DEV Community

Discussion on: What's One Thing You'd Tell Your Younger (Dev) Self?

Collapse
 
kquirapas profile image
Kristian Quirapas

I would definitely keep this with me. I suffer from too-lazy-to-test-personal-projects disease and this really motivated me to write tests.

Also a great write up, Jeremy. I'm wondering what you have in mind when it comes to writing maintainable and scalable code.

Collapse
 
jeremyf profile image
Jeremy Friesen

One of my guiding principles is "If it's hard to test, it's going to be hard to maintain and scale." So, make it easy to test.

This influences my low level decisions (make methods easy to test by using dependency injection). And also my higher level decisions (in Rails testing controllers is painful, so minimize the amount of tests you need. Which quickly becomes writing objects for actions.)

I wrote most of github.com/ndlib/sipity, and it's been the most maintainable codebase I've ever wrote. There are a few bad decisions in there based on requirements that later proved to not be necessary.