Click here to Skip to main content
15,879,474 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Saw something strange... Pin
vonb16-Jul-13 19:28
vonb16-Jul-13 19:28 
GeneralRe: Saw something strange... Pin
Bernhard Hiller16-Jul-13 22:10
Bernhard Hiller16-Jul-13 22:10 
GeneralRe: Saw something strange... Pin
BotCar16-Jul-13 22:25
BotCar16-Jul-13 22:25 
GeneralRe: Saw something strange... Pin
OriginalGriff17-Jul-13 0:47
mveOriginalGriff17-Jul-13 0:47 
GeneralRe: Saw something strange... Pin
vonb16-Jul-13 23:23
vonb16-Jul-13 23:23 
GeneralRe: Saw something strange... Pin
Rajesh Anuhya17-Jul-13 1:53
professionalRajesh Anuhya17-Jul-13 1:53 
GeneralRe: Saw something strange... Pin
lewax0017-Jul-13 4:56
lewax0017-Jul-13 4:56 
GeneralRe: Saw something strange... Pin
dojohansen18-Jul-13 5:57
dojohansen18-Jul-13 5:57 
That's nothing! We lived for three months in a brown paper bag in a septic tank...

Python references aside, I think I can top that. I've actually seen a *system* where they did something about as clever: One program generated contracts from document templates and some data. The resulting doc was then turned into a TIFF image by automating Word, server-side, and print it using a TIFF printer driver. This image file was then run through OCR logic to extract from the document the data that you originally started with in order to generate the document.

The reason for this wonderful design? Everything else that was to happen whenever a contract was entered into was tightly coupled to a scanning solution from a time when all contracts were received physically by snail-mail and scanned in order to be processed by computer. The scanning solution wasn't actually very old, but the people who owned it had more influence than the people owning documents.

It's amazing what convoluted silliness can survive out there in the wild. And that, in part, is why I can believe Elon Musk when he says it's perfectly possible to build a transportation system that costs 1/10th of a bullet train to set up, is safe, runs on solar, and about twice as fast as an airplane...

Of course, our industry still easily gets the top spot for wasteful idiocy. Taking a few bytes of character data and turning it into a TIFF image of millions of bytes most of which are not even related to the data of interest, then doing OCR to get (most of) the data back again (most of the time) is surely serveral million times more complicated, and several million times more work, than almost any straightforward mechanism.

Maybe there is hope for the future. If we can be this crazy in software, who's to say existing transport systems, or energy useage in general, isn't simply the result of narrow thinking and attempts to improve what already exists? By starting with a clean sheet, it may well be possible to do radically better in a lot of areas.
QuestionRe: Saw something strange... Pin
Peter Adam17-Jul-13 21:12
professionalPeter Adam17-Jul-13 21:12 
AnswerRe: Saw something strange... Pin
BotCar17-Jul-13 21:26
BotCar17-Jul-13 21:26 
AnswerRe: Saw something strange... Pin
Peter Adam17-Jul-13 21:31
professionalPeter Adam17-Jul-13 21:31 
GeneralRe: Saw something strange... Pin
BotCar17-Jul-13 21:35
BotCar17-Jul-13 21:35 
GeneralRe: Saw something strange... Pin
Gary Wheeler18-Jul-13 0:16
Gary Wheeler18-Jul-13 0:16 
GeneralRe: Saw something strange... Pin
Brisingr Aerowing18-Jul-13 6:47
professionalBrisingr Aerowing18-Jul-13 6:47 
GeneralWith all these touch screen devices... Pin
Raybarg16-Jul-13 0:30
professionalRaybarg16-Jul-13 0:30 
GeneralRe: With all these touch screen devices... Pin
MacSpudster16-Jul-13 5:23
professionalMacSpudster16-Jul-13 5:23 
GeneralPoints, Points Everywhere Pin
Argonia15-Jul-13 3:58
professionalArgonia15-Jul-13 3:58 
GeneralRe: Points, Points Everywhere PinPopular
Brisingr Aerowing15-Jul-13 7:57
professionalBrisingr Aerowing15-Jul-13 7:57 
GeneralRe: Points, Points Everywhere Pin
Lutosław15-Jul-13 11:13
Lutosław15-Jul-13 11:13 
GeneralRe: Points, Points Everywhere Pin
Lutosław15-Jul-13 11:19
Lutosław15-Jul-13 11:19 
GeneralRe: Points, Points Everywhere Pin
vonb15-Jul-13 19:38
vonb15-Jul-13 19:38 
GeneralRe: Points, Points Everywhere Pin
Argonia15-Jul-13 20:22
professionalArgonia15-Jul-13 20:22 
GeneralRe: Points, Points Everywhere Pin
vonb15-Jul-13 20:25
vonb15-Jul-13 20:25 
GeneralRe: Points, Points Everywhere Pin
Rob Grainger15-Jul-13 23:02
Rob Grainger15-Jul-13 23:02 
GeneralRe: Points, Points Everywhere Pin
johannesnestler17-Jul-13 1:51
johannesnestler17-Jul-13 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.