Late Night Coding
As some of you probably know, I’ve been programming computers for the largest part of my life. When I was young I had a lot of time in my hands to experiment and goof around with languages, APIs, platforms etc. But it wasn’t so much time, but mostly passion that allowed (drove?) me to spend most of my free time in front of my machine: the passion to learn and the passion to get stuff working. Over the years, computing was demystified, from the bare metal, or rather silicon, to software engineering all the way to high-level APIs, academic languages and ‘arty-farty’ logic; the computer’s charms largely disappeared, the passion waned and what’s left is that feeling of habit, longlasting love for the machine, nostalgia and a sense of belonging. That certainly wasn’t the case ten or fifteen years ago.
Still, there’s something magical about staying up all night solving problems, in the absolute darkness and silence (well, at least when you’re not using a Mac tower), with no distractions or stimuli. Back in the day I’d frequently stay up all night trying to figure out how something worked, getting comfortable with one language or the other, trying to solve a interesting problem. My hardware was very modest up until I was about sixteen, but my passion unsurpassed. I clearly remember several occasions when I practically spent the whole weekend in front of the computer trying to solve some problem in Pascal or C, or later x86 Assembly. Later, at university, practically all of my — almost nonexistent — studying for exams, assignments and projects, endless hours of coding in C++ and Java, Haskell and Prolog happened in the early hours and when I graduated I continued working at night, be it for my Ph.D or my other professional engagements. Sadly, it’s not very often that I get to do this anymore. Not because I don’t have the time; but because I don’t have the will. It is somewhat regrettable, in a sense, as my experience and knowledge would probably allow me to do so much more with my programming time now than I did back then.
In the past few days I’ve been doing all-nighters as I need to finish the final pieces of my Ph.D software, an analysis and visualisation tool. The design has been stable for a long time, most of the implementation details too, but I just never got around to finishing it. In some ways it’s a bit frustrating writing software that you know no one is ever going to see or use. But it has to be done, so earlier this week I decided to take as much time as I needed to finish it and get on with finishing my thesis right after that. Unfortunately, I ran into some stupid problems with Apple’s Core Data framework and NSController classes (yep, next time I am probably going to investigate and pay attention to the people that claim that NSTreeController or some other Apple API sucks. You probably should too.) which took me back several days in rewrites and getting around them. The get-it-working stubborness was back and there are few things better than the satisfaction you get when you get the damn thing to work, watch the sun rise and go to bed (or your dayjob :) )
So tonight, as a tribute to my late night coding sessions I made a short film that is more or less representative of the dark, strenuous code-debug-execute all-night sessions I’ve been going through for almost two decades now. I love working at night, and I think many hackers/geeks/programmers/whatever-you-want-to-call-us do too. This is for all of you.
I’m not a very experienced cinematographer or video editor, so I apologise if the result is not up to your average pro level. Very obviously there’s scene reuse and the presented code is only there for demonstration purposes. I’ve only shot and edited stuff once or twice before so be gentle :)


Nicely done video, cosmix! Congratz!
p.s. Your next can be entitled “Programming in the Dark” as the “Alone in the Dark” thing :P
Thank you stelaboura.
It’s more or less the first thing I’m shooting ever since I was 12, so it — obviously — could have been better. That said, I don’t think I’ll dedicate any more ‘film’ to late night programming :)
Hello Cosmix,
Very nice post! I hope for you that your program will be ready soon enough! I enjoy the reading of this post because although I had a very different childhood and I first discovered computers in 2001, I got literally lost inside the Linux world, not much programming, mostly learning command line, learning about networking and dealing with computer security a bit.
Long, infinite I may say, IRC sessions with groups and “friends” that no longer exist and of course I wouldn’t know where to reach them.
However, I regret not being involved with programming back then. Because now I’m getting really out of time and when I have hours available I’m usually tired. You can’t learn programming (error/trial) while being sleepless. These days the computer for me is mostly a game machine. I always have a UNIX machine running somewhere, (OpenBSD now, linux before) that acts as a torrents server, firewall / router etc. MacOSX is the Desktop of choice and I’d love to be able to write cocoa applications just for fun one day.
However I regret for spending so much time at the computer back at the university and not studying FOR the university. Everything is about dealing properly with responsibilities. Even today I struggle to do it right. Today, things are much more difficult and pressure for result is higher.
I’m happy for you that you still have time, I understand perfectly that you don’t spend your time on the computer anymore like you did before, must of the people I know make a curve, you seem to reached the pick. The experience you gain never gets lost, so it will pay back, if it doesn’t pay back already.
I can’t even remember how many times I fell asleep in front of a screen running an irssi session and a bash shell with launched commands. This was my desktop, a fluxbox window manager running on Gentoo GNU/Linux with 2 terminals always open, transparencies, gktrellm (transparent too), rss news on the desktop, few icons… I can’t calculate the time that I spend configuring that thing. I damn myself for having lost the screenshots, it was really “elite”.
A guy once told me that Linux doesn’t cost if your time doesn’t cost. These days I work with “time”. I’m getting for the National Service now, afterwards I’ll be about to run a small-medium size company with dozens of responsibilities in a job where your time is money. The more you work, the more you get. There’s no other way. So I think that in about 12 months things will be even worst and all-nighters will be lost forever. I don’t feel sad though, it was a pleasant experience that most people (like my parents) will never understand.
I enjoy the reading, bye
:)
This brings back memories. Most of my coding was done during uni years, but I still sorely miss the time when it was just me, an editing window and a shell.
Now it’s more like alt-tab photoshop, alt-tab dreamweaver, scribble scribble scribble, alt-tab firefox, deep breath, alt-tab ie, cursing, alt-tab dreamweaver, rinse and repeat. Ah, the joys of being a web designer.
By the way, doesn’t anyone use inline starting curly brackets anymore?
I do, depending on the style. By the way, why on earth would you want to use Dreamweaver or any WYSIWYG editor for web design anyway? :)
Great post, lovely video. Really enjoyed it.
Due to the lack of a lightweight Windows editor with decent autocomplete features for both HTML and CSS, FTP support and some nifty braces balancing and comments applying thingies that only Dreamweaver has, in my knowledge.
I never use the WYSIWYG aspect of it anyway. I just code away in its code window. :)
@Sugar: I see. Well you do have a point. Although I always found it cluttered and heavy — and my hardware was, typically, top notch so that wasn’t the problem. Well, I guess I may be getting old, but TextMate+Transmit is good enough for me, thank you very much. :D
@mark: Thanks!
It is cluttered and heavy, indeed. But in lack of a better alternative and since I work on a PC in work (oh noes), I must suffer.
At least until something like Coda comes out for Windows.
“By the way, why on earth would you want to use Dreamweaver or any WYSIWYG editor for web design anyway? :)”
My point exactly!
Nice post, loved the video.
Nice video! I’m sure a lot of us feel that way. Especially late at night, when the brain is tired. So many times we deal for hours with a problem that we can solve in minutes the next day. I paid an homage to your video on this blog post: http://fernandoacorreia.wordpress.com/2008/08/02/returning-dtos-from-pyamf/