Homework.

Published November 03, 2004
Advertisement
So it seems real life has had to interfere for the past couple of days. I had to do some computer science homework yesterday and today. Calculate results of equations that are in Reverse Polish Notation (also called postfix notation). Not really hard, but I probably complicated it more than necessary.

The main gist of the homework was to work with a stack, using push, pop, etc. I wound up using a fair amount of string manipulation and character arrays to extract what I needed [sad]. Like I said, certainly not the most elegant solution, but it works, and I can't complain about working code! Oh, by the way, the strtok() function is very handy for breaking things up based on defined delimiters[smile].

Haven't had much of a chance to work on Reversi, and that sucks.

I do have a question for those more knowledgeable than me. For those of you who have coding jobs, how much emphasis is placed on working code vs. elegant and clean code? I've been sort of worrying about this lately. I can produce working code, but more often than not it's not very elegant, but it gets the job done. I'd very much like some input on this. I know that the ideal situation is nice, clean, elegant code that works.

I've been coding for quite a while now, just recently started college and have become increasingly aware of my coding. Prior to college, basically 0 people ever saw my code besides me, so in this more teamlike environment where we sometimes code up solutions in small groups, i've become sort of self conscious. How could I go about writing better and cleaner code? Any exercises you would recommend?
Previous Entry Day == wierd already!
Next Entry Here ya go.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Update++

1220 views

Untitled

936 views

Hooray!

1013 views

Untitled

1012 views

Updates

1031 views

Cheapness!

962 views

Oh dear.

960 views

My first Perl!

1077 views

Oh the Oxycodone!

1036 views
Advertisement