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.
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!
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 can 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
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)
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. The style of this book is problem-hint-solution. In my experience this style of teaching is the best for quickly learning new concepts and problem solving skills. It's also a 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
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 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 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.
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. Be like me.
I hope you liked my first five book recommendations. Let me know in the comments what your favorite books are and until next time!
Watch this 4 minute demo video that demonstrates the possibilities:
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.
- 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 firstname.lastname@example.org 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:
- Russian translation
- Chinese translation
- Portuguese translation
- English original
- Want to help with translation in your language? Email me email@example.com!
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?
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.
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)
- 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.
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.
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.
If you're interested in translating my interview to other languages, email me firstname.lastname@example.org.
Until next time!
A few days ago I watched How Computers Learn talk by Peter Norvig. In this talk, Peter talked about how Google did machine learning and at one point he mentioned that at Google they also applied machine learning to hiring. He said that one thing that was surprising to him was that being a winner at programming contests was a negative factor for performing well on the job. Peter added that programming contest winners are used to cranking solutions out fast and that you performed better at the job if you were more reflective and went slowly and made sure things were right.
Watch the relevant video fragment from the lecture:
Peter Norvig says that being good at programming competitions correlates negatively with being good on the job at Google.
Video URL: https://www.youtube.com/watch?v=DdmyUZCl75s.
You can watch the full lecture here:
How Computers Learn - Vienna Gödel Lecture 2015 by Peter Norvig.
Video URL: https://www.youtube.com/watch?v=T1O3ikmTEdA.
I extracted the fragment from the QA session at 1h 11m 50s.