Pseudo-code.

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
My editor says to remove the hyphen and just write pseudocode. I don't like it that way. Thoughts?
 

Bob Hubbard

Retired
MT Mentor
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Aug 4, 2001
Messages
47,245
Reaction score
771
Location
Land of the Free
I always wrote my psudocode by starting with the aactual code and worked backwards. Always seems like a wasted step to me....
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
Since I don't know what language they'll be using with my book, I need it!
 

Bob Hubbard

Retired
MT Mentor
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Aug 4, 2001
Messages
47,245
Reaction score
771
Location
Land of the Free
Look for something by I believe Tanembaum... I may be a bit off on the spelling. His data structures book was heaviliy into college-geek level p-code.
 

satans.barber

Master Black Belt
Joined
Mar 30, 2002
Messages
1,037
Reaction score
6
Location
Leeds, England
Originally posted by Kaith Rustaz
Look for something by I believe Tanembaum... I may be a bit off on the spelling. His data structures book was heaviliy into college-geek level p-code.

I assume you're referring to Tanenbaum, Andrew S.

Ian.
 

Rich Parsons

A Student of Martial Arts
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Oct 13, 2001
Messages
16,835
Reaction score
1,079
Location
Michigan
Originally posted by arnisador
My editor says to remove the hyphen and just write pseudocode. I don't like it that way. Thoughts?

If I understand your post, then you are asking abotu teh word Pseudo-code versus pseudocode. I personally like the hyphen, yet it is common to drop it, yet my dictionary has it with a dash.

If you are talking about actually writing pseudo code then you need to think abstractly at a very high level.

While ( ( ( ( Condition A ) and ( Condition B ) ) or ( Condition C ) ) And ( Condition D ) ) Are True for a given amount of time X(1).

Do the following


End While


When Condition I is True
Execute process P1

When Condition J s True
Execute process P2

When Condition K is True
Execute process P3

Otherwise
Do NOthing (* or execute Process P4 *)

End When

These are high level examples of pseudo code with out using exact syntax of any language. Remember that the more Verbose or English like the Pseudo-Code the better.

BTW can I get an mention in your book, A special thaks goes otu to all my friends who helped me. You cannot sue my name since a Contract I signe with my employer states that everything I dream up belongs to them :(

Enjoy :)
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
BTW can I get an mention in your book

"Thanks to General Motors for all their help."

In the Newsweek article on our school it mentions that one reason we're "hot" is that GM now only recruits at 20 different schools and we're one of them.

We all know this stuff is nonsense at the college, but being ranked #1 by USN&WR and "hot" by Newsweek/Kaplan is sure a big publicity bonus.
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
Next question: When to use FORTRAN and when to use Fortran. It was FORTRAN until 1990 (?) with Fortran90, or was it Fortran95 where it changed?

I use Fortran to refer to it in general, but many people are stuck on the usage FORTRAN.
 
E

Elfan

Guest
FORTRAN reminds you of the painful ALL CAPS variable names and such I supose.

But uhh, why are you using Fortran?
 

satans.barber

Master Black Belt
Joined
Mar 30, 2002
Messages
1,037
Reaction score
6
Location
Leeds, England
It stands for FORmula TRANslation, so technically, FORTRAN would be most correct.

I hope you don't meant 'use' as in actually program with either! hehe

Ian.
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
But uhh, why are you using Fortran?

It's for historical references for the most part--fancier packages built on older IMSL programs written in FORTRAN77.

Fortran is still the language of supercomputing and is slightly better than C for numerical work, principally because of it's column-major storage. It's still common to have to call Fortran legacy code as well. I've had to do that with for example a radar model written years ago that is now the model but can't be recoded in C because the code is such a bizarre mess after years of careless evolution.

For me, I work in MATLAB whenever possible. When I work on a cluster, I expect to have to write in either Fortran or C (or C++)--and Fortran is objectively better for heavy numerical work.
 

Rich Parsons

A Student of Martial Arts
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Oct 13, 2001
Messages
16,835
Reaction score
1,079
Location
Michigan
Originally posted by arnisador
"Thanks to General Motors for all their help."

In the Newsweek article on our school it mentions that one reason we're "hot" is that GM now only recruits at 20 different schools and we're one of them.

We all know this stuff is nonsense at the college, but being ranked #1 by USN&WR and "hot" by Newsweek/Kaplan is sure a big publicity bonus.


Yes, GM Trimmed back the colleges they court, yet it seems that a certain college was recently added back on due to some high ranking individual went there :D. When colloges like Ohio State and Wisconsin were dropped

Yep nice or good Publicty is a good thing :D
 

Rich Parsons

A Student of Martial Arts
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Oct 13, 2001
Messages
16,835
Reaction score
1,079
Location
Michigan
Originally posted by satans.barber
It stands for FORmula TRANslation, so technically, FORTRAN would be most correct.

I hope you don't meant 'use' as in actually program with either! hehe

Ian.

Ian is correct in this.

The best useage would be FORTRAN. Yet, the word has been around for decades and therefore it has become acceptable to use Fortran. (* Since only Engineers and Physicists and College Prof's know anythign about it *)
 

Rich Parsons

A Student of Martial Arts
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Oct 13, 2001
Messages
16,835
Reaction score
1,079
Location
Michigan
Originally posted by arnisador
It's for historical references for the most part--fancier packages built on older IMSL programs written in FORTRAN77.

Fortran is still the language of supercomputing and is slightly better than C for numerical work, principally because of it's column-major storage. It's still common to have to call Fortran legacy code as well. I've had to do that with for example a radar model written years ago that is now the model but can't be recoded in C because the code is such a bizarre mess after years of careless evolution.

For me, I work in MATLAB whenever possible. When I work on a cluster, I expect to have to write in either Fortran or C (or C++)--and Fortran is objectively better for heavy numerical work.


FORTRAN has it benefits. C is popular for its capability to handle addresses, stacks, numbers and characters or text relatively well on an overall general performance. Yet, Like mentioned FORTRAN has some neat numerical features designed in.


And as to the being unable to update some system due to its' history of being just one quick fix after another, is a well known horrow story to Engineers. Management wil not pay for a total upgrade or replacement, and yet you are forced to just make one more change. ;)
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
Originally posted by Rich Parsons
And as to the being unable to update some system due to its' history of being just one quick fix after another, is a well known horrow story to Engineers. Management wil not pay for a total upgrade or replacement, and yet you are forced to just make one more change.

Yup. The software engineers aim to change that. I wish them luck, but they aren't as smart as managers are...short-sighted.

I thought there was a conscious decision, by NIST, to change from FORTRAN to Fortran with either 90 or 95? It appears both ways on their site (www.nist.gov).
 

Rich Parsons

A Student of Martial Arts
Founding Member
Lifetime Supporting Member
MTS Alumni
Joined
Oct 13, 2001
Messages
16,835
Reaction score
1,079
Location
Michigan
Originally posted by arnisador
Yup. The software engineers aim to change that. I wish them luck, but they aren't as smart as managers are...short-sighted.

I thought there was a conscious decision, by NIST, to change from FORTRAN to Fortran with either 90 or 95? It appears both ways on their site (www.nist.gov).

Well I think it was 95 that they tried to change the the usage officially. Yet, I think it is the fault of the users, we all remember FORTRAN and have typed it that way for a long time.

Would you type 'c' or 'C'?

Yet I have seen Basic versus BASIC. WIht the example I woudl have to go back to the user arguement. The Engnieers and Scientists that use FORTRAN know the history or the original usage versus those who use to more popular languages today.

So, which way do you like? Which way do you want it to have in print for years to come, ad for other authors to use as a reference? You have the POWER! ;) :D
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
Actually, I share the power with an editor, copyeditor, and production supervisor. For some things I can insist it be my way, but where there's an accepted style I need a good argument to vary from the Chicago Manual of Style.

I think the newer Fortan is the way to go and use it unless I am explicitly referring to, say, FORTRAN77.

This actually came up in a quote, where someone else referred to FORTRAN90 and I quoted a phrase from him. It was in quotes and attributed and they still suggested changing it, which I am very disinclined to do--but it raised the consistency issue.
 
OP
A

arnisador

Sr. Grandmaster
MTS Alumni
Joined
Aug 28, 2001
Messages
44,573
Reaction score
456
Location
Terre Haute, IN
So the question now is, Unix (my preference, and widely used) or UNIX? The latter is still preferred by Bell Labs, I think, but I prefer the former.
 
E

Elfan

Guest
My short summary: It was UNIX first, then the guys who made UNIX were like "wait it isn't an acronym it should be Unix", but Bell Labs was like "umm no we like UNIX cause it looks cooler."

I prefer Unix.
 

Latest Discussions

Top