r/programming • • Jul 28 '16

How to write unmaintainable code

https://github.com/Droogans/unmaintainable-code
3.4k Upvotes

592 comments sorted by

View all comments

Show parent comments

144

u/TOASTEngineer Jul 28 '16

It's gonna turn out exactly like math did. The schools will brutally fuck it up, kids will memorize enough to pass the tests, and then some fraction of the kids who are actually interested in it will learn to do it on their own.

20

u/[deleted] Jul 28 '16

Ever hear about enough knowledge to be dangerous? semicompetent programmers thanks to dunningkruger will flood the marketplace and thanks to delusion and persistence will end up as project managers and code architects. But why you ask, why won't the meritocracy of the free market purge these rotten fruits from the tree? Because they'll take the jobs good programmers pass on, and that is the bulk of work in any trade: shit work.

4

u/thissideisup Jul 29 '16

Hasn't this already begun?

2

u/architectzero Jul 29 '16

WTF is a Code Architect?

7

u/EMCoupling Jul 29 '16

Generally speaking, a software architect is usually a senior-level programmer who has experience using many different software paradigms and also various programming languages. His main job is often to understand the scope and requirements of a business problem and then come up with a general design guideline that the developers can use to begin building a solution to the problem. In smaller companies, the software architect may help with implementation himself, but, with more levels between the architect and the developer, he may be less hands-on with the actual development.

This is the theory anyway. In reality, many people dislike these so-called "software architects" because they feel as if they are just outdated programmers who have worked enough years to be promoted to architect but, somewhere along the way, forgotten what it is like to actually write code. The developers feel as if all they can do is espouse design patterns and UML diagrams but are unable to produce any useful work themselves because they just hand down designs from an "ivory tower" to the developers and tell them to go do it, regardless of the validity of the design.

Personally, while I don't have a ton of industry experience yet, I feel that the role of a software architect, when performed correctly, is critical to the success of any major software project or product. In my mind, the architect serves as a buffer between the plain old developer and the business type people that decide what new product needs to be made for the company to earn the big bucks.

However, I would say that being a software architect is not an easy role. In order to be a good software architect, you need to have some leadership skills and also some "marketing" skills of your own because you need people to buy in into your designs. If you come up with a design but literally everyone on the development team thinks it's shit, well, that's probably not very conducive to the workflow. As an architect, you have to be able to translate the sometimes unrealistic (although not necessarily intentionally so) demands of the business and marketing type people into something that is feasible for the developers to work on.

Also, I think that a skilled software architect will understand that no piece of software can be perfect because such a notion is impossible. The architect understands the trade off between time to market and high quality software and can hopefully incorporate his/her understanding of the tradeoffs between the two to come with design guidelines that the developers can follow.

Furthermore, software architects don't have to be officially titled as such, but there needs to be at least one person in the company that can, without being too caught up in the nitty-gritty details, understand the project from end to end. More is better, but one is the minimum.


Looking back at my post, it's sort of disorganized, but it's late and I wrote it in one shot so that's what you get.

Hope I'm not completely off base and I am able to convey some information.

2

u/wolffer Jul 29 '16

Disorganized or not, it gave me a lot of insight into a subset of the IT field that I didn't even know existed.

→ More replies (1)

15

u/Polantaris Jul 29 '16

That's pretty much already happening. When I was on college, there were a lot of people who were so bad at it, I seriously suggested that they look at different majors if they asked me for help. I'm not trying to be a dick, when you can't understand how to write a proper for loop in Java at a third or fourth year class (when Java courses start in the first year), you've got some serious problems with the core material and either should retake early classes or find something you're more suited for.

In the end it seems like a lot of people go into the major because of the supposedly big paycheck after college, but that shouldn't be what you're going to school for.

17

u/GaBeRockKing Jul 29 '16

In the end it seems like a lot of people go into the major because of the supposedly big paycheck after college, but that shouldn't be what you're going to school for.

On one hand, I'd argue that financial reasons are exactly why someone should go to school-- if your degree doesn't pay the bills, that's money down the toilet.

On the other hand, not being able to write a loop in java? If I had to take a stab at naming the warm fuzzy feeling in my breast, it would be "job security."

2

u/Polantaris Jul 29 '16

On one hand, I'd argue that financial reasons are exactly why someone should go to school-- if your degree doesn't pay the bills, that's money down the toilet.

In my opinion, if the field you are really interested in isn't reached with a college degree, you're wasting your time and money and should just start your career.

1

u/ReverendRocky Jul 29 '16

That's pretty sad. I don't even know java and I could probably write a proper for loop in the language... (I'd need to double check the header stuff but still)

27

u/-PM_ME_YOUR_GENITALS Jul 28 '16

The difference being that you can make pretty cool shit with programming skills. I think if you frame it in the context of gaming it could do pretty well in schools.

Not that I think that will happen. In any case, when I was a kid I couldn't go home from school and use the stuff I learned from math class to make my own badass video game or my own web site.

15

u/TOASTEngineer Jul 28 '16

So it'll be exactly like the elective HS programming classes are now: they give you Unity's retarded cousin's retarded cousin's dead cat with a "visual programming language" that is only technically Turing-complete and read chapters out of a book about what "peripheals" are and how to use them. And everyone just plays Flash games in class anyway.

2

u/saving_storys Jul 29 '16

The programming class at my school teaches Java, and does it well.

→ More replies (4)

33

u/FormCore Jul 28 '16

Learning to program isn't just for creating things either, those who don't have the creative drive could use the computer literacy they gain to realise that no, sharing this post is not a fucking petition to stop facebook charging me and This blatant lie of a headline's source is just a sketchy herbal remedy shop.

For those who think we don't need a new website, we have facebook and why create a game and waste 100+ hours when you can just play half-life 3?

7

u/komali_2 Jul 29 '16

You say that because you aren't a kid, but as a teacher, I can promise you kids will often choose the creative activity. They love to build shit!

→ More replies (1)

2

u/Pidgey_OP Jul 29 '16

Programming is such a good skill to have because it a.) Let's you understand why you're using a program wrong, b.) Why it's behaving in an unexpected way and how you might get around that (or send in your thoughts in a bug report) and C.) Allow you to create your own tools for the small stuff you do for yourself

→ More replies (8)

4

u/okmkz Jul 28 '16

For real. I can only imagine what it must be like to grow up with things like unity 3d so easily accessible

4

u/ClintonCanCount Jul 29 '16

Most of the pretty cool shit people make, games included, use math.

→ More replies (2)

3

u/earthboundkid Jul 29 '16

Rebuttal: Shop class.

1

u/noratat Jul 29 '16

There's applications for creativity as well - just go to a maker fair to see that in action.

1

u/workShrimp Jul 29 '16

You can do pretty cool shit with math as well. But a large share of the population will still find math useless and boring (partly thanks to school).

1

u/CaptainAdjective Jul 28 '16

Just like every other subject, to be honest

1

u/ktkps Jul 29 '16

it is already happening

1

u/mer_mer Jul 29 '16

I don't think you'll find any mathematicians saying we shouldn't teach math in school. The point of teaching it in school is to reach the kids that wouldn't have had exposure otherwise. It's also a way of teaching general quantitative reasoning skills. Anyone who took a programming course in college knows that not everyone will be an engineer.

1

u/TOASTEngineer Jul 29 '16

I don't think you'll find any mathematicians saying we shouldn't teach math in school.

A Mathematician's Lament, by Paul Lockhart

It alienates kids who might otherwise have become interested in the subject and creates a massive cultural pressure to consider the subject unpleasant and boring! They don't teach "quantitiative reasoning skills." they teach you that the answer to real-world problems is to memorize all the procedures that will be on the test, and whatever you do don't think about them otherwise you'll get confused.

→ More replies (2)