Spaghetti code
-
If you think the code we see here is bad, you should check out the IOCCC[^] :)
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
The best way to get the best spaghetti coders this side of Naples Italy to stop is to have the code reviews performed by Catholic Nuns! Sister Mary Concurrent reviews the code, and if it resembles spaghetti at all she will whack you on the knuckles with a yard stick (or metre stick), or the dreaded wooden pointer that resembles a cane used in Singapore!
-
Yuru yuri fans? where? :D
-
Sometimes it's a misconceived attempt at self-glorification. Has anyone here ever run into the Code of the Real Programmer?
One of the enduring fallacies of the younger (but not the youngest) folks in this trade is the belief that coding tricks are a demonstration of expertise. Oftentimes, they'll go out of their way to embed a tricky bit of code in a program, and then draw others' attention to it. "Look at me, I'm standing on my hands!"
A beginning programmer doesn't know enough to do such things. His programs are relatively easy to read and debug.
A well-seasoned programmer appreciates the virtues of simplicity. His stuff looks a lot like the beginner's code, and is about as easy to comprehend and debug.
It's the intermediate guy, who's knocked off a couple of problems and has begun to "feel his oats," who causes most of the trouble.
The hell of it is, nearly all of us go through that stage on our way to becoming "productive members of society."
(This message is programming you in ways you cannot detect. Be afraid.)
Wow, that pretty much exactly describes where I'm at in my coding journey :^) Thanks, I needed that.
This space intentionally left blank.
-
There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
Don't worry, they will eventually die and burn in coder's hell.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia
-
What do we have to do to reach the level where we can write that kind of code :wtf:
-
What do we have to do to reach the level where we can write that kind of code :wtf:
-
Its a problem with every software every where. At start every thing turns out to be beautiful, but over years and due to preassure and stuffs people tends to get the feature out rather than thinking about code beautification/maintaenance/quality etc. Yes on the contrary to this, one developer should be good at his/her skills. I always consider doing the things good though i my output will be a bit delayed, i always concentrate over quality of my output than the quantity, which many of my colleagues think i am weird.
I agree about feature additions messing up "beautiful" code but I think everyone is missing the main reason spagetti code exists. That is QC. In our organization, if any change is made to an existing and tested block of code, the whole block has to be re-tested. This increases the costs and delays shipment. Anyone can write pretty code given the time. It takes a special skill set to modify existing code without breaking it. And if that results in spagetti code over time, so be it. It works. Just document the code so the next skilled worker knows what you did.
-
Indeed. Many of the coworkers I've had over the years seem to think that building complex code is impressive. I don't think so. I think building simple code to support complex scenarios is impressive.
-
Ian Shlasko wrote:
we see here is bad
You should see the code I am stuck with.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
Spaghetti code or Lasagne code, it is all the same. It is always more complex than it needs to be but it keeps us in a job. Think about it positively - if you can't fix it, it was the previous coders' fault, if you can fix it, you get the credit. You seldom get a win-win situation in this business!!
-
Wes Aday wrote:
... go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.
Code is not meant to be maintained, it is meant to be rewritten :cool: -- RP
In that case every firm dies faster.
-
Wes Aday wrote:
There really ought to be a special punishment reserved for people ... that go out of their way to write the most convoluted code that they can
Over here, they get promoted to Management.
Hehehe true true. brainless, stupid 1s go high faster
-
There really ought to be a special punishment reserved for people (using the term people here loosely, as what I really think is not KSS) that go out of their way to write the most convoluted code that they can in an effort to make maintenance as painful as possible.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012