Mike Nuss

Taking the U out of UUID

by in CodeSOD on

Paul N, spotted this ColdFusion code in a third-party shopping cart system he'd been tasked with modifying (to make it usable):

 


Online Offline

by in CodeSOD on

Ben S. submitted the following piece of SQL. It's only a few lines of code, but both the variable names and values are a bit... curious.

I can only imagine what context this code appeared in, or what the author was trying to achieve. What do you think?


The Long Road to Clean Up

by in CodeSOD on

One of Joe J.'s first tasks at his new job was to "clean up" some existing code. We always hope for the best in these situations, but since the code has ended up here, you can tell where this story is going.

The .NET framework has a handy getFileName method, which returns only the file name from a complete path. Since library methods aren't to be trusted, Joe's predecessor decided to use the following routine instead.


The Data Cleanup

by in CodeSOD on

Ralph B. submitted today's scary code snippet, found in a script used for "cleaning up" data from a widely used and well-respected data source for use in another widely used and well-respected data source.

It's not so amazing that this code does work, but there has to be a better way to do this. I'm not a SQL guy, but maybe another script is needed to clean up the clean up script...  


Archives