One of the cool things about working at PMG is that if you want to start a club, you can. The Developers Pod in the office, envious of the SEO team, did just that and we started our own Developers Book Club! Our first book is Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce. With our first three chapters read, and our first official DBC meeting, here are just a few of the things I’ve taken from it so far:
- We’re on the right track
We’ve only read the introduction chapters so far, however the book gives us best practices for, as the title suggests, writing object-oriented software. It was comforting as I read through it thinking that at PMG our dev team follows a lot of these methods, or adaptions of them, already.
- Never stop ‘growing’ your code – refactor, refactor, refactor!
Whenever I look over my old code I can’t help but wonder what I was thinking when I wrote it, I probably thought it was fantastic at the time. Continuously cleaning up old code, refactoring it to be better written, simpler, and easier to read and understand is a fundamental part of programming. This also makes it easier to test, change, and add to in the future. One of my favorite points from chapter two was about making code easy in all aspects. For example, if there is a complex or confusing section of code, pull it into its own method, with a sensibly descriptive name of what it actually does, future you will thank you!
- Testing is important, obviously
Testing can be a pain, tedious, or seem less important than other work you have going on. This book is test focused, so it really enforces the importance of running tests. For example, unit tests allow you to test small parts of an application, and you will also need an end-to-end, or system, test that allows you to test that the overall application is behaving as expected. Including both these types of tests, along with any other tests appropriate for the application, is the smart thing to do when writing tests.
- Finally, it’s always important to have some sort of a plan
I’ve never participated in a book club before, so I wasn’t sure what we were meant to talk about, other than general book conversation. Next time the team will come in more prepared with things we liked, learnt, disliked, or were confused by from the next two chapters.
I would definitely recommend this book. Whether you’re a new or seasoned programmer, and regardless of your preferred language, it provides a great guide for best practices. I can’t wait to continue our weekly Book Club meetings and to get further into this book!
– Emily Fox