PDA

View Full Version : Any Computer Science guys here?

chrisleakfan4life
03-28-2012, 11:47 AM
I've been having some trouble with my courses, mostly dealing with Pseudocode

Are there any good books out there that i can pick up to help me study the material better?

The textbooks and the teachers at my school haven't been very helpful in that area.

Ericgraves
03-28-2012, 09:59 PM
Pseudocode means outline code (unless there is an actual pseudocode language now).

Basically if I ask you to write the pseudocode for a something like a bubble sort it would be something like this

for n = 1:end_of_vector
if vector [n] > vector[n+1]{
a = vector[n]
vector[n] = vector[n+1]
vector[n+1] = a
}

You don't actually need to write the code, instead just write an outline of the code. Like I didn't init any variables, I didn't bother with syntax for the most part.

If you need help writing it, I recommend Latex Pseudocode (http://en.wikibooks.org/wiki/LaTeX/Algorithms_and_Pseudocode). Now it won't directly tell you how to write it, but it WILL LIMIT WHAT YOU CAN DO. Thus getting you in the correct mindset of pseudocode, and honestly knowing how it looks is all that is required.

chrisleakfan4life
03-30-2012, 02:16 AM
Thanks Eric ill look into it

orangeblueorangeblue
03-30-2012, 07:36 AM
What do you mean your courses and pseudocode? Are they just asking that you give examples in pseudocode? LaTeX is a monster all its own and it might be more confusing to use their examples if you don't need to.

Sometimes when I'm giving a job to someone else I'll quickly write up my ideas in C-style pseudocode (although we work mainly in Python). It's generally just control structures and comments:

list urls = [];
for (unsigned int i = 0;i < urls.length();i++) {
// retrieve url, save to db.
Boost::Curl crl;
std::string this_url = crl.get(urls[i]);

db.insert_record(crl.header);

}

Unless it needs to approximate syntax I would think you'd have some freedom/leverage with style.

orangeblueorangeblue
03-30-2012, 07:37 AM
for n = 1:end_of_vector
if vector [n] > vector[n+1]{
a = vector[n]
vector[n] = vector[n+1]
vector[n+1] = a
}

Bubble, or circle? :wink:

michaelc
04-01-2012, 07:44 AM
just treat it like algebra

not that there is an off the shelf operating system you could use for these day anyways

i think microsoft went one way .and open source dos is so far under the table no body will be able to write a new off the self for years

i guess computer science will be a office operating system job for some time

i took a computer engineering degree just for kicks

if you don't take microprocessors.. as a class... you never use it anyway

there's a primer written my doctor omally, it will take you about an hour to read and it will be all anybody ever remembers from the class... minus the algebra

i'd look around the uf book store, ask some to buy one for me or steal one

it's just too stupid to miss