[ insert title here ]

by in Error'd on

This week we received a plethora of failed text substitutions. I'd like to find a pithy name for this sort of error; suggestions in the comments here will be welcomed.

But before we dive into those typical errors, repeat contributor Valts S. has shared a classic blunder: "White text on white background. Who among us hasn't done this in our lives? :)"


Succesful Deployment

by in Feature Articles on

Typos are the bane of delevopers' existence. For most of our typos, the result is a syntax error. It's quick and easy to find and fix. But any time we're working with strings (or in languages where variables are declared at use) there can be many more subtle bugs.

So when Abigail's company sent an intern off to fix a few typos, they thought this was a lovely little low-hanging fruit bug to fix.


This Equals Success

by in CodeSOD on

There are common errors that are (or were) once so common that we've built tools to help us avoid them. So I was a little surprised to see this JavaScript from Annie's co-worker.

toggleField() {
    this.updateToggle(this.obj.id, this.toggle).subscribe(data=> {
      if (data.status = "success") {
        this.showToast('Toggle updated successfully');
		...
	  }
	  ...
	}
}

Loop the Loop the Loop

by in CodeSOD on

David's organization didn't fully understand why you bring interns into a company. The purpose of an internship is to provide an educational opportunity and resume line-item to someone looking to enter the industry, and possibly recruit said intern after they graduate, getting a new-hire that is more ready for your team than average. It's good for the intern, it's good for the overall health of the industry, it's good for the company building its network of professional relationships and recruiting opportunities.

The purpose of an internship is not to just throw tickets at an intern, and let them commit code to your main branch, unsupervised. Unfortunately for David, and for the poor interns that preceded him, that is what the company had done.


Path To

by in Representative Line on

Sometimes, you see a code sample and you almost scroll by. "This isn't bad, I see it all the time." So it took a second glance to see the awful charm of what Henrik H found.

Henrik was asked to join a project to fix a high load website having "some issues". Here's a JavaScript tag that was included on nearly every page.


Number Theories

by in Error'd on

From our readers this week, we have a couple of mixed numbers. David B even gets a twofer.

Trainspotter Daniel notes "The LIRR now has the technology to pass 9 minutes with only 5 minutes of waiting!" They're apparently doing something nonobvious about scheduled versus expected times in one context, but not in another. Maybe the readers can figure it out.


Select Start

by in CodeSOD on

"John Doe" was asked to take a look at a slow-running application. It didn't take too long to discover that the application was slow because the database was slow, but figuring out why the database was slow involved digging deeply through some logs.

The database was a central system, which many applications connected to. Every ten minutes, performance dropped significantly, and it just so happened that every ten minutes a batch update process ran.


Rounding Currency

by in CodeSOD on

Moz works for a company that needs to handle financial transactions. They use Delphi, which has a handy-dandy fixed precision Currency type, which should make this easy.

Of course, someone opted to do most of the math in double precision floating points anyway. Which lead to this function:


Archives