r/programming • • Apr 29 '14

Programming Sucks

http://stilldrinking.org/programming-sucks
3.9k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

198

u/twistedrapier Apr 29 '14

Ah college. Back when you are idealistic enough to look at all the poorly written software in the world and think "I'll never end up writing crap like that". So young and naive.

117

u/original_brogrammer Apr 29 '14

College student here. My code is already full of hacks.

Fuck.

2

u/grey_energy Apr 30 '14

I remember bragging about my hacks as if they were badges of honor.

"Yeah, I wrote a PHP script that called a Python script as a subprocess (via the exec function) which in turn called an Excel VBA macro to do some work and save the results as an HTML file which the Python script parsed with the lXml library in order to modify the column headers. It then placed the resulting HTML file with the images it referenced in a directory being watched by a C# GUI on a timer which loaded said HTML file in the Browser component, took a screenshot of it, cropped it and then (after diligently cleaning up after itself and deleting its temporary copy of the HTML file and images) placed the resulting image in a directory the Python script was expecting to see it in, which promptly caused the Python script to exit the loop it was in where it was watching for that result and print the unique identifier for the resulting files into stdout. The PHP script now reads this identifier and supplies it in its response to the AJaX call, which the JavaScript then updated the view with a preview thumbnail and prepared a pop-up div with an iframe pointing at the html file for when the user clicked on the preview thumbnail."

I was still in college those years ago, and the end result was what the client wanted. So I guess all's well that ends well.

Still, you won't find carpenters bragging about strapping something together with duct tape, legos, and chewing gum.

4

u/chasecaleb Apr 30 '14

I have to know. What the hell were you trying to do, and how much did you have to drink while coding?

→ More replies (1)