“A customer reported they deleted an item and the wrong item got deleted!” Sounds like a pretty serious bug. This is what we got one time at work. Attempting to locate it was quite difficult, because naturally the customer had no idea what they did to reproduce the issue. Turns out the bug was caused by using $index in an …
What do the top 1% of software engineers do that the other 99% do not?
This interesting question was recently posed on Quora: What do the top engineers do, that the rest do not? And how do you get the habits to become one? Anyone can tell you something like “oh you should use source control!”, or “you should comment your code!” or other obvious things like that. But there is a limit to how …
Using techniques from statically typed languages in JavaScript
I wrote an article discussing some techniques from statically typed languages. Head over to SitePoint to check it out! Here’s what you can expect: JavaScript type system, and how it tries to bite you Expanding more about the rule of consistent types with more details on using it to reduce bugs Dealing with type-checking and type-conversion in a way that …
In order to become a better developer, you must first become a teacher
The headline might sound pretentious, but what is the most important skill for a developer besides actually writing code? Communication. What do you typically do when you communicate as a developer with someone else? You explain problems, you describe solutions, you talk to non-programmers about what you’re doing. You could also say that you’re teaching others about what you’re doing. …
How to reduce bugs in JavaScript code by following the rule of consistent types
One of the most annoying type of bug in JavaScript code is when the code doesn’t have logical types. Oh hey, I’ll just sum these two numbers… NOPE! They’re actually strings! That just makes me so angry. To make matters worse, this is something I’ve had to deal with a lot with a codebase I’ve been working with recently. JavaScript …
Hello World Open 2014 thoughts
I participated in the coding world championships, or Hello World Open, 2014. The challenge was to write an artificial intelligence for a slot-car racing game. I wrote my bot in Haskell, and managed to rank 11 out of 856 competitors in the first qualification round, and 78 out of 203 in the second qualification round. Read on for some general …
Book review: Dependency Injection with AngularJS
Are you in the market for a book on AngularJS? Here’s my review of the book Dependency Injection with AngularJS, written by Alex Knol and published by Packt Publishing. Disclaimer: I was sent a free copy of the book for review purposes.
Tips for taking screenshots with PhantomJS + CasperJS
It’s quite easy to use PhantomJS to muck around with pages, especially if you use CasperJS which provides you a bit nicer API. It’s also pretty easy to take screenshots, but there’s a few things you need to take into account if you want the results to be accurate…
AngularJS best practices: Refactoring existing code to Angular
I’ve been involved in several projects where I worked on moving an existing codebase into using AngularJS. Some involved refactoring a small codebase, which is relatively straightforward in most cases, but I’ve also refactored much larger projects where moving everything at once is not an option. Here’s some best practice type stuff that I’ve learned along the way.
Using AngularJS for fast prototyping
One of the big pain points in web application development used to be quickly prototyping site layouts. Now we have things like Bootstrap and other CSS frameworks, which give you a quick grid and a bunch of other reusable components. But that does not solve the whole issue: In today’s web applications, standard page load style actions just don’t cut …