Lots of our people have lots of opinions. Here are just a few of them
ThoughtWorks embraces the individuality of the people in the organization and hence the opinions expressed in the blogs may contradict each other and also may not represent the opinions of ThoughtWorks.
ERB is a most commonly used for rendering HTML in Rails applications, but it can also easily be used to render any text document.
Binding is a rather strange interface to be passing into a method call - since I was rendering templates from within a rake task I really just wanted to pass a hash of values. It turns out ERB recently introduced this functionality in Ruby 2.5, but since I’m not on the latest version I had…
Related to (or a sub-part/refinement of) “contract testing”, that I periodically highlight:
Wire mocks are officially “service virtualization” (SV) of course. The TCK idea is a specific usage of them, originally to allow alternate implementations. Vendors making services (on the internet or installable on-prem or cloud) should make a TCK, too. They may want to include a “no reverse-engineering” clause for licensees of the TCK so they don’t make it too easy for their competitors. Lawsuits of note:
Sometimes you have multiple versions of a gem installed.
But when I invoke the gem executable the latest version is always used.
So how do you specify the version of the gem to use? You use _underscores_.
This doesn’t seem to be documented anywhere, but luckily we have StackOverflow.
Here’s the question, which I found in a thread on Hacker News.
Explain this behavior:
['1','1','1'].map(parseInt) returns [1, NaN, 1]
['1','1','1'].map(n => parseInt(n)) returns [1, 1, 1]
Obviously this is a completely ridiculous question and I would seriously question why anyone would ask this during an interview. But that doesn’t mean we can’t have fun trying to find the answer.
I was stumped at first, especially when I tried playing with the input:
Ok, so let’s try to understand what…
I colleague recently introduced me to tldr-pages, a community-driven and greatly simplified collection of man pages.
While man pages can be very useful I often just need a simple example of how to use a unix tool. For example, for some reason I always get confused by the syntax for
find since it’s so different to
grep (which I use all the time).
Here is the first explained option in
The find utility recursively descends the directory tree for each path listed, evaluating an expression (composed of the ‘‘primaries’’ and ‘‘operands’’ listed below) in terms of…