|
I came across something like this today, in some older code written by one of our more senior programmers that's still being used for live, production work:Perl code:
|
# ¿ Nov 30, 2012 09:46 |
|
|
# ¿ May 20, 2024 14:13 |
|
pigdog posted:Came for awesome perl horrors, left slightly disappointed. Sure he could have just gone for %somehash = @somearray and worked it from there, but hey, TMTOWTDI. Sane and comprehensible is a tall order for Perl programs in the first place. Anyway, probably more impressive in the program were the ~200 regular expressions, all trying to match variations of the same relatively simple string. Stuff like: Perl code:
But I may be being overly harsh on his code because the program doesn't really work at all, and the fact that it doesn't work creates probably an extra few day's worth of incredibly tedious work a month for a couple unlucky people (though not me, anymore).
|
# ¿ Nov 30, 2012 18:16 |
|
quiggy posted:Smart people use whitespace like this. Dumb people use whitespace like this. It doesn't really have anything to do with tabs vs spaces, though--at least where I work, it seems to be more "this script won't run, so I'll just add more braces at the end until it will" kind of stuff.
|
# ¿ Aug 16, 2013 06:49 |
|
fritz posted:ETA: queryTile is called in only one location, and checklist is always a 1-element list. It's better than that: Python code:
Extortionist fucked around with this message at 07:24 on Sep 24, 2013 |
# ¿ Sep 24, 2013 07:09 |
|
Ender.uNF posted:ClearCase. RCS. In the rare case we have to share code with corporate, we have the luxury of using ClearCase. All local stuff is in RCS--and even then, a lot of production-critical code hasn't ever even been checked in.
|
# ¿ Feb 13, 2014 09:46 |
|
Perl code:
Not pictured: capturing STDOUT in a variable, then using regex matches to parse out the information that was queried from the database.
|
# ¿ Apr 16, 2014 04:23 |
|
We have an xml product that contains records of votes on certain pieces of legislation, breaking the totals out into Democrats/Republicans/etc. But Republicans was spelled "republicians", and we can't fix it now because it would break innumerable downstream workflows.
|
# ¿ Jul 3, 2014 08:54 |
|
Edison was a dick posted:Offer an alternative "version 2" feed that has the typo fixed and threaten to deprecate the old one. If I worked in a place with anything approaching sensible practices I might consider it. This is actually a project our group had to rewrite from scratch to replace another group's product--the typo was theirs and we had to replicate it, the downstream teams wouldn't give a minute's effort to fixing anything. But even if I did that a) no one would pay attention, the old one would be deprecated and the new one would still break everything, and b) no one would notice anything was broken until some day I'd just end up with a many-times-forwarded e-mail originating from an loc.gov address in my inbox asking why in the world this feature was broken and I'd have to go and change it back anyway.
|
# ¿ Jul 3, 2014 10:24 |
|
Thermopyle posted:Coding horror: web scraping The business's requirements don't change when a site does. So, yeah, I also feel your pain.
|
# ¿ Aug 31, 2016 05:41 |
|
I don't know if this counts, but a warning from ghostscript working on a pdf:code:
|
# ¿ Oct 2, 2017 21:59 |
|
|
# ¿ May 20, 2024 14:13 |
|
PhantomOfTheCopier posted:PDf is a horror. Please use PostScript for printable document content, and HTML for on-screen content. Believe me, I'd use just about anything else but we have zero control over the input. The goal of the whole project is turning these hideous pdf documents into structured machine-readable documents (like xml, except if it were an awful 40 year old proprietary format).
|
# ¿ Oct 3, 2017 02:48 |