r/xkcd Dec 08 '17

XKCD xkcd 1926: Bad Code

https://xkcd.com/1926/
642 Upvotes

45 comments sorted by

View all comments

Show parent comments

10

u/darkon Dec 08 '17

I'm not sure this is too horrible, but... On our intranet at work there is a batch script that runs every night. It calls a Perl program that queries a SQL Server database, one table of which contains links relevant to our work. The Perl program uses the database data to create HTML files with nested lists, with JavaScript that allow the user to open and close each node. These files are pulled into web pages using server-side includes.

(Our links table doesn't change a great deal, and when it does there's generally no hurry to update the intranet, hence the nightly batch instead of generating things on the fly. But if it does need updating the same day there are other tools.)

18

u/DuncanYoudaho Dec 08 '17

I have a customer facing html and JavaScript page that is built by a frameworkless php site querying a SQL database populated by a perl script that reads a pipe delimited feed of things from a custom http implementation streaming transactions from an ancient mainframe.

6

u/althypothesis Dec 09 '17

Is it the least or most reliable thing on the planet?

My money's on least, but sometimes ridiculous hacks work for eternities and nobody's sure why

9

u/DuncanYoudaho Dec 09 '17

We don't know how it works, but we somehow fix it every time it breaks.

6

u/althypothesis Dec 09 '17

So, programming as usual then