![]() |
![]() |
#1 (permalink) |
Poo-tee-weet?
Location: The Woodlands, TX
|
keeping my C++ skills brushed up over the summer
well i took the first programing principles class in the spring and am taking the second this fall and i was wanting to keep my skills from degrading too far... and was wanting some ideas for some fun projects to do....
im learning C++ and know functions and multiple dimension arrays... all that kind of stuff... but it hasnt been any object oriented stuff... thats the next class...
__________________
-=JStrider=- ~Clatto Verata Nicto |
![]() |
![]() |
#3 (permalink) |
Crazy
Location: Springfield, VA
|
If you are interested in gaming...
Teach Yourself Game Programming in 24 Hours This book should really get you familiar with C++. The first few chapters are a bitch, but once you get past them, its really good. |
![]() |
![]() |
#4 (permalink) |
Upright
Location: Denver
|
Hehe....I've got an evil one for you....
Write a text based Hangman game What it should do: 1) Take a text file as a command line argument 2) Parse the text file to change all letters to the same case, remove punctuation and remove duplicate words 3) Put words into some data structure 4) Pick a length at random (remove all others from the data structure) Now for the fun stuff.... 5) Prompt user for a letter (Note: that you have not picked a word yet, remove all words from the data structure that contain picked letter) You will notice that this is a devious program, in that it does whatever it can to tell the user that they entered an incorrect letter, only when the letter chosen results in one word does the program actually 'pick' the word itself. Challenges: -Make your own data structure (no STL) -Play with GUI libraries to make a pretty user interface
__________________
Do be do be do |
![]() |
![]() |
#5 (permalink) |
Tilted
|
C++ is a good language, but beware of some books. They teach some very bad methods for programming (and I can't tell you which are good and which are bad, really). If you want to keep your skills sharp, just pick a small project and work on it. Experiment with new things. At least, that's been my method. I never could stay in step with those "Teach Yourself (C++, Game Programming, World Domination) in (24 hours, 7 days, a millenia)" books.
Also, if you were a Linux user, I'd suggest grabbing some code from a project and just hacking on it a bit. Especially applications like gkrellm, Gaim, etc. that you could write plugins for. |
![]() |
![]() |
#6 (permalink) |
Upright
Location: Orlando, FL
|
Probably the best way
Is to join your schools programming team.
I participated in the programming team for years and am a much better programmer for it. You will learn a lot of stuff that isn't convered in class and you will become very good at implementing the theories that you are learning. Just my .02 Peter |
![]() |
![]() |
#8 (permalink) | |
Upright
|
Quote:
If your summer is long, make a project for yourself. Even if it has little to know use. It will atleast keep you fresh. |
|
![]() |
![]() |
#9 (permalink) |
Upright
|
Fake robot colony. Make a simulation where ants would go and find food and then return it to a base, when-ever the base has X food, anouther ant will be born... It is alot of fun to program and you can redo it when you get OO programing and graphic programming...
Reikes |
![]() |
![]() |
#10 (permalink) |
WARNING: FLAMMABLE
Location: Ask Acetylene
|
or...
Instead of learning one of the pre-packaged windows systems, learn openGL which shouldn't take more then a week for basic 2d stuff, and write your own window code. You can do really great effects very easily with openGL. For fun you could mirror everything behind a semi-transparent plane to get really cool reflections, or you can add drop shadows or lighting. Once you have openGL you can build something more interesting then you could otherwise.
3d data structures will give you all the experience you need in designing data structures for almost any purpose. 3d algorithms on the other hand can be pretty difficult to understand, and if you actually wanted to learn how CG works you would need to take a course. You might find it tempting to study direct3d or direct*, but they can be pretty daunting and are badly documented (IMO). Using any of microsofts tools is. They work in a fairly similar manner but direct* requires a ton of picky initialization code. http://nehe.gamedev.net/
__________________
"It better be funny" ![]() Last edited by kel; 07-25-2003 at 06:32 AM.. |
![]() |
![]() |
#11 (permalink) |
Tilted
Location: Ottawa, ON, Canada
|
The site kel mentioned is great, you can totally cut and paste the ugly stuff (good if you are a rank amateur at Windows API stuff, which is just about everyone on the face of the earth) And get into doing funky stuff with 3d graphics. Make your own screensavers, etc. It's fun.
|
![]() |
![]() |
#13 (permalink) | |
Tilted
|
Quote:
A couple of projects that we used when I was a TA for a C++ class are a student database (where you can add, remove, and lookup students), and a small MUD (Multi-User Dungeon) game. The latter is a bit tough for a first project, but work your way toward something, step-by-step. The first thing I would research are pointers. Write a simple C program that uses pointers. I'll give a quick intro here. A pointer variable (something like int *var or char *var) just points to an area in memory, e.g. another variable. This is a very important thing that you need to get the grasp of pretty much immediately. It will look confusing, but it's really not. It just takes some learning and getting used to. Remember that a "pointer" just points to something. Oh, and when you allocate memory, free it ![]() |
|
![]() |
![]() |
#14 (permalink) |
Addict
Location: Ottawa, ON, Canada
|
Holy Cripes!
The guy just learned the fundamentals of programming, and most of you are already suggesting he get into things like OpenGL and DirectX. You're going to make his brain explode ![]() You're probably going to want to stay away from those things for now, because they can be quite advanced, even when performing seemingly simple tasks. And just a quick example of how complicated it can get, putting a simple pixel on the screen using DirectX is a matter of initializing DirectDraw, setting the drawing mode, creating a primary surface (and any optional clippers), getting a pointer to the surface, locking it, and knowing where to enter the value representing the colour into the surface's buffer. Not something you should be doing when you're just learning the fundamentals of programming, especially when you add the fact that DirectX is written entirely using COM. ![]() Instead, what you should really do is start out with simple programs. I think that <B>Edvard_Grieg</B> was on the right track with his hangman game, but I just think it uses too much file accessing and parsing, which tend to be more novice skills. If you're only at the point where you've just learned abstract data fundamentals and multidimensional arrays, I would start out even simpler. You could start out by writing a calculator that takes in a formula and spits out a response. Then when you've done that, try writing a calculator that takes input in Polish notation (you'll have to look that one up on the Internet). However, this idea is almost too simple, and won't keep you busy for long. Instead, a good suggestion would be to write a text based program that simulates a scenario of some sort. Simulations tend to be more focussed on the thought process (i.e. figuring out how to simulate the scenario), but still use a lot of fundamental programming skills during the implementation. Two good suggestions from my college days: =-=-=-=-=-=-=-=-=-=-=-=-=-=- 1) A line at a bank. Create a single queue at a bank, with X amount of tellers open to serve the bank customers. Each teller takes a random amount of time (say between 1 to 10 minutes) to serve a customer before they can service another customer. Give the bank line twenty customers, and see how long on average it takes for the 20th customer to be served if there are 2 tellers, 3 tellers, 4 tellers, etc. up to 10 tellers. This actually becomes an interesting exercise, because you should be able to see a point where the efficiency of the bank peaks, and adding more tellers no longer improves efficiencies. 2) The life of a forest This one is nice, because it actually uses two dimensional arrays. Basically, the idea is to create a two dimensional array (the size is up to you), and each element in the array represents an area in a forest. The areas can have three states: T = Full of green trees, I = Infested with insects, and D = Deforested When the forest is displayed on the screen, you advance the forest through time periods by pressing a key. The rules for moving the forest through a time period are as follows: - any 'T' that has an adjacent 'I' will become an 'I' - any 'I' will be changed into a 'D' - any 'D' will be changed into a 'T' (I believe you're only supposed to change the 'D' after <B>two</B> time periods have elapsed, but if this doesn't give you desirable results, try switching it back to one time period) You decide what I mean by 'adjacent', whether it's only on the four major compass points (N, E, W, S), or if it's all eight points. To start the simulation, initialize several different arrays with different scenarios, such as: T T T T T T T I T T T I D I T T T I T T T T T T T or T T T T T T I D I T T D T D T T I D I T T T T T T And let them run, outputting the new forest after every time period. You could even create a user interface that allows the user to choose amongst several scenarios, and keeps track of how many time periods have elapsed. As an extended challenge, if you know how to do text programming, you could give each forest state its own colour (i.e. T is green, I is purple, and D is brown), and instead of drawing a new array on the screen underneath the old array everytime a time period elapses, overwrite the old array on the screen. This method actually gives a stunning effect of animation if you just skip the key pressing, and let it run automatically (with a delay() to slow things down a bit). =-=-=-=-=-=-=-=-=-=-=-=-=- These are just a couple of ideas that I could think of off the top of my head. I'm hoping I was clear enough in my examples, but if you need any elaboration, just let me know, and I'll try to give a better description.
__________________
"A witty saying proves nothing" - Voltaire Last edited by Quadraton; 07-27-2003 at 11:35 AM.. |
![]() |
![]() |
#15 (permalink) |
Banned
Location: Greater Vancouver
|
Are you looking to exercise your algorithms or your syntax? Usually beginner-level exercises like you've requested work on one or the other
![]() I'd suggest just getting a book from the library/googling - it's how I learned. They usually have pretty good examples and exercises, and they're also handy for reference. I also took a computing competition when I was in high school - check it out here: http://contest-cemc.uwaterloo.ca/ccc/index.html They have many problems similar to the one Quadraton just posted. If I remember the contest correctly, the Junior-level problems would be about your skill level. You might need to learn file i/o, but that's fairly simple if you're already accustomed to screen i/o ![]() C: fopen(), fclose(), fprintf() C++: fstream open, close, <<, >> |
![]() |
![]() |
#16 (permalink) |
Dead Inside
Location: East Coast, USA
|
If you are interested in programming competitions, try http://www.topcoder.com It's an on-line real-time programming contest site.
I really like it because it is quite reminiscent of programming contests I took part in when I was in college. I also like programming under time pressure because sometimes I get very anal and cannot get any coding done. good luck and have fun. |
![]() |
![]() |
#17 (permalink) |
Crazy
Location: Salt Lake City
|
Make some money, that's what I'd do. After my first C++ class I decided to keep my skills sharp by writing a small game for the Pocket PC and selling it online. Sure hasn't made me rich, but it's a nice bonus income. Trust me, the best way to learn any skill is to make money doing it from the very start. It's the ultimate motivator.
__________________
---<>---^^---<>---^^---<>--- ---^^---<>---^^---<>---^^--- ---<>---^^---<>---^^---><--- |
![]() |
![]() |
#18 (permalink) |
Insane
Location: Seattle
|
My suggestion for those who want to learn C or C++ is the same.
Read 'C Programming Language', by Kernighan and Ritchie. This book is the 'bible' of C programming. Be sure you can solve every problem in the book. If you want some more, get a book like 'C++ How to Program' by Deitel and Deitel. Go through the book and complete all the excercises in there. Learning to write software is about learning. It's not about producing great works. While academic excercises may not be as impressive as OpenGL based windowing modules, the academic excercises are designed to teach you what you need to know to construct software of any scope in any language. I interview people trying to obtain jobs in the software industry, from college graduates to industry experts with 20+ years of experience. The quickest way to weed out the 90% of losers from the 10% of winners is to ask them a simple 101 or 102 programming question. I then get to stand in amazement as people with impressive resumees as long as a laundry list can't reverse a linked list.
__________________
"It's a long story," says I, and let him up. |
![]() |
![]() |
#19 (permalink) |
Poo-tee-weet?
Location: The Woodlands, TX
|
well i forgot about this thread... and the summer is almost over... i havnt been doing much to keep up on the programing... just a little bit here and there... but Quadratons forest thing sounds like its doable... i think ill start tryin to work on it tonite or tomorow... least my parents would complain about not doing anything productive...
__________________
-=JStrider=- ~Clatto Verata Nicto |
![]() |
Tags |
brushed, keeping, skills, summer |
|
|