Recently, I had a conversation with a junior developer on my team. Let’s call him Alan. We were talking about a new notification feature that was going to be used to send reminder e-mails to potentially thousands of people if they had forgotten to enter certain data in the last month or so. Alan was confident that the code he’d written was correct. “I’ve tested it well.”, he said…
Software development would be a lot easier without so many bugs. In a typical software application, there’s a never-ending stream of bugs as far as the eye can see. Some of the bugs make users’ lives miserable, some of them are annoying but can be dealt with workarounds, and the rest are mostly minor inconveniences…
When you work with software developers, especially those with less experience, it’s virtually guaranteed to hear one of them utter a version of the above expression when someone presents them with a situation they think is impossible (or more likely, improbable) to happen in the program they’ve written…
One of the most effective methods for detecting invalid types is to validate function arguments in runtime. Instead of using an all-purpose validation library designed for validating a wide range of data types, it might make more sense to use a library tailor-made to validate function arguments. With that idea in mind, I’ve created a lightweight JavaScript function argument validation library called fn-arg-validator…
You’ve probably seen programmers calmly writing code at 200 keystrokes per minute to solve hideously complex problems under strict deadlines, and the programs they wrote run perfectly on the first try, often only a few seconds before something blows up real good…
There are many ways to write automated tests for testing code, and you may have heard about test doubles for making testing easier. Some of the code we write is hard to test, so we replace those parts with fake test doubles that are easier to test…