This article is part of the article series "My Top 100 Programming, Computer and Science Books."
<- previous article next article ->

Welcome to part two of my favorite 100 programming, computer and science books. If you're just joining, please see part one for introduction. In this part I'll cover a mix of my favorite theoretical and practical books because as Donald Knuth says in his Selected Papers on Computer Science, "The best theory is inspired by practice; The best practice is inspired by theory."


Slide 28 on page 161 from Don Knuth's Selected Papers on Computer Science.

I'm a huge fan both of theory and practice split 20/80. I love to get practical things done and I also like to learn theory behind what I'm doing. My most creative ideas always come from theoretical books. Read many of them and suddenly many ideas click together and form something amazing.

Some readers asked why I only do five books at a time. Very simple - writing a single blog post about 100 books would take me several weeks of effort. Splitting it in tiny parts makes it much easier to get done. Progress feels good and the series is incrementally getting published.

If you're interested in this article series, you can subscribe to rss feed of my blog and follow me on twitter for updates.


My super nerdy bookshelf.

Alright, let's get to this week's books!

#6 Don Knuth's Selected Papers on Computer Science


Selected Papers on Computer Science.

This is one of the most accessible of Knuth's books. I enjoyed it a lot. It's written for people who aren't necessarily specialists in the subject. It's for educated people in all fields and you don't need to know too much math to read through this book.

Knuth says the following about this book, "If any of my work deserves to be remembered, it is now in the form that I most wish people to remember it.". Knuth discusses topics such as coping with finiteness, usefulness of toy problems, theory vs practice, history of algorithms, Von Neumann's first computer program, and many others.

This is the book to buy if you want to get familiar with Knuth's work in an accessible way and learn something new without much effort.

I just remembered I had written a blog post many years ago called Donald Knuth's First Computer based on a chapter in this book. I even scanned a picture from the book of young Donald Knuth at age of 20 working on his favorite IBM 650 computer in 1958:

Young Donald Knuth from 1958 at an IBM 650 Computer
Young Donald Knuth, age 20, at his first IBM 650 computer in 1958.

Author: Donald E. Knuth

#7 To Mock a Mockingbird


To Mock a Mockingbird.

One of the most remarkable and fun books I've ever worked through. This book teaches combinatory logic by masking combinators as singing birds. You'll be hearing Turing birds sing and you'll be traveling to Godel's forest. Make sure to be prepared for your journey with a lot of paper and tea as this book will capture you once you start working through the problems. You'll be having so much fun along the way as you discover new birds and your mind will stretch a lot. If you've patience to work through all the chapters, you'll learn about Church encoding and Godel's incompleteness theorem in the end.


THE MASTER FOREST - ONLY THE ELITE ARE ALLOWED TO ENTER.

This book may be very hard to find as it's out of print. I got my copy years ago when it was still in print. There are 10 used books available on Amazon right now. It's also available on Kindle and Nook. If you want a printed copy try try searching Ebay and Powell's. There are a few copies on sale.

Author: Raymond Smullyan

#8 The Seasoned Schemer


The Seasoned Schemer.

The Seasoned Schemer is continuation of The Little Schemer that I listed as my #4 favorite book in the first part of this series. This book is written in the same style as The Little Schemer and it's extremely fun to read. It's a dialogue between you and the authors but unlike The Little Schemer that teaches you to think recursively this book teaches you to think about the nature of computation. You'll learn about closures, continuations and continuation passing style (cps), y-combinator and implement your own Lisp in Lisp at the end.

When I read the book, I collected all the code examples and programming commandments on github: the-seasoned-schemer repository.


A solution to one of the problems in The Seasoned Schemer.

Authors: Daniel P. Friedman and Matthias Felleisen.

#9 Expert C Programming


Expert C Programming.

Back to practical books, this is a classic book on C programming. I learned the language purely by programming and reading code examples without ever reading a single tutorial and this was my first real book on C programming language. This book is for people who already know C well. It presents subtle aspects of the language and reveals the shocking truth that C arrays and pointers are not the same thing. Language quirks are accompanied by interesting stories and suggestions called handy heuristics. It's amusingly written, and the historical anecdotes are very interesting as well.

I heard someone say, "You'll definitely know you're a geek when you find yourself chuckling at all of the hilarious comments in the book. What Peter van der Linden has produced is not so much a book about C programming as it is a dense little slab of hacker culture. It's a snapshot of the days when "the Internet" was almost synonymous with "UNIX account.""

Spot on. This book will increase your geekiness level by 10 points. Go get this book!


A hilarious programming challenge.

Author: Peter van der Linden

#10 Laszlo Lovasz's Combinatorial Problems and Exercises


Combinatorial Problems and Exercises.

This book is probably the most advanced book that I will recommend in the whole series. But it's so good that I just had to recommend it as soon as possible and put it in spot #10. This book is written in problem-hint-solution style. Problems take the first 100 pages, followed by hints and solutions in the next 500 pages. Lovasz starts off with simple problems that anyone can solve and quickly moves to more advanced problems. There is no theory in this book.

Every once in a while when I feel like doing some math I work through a couple of problems. I've found that problem-hint-solution style is perfect for quickly learning new problem solving techniques. If you want to improve your combinatorics skills and get better in graph theory, and you love to solve problems then this is the book to buy.

Funny story - I've heard that the first year PhD students in Hungary (where the author is from) are required to work through all the problems in this book. Those who can't solve the problems don't make it to second year of PhD studies.

This book is also out of print so try scouting ebay and other book stores for it.

Author: Laszlo Lovasz

Until next time!

I hope you liked these five book recommendations. As always, let me know in the comments what your favorite books are, subscribe to my blog, follow me on twitter, and until next time!

When you're in the zone coding away you don't want a slightest disturbance. Any external noise can throw you off. Your phone ringing, a louder car outside or with the new open plan offices, or your coworkers talking in background. You don't want any of these noises interrupt your work flow. You want to stay in the zone for hours and get tons of work done.


My kitty approves Bose QC25 headphones. She says these headphones help her catch more mice.

Noise eliminating and cancelling headphones are a must for staying in the zone and getting things done. I've been trying all kinds of headphones and I think I just found the perfect headphones for programming and concentration - Bose QuietComfort 25 headphones with active noise cancellation. The way they work is they record sound around you, invert the sound waves, and emit the opposite sound, effectively cancelling sound around you.


Bose Quiet Comfort 25.

When I put them on it feels like I'm in a vacuum chamber or something similar. Everything becomes strangely quiet. Nothing emits sound. You get used to this feeling in a few hours. Typing on a keyboard is noiseless. You can barely hear someone talking to you directly behind you. They're also very light and comfortable.

These headphones are not cheap but I love to spend money on high quality equipment that lets me get my work done quicker and more efficiently. I'll be sticking with these headphones for years now.

Unboxing Bose QuietComfort 25 was a pleasure. The box was small and neat, and headphones were packed into a very good looking and compact case.


Neatly packed Bose QC 25 headphones.

Pro tip: These headphones use a single AAA battery for noise cancellation. Make sure you don't waste money on batteries. You'll be changing regular Duracells ever 3 days. Get Eneloop Pro Rechargeable AAAs and Eneloop Pro Charger. Eneloop AAA Pros are at 950mAh and they'll last more than 3 days. Eneloop batteries are currently the most competitive rechargeable batteries on the market.


My other kitty tests Eneloop AAAs and Eneloop Pro Charger.

I'll be modding these headphones and adding a USB power cable so I don't have to use batteries at all. If you're interested in hearing about that, subscribe to my blog or follow me on twitter. Until next time!

This article is part of the article series "My Top 100 Programming, Computer and Science Books."
<- previous article next article ->

I was recently interviewed by Fog Creek and one of the questions was about my favorite programming, coding and development books. I got very excited by this question as I'm a huge book nerd. And by a huge book nerd I mean I'm crazy about science, computer and programming books. Every few months I spend a day or two 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 was so excited about this question that I decided to start a new article series here on catonmat about my top 100 programming, software development, science, physics, mathematics and computer books. I'll do five books at a time as breaking huge tasks in tiny sub tasks is the easiest way to get things done.

Here's my bookshelf just to prove my nerdiness:


My super nerdy bookshelf.

In the first post in the series I'll re-share the same five books that I recommended in my Fog Creek interview. I expect this article series to go on for quite some time so if you're interested in this topic, you can subscribe to rss feed of my blog and follow me on twitter for updates.

Enough talking. Let's get to books!

#1 The New Turing Omnibus


The New Turing Omnibus.

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, recursion, formal grammars, non-computable functions, neural networks and algorithms. The writing style of this book is casual and it contains almost no math. It's my favorite book of all time.

I read this book cover to cover in one evening. I enjoyed one of the chapters about the Busy Beaver Problem so much that I spent a few days implementing Busy Beaver in several languages and wrote a program that visualizes how the Beaver travels on the tape. Here's my blog post about Busy Beaver.


Busy beaver puts another one on Turing machine's tape.

Author: Alexander K. Dewdney.

#2 The Little Book of Semaphores (free pdf)


The Little Book of Semaphores.

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 and have never had an Operating Systems course. This book 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.

Author: Allen B. Downey.

#3 Programming Pearls and More Programming Pearls


Programming Pearls and More Programming Pearls.

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 and understand these two books.

Author: Jon Bentley.

#4 The Little Schemer


The Little Schemer.

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. You'll learn about car, cdr, cons, working with lists, lambda and y-combinator.

I've spent countless hours with this book. I copied out all the code examples and put them on GitHub (the-little-schemer repository), and I also wrote a blog post about deriving y-combinator based on one of the chapters in this book.


Only the true schemer fan will understand this message.

Authors: Daniel P. Friedman and Matthias Felleisen.

#5 The Elements of Style and The Elements of Programming Style


The Elements of Style and The Elements of Programming Style.

The Elements of Style is not exactly a development or coding book but a book on writing. To be a great developer you need to communicate clearly, simply and directly. Strong writing skills are essential to success. The book is just 100 pages long and you can read it in one evening. Re-read it every couple of months for full effect.

Authors: William Strunk Jr. and E. B. White.

The Elements of Programming Style is a classic programming book by Brian Kernighan. 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.
  • Modularize...

Authors: Brian W. Kernighan and Phillip J. Plauger.

As a bonus, I recommend my own book Perl One-Liners, published by No Starch Press. My book teaches how to be fast in the command line and get things done quickly there. 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.


Perl One Liners.

I hope you liked my first five book recommendations. Let me know in the comments what your favorite books are and until next time!

Exciting news everyone! I've launched Browserling's Live API. Browserling's Live API live lets you embed live interactive browsers in your own applications on demand. It also lets you automate and control browsers through a very neat JavaScript API.

Watch this 4 minute demo video that demonstrates the possibilities:

Browserling's Live API Demo Video
https://www.youtube.com/watch?v=NhbpxXbEBos

Here are some of the use cases from some of our early Live API customers:

  • Quality Assurance - view your application in a bunch of browsers at once as part of QA process before the release.
  • Continuous Integration - load a browser on every commit, accept or reject the commit based on the results you see.
  • Sandboxed browsing - embed a browser in your application so that your computer doesn't get exposed to trojans, viruses and other malware. We run sandboxed, virtualized browsers and your computer never sees them.
  • Automating browsers - automate cross-browser testing by scripting browser interactions with JavaScript.
  • Rebranding, white-labeling and reselling - wrap around the API to create your own cross-browser testing service. We run the browsers and you make money!

Embedding a browser in your application takes less than 10 lines of code:

var browserling = new Browserling(api_key);
browserling.setBrowser('ie');
browserling.setVersion('9');
browserling.setUrl("http://www.google.com");

var div = document.querySelector('browserling');
var iframe = browserling.iframe();
div.appendChild(iframe);

Once you've embedded a browser in your application, you can control it through this simple API:

browserling.moveMouse(100, 200) // moves mouse to x=100, y=200
browserling.leftClick(40, 50)   // left clicks mouse at x=40, y=50
browserling.rightClick(40, 50)  // right clicks mouse at x=40, y=50
browserling.dragMouse(0, 0, 100, 101) // drags mouse from 0, 0 to 100, 101

browserling.delay(5000)         // delays actions for 5 seconds

browserling.type("hello world") // types "hello world"
browserling.keyPress(Browserling.Keys.Enter) // sends Enter key
browserling.keyPress(Browserling.Keys.F1)    // sends F1 key
browserling.keyDown(Browserling.Keys.Shift)  // presses Shift (but doesn't release it)
browserling.keyPress('a') // presses 'a', but since Shift was pressed, it types 'A'
browserling.keyUp(Browserling.Keys.Shift)    // releases Shift

See Live API's full documentation for more information about how to embed and control the browsers. I also created Live API demo page that lets you run a live demo (email me peter@browserling.com for a demo invite code, if you're intersted).

We're planning on releasing many new features for Browserling throughout this year. Just to name a few - Headless API, Mobile browsers, Linux browsers, screenshots, screenshots API, screen recording, screen sharing, and an affiliate partnership program.

This blog post is a repost of the original announcement on Browserling's blog: Announcing Browserling's Live API.

Follow us on Twitter @browserling for updates and until next time!

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:

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.


IBM ThinkPad 701CS butterfly laptop. No longer working.

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.


Intel Inside Celeron.

What language did you start out with?

I started with a bunch of languages at once. When I got my Celeron computer I already had a clear understanding about what I wanted to do. I wanted to make web pages so on the first day that I got the computer I started writing in HTML, JavaScript and CSS. At first I didn’t quite understand how websites operated and didn’t know about server-side languages so it took me some time to understand that I needed a web server to run websites. I was hosting my sites at Angelfire at first but later I setup my own Linux Slackware web server with PHP and MySQL. I also wanted to be a hacker so I learned C and Assembly. I was also spending ridiculous amounts of time on IRCNet, so I learned mIRC scripting as well and created my own IRC client in Visual Basic.

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 current role is CEO of Browserling Inc. I started Browserling in 2011 in the Bay Area together with a friend. Browserling is an interactive cross-browser testing service. You can just go to Browserling.com and test your website in the most popular browsers. We run the browsers in virtual machines and stream them to you. No plugins required. It’s all JavaScript and HTML5 canvas.

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.


Browserling.

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.


Kitties helping me to build my new workstation.

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)
  • Photoshop
  • 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.


My 10 year old Microsoft Natural Multimedia keyboard.

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 take a ton of notes when working on problems. I blurred the photo because it contains private information.

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.


My best friends when programming.

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.

#1 The New Turing Omnibus


The New Turing Omnibus.

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.

#2 The Little Book of Semaphores


The Little Book of Semaphores.

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.

#3 Programming Pearls and More Programming Pearls.


Programming Pearls and More Programming Pearls.

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.

#4 The Little Schemer


The Little Schemer.

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.

#5 The Elements of Style and The Elements of Programming Style


The Elements of Style and The Elements of Programming Style.

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.
  • Modularize...

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!


My bookshelf.

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.


Perl One Liners.

My main source for the latest technology and coding news is Hacker News and reddit.com/r/programming. I check these sites all the time to keep myself up to date.

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.


Running a 800m race.

What advice would you give to a younger version of yourself starting out in development?

I can think of four advices to my younger self:

1. Get things done quickly, efficiently and move on.
2. Don’t do things that don’t create value.
3. Start a programming blog much earlier.
4. Release early and often.

Hooray!

If you're interested in translating my interview to other languages, email me peter@catonmat.net.

Until next time!