Rails ships with a very powerful tool which is ActiveRecord. It provides access to database, maps records, handles relations, keeps business logic and more. Isn't it a bit too much? Let's try to refactor it!
I've said before that I think that all tests can run at 100 assertions (or expects) per second or faster. But most suites are considerably slower than that?
Why? It's tempting to say "the database", but actually, that's not it. It's factories.
As programmers we often have to mentally run code. To imagine how a program will behave given certain inputs. This is hard enough for experienced developers. But for juniors? It can seem impossible.
Some things you do as a developer can work for you for years, then turn around and bite you when you were least expecting. These are the things that you wish another developer had told you early in your career so you never had to make the mistakes. This post is about one of those things and if you’re reading this, consider it me telling you.
For any two programmers, no matter how good he or she is, if we get them to sit together, the value of their work will be greater than if they sit apart.