Curious Perversions in Information Technology
6k followers 5 articles/week
CodeSOD: You Need an Alert

Gabe enjoys it when clients request that he does updates on old software. For Gabe, it's exciting: you never know what you'll discover. Public Sub AspJavaMessage(ByVal Message As String) System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE=""JavaScript"">" & vbCrLf) System.Web.HttpContext.Current.Response.Write("alert("""...

Wed Feb 28, 2024 14:30
CodeSOD: A Split Purpose

Let's say you had input in the form of field=value, and you wanted to pick that "value" part off. In C#, you'd likely just use String.Split and call it a day. But you're not RK's co-worker. public string FilterArg(string value) { bool blAction; if (value.Contains('=')) blAction = false; else blAction = true; ...

Tue Feb 27, 2024 14:44
CodeSOD: Climbing Optimization Mountain

"Personal Mountains" was hearing dire rumors about one of the other developers; rumors about both the quality of their work and their future prospects at the company. Fortunately for Personal Mountains, they never actually had to work with this person. Unfortunately, that person was fired and 30,000 lines of code were now Personal Mountains' responsibility....

Mon Feb 26, 2024 14:25
Error'd: Hard Daze Night

It was an extraordinarily busy week at Error'd HQ. The submission list had an all-time record influx, enough for a couple of special edition columns. Among the list was an unusual PEBKAC. We don't get many of these so it made me chuckle and that's really all it takes to get a submission into the mix. Headliner Lucio Crusca perseverated...

Fri Feb 23, 2024 14:19
CodeSOD: The Default Path

I've had the misfortune to inherit a VB .Net project which started life as a VB6 project, but changed halfway through. Such projects are at best confused, mixing idioms of VB6's not-quite object oriented programming with .NET's more modern OO paradigms, plus all the chaos that a mid-project lanugage change entails. Honestly, one of the worst choices...

Thu Feb 22, 2024 14:53
CodeSOD: Route to Success

Imagine you're building a PHP web application, and you need to display different forms on different pages. Now, for most of us, we'd likely be using some framework to solve this problem, but even if we weren't, the obvious solution of "use a different PHP file for each screen" is a fairly obvious solution. Dare I say, too obvious a solution? What...

Wed Feb 21, 2024 15:30

Build your own newsfeed

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

Create account