Category Archives: Fun

CodeSOD: The Least of the Max


Adding assertions and sanity checks to your code is important, especially when you’re working in a loosely-typed language like JavaScript. Never assume the input parameters are correct, assert what they must be. Done correctly, they not only make your code safer, but also easier to understand. Matthias’s co-worker… doesn’t exactly do that. function checkPriceRangeTo(x, min, max) { if (max ==

Read more

In $BANK We Trust


During the few months after getting my BS and before starting my MS, I worked for a bank that held lots of securities – and gold – in trust for others. There was a massive vault with multiple layers of steel doors, iron door grates, security access cards, armed guards, and signature comparisons (live vs pre-registered). It was a

Read more

Why Medical Insurance Is So Expensive


At the end of 2016, Ian S. accepted a contract position at a large medical conglomerate. He was joining a team of 6 developers on a project to automate what was normally a 10,000-hour manual process of cross-checking spreadsheets and data files. The end result would be a Django server offering a RESTful API and MySQL backend. "You probably won’t

Read more

Representative Line: Tern Back


In the process of resolving a ticket, Pedro C found this representative line, which has nothing to do with the bug he was fixing, but was just something he couldn’t leave un-fixed: $categories = (isset($categoryMap[$product[‘department’]]) ? (isset($categoryMap[$product[‘department’]][$product[‘classification’]]) ? $categoryMap[$product[‘department’]][$product[‘classification’]] : NULL) : NULL); Yes, the venerable ternary expression, used once again to obfuscate and confuse. It took Pedro a few

Read more

CodeSOD: Dictionary Definition


Guy’s eight-person team does a bunch of computer vision (CV) stuff. Guy is the “framework Guy”: he doesn’t handle the CV stuff so much as provide an application framework to make the CV folks lives easy. It’s a solid division of labor, with one notable exception: Richard. Richard is a Computer Vision Researcher, head of the CV team. Guy is

Read more

CodeSOD: Warp Me To Halifax


Greenwich must think they’re so smart, being on the prime meridian. Starting in the 1840s, the observatory was the international standard for time (and thus vital for navigation). And even when the world switched to UTC, GMT is only different from that by 0.9s. If you want to convert times between time zones, you do it by comparing against UTC,

Read more

CodeSOD: Whiling Away the Time


There are two ways of accumulating experience in our profession. One is to spend many years accumulating and mastering new skills to broaden your skill set and ability to solve more and more complex problems. The other is to repeat the same year of experience over and over until you have one year of experience n times. Anon took

Read more

CodeSOD: JavaScript Centipede


Starting with the film Saw, in 2004, the “torture porn” genre started to seep into the horror market. Very quickly, filmmakers in that genre learned that they could abandon plot, tension, and common sense, so long as they produced the most disgusting concepts they could think of. The game of one-downsmanship arguably reached its nadir with the conclusion of The

Read more
« Older Entries