Why I Don’t Work At Night

by Justin Litchfield

Software Developer by Day

There’s a popular news story going around – it just got introduced to me through the third distinct medium – so I finally read it. It is, “Why Programmers Work At Night”. I haven’t read through the responses, though apparently the author has written a book since publishing this a WEEK ago based on the responses.

Instead, I offer my thoughts here:

1. Avoiding distractions

I 100% agree that distractions are CRIPPLING to productivity. Rather than sit around the office all day then have a chance to work distraction-free at night, though, I’d rather take a page from Tim Ferris and get out of the office altogether. That’s the hugest step right there. Step 2 comes trivially after that – just turn your shit off. Now you can get the 3-4 hours of productivity that would be AMAZING to accomplish in an office setting done before lunch (or even breakfast). And then maybe go to the beach.

Remote working arrangements are wonderful because you can choose your setting. Do you concentrate better at a coffeeshop? Go work there. Do you like to look at nature while you work? It’s your world. Couple this freedom with a chance to work with your team a couple of times a week, and you have the excellent work arrangement that we have at CabForward. I really enjoy working around, getting to know, and sharing experiences with my colleagues – it helps us come together more easily when we need to solve a difficult problem, but really, working remotely is a huge productivity boost.

In fact, I’m writing this while sitting just a couple blocks off the beach in Playa Del Carmen, Mexico, where I’ve been working for almost a month, and I’ve found it remarkable how a lot of variety in daily life can make me more creative when solving probelms during web application construction. Being part of a wide team is something that has some technical and logistical challenges, that I’ll talk more about our solutions to in future posts, but it’s immensely rewarding.

2. Object-oriented Programming!

This relates to the allusion that all web application programmers work on the biggest, most complicated, mental-web-nightmare things in the known history of the universe. We do solve complex problems, but object-oriented programming lets us break these programs (and constructs) into small units. Can you imagine trying to assemble a skyscraper in one step? Would you have every single person involved get perfectly ready and everyone do their one precise task *NOW*? Nope, it makes no sense. Having huge structures that need to be complete in their entirety to function make no sense. They are fragile. The internet, on the other hand, is a large *set* of networks of various sizes, sophistication, and complexity that can tolerate failures ALL OVER THE PLACE because such a system is the only thing that can work. The internet, being fault-tolerant because it’s made of small chunks, is robust.

Similarly, the software you write (especially if you have the luxury of using modern languages – standing on the shoulders of giants) should be made up of small chunks of behavior operating at a similar level of abstraction. It makes my brain hurt to consider loading up the entire “map” of the software that runs Pokertainment, but I don’t have to. If I need to tweak the schedule builder module, I just need to load that segment up in my mind. That makes me a little more robust against distractions.

You can build wonderfully object-oriented programs in Ruby on Rails. It’s pretty easy – and most developers when they’re just starting out do this – to ‘lean’ a lot on the framework and not think about the tiny things that your program does, but the ease in which you can build small objects that can do their one thing and do it well is fantastic. It’s something that I love doing and teaching to junior devs.

3. TEST!

Similarly, testing your code lets you offload a lot of the baggage that comes with any given piece of it. You can put the behavior-checking into your “exobrain” (the tests) and then just be creative and try things. Your failing test lets you know exactly the tiny tiny detail you are iterating on, and you can use all your faculties to try to come up with a brilliant way to solve this tiny problem. Again, it makes you more interruption-robust, AND you make better code.

4. If you don’t want to be building, STOP

Do something better. I know that when I’m on, I’m ON and I can produce prodigiously. If I’m dragging my feet, I write garbage, I check twitter, I don’t test well, etc. So I do something else, and let anything that’s bothering me work in the background until I’m ‘inspired’ again. I work best when I’m inspired, not when I’m tired.

the beach

That’s why it’s so great working at CabForward – I can minimize distractions because we work remotely, we build software in the Object-Oriented Ruby-on-Rails, and we pride ourselves in testing. It makes for easier development and a happy side effect is that your software is much more rugged.