I was just on vacation for four weeks and I spent the entire time writing code.
Well okay, I did also spend some time playing games because Steam summer sale and all that (I finished Bayonetta).. but that’s beside the point :)
My job is to write code.
Most people stop doing what they do at work when they go on vacation.
During some days I probably spent more time writing code or thinking about it than I would do at work.
And not only that, I was using Haskell. A friend wanted to help me in the project we were working on and I told him I was using Haskell… Behind his plain “Why?” I’m sure he thought I was crazy :)
But the thing is… I usually don’t have much interest to work on side projects these days. Most of my creativity seems to go into work – after you deal the whole week with all the issues and bugs and things at the office, it can be difficult to get up and do something that requires a lot of thinking.
So why do I jump to a random side project as soon as I’m on vacation… and in some crazy language like Haskell to boot? Why not use something more sensible and relevant to what I do anyway like Redux or TypeScript, neither of which I’ve never used?
Yes – I’ve never used Redux… but when you’ve seen a hundred JS libs, you’ve seen them all. Yes… I’ve never used TypeScript… but when you’ve seen a dozen Object-Oriented languages, you’ve seen them all.
With Haskell… well, let’s just say I went on the #haskell IRC channel on Freenode to ask questions a lot :)
If you’ve worked with programming for a while – or even just used computers – you can probably remember a time when things were new and exciting. Oh I just printed stuff on the screen! YES I’M THE BEST AT PRINTING TO THE SCREEN!… or if you play games, you might remember the early days fondly… I remember when the first 3D accelerated games were released. Boy did they look amazing! These days it’s just small incremental upgrades where you can see Shooter McFiresguns’ facial hair and angry expression in slightly more detail than last year.
Programming also has similar aspects to it: For example learning new ways to write code, or finally understanding something concept well. These are some of the most fun aspects about programming, but once you’ve been doing it for a while, it just stops happening because you kind of already know this stuff.
But then I learned Haskell, and it just keeps giving more cool stuff to learn. It’s like going back 5 years when there still was new and interesting things in programming. Yes, it might be a bit crazy… Yes, it’s full of weirdo math vocabulary (monads are just the tip of the iceberg) that I never learned… But it’s surprisingly practical, and much of it can help you write better software in other languages too.
So what’s the point of this somewhat rambley story?
To borrow some gaming lingo, you don’t git gud by just doing the same things over and over again. While repetition helps, there comes a point where it’s no longer effective.
There’s an interesting paragraph on Wikipedia regarding Wayne Gretzky, who is widely thought to be one of the best ice hockey players ever. Essentially it states that much of his skill came from studying every aspect of playing hockey, instead of some creative genius that many thought it was.
Similarly, while Albert Einstein is perhaps most famous for his theory of relativity, it’s nowhere near the only aspect of physics he studied.
We can easily draw a parallel to programming here. You don’t get really good at programming by just coasting along in your comfort zone, using your favorite toolset all the time, and doing what everyone else is doing.
As an example, personally I went and kept doing something new and different. I don’t mean this as in nobody had done it before, but as something that I personally hadn’t done before – sure, I could have written yet another todomvc example app with a different library, but where’s the challenge in that?
I admit I didn’t really plan on doing that. It just happened because I kept looking for new things that were interesting and different from what I did before.
Because I kept looking for new and exciting things to learn, I was exposed to much more information, and many more techniques, than, say, just remaining a PHP programmer would have done.
To give you a few examples:
- C taught me pointers and references. I’ve noticed many JS programmers have problems understanding things like how references work, and how values and references differ. You basically have to know how this stuff works if you use C
- C# taught me about debuggers. The built in debugging tools in the Visual C# IDE are basically why I’m good at using the debuggers in browsers. It also gave me a rudimentary understanding of how GPU rendering works after playing with DirectX
- Java made me realize I don’t really like dealing with the average Java project
- Haskell made me realize languages with strong typing aren’t all really annoying to use
As a result, I’m a better programmer in the languages which I do end up using daily. This kind of knowledge also allows me to pick and choose a tool that’s best suited for a job – for example, Python has some great web scraping libraries, and Haskell has some great tools for writing parsers.
If you want to be an excellent developer, don’t shy away from trying something new and different. You definitely don’t have to learn a dozen different languages like I did, but it’s worth at least trying something different from time to time :)