Remy Porter

Computers were a mistake, which is why I'm trying to shoot them into space. Editor-in-Chief for TDWTF.

Aug 2015

A Fever on a Crappy Day

by in Bring Your Own Code on

It feels like forever ago, we introduced the Lucky Deuce casino contest. This is a series of challenges, brought to you by our pals over at Infragistics, where we call on you to help us build a “scoundrel’s casino”. We are nearing the end of this little BYOC contest- this week is our last "all original" round, and next week, we'll introduce one final challenge that leverages code you may have already written for this contest.

Last week, you had a tricky little problem: you needed to write some code that looked like it was going to cheat, but really would get the cheater caught.


Foxy Checksum

by in CodeSOD on

Pavel D inherited some… we’ll call it “software”… that helps run warehouse operations for a boiler/heating manufacturer. That software was a Visual FoxPro database.

Now, this application needs to read barcodes off of products in the warehouse. Since the laser-scanners can sometimes mis-read those barcodes, the database uses a custom check-sum algorithm.


The Lucky Deuce: In the Cards

by in Bring Your Own Code on

Two weeks back, we introduced the Lucky Deuce casino contest. This is a series of challenges, brought to you by our pals over at Infragistics, where we call on you to help us build a “scoundrel’s casino”.

Last Week, you were again given some vague requirements, this time for building a broken slot machine. Once again, we had some seriously great submissions. Like last week, I’ve rehosted the winning code here.

Honorable Mentions


At Least There's Tests

by in CodeSOD on

Having automated tests for a project is a good thing, as a general rule. We can debate the broader merits of “TDD”, “ATDD”, “BDD”, “ATBDDSM”, how much test coverage is actually worth having, and if we should view our test approach as a series of metrics that must be met, instead of some guidelines that will help improve our development process.

Our first exhibit today is from Paul. It’s a JUnit test, that, well, maybe misses the point of writing unit tests:


The Lucky Deuce: Getting in the Slot

by in Bring Your Own Code on

Last week, we introduced the Lucky Deuce casino contest. This is a series of challenges, brought to you by our pals over at Infragistics, where we call on you to help us build a “scoundrel’s casino”.

Last week’s challenge was to build a “broken” roulette wheel, that instead of being truly random, avoids recently spun numbers to “feel” more random. I’ve rehosted all of the winners’ code here.

Honorable Mentions


Listicle

by in CodeSOD on

The Top 10 Ways to See if an Item Is in a List, Only 90s Kids Will Get this

Pardon the clickbait headline. We’re only going to look at one method to tell if an item is in a list. A bad one.

Andrew M. inherited some software that tracks metrics. There are three general categories of metrics- “MS”, “FN”, and “CM”. Each of these categories contains a number of specific metrics, each assigned its own ID.


Introducing the Lucky Deuce

by in Bring Your Own Code on

The life of a developer is about being cunning. When presented a problem that could be solved with strenuous, character-building labor, our first instinct is to automate it and cheat our way around it, if at all possible.

Or maybe I’m just projecting. Still, if there’s one thing I’ve noticed, TDWTF readers are a shifty lot of scoundrels. It’s time for us to put that cunning to work.