Object#tap And How To Use It
The #tap method was introduced in Ruby 1.9, back in 2007. To this day, it raises questions like:
Articles for Ruby developers.
The #tap method was introduced in Ruby 1.9, back in 2007. To this day, it raises questions like:
A friend told me a tale about a technical job interview from years ago. The feedback he received from the interviewer was that he had used private incorrectly. The code was something like this:
Consider a hypothetical class that filters out unsafe HTML elements:
Let’s consider two software development workflows. Their outcomes differ in many ways, but in this article I just want to focus on code quality.
Today I am announcing ValueSemantics — a gem for making value classes. This is something that I’ve been using in my personal projects for a while, and I think it’s now ready for public use as of v3.0.
This article is a short study in web application design. We will be comparing Rails to Django, using a simple web form as an example.
Dependency injection (DI) is a somewhat contentious topic in the Ruby community. Some argue that DI containers are unnecessary complexity cargo-culted from Java. Some argue that DI is the path to cleaner, simpler, more-testable code.
Blocks of code in blog posts and articles often contain errors. I see it frequently, in other people’s writing and my own. Code examples are usually not tested, or even run through a compiler/interpreter, so errors are not surprising.
Consider the following test.