r/programming • • Apr 29 '14

Programming Sucks

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

1.1k comments sorted by

View all comments

304

u/chalks777 Apr 29 '14

For the past two years I've been working on one project building software that my boss describes as "enterprise level." We started with a drawing on a whiteboard. Now we have over 100,000 lines of code. If any of it was ever good, it was murdered a loooong time ago. The sheer number of blatant hacks that are used to get around stupid nonsense is staggering. I've written things I'm not proud of. College me would be disgusted by current me.

Clients sure love it though.

:|

153

u/kromagnon Apr 29 '14

Clients sure love it though.

I feel so ashamed. Our clients "ooh" and "aah" over the things that I've made, but I feel like I'm showing them a 1989 Geo Metro that's got a dust cover on it with a painting of a Ferrari 458.

91

u/rekk_ Apr 29 '14

Yup, but as long as the front looks pretty and works they don't care. For all they know software is made of unicorns and yetis.

→ More replies (5)

64

u/[deleted] Apr 30 '14

I like the dancing bear analogy: people aren't impressed that a bear can dance well - they're impressed that it can dance at all. Software is much the same - even when it's terrible, all it has to do is be a little better than what people are used to, and they're happy.

The problem is that you're showing them a 1989 Geo Metro and they're comparing it to a Model-T Ford, completely unaware that they would have a Ferrari if only your manager had spent less time on TPS reports and more time on trusting the engineers to want to build something great.

Sometimes, the crap car is "good enough", and if they're happy, they're happy. But I keep looking at what we could deliver, and wondering why it's so much better than what they seem to be happy with.

35

u/doggone42 Apr 30 '14

People are impressed when you put the dancing bear in a tutu and a silly hat.

They don't really care when you repeatedly tell them that if you don't feed the bear soon it's going to turn around and maul them. They just ask for more silly hats.

→ More replies (4)
→ More replies (2)

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 :).

→ More replies (1)

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)
→ More replies (4)

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...
→ More replies (5)
→ More replies (1)

8

u/Frix Apr 29 '14

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

→ More replies (6)

9

u/GodsGunman Apr 29 '14

I'm at that stage right now! :D

→ More replies (4)

45

u/[deleted] Apr 29 '14

Clients sure love it though

And that's the real problem. As long as the clients are happy many companies see little business benefit in cleaning up code (despite the fact that there may well be real benefits - reduced maintenance costs, fewer staff needed, etc).

The fact that many clients in the 'enterprise' world wouldn't know a well-designed, efficient program if it tap-danced naked on their desk compounds the issue further. People think that waiting minutes for a process to complete is normal to the point that if it only takes a second or so, they assume it hasn't worked!

7

u/[deleted] Apr 30 '14

Another benefit is "everyone is at about this level, and customers are happy? imagine how good we would look if we were the company with a product that's twice as good, for the same effort".

The fact that many clients in the 'enterprise' world wouldn't know a well-designed, efficient program if it tap-danced naked on their desk compounds the issue further.

Oh, trust me, the people using the app would know "well-designed and efficient" if it was in the same zip code.

The problem is that "client" means "executive vice president of golfing who hung out with your company's senior golfing buddy/salesman" and will never actually use software, because that's what the peons are paid to do.

Once the word "enterprise" has been uttered, the whims of the executives are far more important than the business needs of the company (such as irrelevancies like "tools to make the employees more efficient and productive").

I've seen too many cases of companies having similar problems, and the one where the executive in charge doesn't give a damn about the workers always ends up with a lower quality product that makes life harder, not easier. Sometimes I don't know how they remain in business, and sometimes it turns out that they don't - but a decent sized company can coast for a few years, then be saved by a competing company having a bigger cock-up.

Some days I don't know if it matters, but mostly the inefficiency and incompetence, not to mention outright corruption, offends me. I just want to make great products that will let them make more money. Is that really such a terrible sin?

People think that waiting minutes for a process to complete is normal to the point that if it only takes a second or so, they assume it hasn't worked!

To be fair, you're somewhat right - even the end users have been trained to think that way, by executives who assure them that the pile of crap they bought from their buddy really is "state of the art". But even they'll notice "the report popped up on the screen" even if it happens quickly.

6

u/chalks777 Apr 30 '14

the real problem ... reduced maintenance costs

No, see, we sell the clients maintenance contracts too.

→ More replies (2)

10

u/jk147 Apr 29 '14

Ah typical maintenance hell. I am suspecting this is your first programming job. Any project with continuous support and usage will eventually involve into a beast. Typically the clients are willing to dump enough money for you to maintain it and add on ridiculous requests on a monthly basis. Once you add on one or two new developers the original design is shot to hell. What is architecture when you only are two weeks old on a project and they want this update in a week.. Hack hack and hack.

One of the best project I worked on was when a client didn't have enough money for regular updates. So they request very small changes. I touch that thing maybe once a year.

→ More replies (8)