This rule sounds simple in theory, but you will discover difficulties when applying it strictly. Let’s look at the pros and cons of short methods, and when it’s OK to break the rule.
When we learn programming languages and techniques we go through certain phases: Curiosity, Admiration, Overdosage, Rejection, Approval etc. We learn to enjoy them, we try too much of it and learn the consequences.
The reject! method in Ruby selectively removes elements from an array in-place, based on a provided predicate (in the form of a block). Between Ruby 1.9.3 and Ruby 2.3, reject! was accidentally quadratic.
Before tuning your factory usage, consider measuring which factories are adding the most time to your test runs. You may discover the time spent in factories is fine and decide to speed up another area of your suite.
Don't get me wrong, I think the asset pipeline is great, it allows you to get a web app up and running in no time with zero configuration. However, when you want to make the move away from coffeescript to using pure ES6 and other JS libraries such as React, things start to get a little more difficult.
Raising technical debt is very natural to all programmers. We have to admit it. It’s a part of the development process. Some people call it inevitable evil of coding. Some are obsessed to resist it. Some try to convince their bosses to deal with it. Others do not care.
I struggled for hours scrolling through tutorials, watching videos, and banging my head on the desk trying to build an unbeatable Tic Tac Toe game with a reliable Artificial Intelligence.
When you work as a professional programmer, you almost always know somebody (or are somebody) who’s going through one of the most common development horror stories in the book.