code quality

Mismanaging resources is one of the easiest ways to bring down a production system. In a development environment, it’s easy to ignore open streams and temporary files, but at production scale, they can have a hugely negative impact. Unfortunately, it’s far too easy to overlook these issues while developing, even…

I recently finished a project which required me to modify an annotation macro for Scala using the Scala Macros Paradise project. Because I was extensively modifying a macro that we were already using, I wanted to write tests to prevent breaking our current workflow and to check that the new…

So you want to build an add-on for Google Docs, Sheets, or Slides, but you’re worried about ending up on the highway to development hell? You’ve come to the right place, then. As someone who has been down that road before, I’d like to share some of the mistakes, missteps,…

Background Users have been using Lucidchart for a long time to make their diagrams, since 2010 and IE6. And for nearly that long, Lucid has used Google’s Closure Compiler to manage its increasingly sophisticated code base. Closure Compiler is a typechecker and minifier that uses JSDoc annotations in comments to…

The dangers of garbage-collected languages Any programmer that has had to manually manage memory knows the value of automatic memory management, also known as garbage collection. Garbage collection prevents several potential bugs that occur in manually managed memory, such as dangling pointers, double free errors, and several types of memory…

The problem Package and managers Packages are collections of software: data files, binaries, executables, source archives, etc. These are published, resolved, downloaded, and installed with package managers. Unfortunately, in 2017, almost every package manager has the the ability, the default, or even the common practice of creating nondeterminism in the…

Previously, we discussed ways that you can maximize the success of the code reviews you request from your peers. However, preparing a good code review is only half of the story. There is a lot you can do as a reviewer of code reviews to make your review as helpful…

Code reviews: Some love them, some hate them, but most probably see them as no better than a necessary evil. As a result, we often view them as a mundane task to check off the list–a final gatekeeper before our wonderful features or bug fixes can begin their journey into…

We’ve all been there. After hours or even days of tirelessly trying to narrow in on the cause of some small bug, you finally close in on a particular section. You know the problem is in there somewhere, but the code is spaghetti—an impossible-to-read, jumbled mess of logic that does…

Uglier than a Windows backslash, odder than ===, more common than PHP, more unfortunate than CORS, more disappointing than Java generics, more inconsistent than XMLHttpRequest, more confusing than a C preprocessor, flakier than MongoDB, and more regrettable than UTF-16, the worst mistake in computer science was introduced in 1965. I…