Let’s face it: As developers, much of our time is spent fixing problems. No matter how hard I try, there’s always something that needs debugging. In the past, I would use console.log or alert. Just sprinkle them in my code, and hope that they give me enough information to fix the problem. If you’ve tried doing that, you know that …
Detect problems in JavaScript automatically with ESLint
I’ve been programming JavaScript for 15 years or so, and I still keep making various silly mistakes – I type things wrong, I forget to rename everything, I forget to follow the coding styles… then I waste my time clicking around in the browser and feel like slapping myself. Thankfully tools like ESLint exist. ESLint helps by finding errors automatically, …
Why use user story based testing tools like Cucumber instead of other TDD/BDD tools?
When you think of writing tests, usually you would write them using a tool from the xUnit family, PHPUnit, JUnit, etc., or if you like a more BDD-style approach, perhaps you would use RSpec, Jasmine, or some other tool like that. Then there’s Cucumber. Instead of writing your tests purely in code, with Cucumber you start by writing a human-readable …
Headless Chrome/Firefox testing in NodeJS with Selenium and Xvfb
The other day I wanted to run a bunch of tests with a browser in a NodeJS environment. Having been spoiled by how easy it was to do in a Rails setup using Capybara, I thought it would be easy considering how everything cool is easy to do with Node! Well, I thought wrong. It’s easy once you have everything …
How to run Apache and NodeJS based sites on the same server with Varnish
While developing Battlefield 3 Web Commander, I wanted to keep it on my VPS where I was already running Apache. Of course I had the option of putting it in a non-standard port like 8080, but it wouldn’t be nice if the URL would be somedomain.com:8080. The second option was ordering an extra IP address from Linode. That would’ve cost …
Why did nobody ever tell me about ssh_config?
As someone who uses SSH a lot, I need to remember a bunch of different usernames, identity files and even one non-standard SSH port. It can sometimes be a bit of a hassle, especially if I need to use a specific identity file or other such, and then need to subsequently remember the pathname to it and all that. But …
Now you can write PHP code… without writing any code
Yes, you heard that right! You can now code in PHP without having to write a single line of code – amazing, right? The application that makes this possible is called Lemon ADE, and it runs on the iPad. In this post I’ll go over how Lemon ADE works, and I have also recorded a short video demonstrating coding with …
Unity: The best game development platform?
One day I saw a webpage which had some game, and wanted me to download the Unity web player plugin for my browser. I thought “What crap is this? I’m not going to install it!”. That was stupid, because Unity rocks as a game development tool!
Solving the alt-tab problem: My solution
Lately there’s been some discussion about “the alt tab problem” – In other words, when you have lots of windows open and when working on something you constantly jump between a few of them. Basically when doing this, it becomes tricky to recall which window you get when you alt tab once, or twice, and so on. If you’re not …
Git interactive rebase tips
Interactive rebase is one of my most used Git commands. It’ll let me slice and dice commits in various useful ways. Here’s a few tips for you to unleash the true potential of rebase :) Basics: editing, combining, reordering and removing commits Breaking a commit into two Taking a part of a commit and bringing it to HEAD Bonus! How …