Some browsers define window.event, which will return a copy of the "current" event. However, this is not defined by the...
This is a guide on how to effectively use Git when working on a feature branch. It is designed to...
Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...
To safely transport an arbitrary string within a URL, you need to percent-encode characters that have a particular meaning...
If the project team consists of at least 2 members, do a daily standup. It should not take much longer...
We organize our daily work with issues in our Linear workspace. Issue format A good issue needs to be precise...
When working on a bigger project, the easiest way to improve your work relation with a client or an external...
When starting a project we always make a good estimate of all known requirements, and plan budgets and available developers...
Ruby has Enumerable.find(&block), which returns the first item in the collection for which the block evaluates to true.
On Ruby 1.9+, standard ruby character classes like \w, \d will only match 7-Bit ASCII characters: "foo" =~ /\w+/ # matches...
tig is a command line explorer for Git that is just awesome. Install via apt-get or brew. Handy commands...
There is no such thing as a "default order" of rows in database tables. For instance, when you paginate a...
All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and...
FactoryBot.define do factory :parent do transient do child_name nil child_allowed_to_drive false end child do association(:child...
Several Rails migration methods accept index: true as an option to create an index. In some cases (like #add_column...
It is a common misunderstanding that all [op]=-operators work the same way, but actually they don't. ||= and &&=
In RSpec you can tag examples or example groups with any tags you like simply by saying describe ReportCreator, slow...
# Given the following models class Image < ActiveRecord::Base has_many :album_images has_many :albums, through: :album_images
When ending a Selenium test Capybara resets the browser state by closing the tab, clearing cookies, localStorage, etc.
You know that ActiveRecord caches associations so they are not loaded twice for the same object. You also know that...
Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...
RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...
Please don't simply copy line number links from Github. The URL usually contains a branch name like master which...
Be careful when using buttons without a type attribute, since browsers will consider them the default submit button of a...