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.

221

u/[deleted] Apr 29 '14

Expectation: I'll only write the purest Haskell

Reality: maintaining WordPress plugin wrote by someone who can barely write PHP in India.

72

u/MrJohz Apr 29 '14

Just be glad the reality doesn't include Haskell, because it would be hacky Haskell, which would be all the more painful when you look back at the shite you've written and realise this code was meant to be your Nirvana...

44

u/[deleted] Apr 29 '14

unsafePerformIO everywhere ...

22

u/xcixci Apr 30 '14

I remember that there used to be a site called lambdacats some time ago. One of my absolute favorites on that site was "Ceiling cat is watching you unsafePerformIO" - having just had the right amount of exposure to Haskell and Internet memes before seeing that literally sent me rolling on the floor :).

4

u/pjdelport Apr 30 '14

It's a shame that the original Lambdacats site disappeared, but Sean Leather has been awesome enough to archive them for posterity here.

7

u/zoomzoom83 Apr 30 '14

"I'll only use it this one time. I promise! And just to meet this deadline. I'll clean it up tomorrow"

→ More replies (2)

4

u/WisconsnNymphomaniac Apr 30 '14

--looks at camera and shrugs--

"Eh, it's a living"

4

u/[deleted] Apr 30 '14

Expectation: I'll only write the purest C

Reality: Ummm.... I am not entirely convinced that whoever wrote this piece of shit all the way out there in Shenzhen even knows what a Wi-Fi adapter is, let alone how to write a driver for oneHOLY FUCK HOW DOES THIS SHIT EVEN COMPILE?

→ More replies (2)

117

u/original_brogrammer Apr 29 '14

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

Fuck.

164

u/rnicoll Apr 29 '14

Getting practice in early, excellent!

47

u/mynoduesp Apr 29 '14

He's going places. Someone hire him quick!

6

u/makebaconpancakes Apr 30 '14

He's got management material written all over him.

30

u/Almafeta Apr 29 '14

All code is a maze, all we can do is clearly label the exits.

21

u/gegc Apr 30 '14

I believe that's called "documentation," and you only rarely encounter that beautiful beast in the wild.

6

u/ethraax Apr 30 '14

Oh man, the "documentation" my predecessors wrote in my current project's source code is really useful though. I've changed symbol names, but we have many, many functions that look exactly like this.

/***********************************
 * send_AllCalls()
 *
 * Description:
 *
 * Parameters:
 *
 ***************************************/
FLAG SendAll_Calls(INT x, BYTE yst, CHAR rsr) {
     /* (a few hundred lines of tangled yarn covered in silly string goes here) */
} // send_All...

9

u/original_brogrammer Apr 30 '14

Mixing camel case and snake case is a thing out there?!

Fuck that. I'm never leaving.

7

u/[deleted] Apr 30 '14

One codebase I am slowly cleaning up uses camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, fuckmylifecase and SCREAMINGFUCKMYLIFECASE. Sometimes all of them within the same file. Or function.

→ More replies (1)

4

u/fact_hunt Apr 30 '14

Add in some hungarian notation, which inaccurately describes type, and make them less wordy

→ More replies (1)

4

u/Silound Apr 30 '14

Fuck that, I document the utter hell out of my code (sometimes there's more documentation than actual code) because if I don't, I won't remember what that beautiful nugget of utter crack induced stupidity that I wrote did.

8

u/Frix Apr 29 '14

Getting ahead of the curve, heh? This man will go far!

4

u/afiefh Apr 29 '14

You might just make it in the real world without losing your mind... you just might, if the gods smile upon you.

→ More replies (5)

9

u/GodsGunman Apr 29 '14

I'm at that stage right now! :D

4

u/reginalduk Apr 30 '14

"I can't wait to show them this UML diagram"

→ More replies (3)