Regularly Read Your Source Code

November 8, 2013

This morning I did my best to get into work as early as possible(6:13 am) so that I would have enough time to finish Chapter 6 of the Rails Tutorial. Unfortunately upgrading to Mavericks that I did several days ago mest something up with the XCode command line tools and I had to get that fixed before I could use my ‘rails’ command in the console. Not sure why I didn’t have a problem with this until this morning, but I did get it resolved! It just took until 7:20 am until I could actualy start going through Chapter 6.

I was only able to get to Section 6.2.2. but I did learn about setting up a test database and creating a user model. I also learned that with Rails 4 you should use find_by with a hash of what you want to find inside like, find_by(:email, 'blake@example.com') rather than find_by_email.


Last night on my way home from work I listened to Farther, further, faster. In this episode dhh talks about how he regularly reads all of the basecamnp source code. They don’t have very string code reviews at 37signals and reading the source code is a good way for him to get familiar with what everybody has worked on and be able to offer any suggestions for improvment. But I liked the fact that he isn’t a dictator on what goes into production and that everything doesn’t has to funnel through him.

I want to be better about reading all the source code that I work on at my job. I’ve been here 6 months and I still haven’t had a chance to read through all of it yet. Which can be frustrating at times because I often have to fix bugs in areas of code that I have never seen before or even knew existed. I also think readying through the source code solves the lack of documentation problem we have. I’m also hesitent to start writing documentation beyond some simple readme files because I fear they are just going to get out of date very quickly, but regularly reading through the source code never gets out dated.