The Daily WTF
Efren‘s employer recently acquired a competitor. The competitor had been struggling for a number of years, and the acquisition was a last ditch attempt to preserve at least some of the business (a complete closure was the only other option).
Now, “struggling for a number of years” sounds fairly vague, but due to some bad database design, we actually have a clear indicator of exactly when the company gave up:
CASE YEAR(SomeDate) WHEN 2013 THEN SUM(Estimate2013) WHEN 2014 THEN SUM(Estimate2014) WHEN 2015 THEN SUM(Estimate2015) WHEN 2016 THEN SUM(Estimate2016) WHEN 2017 THEN SUM(Estimate2017) WHEN 2018 THEN SUM(Estimate2018) WHEN 2019 THEN SUM(Estimate2019) WHEN 2020 THEN SUM(Estimate2019) WHEN 2021 THEN SUM(Estimate2019) WHEN 2022 THEN SUM(Estimate2019) WHEN 2023 THEN SUM(Estimate2019) WHEN 2024 THEN SUM(Estimate2019) WHEN 2025 THEN SUM(Estimate2019) WHEN 2026 THEN SUM(Estimate2019) END
Here we have the classic “add a new column for every unit of time” design anti-pattern. A fun, traditional piece
To read the full article click on the 'post' link at the top.