Programmers: Do you hate pseudo-code?

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Programmers: Do you hate pseudo-code?

Post by Durandal »

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?
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
User avatar
Pu-239
Sith Marauder
Posts: 4727
Joined: 2002-10-21 08:44am
Location: Fake Virginia

Post by Pu-239 »

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
User avatar
Cyborg Stan
Jedi Knight
Posts: 849
Joined: 2002-12-10 01:59am
Location: Still Hungry.
Contact:

Post by Cyborg Stan »

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.
ASVS Vets Assoc, Class of 1999

Geh Ick Bleah

Avatar is an image of Yuyuko Saigyouji from the Touhou Series.
User avatar
Hamel
Sith Marauder
Posts: 3842
Joined: 2003-02-06 10:34am
Contact:

Post by Hamel »

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."
User avatar
Slartibartfast
Emperor's Hand
Posts: 6730
Joined: 2002-09-10 05:35pm
Location: Where The Sea Meets The Sky
Contact:

Post by Slartibartfast »

Useless garbage.
It's best to program straight into assembler.
Image
User avatar
Brother-Captain Gaius
Emperor's Hand
Posts: 6859
Joined: 2002-10-22 12:00am
Location: \m/

Post by Brother-Captain Gaius »

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. :P
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
User avatar
Crayz9000
Sith Apprentice
Posts: 7329
Joined: 2002-07-03 06:39pm
Location: Improbably superpositioned
Contact:

Post by Crayz9000 »

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.
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
User avatar
Slartibartfast
Emperor's Hand
Posts: 6730
Joined: 2002-09-10 05:35pm
Location: Where The Sea Meets The Sky
Contact:

Post by Slartibartfast »

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.
Image
Crazy_Vasey
Jedi Council Member
Posts: 1571
Joined: 2002-07-13 12:56pm

Post by Crazy_Vasey »

I sometimes find it useful if I'm set a problem (say a complex algorithm) I can't just solve in my head straight off, but that hasn't happened often (more to do with the lack of academic rigour of the course than my ability, unfortunately).
User avatar
haas mark
Official SD.Net Insomniac
Posts: 16533
Joined: 2002-09-11 04:29pm
Location: Wouldn't you like to know?
Contact:

Post by haas mark »

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


Image
User avatar
Dahak
Emperor's Hand
Posts: 7292
Joined: 2002-10-29 12:08pm
Location: Admiralty House, Landing, Manticore
Contact:

Post by Dahak »

Pseudocode is useful for describing a specific algorithm without having to write it in a specific language.
Image
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.
Image
Super-Gagme
Little Stalker Boy
Posts: 1282
Joined: 2002-10-26 07:20am
Location: Lincoln, UK
Contact:

Post by Super-Gagme »

YES YES YES YES YES :evil: :evil: :evil:

I HATE it. If you want to describe an algorithm, use a flowchart, pseudocode serves no purpose, it is bullshit. Waste of my time. :evil:
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.
User avatar
Sharp-kun
Sith Devotee
Posts: 2993
Joined: 2003-09-10 05:12am
Location: Glasgow, Scotland

Post by Sharp-kun »

Don't mind it, probably as I've never had to use it. We got told what it was, and were shown a few examples. After that it was left as "use if if you want".
User avatar
Rye
To Mega Therion
Posts: 12493
Joined: 2003-03-08 07:48am
Location: Uighur, please!

Post by Rye »

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
User avatar
Dahak
Emperor's Hand
Posts: 7292
Joined: 2002-10-29 12:08pm
Location: Admiralty House, Landing, Manticore
Contact:

Post by Dahak »

Rye wrote:I hated it last year, i mean, why bother to not write the accurate coding? Silly nonsense.
Because in pseudocode you don't have to deal with annoying special features of a specific language...

And I never saw anyone trying to explain an algorithm in flowcharts...
Image
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.
Image
User avatar
Xon
Sith Acolyte
Posts: 6206
Joined: 2002-07-16 06:12am
Location: Western Australia

Post by Xon »

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.
"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.
User avatar
Solauren
Emperor's Hand
Posts: 10387
Joined: 2003-05-11 09:41pm

Post by Solauren »

I use psuedo code for documentation purposes, since I never comment (grin)
User avatar
StimNeuro
Padawan Learner
Posts: 444
Joined: 2002-11-11 02:58pm
Location: Marietta, GA

Post by StimNeuro »

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
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Post by Durandal »

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. :)
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
User avatar
Comosicus
Keeper of the Lore
Posts: 1991
Joined: 2003-11-23 06:33pm
Location: on the battlements of Sarmizegetusa
Contact:

Post by Comosicus »

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."
Not all Dacians died at Sarmizegetusa
User avatar
Mad
Jedi Council Member
Posts: 1923
Joined: 2002-07-04 01:32am
Location: North Carolina, USA
Contact:

Post by Mad »

I can't recall ever having been required to turn in pseudocode, except maybe when covering pseudocode itself...

I use pseudocode or some other method of planning when I need it, but usually I don't need it for assignments.
Later...
User avatar
Jawawithagun
Jedi Master
Posts: 1141
Joined: 2002-10-10 07:05pm
Location: Terra Secunda

Post by Jawawithagun »

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
User avatar
aerius
Charismatic Cult Leader
Posts: 14801
Joined: 2002-08-18 07:27pm

Post by aerius »

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.
Image
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. :P
User avatar
Symmetry
Jedi Master
Posts: 1237
Joined: 2003-08-21 10:09pm
Location: Random

Post by Symmetry »

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.
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.
I hope you're joking there, but I'm not sure.

:?
SDN Rangers: Gunnery Officer

They may have claymores and Dragons, but we have Bolos and Ogres.
User avatar
Durandal
Bile-Driven Hate Machine
Posts: 17927
Joined: 2002-07-03 06:26pm
Location: Silicon Valley, CA
Contact:

Post by Durandal »

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.
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.

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
Post Reply