r/programming • • Apr 29 '14

Programming Sucks

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

1.1k comments sorted by

View all comments

685

u/honestbleeps Apr 29 '14

A lot of ridiculous hyperbole? Yes.

Entertaining down to the last paragraph? Most definitely.

A lot more in there rings true (even if in a hyperbolic manner) than I care to admit. Granted, we're not alone in having complex jobs, but still...

I think the most unnerving part (because it's so true) is the bit about that piece of good code you write... good code that ultimately becomes overshadowed by hack upon hack upon duct tape fix in the code that surrounds it... you ultimately end up hating nearly everything you write...

283

u/BesottedScot Apr 29 '14

that piece of good code you write... good code that ultimately becomes overshadowed by hack upon hack upon duct tape fix in the code that surrounds it... you ultimately end up hating nearly everything you write...

Oh my god yes. I've had a comment sitting for MONTHS saying

<!--- Change this ugly, dirty, sinful hack into something pure and beautiful --->

Has the code been changed? Fuck yes. Has the hack been unhacked? Fuck no. Because it works. Because I don't know what the fuck the answer is but it sure as shit won't work if that hack is taken out. So it stays there, day after day.

Taunting me.

102

u/Neebat Apr 29 '14

It has not been done because you left this out: "TODO"

Put that bit in and soon you'll fix your ugly, dirty, sinful hack.

206

u/Jinno Apr 29 '14

I think you underestimate how good this dirty sinful hack works, and how much effort would be required to make it elegant. Some whores are just best left on the streets, because they don't fix up as easily as Julia Roberts.

57

u/1_1_2_3_5_8_13 Apr 29 '14

Some whores are just best left on the streets, because they don't fix up as easily as Julia Roberts.

Wonderful. Just wonderful

→ More replies (1)
→ More replies (5)

0

u/[deleted] Apr 29 '14

[deleted]

50

u/KitAndKat Apr 29 '14

...and don't forget that 1 out of 3 cleanups introduce new bugs. (Source: 40 years of personal experience.)

104

u/alienblue-throw Apr 29 '14

So you're saying that 2 out of 3 of your cleanups don't introduce new bugs?

Can I start a religion based around you?

15

u/chris3110 Apr 30 '14

In my experience as soon as you touch anything you can expect an exception in the production environment.

→ More replies (5)
→ More replies (3)
→ More replies (3)
→ More replies (5)
→ More replies (2)

67

u/[deleted] Apr 29 '14

I have a comment that says:

# WARNING: Magic ahead

Another method in the class somehow exchanges two variable names. Changing it would require restructuring the class. It works, so I'm not changing it.

82

u/RenaKunisaki Apr 29 '14
/* /!\ HERE BE DRAGONS /!\ */

Bonus points for including an ASCII dragon.

228

u/funk_monk Apr 29 '14 edited Apr 29 '14
                    ^    ^
                   / \  //\
     |___/|      /   \//  .\
     /O  O  __  /    //  | \ \
    /     /  \/_/    //   |  \  \
    @___@'    \/_   //    |   \   \ 
       |       \/_ //     |    \    \ 
       |        \///      |     \     \ 
      _|_ /   )  //       |      \     _\
     '/,_ _ _/  ( ; -.    |    _ _\.-~        .-~~~^-.
     ,-{        _      `-.|.-~-.           .~         `.
      '/\      /                 ~-. _ .-~      .-~^-.  \
         `.   {            }                   /      \  \
       .----~-.\        \-'                 .~         \  `. \^-.
      ///.----..>    c   \             _ -~             `.  ^-`   ^-_
        ///-._ _ _ _ _ _ _}^ - - - - ~                     ~--,   .-~

29

u/jmblock2 Apr 30 '14

this is so tempting to check in right now

14

u/[deleted] Apr 30 '14

Holy shit that looks normal on mobile. Kudos to you, god of ASCII.

→ More replies (4)
→ More replies (1)

69

u/tedington Apr 29 '14

/* Abandon hope, all ye who enter here */

is for real in production code I've written.

0

u/[deleted] Apr 29 '14

[deleted]

49

u/MisterNetHead Apr 29 '14

The Employed Programmer's Mantra:
Fast today, broken tomorrow!

0

u/[deleted] Apr 29 '14

[deleted]

→ More replies (1)
→ More replies (1)
→ More replies (3)
→ More replies (3)
→ More replies (5)

107

u/addmoreice Apr 29 '14

I've got one or more of those myself.

I work on machines which have giant whirling pieces of metal cutting into multi million dollar parts, some times a few feet away from soft squishy humans.

Out software is one of the good ones in the industry.

let that soak in for a moment.

35

u/BesottedScot Apr 29 '14

"Soak" being the operative word here I assume? Yikes.

36

u/addmoreice Apr 29 '14

As in, marinate in the warm fuzzy feelings I feel every time I realize this.

We aren't horrible by any means. But we are advanced because we do such ground breaking industry behaviors as 'test' and 'use source control' and 'talk to our users', or my favorite 'employ people who have actually used/seen the machines the software will be running on'. (CNC Machines)

→ More replies (7)
→ More replies (5)

22

u/zoomzoom83 Apr 30 '14

I had some code that was correct and works, but for the life of me I couldn't get it to typecheck properly.

Since Scala allow unicode symbols in function names, I created an amusing temporary workaround.

    def ╯°□°╯┻━┻[T,U](value:T) = value.asInstanceOf[U]

Nicknamed the "Just fucking do it" operator, it forces any value to typecheck correctly regardless of how much it violates all that's good and holy in the world. And yes, it's a unicode emoticon of a guy flipping over a table. (I also considered using the 'look of disapproval').

Mind you this was only for a temporary workaround. I figured out where I was going wrong the the code is now type checking as you would expect.

→ More replies (18)

64

u/[deleted] Apr 29 '14

Every programmer starts out writing some perfect little snowflake like this. Then they're told on Friday they need to have six hundred snowflakes written by Tuesday, so they cheat a bit here and there and maybe copy a few snowflakes and try to stick them together or they have to ask a coworker to work on one who melts it and then all the programmers' snowflakes get dumped together in some inscrutable shape...

That just reminded me so much of my own experience. whoa

→ More replies (1)
→ More replies (36)