This is amazing. I was just interviewed by Fog Creek on their development blog. We talked about how I got into software development, what I currently do, my current setup and my favorite books. I've been a lifetime fan of Fog Creek Software and it just feels so great to be interviewed by them.
I'm making a backup copy of the interview here on catonmat. This is the full interview and has some extra content and pics.
My friends and blog followers offered to translate the interview in several languages. Currently Russian and Chinese translations are available:
- Russian translation
- Chinese translation
- Portuguese translation
- English original
- Want to help with translation in your language? Email me firstname.lastname@example.org!
Here's the full interview.
How did you get into software development?
I’ve been playing with computers since around the age of 6 when I first got access to a 386 or 486 computer at mom’s work. The first time I sat at a computer I was completely hooked. From then on I was dreaming every day to have my own computer. It took me a while to get a computer and until I did I tried to get access anywhere I could. I made a ton of friends who were interested in computers and used their computers. I even pretended to be a student at several universities while being just a kid to gain access to the Internet!
I actually got a laptop first. I had a friend called Zombie and he was this amazing sysadmin. Somehow he had a spare laptop and he gave it to me for free. I still have it. The IBM Butterfly laptop (ThinkPad 701CS). It had 8 MB of RAM, 800MB disk, and I dual booted Windows 95 and OpenBSD on it. I later upgraded it to 40MB of RAM. I just tried booting it but it no longer works. It also had a thinnet PCMCIA network adapter card and my first home network was 10Mbit/s thinnet. For those of you who haven’t heard of thinnet, it’s Ethernet over coaxial cable, aka 10BASE2.
I finally got my own computer much later though at the age of 15. It was a killer machine running a 400Mhz Celeron with 256MB of RAM, 8GB hard drive, a 3D Blaster Banshee 16MB video card, and a 17” 75Hz 1024x768 CRT screen. The computer was running Windows 98 that just had come out.
What language did you start out with?
Self taught, or learned at school?
I’m 100% self taught. By the time I finished high school I already knew so much about computers that I could’ve taught practical courses at universities. I didn’t know much about the theory of computation though. I learned the theory much later. I realized that I’d be wasting time if I studied computer science so instead I went to study physics and it was an awesome choice. I learned so much about nature and also a lot of math that I was later able to use to learn the analysis of algorithms and to understand advanced computer science topics.
Tell us a little about your current role (and/or personal projects). What do you do and what does a typical day involve?
My typical day involves writing a lot of code, managing servers, working with my customers and my employees. I love what I do and I currently can’t imagine myself doing anything else than running a software company. I was a huge Paul Graham fan and his essays encouraged me to start a startup. A while ago I wrote a blog post about how I started Browserling and raised money for it.
Catonmat is one of my personal projects. About 10 years ago I had this big dream to create a really popular programming blog. I was reading Coding Horror and Joel on Software and I wanted my own programming blog as well. So in 2005 I bought the catonmat.net domain and soon started blogging. I simply started writing about all things computing. People liked my articles and my blog quickly gained popularity. Right now I’ve over 17,000 subscribers and I get about 100,000 unique visitors a month.
In 2011 my articles were exploding in popularity, getting millions of views, so I thought it would be interesting to convert some of my most popular articles into books. One day I just opened book.tex, copied articles to the file, edited and converted them to LaTeX, integrated PayPal payments and published the book on my blog. Sometimes opening a text editor is all it takes to create a new product. So far I’ve published books about Awk, Sed and Perl. It’s been a success and I’ve sold thousands of copies of my books. Take a look at my books.
What are you currently working on (or other interesting recent project), what challenges has it thrown up and how did you overcome them?
I’m currently 100% focused on growing the business. I don’t do any side projects and have stopped writing books as that would shift my focus away from the company. The number one rule of building a successful company is having 100% product focus. I’m currently growing revenue and building an international remote team at Browserling. I just hired a great engineer in Ukraine and I’m expanding the company to non-English markets. I’m also solving a lot of technical problems, such as how to efficiently stream browsers running on virtual machines to clients and how to capture hundreds of browser screenshots per second. I also love working with servers and I’m planning to move the server stack from EC2 and Rackspace cloud instances to real hardware. Cloud servers are great when you just start but once you get to a certain point it makes a lot sense to switch to your own hardware. It saves a lot of money and increases performance.
When are you at your happiest whilst coding?
I’m happiest when I’m in the zone and when I get things done. I’m able to get into zone quite often and I can share my secret. I’m up during the night and I sleep all day. Night is the perfect time for being in the zone. Night eliminates all distractions and keeps you alert and focused. Another secret to being in the zone is closing twitter, facebook, skype, gtalk and g+. When you’re in the zone, you don’t want be disturbed by sudden sound alerts or messages.
What is your dev environment? - What's your development setup? hardware, OS/distro, editor, plugins
I’ve a dual Windows/Linux setup. I use Windows 7 on my primary workstation and I ssh into my Linux servers. I just built a brand new workstation last month. I got an Intel i7 4790K and overclocked it to 4.7Ghz. I love to overclock computers. You can get so much free computing power by doing so. This new CPU has the base frequency is 4Ghz, but I’m running it at 4.7Ghz, which is 17.5% of free computing power! I actually want to lap this CPU and heatsink and get it running at 5Ghz. I wrote a blog post earlier this month about how I built the computer. The blog post is called My New Workstation for the Next Two Years.
Then I’ve a Linux firewall server, a Linux file server and a Linux development server. I mount the Linux file server on Windows over samba, and it runs a bunch of drives in RAID6, which allows for two drive failures. All these Linux servers run Slackware. I love the simplicity of Slackware. I go with minimalistic installs and then add only the packages that I need. So for example the firewall doesn’t have much more than bash, vim and iptables. The file server has bash, vim, cryptsetup and samba. And the development server has everything I need for development.
I cycle computers every few years. I get a more powerful workstation and move the old workstation as a server.
I use vim on Windows and Linux, and gvim and Visual Studio on Windows. I can’t imagine doing Windows application programming in an environment without IntelliSense. I’ve a highly customized vim and I use two dozen plugins, such as:
- surround.vim (quickly edit surrounding text)
- repeat.vim (repeat surround commands)
- matchit.vim (extend what % key matches)
- snipmate.vim (code snippets)
- nerd_tree.vim (explore filesystem from vim)
- a.vim (alternate C and H files)
- ragtag.vim (mappings for editing HTML)
- tabular.vim (aligning text)
- bufexplorer.vim (working with buffers)
- python.vim (better python support)
- exchange.vim (exchange text quickly)
- abolish.vim (substitute words)
- speeddating.vim (increment dates)
And many others. You can find and download these plugins at the scripts section of Vim homepage. I started an article series called Vim Plugins You Should Know About, where I teach you how to use these plugins. Take a look, if you want to customize your vim and be much quicker.
What software tools do you use and couldn’t live without?
There are so many tools that I couldn’t live without. On my Windows computer, I couldn’t live without:
- Total Commander (file manager)
- Visual Studio (can’t beat IntelliSense)
- SQLyog (GUI manager for MySQL databases)
- SQLiteSpy (GUI manager for SQLite databases)
- pgAdmin (GUI manager for Postrgres databases)
- WinSCP and SecureFX (secure ftp clients)
- Putty and SecureCRT (ssh clients)
- KeePass (password manager)
- ClipX (clipboard manager)
- Launchy (program launcher)
- Locate32 (file indexer)
- allSnap (window manager)
- AutoHotkeys (automate tasks and programs)
- Virtual CloneDrive (mount disk images)
- IsoBuster (extract disk images)
- ImgBurn (image burner)
- Enounce MySpeed (speedup or slow down videos)
- Hex Workshop (hex editor)
- VMWare Workstation (virtual machines)
- Cygwin (unix tools)
- UltraMon (multi-screen support)
- Beyond Compare (diffing tool)
- Tclock2 (better clock)
- Fineprint (printer proxy)
- SumatraPDF (better PDF viewer)
- AviSynth (edit videos programmatically)
- ffmpeg (convert videos)
- VirtualDub (convert and edit videos)
- WinDirStat (disk space visualization)
- clink (better cmd.exe)
- IDA Pro (debugging)
- Sysinternals tools
I once wrote about all these programs on my blog in an article called Must Have Windows Programs.
On Linux, I couldn’t live without:
- samba (mounting Linux on Windows)
- tmux and screen (persistent shell sessions)
- all the standard UNIX utilities (awk, sed, grep, head, tail, uniq, sort, etc.)
- perl (rapid prototyping, quick hacks, one-liners)
- iptables and nftables (firewalling)
- htop (better top)
- mtr (better traceroute)
- multitail (tail multiple files in multiple windows)
- nc (netcat, TCP/IP swiss army knife)
- iftop (bandwidth monitor)
- ack (better grep)
- ipcalc (network address calculator)
- pv (pipe viewer - UNIX pipe progress bar)
- rsync (backups)
- ncdu (disk space visualization)
- curl (http client)
- nmap (network scanner)
- tcpdump and wireshark (for network debugging)
- sysdig (strace + lsof + tcpdump combined)
- youtube-dl (downloading all online videos)
And many more tools.
Do you code sitting, standing? listening to music? any coding quirks?
I code sitting. I’ve never tried coding standing or walking. That just seems too weird. When I’m in the zone, I listen to Vocal Trance stream from di.fm. But only if I’m in the zone. Otherwise music is too distracting. I couldn’t code without a Microsoft Natural keyboard. I’ve had mine for over 10 years. It still works well but is showing age.
I take a lot of notes when trying to figure something out. As soon as I’ve a more complicated problem, I try to break it up in smaller sub tasks that can be easily solved. Then I create a todo list for the tasks, get them done one by one, and cross them out. Actually I’ve several todo lists of long term tasks (next 1-2 years), mid (next few months) and short term tasks that I’m doing right now.
I also keep a printed copy of Google Calendar for the next few months and the next year somewhere near me. I use the yearly calendar to keep track of milestones and projections and I use the monthly calendars to keep track of the most important things I need to done soon.
Pen and paper are programmer’s best friends.
What are your favorite books/articles about coding or development practices?
I’m crazy about computer books and science books in general. Every few months I spend a day researching the latest literature and buying the most interesting titles. I could probably go on forever about my favorite books. I’ve so many. I’ll list my top 5 coding, development and computer books.
A must read for anyone interested in computers. This excellent book contains 66 short essays on the most important and interesting computing topics, such as compression, Turing machines, formal grammars, non computable functions, and neural networks. The writing style of this book is casual and it contains almost no math. It’s my favorite book of all time.
This book teaches how to think about multithreaded execution and how to solve synchronization problems. I highly recommend it, especially if you’re self taught. It leads the reader step by step through a series of classical and not so classical synchronization problems. It’s great fun to work through the problems and I’ve been recommending it to everyone ever since I found it.
Classic programming books. Jon Bentley knows how to write clearly and enthusiastically about algorithms. These books are timeless and they teach you how to reason about problems, break them apart, and efficiently implement the solutions. You’ll pass the Google interview if you read these two books.
The Little Schemer teaches you a little bit of LISP in the most fun style ever. The book is a dialogue between you and the authors about hundreds of tiny Scheme programs and it teaches you to think recursively. This book will make you think and will stretch your mind a little. It’s one of the most fun programming books ever written.
The Elements of Style is not exactly a development or coding book but a book on writing. To be a great programmer you need to communicate clearly and writing skills are essential. It’s 100 pages long and you can read it in one evening.
The Elements of Programming Style is a classic programming book by Kernighan and the form of this book is strongly influenced by The Elements of Style. It’s an old book but mostly everything it teaches still applies today. It contains 70 rules of programming such as:
- Write clearly – don’t be too clever.
- Say what you mean simply and directly.
- Choose a data representation that makes the program simple.
- Let the data structure the program.
And I just got started. I could easily do my top 100 favorite books. Message me if you need book advice or want to talk books with me!
As a bonus, I recommend my own book Perl One-Liners, published by No Starch Press. Being fast in the command line will save you thousands of hours throughout your career. Once you master one-liners, you’ll be solving quick one-time tasks in seconds. I’ve seen programmers spend hours writing programs for tasks that can be done in 20 seconds with a one-liner. Don’t be that programmer.
What technologies are you currently trying out or want an excuse to try?
There is so much technology that I want to try that I don’t even know where to start.
I’m a big Visual Studio fan so I just downloaded Visual Studio 2015 Preview and have been playing with it. I also just installed Windows 10 Preview on a virtual machine. Since I do so much cross-browser testing, I’m really looking forward to see what Microsoft’s new browser called Spartan will offer. I’ll be adding this browser to Browserling as soon as it comes out.
Google just open sourced Kythe a few days ago that should be a way better code indexer and explorer than anything else out there. I heard about it last year already from a Googler friend and I was been impatiently waiting for it. I’ll be trying it on Linux Kernel’s source this weekend.
If I had more time, I’d combine Oculus Rift with a motion platform to build a true virtual reality rig. I’ve tried Oculus Rift alone and it felt unreal but with a motion platform it would feel even closer to reality. And then I’d do a Kickstarter and mass produce this for everyone.
When not coding, what do you like to do?
I like to keep myself in shape. I do track and field. I’ve found that sprint workouts are better than coffee. On the days when I do 10x60m sprints I get energized for 10-12 hours and I code like a beast all night long. I also like to compete in track meets. 400m sprint and 800m race are my favorite distances.