Technology1 min read

CodeSOD: Get It Now

By · Published by Everything Blog

In short

A software function discovered in developer Sam C's codebase was found hardcoding the current year as a static value rather than retrieving the actual date. While developers frequently leave "TODO" reminders in code to address temporary workarounds or missing features, this specific placeholder remained uncompleted. Because the update was never implemented, the function continuously outputs 2012, a year that is now over a decade in the past.

Key points

  • A software function discovered in developer Sam C's codebase was found hardcoding the cur…: A software function discovered in developer Sam C's codebase was found hardcoding the current year as a static value rather than retrieving the actual date.
  • While developers frequently leave "TODO" reminders in code to address temporary workaroun…: While developers frequently leave "TODO" reminders in code to address temporary workarounds or missing features, this specific placeholder remained uncompleted.
  • Because the update was never implemented, the function continuously outputs 2012, a year…: Because the update was never implemented, the function continuously outputs 2012, a year that is now over a decade in the past.

Sources checked by our analysis pipeline: 1

"TODO" comments are an inescapable part of our work. Yes, yes, you should just do it right the first time, everything should probably have a ticket in whatever your ticket system is for visibility, but at some point, you're just going to leave a "TODO" behind.

But hopefully, the TODO gets TODONE, which is not what happened in Sam C's codebase.

function getnow()

{

//TODO

return '2012';

}

It's the XKCD, but for years. Or WHAT YEAR IS IN memes.

At least it's a relatively recent year, not some far off point from over a decade ago.

Wait. 2012 was how long ago? That can't be right. It was just a few years ago!

Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!

Technology