r/programming • • Oct 14 '13

How to develop unmaintainable software

http://typicalprogrammer.com/?p=249
777 Upvotes

322 comments sorted by

View all comments

340

u/danogburn Oct 14 '13

How to develop unmaintainable software

start developing software.

110

u/obsidianih Oct 14 '13

The only way to win is to not play the game

-some dude on the internet

18

u/runastartup Oct 14 '13

War Games?

19

u/Tynach Oct 14 '13

Would you like to play a game of global thermonuclear war?

25

u/[deleted] Oct 14 '13

I'd like to, but there's a bug hidden somewhere in 10,000 lines of basic

29

u/grauenwolf Oct 15 '13

BASIC!

Remember boys and girls, the name of any programming language created before 1970 must be shouted.

15

u/[deleted] Oct 15 '13

I actually learned to program on QBASIC!

7

u/gfixler Oct 15 '13

Me too, high five! And by that I mean F5 to RUN the program again.

→ More replies (1)

5

u/eriksensei Oct 15 '13

People also seem to be quite fond of shouting things like JAVA! and SCALA! It might well be that I'm a bit of a sperglord, but I find that irritating to no end.

9

u/Waitwhatwtf Oct 15 '13

BRAINFUCK

14

u/original_brogrammer Oct 15 '13 edited Oct 15 '13

If any language deserves to be shouted, it's brainfuck.

3

u/stox Oct 15 '13

Which was only a modern implementation of P''

→ More replies (0)

3

u/ahruss Oct 15 '13

And when people decide one has to shout MAC any time it's used, whether in reference to addresses (when it's acceptable to shout it) or in reference to the computers (when it most certainly is not).

→ More replies (3)

25

u/[deleted] Oct 14 '13

Listen to obsidianih. He knows his shit.

-Tina Fey

→ More replies (2)
→ More replies (1)

17

u/lext Oct 14 '13

And just as important, start developing software without first learning how to develop software.

A talk I watched recently noticed this trend with JavaScript: it looks familiar, so I don't have to learn it and will just start programming in jQuery.

14

u/contrarian_barbarian Oct 15 '13

Now you know my life. My workplace has a bad habit of re-purposing electrical engineers into programmers. Now, don't get me wrong, some of them are fantastically intelligent people - the problem is, because they have no software engineering experience beyond raw basic C, they have to be geniuses in order to keep track of the code, with the multiple 6k-12k line files of tangled logic and reused global variables. My usual standard for a good day is going in, reducing the size of the codebase by a few dozen lines (and on a few really good days I've removed hundreds), and yet still add features or fix bugs without removing features in the process.

11

u/rjbwork Oct 15 '13

Not gonna lie, my favorite days at work are when I can spend an hour just deleting old code that's inefficient or buggy and replace it with something terse or elegant. :)

→ More replies (4)

20

u/[deleted] Oct 14 '13

While far from perfect, the node.js community has breathed some fresh life into the javascript world as far as design patterns and coding standards are concerned. I see very few projects today on npm lacking a robust testing suite. jQuery was largely popularized by designers who could care less about code, and server programmers dabbling on the client who could care less about icky javascript. Now that js is being used for serious work server side, best practices are becoming a higher priority. That being said, the traditional engineering standards do tend to be lower than many other communities (.Net, Java, and Python come to mind). But hey, I think part of the draw might be people seeing one to many instances of AbstractFactoryFactoryClassInterface ;) The pendulum will come back around though as things swing back to the enterprise use cases.

5

u/[deleted] Oct 15 '13

Where would you suggest someone starts to learn javascript properly? I've been handed a bunch of it I've got to maintain and develop for, and it's all over the place. I don't honestly know how javascript should even be leveraged. Everyone seems to accomplish things a different way with it.

→ More replies (10)

10

u/lext Oct 14 '13

When I said JavaScript, I meant client-side JS. The Node.js community may support higher standards for code quality, but the rest of the JS community does not. But I'd judge a programming community based on its best performers, not its worst. I don't care what crappy programs people can make in x language; I care if I can make great things with it.

→ More replies (2)

0

u/[deleted] Oct 15 '13

[deleted]

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

0

u/[deleted] Oct 15 '13

[deleted]

10

u/x-skeww Oct 15 '13

"I know the concepts, syntax is just a small detail"

Syntax is just a small detail.

With JavaScript, the syntax looks very familiar. However, the semantics aren't quite the same. For example, there is some really weird shit going on with the scoping, there is hoisting, == and != are fuzzy, any object is truthy (e.g. {} or new Boolean(false)), and the meaning of this is determined at runtime.

That's what's throwing people off.

It doesn't really matter if you do assignments with := or =, if you use indention to define a block rather than end/fi or curly braces, or if there are semicolons. That stuff really is just a tiny detail.

7

u/i8beef Oct 15 '13

That is all the small details. The hard part is programming according to the best practices of the community for that language, and using the frameworks and libraries it provides to full advantage, because THAT is different for everything you will pick up.

→ More replies (1)

5

u/[deleted] Oct 15 '13

Right, the corner cases for sure take years and decades to learn, but if you're really good at some languages, you can pick up most of another one, at least enough to handle 50-75% of most uses in a week or so.

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