Curious Perversions in Information Technology
7k followers 5 articles/week
Error'd: Too Spicy For My Hat

My plate has been full this week, but not as full as Walter's! "Maybe hold the cheese?" suggests Walter T. regarding a pepper and steak grinder. "Seen at Reading (MA) House of Pizza on Jul 24 2024." If you decide to search around to try to understand the different names for this kind of sandwich, you will undoubtedly discover someone...

Fri Jul 26, 2024 15:04
CodeSOD: Reflections on Privacy

Jaco's team had a problems with making an embedded web server shut down properly. Something about the shutdown process was deadlocking, so one of their "ninja Yoda coders" rockstarred their way to a solution. private void stopServer() { try { if (webServer != null) { logger.debug("Shutdown webserver"); // This goes into a dead lock, therefore...

Thu Jul 25, 2024 15:34
CodeSOD: How to Validate an IP Address

Andy has some concerns about future proofing. In this case, he sends us some C# code that's supposed to validate an IP address. string[] address = StringTools.splitStr(IP, '.'); if (address.length < 4) { throw new Exception("Bad IP format : " + IP); } Andy writes: "IPv6 will never be a thing!" It's not just IPv6, of course....

Wed Jul 24, 2024 14:22
NPath Complexity

We're not going to look at code today, and instead, we're going to talk about a code metric. Specifically, "NPath complexity". NPath complexity is a good metric to track, and many static analyzers will do it. Formally written, it's defined: "The NPath complexity of a method is the number of acyclic execution paths through that method." Or, more simply,...

Tue Jul 23, 2024 14:51
CodeSOD: Serial Properties

Jan wrote some code that set a property, and a few lines later had to write code to read that value- and the compiler complained. Which is what drew his attention to this C# code: public string ViewNodeFilter { protected get { if (viewNodeFilter.IsNotValid()) { return "null";...

Mon Jul 22, 2024 14:48
Error'd: Pennies From Heaven

Adrian M. lit up this blooper for us. "Apparently Siemens Mobility wasn't satisfied that a mere 95-year copyright term would be enough for the brochure about their m60-series traffic light controller. I hope I won't have to wait until 2029 for a green light." See for yourself here.   Mark W. thinks Doordash needs a kiss on...

Fri Jul 19, 2024 15:21

Build your own newsfeed

Ready to give it a go?
Start a 14-day trial, no credit card required.

Create account