Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 where does the bad code come from?
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
michaelp




PostPosted: Fri Feb 29, 2008 8:25 pm   Post subject: where does the bad code come from?

Where do people learn to do such bad coding?
I have seen things that are just so... weird that I have absolutely no clue where they came up or learned how to do these things so improperly. (Is that a word?)
Just recently (today) I saw some guy post something about Turing. (Thread here)
How does he think he can put down a variable that has no value? It's not that bad, but it made me think of this:

http://www.cpplc.net/forum/index.php/topic,1465.0.html

In each switch statement he had (this was C++) a the main() loop. How does he think he can pull that off?
What are you thoughts on this? What are some situations that you've seen with really bad code?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Feb 29, 2008 8:56 pm   Post subject: Re: where does the bad code come from?

michaelp @ Fri Feb 29, 2008 8:25 pm wrote:
How does he think he can...

He doesn't. Think that is.

It's the equivalent of throwing paint at the canvas with hopes of reproducing an artwork. The only caveat is that abstract art doesn't compile.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
nike52




PostPosted: Sat Mar 01, 2008 2:37 am   Post subject: Re: where does the bad code come from?

Tony @ Fri Feb 29, 2008 8:56 pm wrote:
michaelp @ Fri Feb 29, 2008 8:25 pm wrote:
How does he think he can...

He doesn't. Think that is.

It's the equivalent of throwing paint at the canvas with hopes of reproducing an artwork. The only caveat is that abstract art doesn't compile.


Yeah, I have a friend in my compsci class who does that. Very strange. If his code isn't working, he googles examples to try and copy and paste.

"Dude, help me out man"
"You don't understand your code man"
"I know that" and then he's a little pissed off at me
md




PostPosted: Sat Mar 01, 2008 10:19 am   Post subject: RE:where does the bad code come from?

Another problem is that actual programming isn't even taught anymore (or no where I've been). Students are left to learn how to program on their own, and instead taught a language, or more usually a languages libraries.

How to actually structure your code, and write new code are left entirely to trial and error.
syntax_error




PostPosted: Sat Mar 01, 2008 10:25 pm   Post subject: RE:where does the bad code come from?

Its also imo a issue with math; sicne most early Ontario Math course don't teach much to the student on HOW to think. I does show up in other courses such as compsci. If only they are thought to think early on. If only.
md




PostPosted: Sun Mar 02, 2008 5:41 pm   Post subject: RE:where does the bad code come from?

Not teaching people to think is unfortunately a key requirement for maintaining the social structure that is currently in place. As such it's not likely to change.

If you look at the world you find that the ones advocating meaningful change (for the good) are mostly people who are educated in technical fields or have otherwise managed to learn how to think for themselves. The people who advocate the status quo (or changes for the worse) are people who can't think, or can think and have all the power.

Basically, teaching people to think leads to social unrest; so no one is taught how to think.
syntax_error




PostPosted: Sun Mar 02, 2008 7:52 pm   Post subject: RE:where does the bad code come from?

touche (sorry no French characters supported )

social norms something needed. Sadly.
btiffin




PostPosted: Sun Mar 02, 2008 10:14 pm   Post subject: Re: where does the bad code come from?

Tony @ Fri Feb 29, 2008 8:56 pm wrote:
michaelp @ Fri Feb 29, 2008 8:25 pm wrote:
How does he think he can...

He doesn't. Think that is.

It's the equivalent of throwing paint at the canvas with hopes of reproducing an artwork. The only caveat is that abstract art doesn't compile.


I'm breaking the thread, but have you ever seen Piet? Programming in colour code blocks. All the images on the linked page are executables with a Piet interpreter. http://www.dangermouse.net/esoteric/piet/samples.html Some of the work by Thomas Schoch has to be seen. Abstract art can compile. Smile

Back to bad code; I once had a co-worker ask me if he could write something that would change the meaning of the value 2 to work out a hack patch.

Cheers,
Brian
Sponsor
Sponsor
Sponsor
sponsor
StealthArcher




PostPosted: Sun Mar 02, 2008 10:18 pm   Post subject: Re: where does the bad code come from?

Someone here recently wrote compiler of something like that in turing.
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: