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

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);

var div = document.querySelector('browserling');
var iframe = browserling.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.


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.


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

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.

If you're a first time entrepreneur incorporated in Delaware and you've authorized the standard 10,000,000 shares, you'll probably freak out when you receive your first Delaware franchise tax bill for approximately $70,000.

I received a franchise tax bill for $71k.

Don't freak out! You can pay just $400 instead of $70k. Here's why. In the state of Delaware tax can be calculated using two methods:

  • The Authorized Shares Method (default method used to issue the tax bill)
  • The Assumed Par Value Capital Method

You can calculate and pay tax using one of these methods. One of them will produce a smaller tax bill depending on the structure of your corporation.

Just call your Delaware registered agent and they'll take care of this.

Your registered agent will use the assumed par value capital method to recalculate the tax and you'll pay $400.

And that's what I did. I paid $400 in Delaware state taxes using par value capital method instead of $70,000 that was on the bill.

Here's a brief overview of both methods.

The Authorized Shares Method

Using the authorized shares method you pay $75 for every 10,000 authorized company shares. Here's how you approximately calculate the franchise tax using this method:

total number of authorized shares / 10,000 * $75

If you've 10,000,000 authorized shares, you'll get hit with a $75,000 tax. This is the default method that is used to calculate the franchise tax in Delaware. This is the tax bill you'll get. Don't pay this. Instead use the assumed par capital method.

The Assumed Par Value Capital Method

The assumed par value capital method uses a completely different way to calculate tax that involves total gross assets, issued and authorized shares, and the par value per share. This method is much more complicated but it produces $400 in the end. :)

It's quite impossible to explain the steps you need to take to calculate the tax using this method in a blog post. Please see examples, calculator and more information see How To Calculate Franchise Taxes on the State of Delaware website. Or better yet just call your registered agent and they'll calculate and pay this on your behalf.

Until next time!

I love my customers and users at Browserling so my team and I launched a public support forum a little while ago. Everyone is welcome to participate, even if you're not a Browserling's user. I love my blog readers, too. :)

Browserling's public support and help forum.

The implementation was very straight forward. We created two database tables - one for discussion topics, the other for answers. The main support page selects all visible topics from the discussion topics table and renders them as html. When you go to a particular discussion topic, the answers get loaded from the answers table.

Being in touch with your users and solving their problems quickly and efficiently is something that every company should focus on. We strive to be excellent to our customers and users at Browserling.

Until next time!