Programmers: Do you hate pseudo-code?
Moderator: Thanas
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
Programmers: Do you hate pseudo-code?
I don't think there's a single thing about programming classes I hate more than the requirement to hand in "pseudo-code" for a program. I always end up writing that shit afterward anyway, so there's no fucking point to it. I can deal with IPO charts and even structure charts; that shit is easy. But pseudo-code is so utterly and absurdly time-consuming comparatively, adds nothing to my program design process and generally just pisses me off.
Anyone else feel this way, or do you see a legitimate use for that shit in programming courses?
Anyone else feel this way, or do you see a legitimate use for that shit in programming courses?
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
I see a use in pseudocode for explaining algorithms or concepts, but that's it. Fortunately my AP CS teacher doesn't require us to do any of this, though my summer school regular CS teacher was very anal about "planning".
ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer
George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
- Cyborg Stan
- Jedi Knight
- Posts: 849
- Joined: 2002-12-10 01:59am
- Location: Still Hungry.
- Contact:
Pseudocode has it's uses, espically if you don't know the exact syntax of a command and whatnot. (Although I can make an effort to fix that as soon as possible.)
I do agree that having assignments in which you're supposed to turn in the pseudo-code itself is useless though - for most assignments I simply can write/type code that would work as is.
As for planning, that annoys me as well. It's too much like being forced to think other people's thoughts.
I do agree that having assignments in which you're supposed to turn in the pseudo-code itself is useless though - for most assignments I simply can write/type code that would work as is.
As for planning, that annoys me as well. It's too much like being forced to think other people's thoughts.
ASVS Vets Assoc, Class of 1999
Geh Ick Bleah
Avatar is an image of Yuyuko Saigyouji from the Touhou Series.
Geh Ick Bleah
Avatar is an image of Yuyuko Saigyouji from the Touhou Series.
Pseudocode is alright if the instructor makes it clear how you're supposed to lay it out. I've handed in lots of homework using pseudocode only to have the prof say "this isn't pseudocode" and "don't use real language code". Usually they don't let you know wtf they really want.
"Right now we can tell you a report was filed by the family of a 12 year old boy yesterday afternoon alleging Mr. Michael Jackson of criminal activity. A search warrant has been filed and that search is currently taking place. Mr. Jackson has not been charged with any crime. We cannot specifically address the content of the police report as it is confidential information at the present time, however, we can confirm that Mr. Jackson forced the boy to listen to the Howard Stern show and watch the movie Private Parts over and over again."
- Slartibartfast
- Emperor's Hand
- Posts: 6730
- Joined: 2002-09-10 05:35pm
- Location: Where The Sea Meets The Sky
- Contact:
- Brother-Captain Gaius
- Emperor's Hand
- Posts: 6859
- Joined: 2002-10-22 12:00am
- Location: \m/
It can all go to hell. If I need to plan out some code (which is rare, as I vastly prefer to be actively coding, compiling, fixing, recompiling, etc), then I will do so. Too many programming teachers are hellbent on making their students conform to their exact methods of coding, whether or not said methods are effecient. Commenting requirements I can at least understand, as they do tend to make code more readable, but comments can still go to hell.
Agitated asshole | (Ex)40K Nut | Metalhead
The vision never dies; life's a never-ending wheel
1337 posts as of 16:34 GMT-7 June 2nd, 2003
"'He or she' is an agenderphobic microaggression, Sharon. You are a bigot." ― Randy Marsh
The vision never dies; life's a never-ending wheel
1337 posts as of 16:34 GMT-7 June 2nd, 2003
"'He or she' is an agenderphobic microaggression, Sharon. You are a bigot." ― Randy Marsh
- Crayz9000
- Sith Apprentice
- Posts: 7329
- Joined: 2002-07-03 06:39pm
- Location: Improbably superpositioned
- Contact:
I usually just make a quick flowchart or block diagram (for large programs) when programming something complicated.
Pseudocode, for me, is redundant. Instead of pseudocoding, I first write out a handful of comments in the program body, and then fill in according to those comments. So the comments kind of become the pseudocode.
And contrary to opinion, unless you think and breathe assembly language, you should at least have a translatable framework (whether written in a high-level language, pseudocode, or flowchart) before you start coding. Writing assembly without an established idea of what you're doing is pretty much a bad idea.
Pseudocode, for me, is redundant. Instead of pseudocoding, I first write out a handful of comments in the program body, and then fill in according to those comments. So the comments kind of become the pseudocode.
And contrary to opinion, unless you think and breathe assembly language, you should at least have a translatable framework (whether written in a high-level language, pseudocode, or flowchart) before you start coding. Writing assembly without an established idea of what you're doing is pretty much a bad idea.
A Tribute to Stupidity: The Robert Scott Anderson Archive (currently offline)
John Hansen - Slightly Insane Bounty Hunter - ASVS Vets' Assoc. Class of 2000
HAB Cryptanalyst | WG - Intergalactic Alliance and Spoof Author | BotM | Cybertron | SCEF
John Hansen - Slightly Insane Bounty Hunter - ASVS Vets' Assoc. Class of 2000
HAB Cryptanalyst | WG - Intergalactic Alliance and Spoof Author | BotM | Cybertron | SCEF
- Slartibartfast
- Emperor's Hand
- Posts: 6730
- Joined: 2002-09-10 05:35pm
- Location: Where The Sea Meets The Sky
- Contact:
-
- Jedi Council Member
- Posts: 1571
- Joined: 2002-07-13 12:56pm
- haas mark
- Official SD.Net Insomniac
- Posts: 16533
- Joined: 2002-09-11 04:29pm
- Location: Wouldn't you like to know?
- Contact:
Pseudocode is nice when you're starting out. But being *required* to write it, I think, is utter bullshit.
Robert-Conway.com | lunar sun | TotalEnigma.net
Hot Pants à la Zaia | BotM Lord Monkey Mod OOK!
SDNC | WG | GDC | ACPATHNTDWATGODW | GALE | ISARMA | CotK: [mew]
Formerly verilon
R.I.P. Eddie Guerrero, 09 October 1967 - 13 November 2005
Hot Pants à la Zaia | BotM Lord Monkey Mod OOK!
SDNC | WG | GDC | ACPATHNTDWATGODW | GALE | ISARMA | CotK: [mew]
Formerly verilon
R.I.P. Eddie Guerrero, 09 October 1967 - 13 November 2005
- Dahak
- Emperor's Hand
- Posts: 7292
- Joined: 2002-10-29 12:08pm
- Location: Admiralty House, Landing, Manticore
- Contact:
Pseudocode is useful for describing a specific algorithm without having to write it in a specific language.
Great Dolphin Conspiracy - Chatter box
"Implications: we have been intercepted deliberately by a means unknown, for a purpose unknown, and transferred to a place unknown by a form of intelligence unknown. Apart from the unknown, everything is obvious." ZORAC
GALE Force Euro Wimp
Human dignity shall be inviolable. To respect and protect it shall be the duty of all state authority.
-
- Little Stalker Boy
- Posts: 1282
- Joined: 2002-10-26 07:20am
- Location: Lincoln, UK
- Contact:
YES YES YES YES YES
I HATE it. If you want to describe an algorithm, use a flowchart, pseudocode serves no purpose, it is bullshit. Waste of my time.
I HATE it. If you want to describe an algorithm, use a flowchart, pseudocode serves no purpose, it is bullshit. Waste of my time.
History? I love history! First, something happens, then, something else happens! It's so sequential!! Thank you first guy, for writing things down!
evilcat4000: I dont spam
Cairbur: The Bible can, and has, been used to prove anything and everything (practically!)
StarshipTitanic: Prove it.
evilcat4000: I dont spam
Cairbur: The Bible can, and has, been used to prove anything and everything (practically!)
StarshipTitanic: Prove it.
I hated it last year, i mean, why bother to not write the accurate coding? Silly nonsense.
EBC|Fucking Metal|Artist|Androgynous Sexfiend|Gozer Kvltist|
Listen to my music! http://www.soundclick.com/nihilanth
"America is, now, the most powerful and economically prosperous nation in the country." - Master of Ossus
Listen to my music! http://www.soundclick.com/nihilanth
"America is, now, the most powerful and economically prosperous nation in the country." - Master of Ossus
- Dahak
- Emperor's Hand
- Posts: 7292
- Joined: 2002-10-29 12:08pm
- Location: Admiralty House, Landing, Manticore
- Contact:
Because in pseudocode you don't have to deal with annoying special features of a specific language...Rye wrote:I hated it last year, i mean, why bother to not write the accurate coding? Silly nonsense.
And I never saw anyone trying to explain an algorithm in flowcharts...
Great Dolphin Conspiracy - Chatter box
"Implications: we have been intercepted deliberately by a means unknown, for a purpose unknown, and transferred to a place unknown by a form of intelligence unknown. Apart from the unknown, everything is obvious." ZORAC
GALE Force Euro Wimp
Human dignity shall be inviolable. To respect and protect it shall be the duty of all state authority.
The issue is; once you are down to coding a single routine, writing the pseudocode is a waste of time.
Before you write a routine, it should have 1 planned purpose, and you should have clear understanding of the algorithm it might need to uses.
Most routines should be no more than 100-150 lines of code in C#/C++/C/Java/etc. Which is generally one screen of code.
If you are dealing with maths, you should have worked it out on pen & paper long before touching the code. Computers are horrible for doing quick & dirty symbol manipulation, which you need todo to manipulate the maths into a form which can easily be encoded in code.
How it does it is not really important, its the required output based on the provided input.
Before you write a routine, it should have 1 planned purpose, and you should have clear understanding of the algorithm it might need to uses.
Most routines should be no more than 100-150 lines of code in C#/C++/C/Java/etc. Which is generally one screen of code.
If you are dealing with maths, you should have worked it out on pen & paper long before touching the code. Computers are horrible for doing quick & dirty symbol manipulation, which you need todo to manipulate the maths into a form which can easily be encoded in code.
How it does it is not really important, its the required output based on the provided input.
"Okay, I'll have the truth with a side order of clarity." ~ Dr. Daniel Jackson.
"Reality has a well-known liberal bias." ~ Stephen Colbert
"One Drive, One Partition, the One True Path" ~ ars technica forums - warrens - on hhd partitioning schemes.
"Reality has a well-known liberal bias." ~ Stephen Colbert
"One Drive, One Partition, the One True Path" ~ ars technica forums - warrens - on hhd partitioning schemes.
We were required to turn in psuedo-code for every project during the first 2 Java classes we took. After that, it wasn't required. Seems like a very backwards policy to me. When you are writing a program to accept a Length and Width of a yard and return the length of time it takes to mow given a mowing speed, you don't need any algorithm. Psuedo-code does come in handy when you are writing much larger programs stretching across multiple classes, however.
"Well, it's too bad that thread pilots aren't allow to carry pistols.
Otherwise they would have stopped you." - Pablo Sanchez
Otherwise they would have stopped you." - Pablo Sanchez
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
My big problem is that each instructor has special style preferences. For example, mine prefers it to look shoddy and unprofessional. Her examples are pseudo-code with shitty-looking lines connecting certain portions. When I go through the trouble of finding a LaTeX pseudo-code style file and using it to make something at least somewhat resembling professional, I get all points knocked off for it.
And frankly, the first run of the code I try and compile resembles pseudo-code very much anyway. It's syntactically incorrect and doesn't compile.
And frankly, the first run of the code I try and compile resembles pseudo-code very much anyway. It's syntactically incorrect and doesn't compile.
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
- Comosicus
- Keeper of the Lore
- Posts: 1991
- Joined: 2003-11-23 06:33pm
- Location: on the battlements of Sarmizegetusa
- Contact:
This remembers me of a joke:
At a programming course, the assistent is called by a student:
"My programs runs, but it doesn't do anyhting."
The assistent looks at the code, eyes widening.
"But you have all the code commented"
"Yeah, but it was the only way to get it compiled."
At a programming course, the assistent is called by a student:
"My programs runs, but it doesn't do anyhting."
The assistent looks at the code, eyes widening.
"But you have all the code commented"
"Yeah, but it was the only way to get it compiled."
Not all Dacians died at Sarmizegetusa
- Jawawithagun
- Jedi Master
- Posts: 1141
- Joined: 2002-10-10 07:05pm
- Location: Terra Secunda
I just handed in Pascal code. It looks just the same.
"I said two shot to the head, not three." (Anonymous wiretap, Dallas, TX, 11/25/63)
Only one way to make a ferret let go of your nose - stick a fag up its arse!
there is no god - there is no devil - there is no heaven - there is no hell
live with it
- Lazarus Long
Only one way to make a ferret let go of your nose - stick a fag up its arse!
there is no god - there is no devil - there is no heaven - there is no hell
live with it
- Lazarus Long
For an introductory level course where the profs are trying to get the students used to actual code it does make sense. Pseudocode along with flowcharts and block diagrams really helped me get the hang of things in first year Computer Science since I had no formal experience with programming prior to that. But by the time 1st semester was over pseudocode was becoming more of pain in the ass than a help, and I was using flowcharts & diagrams to layout my programs and writing up the required pseudocode after after the actual program itself was done.
aerius: I'll vote for you if you sleep with me.
Lusankya: Deal!
Say, do you want it to be a threesome with your wife? Or a foursome with your wife and sister-in-law? I'm up for either.
Lusankya: Deal!
Say, do you want it to be a threesome with your wife? Or a foursome with your wife and sister-in-law? I'm up for either.
I don't find much use for it, but its not so stupid as, say, the enviornment model. When I've had to turn in "Pseudocode" my TAs didn't mind actual Java, so I guess I'm in the same boat.
I hope you're joking there, but I'm not sure.Slartibartfast wrote:I got a bad grade in assembler because I didn't put a single comment. Stupid teacher, anyone could have seen what it does just by looking at the code.
SDN Rangers: Gunnery Officer
They may have claymores and Dragons, but we have Bolos and Ogres.
They may have claymores and Dragons, but we have Bolos and Ogres.
- Durandal
- Bile-Driven Hate Machine
- Posts: 17927
- Joined: 2002-07-03 06:26pm
- Location: Silicon Valley, CA
- Contact:
That's the problem with introductory programming courses. They're geared toward people who don't already think "in that way." But for those of us who already do, it tends to not only infuriate, but dampen enthusiasm for the class.aerius wrote:For an introductory level course where the profs are trying to get the students used to actual code it does make sense. Pseudocode along with flowcharts and block diagrams really helped me get the hang of things in first year Computer Science since I had no formal experience with programming prior to that. But by the time 1st semester was over pseudocode was becoming more of pain in the ass than a help, and I was using flowcharts & diagrams to layout my programs and writing up the required pseudocode after after the actual program itself was done.
Seriously. I attack programming assignments like nothing else. I go out of my way to find different methods of doing things and go ahead of what we're supposed to do. I like the challenge. But then I get my grade back and find that I've received a 28/50 purely because she didn't like my presentational materials (the code compiled and produced the correct output), and I get cynical about the class.
The problem with my computer science curriculum in general is that the introductory courses are basically mechanized. They're taught by part-time teachers who work for State Farm, and the introductory C++ class is completely inflexible. So when you get students who want to do things differently, they're not rewarded or supported. Everything has to be done by the book, no exceptions, and that's a horrid way to approach programming, especially in the beginning sections.
Damien Sorresso
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion
"Ever see what them computa bitchez do to numbas? It ain't natural. Numbas ain't supposed to be code, they supposed to quantify shit."
- The Onion