well, if anyone knows C, have a gander here:
Source Code
here was the descrition of what we were supposed to achieve:
Assignment Descriotion
I am Programmer, Hear me ROAR!!!!!
No, Really. Bite me.
Now start in on something with 1000+ lines!
quote:
ACES! Another post by Maradon XP:
It sucks.Now start in on something with 1000+ lines!
you'd be surprised how long some people made that problem. One of the guys on the class discussion board has over 500 lines of code, prior to commenting, with minimal blank lines.
And yes, i've done bigger programs, my largest was just over 5k lines, but i prefer smaller probs.
(wrong account, it's burger...) [ 03-15-2003: Message edited by: Big Rude Jake ]
I remember doing this one enormous tic-tac-toe program in my C++ class. It had DOS-based graphics and everything. I managed to finish it in about 1000 lines of code where most had almost twice that.
quote:
Maradon XP spewed forth this undeniable truth:
I know, I was just kidding.I remember doing this one enormous tic-tac-toe program in my C++ class. It had DOS-based graphics and everything. I managed to finish it in about 1000 lines of code where most had almost twice that.
well, my 5k line program was a tic-tac-toe game as well. It was written in turing (ugh) and it was the AI for a 4x4x4 tic tac toe... Great thing was that your win/loss percentage against the other AI's in the class affected your grade for the program. If you wrote a good AI, you'd beat others, and you'd get a good mark.
No, Really. Bite me.
To give an example but what i mean by "get it," I just rewrote some code for a co-worker. he spent about four and a half months to make this code. It took me a little over three days to re-write a better version of the product from scratch. This isn't so much because of my ability to code as much as the fact that he just doesnt "get it." he isn't a bad person, just a bad programmer.
far too many people walk away with papers that looks good on a resume and have no actual knowledge or ability. juding from the code you made, provided most of it came from your head and is not copied from a book, Id say you probably "get it." be proud of this fact. there are far too many people out there who think they know what they are doing but dont.
edit:
my only suggestion is that you put a prefix before all your characters to show what variable they are during use. (so a variable such as counter or i would be intCounter or intI, for example)
edit2: You may want to look into diffrent types of trees. they are good to know. [ 03-15-2003: Message edited by: diadem ]
[ 03-15-2003: Message edited by: diadem ]
quote:
Sample InputDear Sally,
Please, please do it--1 would 4
Mary very, 1 much. And 4 6
8 everything in 5's power to make
14 pay off for you.-- Thank 2 18 18--
0Sample Output
Dear Sally,
Please, please do it--it would please
Mary very, very much. And Mary would
do everything in Mary's power to make
it pay off for you.-- Thank you very much--
That is driving me crazy - I cannot see the relation between the word order, the numbers, and the words that appear in place of the numbers.
quote:
diadem had this to say about Punky Brewster:
nice, clean code. better than some of my co-workers. I kinda miss c stuff like that. The code you made is simple, but it shows you "get it." I'd say once you start dealing with rotating trees (or deal with semaphores) and such, that's the point where they weed out the programmers who copy code from a book from those who actually know what's going on.To give an example but what i mean by "get it," I just rewrote some code for a co-worker. he spent about four and a half months to make this code. It took me a little over three days to re-write a better version of the product from scratch. This isn't so much because of my ability to code as much as the fact that he just doesnt "get it." he isn't a bad person, just a bad programmer.
far too many people walk away with papers that looks good on a resume and have no actual knowledge or ability. juding from the code you made, provided most of it came from your head and is not copied from a book, Id say you probably "get it." be proud of this fact. there are far too many people out there who think they know what they are doing but dont.
edit:
my only suggestion is that you put a prefix before all your characters to show what variable they are during use. (so a variable such as counter or i would be intCounter or intI, for example)edit2: You may want to look into diffrent types of trees. they are good to know.
The only thing I looked up was syntax, and for that, i really need a better reference. (I'm using jamsa's programmer's bible, and it's ASS)
As for "getting it" i think i do. Or at least I hope i do.
And for new data structure types, i'm trying to learn hashing on my own, i've learned binary and trinart trees on my own. However, this is still first year, second semester, and we haven't formally learned anything more than arrays and such... (if you look on the "lecture slides" section under prof kobti, we've only just finished bitwise operations.)
And as for your co-worker, make him code everything off the computer first. Have him do it on paper, with a pencil, in pseudocode first, and then have him code it on the PC. I find that if someone is having problems with code, it's normally that they just don't know what thet want to do, instead of knowing what they want, and not knowing how to get there. I always write pseudo frst, even if it's just a lab.
BTW, thanks for the praise.
No, Really. Bite me.
quote:
Nobody really understood why Tegadil wrote:
That is driving me crazy - I cannot see the relation between the word order, the numbers, and the words that appear in place of the numbers.
well, any time a word is printed onscreen, it is moved to the top of the list.
so, if our list is:
1:hello
2:bob
3:jello
4:frog
5:sally
6:if
and then you encounter the number 4 in the file, you'll print the word frog, and then move frog to position 1, and then the list looks like this:
1:frog
2:hello
3:bob
4:jello
5:sally
6:if
try that.
No, Really. Bite me.
quote:
Maradon XP got all f'ed up on Angel Dust and wrote:
I know, I was just kidding.I remember doing this one enormous tic-tac-toe program in my C++ class. It had DOS-based graphics and everything. I managed to finish it in about 1000 lines of code where most had almost twice that.
I did that program. Except I had an if/else if statement to account for every possible movement.
I "got it" I think as far as coding went, I was like in the top 3 or so students in our class. Qbasic made for more fun though, I was a crazed half asleep freshmen who would randomly burst our at his computer .
C++ was more chanllenging after getting the hang of Qbasic and VBasic. But it's fun, keeps you thinking, and you get to do so many variable names, that usually end up being called thing, thingy or thingymothing, and stuff like that
Yes, I drove my teacher nuts as she tried to keep track of the different thingies, but I always got my stuff done, and always made sure it worked right.
Our final game was Maxit, I wonder if I still have a copy of that around, but you had to make a board, 5 by 5 numerical numbers wide. You also had to make player classes, who would interact with the board to move their peice. It would randomly fill the board with numbers ranging from -5 to 5, and take the players names. For extra credit you could do AI, and a replay function. The game was great, just simply great. My AI bit, it just went for the highest number, but still, I'm just a highschool student, and I didn't have enough time to think out much more than that (1 week for the project, I only worked on it in class, never took the time to set C up on my comp).
But cool stuff Burger, good job, I might try and take a look at your code, just to keep in the C spirit (ugh).
I probably won't finish it, though. Not in a MILLION YEARRRSSSSSS
"Don't want to sound like a fanboy, but I am with you. I'll buy it for sure, it's just a matter of for how long I will be playing it..."
- Silvast, Battle.net forums
quote:
When the babel fish was in place, it was apparent Beta Tested said:
I hated C++, oh so much, it made my head hurt, oh so much.I "got it" I think as far as coding went, I was like in the top 3 or so students in our class. Qbasic made for more fun though, I was a crazed half asleep freshmen who would randomly burst our at his computer .
C++ was more chanllenging after getting the hang of Qbasic and VBasic. But it's fun, keeps you thinking, and you get to do so many variable names, that usually end up being called thing, thingy or thingymothing, and stuff like that
Yes, I drove my teacher nuts as she tried to keep track of the different thingies, but I always got my stuff done, and always made sure it worked right.
Our final game was Maxit, I wonder if I still have a copy of that around, but you had to make a board, 5 by 5 numerical numbers wide. You also had to make player classes, who would interact with the board to move their peice. It would randomly fill the board with numbers ranging from -5 to 5, and take the players names. For extra credit you could do AI, and a replay function. The game was great, just simply great. My AI bit, it just went for the highest number, but still, I'm just a highschool student, and I didn't have enough time to think out much more than that (1 week for the project, I only worked on it in class, never took the time to set C up on my comp).
But cool stuff Burger, good job, I might try and take a look at your code, just to keep in the C spirit (ugh).
Well, a couple things:
1) It's actually C code, not C++ (our school compiler is C only, not C++, so if you want to get your code to compile, you need to limit yourself to only using C commands and such...) However, it'll compile fine in a c++ compiler.
2) Keep plugging away. The important thing isn't learning all the commands of a language, it's learning how to solve problems. I still suck ass at C programming, but I know enough general programming theory, and i've coded enough to know what should be able to be done, and if i ned to, i just look up how to do it. That's how i learned about the malloc command. I knew that there had to be a way to ask for some space dynamically, i just didn't know exactly how. So i googled for "dynamic memory linked list c programming" and read for a couple minutes, and then, BINGO. So learn the ideas, not just the syntax and commands.
3) grats on the game, if you've still got a copy sitting around, i might like to see it.
No, Really. Bite me.
quote:
Fazum'Zen Fastfist stumbled drunkenly to the keyboard and typed:
For my programming class, I'm gonna try and make a first person shooterI probably won't finish it, though. Not in a MILLION YEARRRSSSSSS
it's doable, but EXTREMELY tough. I've seen it done in turing, but the results were none too inspiring.
No, Really. Bite me.
And I know C and C++ aren't the same thing, but they are pretty close. I can look at C and kinda get an idea of that things are happening (looking at my friends mud while they happen to be coding it). Just trying to compair something that I know something about hehe.