View Full Version : ideas for a beginner's programs
sandyrepope
19-02-2007, 22:59
I'm a beginner. Ok, I admit it! I think I'm having the same problems that every beginner goes through and that is thinking of program ideas that are not way beyond the beginner level.
I've spent time just staring at the computer screen waiting for an idea to hit me. So far......... only a headache. Still no ideas!
I just wonder if all beginners go through this or is it just me.
If anyone has any ideas about simple programs to write, Please let me and all the other beginners know about them!
Thanks
Sandy
ErosOlmi
19-02-2007, 23:13
I remember when I started learning programming languages strugglyng with the same, you are not alone.
Than, instead of thinking in terms of ideas to have I started in terms of "problems to solve" and "real life operations to be automated" and I get started learning programming.
So, starting from this assumption, the idea could be:
are there any repetitive tasks I can try to automate?
are there any problem I can think I can solve with a program (archiving and organizing info for example)
if all my real life problems are already solved, is there any people around me (frinds or relatoves) having some problem I can try to solve with a computer program?
...
Another little suggestion I can give you: start simple! start to try to solve little, very litle problems.
Quite sure this post will be full of suggestions.
Ciao
Eros
ErosOlmi
19-02-2007, 23:29
Not to be just theoretical, few ideas, maybe stupid, but can let you start, if you like:
read text files
read text files and count words
read text files, count words and for every word count how many times it was present in file
read text files, count lines, order lines by number of words inside them
Those examples seems stupid or simple to be solved but many of the algos needed to get those results are every day problems in programming.
While you make some code, always add some timing measurements. This will push you to find better more optimized ways to solve the same problem.
Ciao
Eros
ErosOlmi
19-02-2007, 23:44
Last idea. To develop thinBasic we use Power Basic compiler.
In Power Basic support forum there is a nice area where users share some of the code they had produced. All this code was a solution to some problems so they can also be a source for ideas. Have a look at
http://www.powerbasic.com/support/forums/forumdisplay.cgi?action=topics&forum=Source+Code&number=7&DaysPrune=1000&SUBMIT=Go
maybe it can inspire you more.
Ciao
Eros
A very fun and relatively easy program is guess the number game.
1 program asks for users name
2 program says, ok I picked a number from 0 to 100
before it asks, the computer generates a random number between 0 and 100
3 program asks player to enter first guess
4 the program evaluates the guess with the actual number, if match, you got it in 1 try is reported to the user
if guess is lower than the number the computer picked, the program responds 1 try and need to go higher.
if guess is higher then the number the compuet picked, the program responds 1 try and need to go lower.
5. this all loops till a match is found.
6. then the program asks do you want to play again.
and if so repeats the above. if not exists.
This simple, but fun game really covers the basics of most programming with loops, conditions, output and input.
Good luck, I think you will enjoy writing a game like this.
Petr Schreiber
20-02-2007, 11:48
Hi,
when I was younger I found extremely challenging following "learning" sample :):
Computer has basic knowledge of animals. He knows name, sound it generates and movement style. So you think in mind some animal and computer tries to guess it. If he doesn't know, he asks you about the solution and reminds it for next game...
Here is sample output of "game":
> --- Game started ---
> Think animal
> Is it walking ?
No
> Is it flying?
Yes
> Does it say "beep beep"
Yes
> *** It is sparrow ***
> Play again (y/n) ?
y
> --- Game started ---
> Think animal
> Is it walking ?
no
> Is it flying ?
yes
> Does it say "beep beep"
no
> [!] I don't know this animal !
> How is it called ?
Crow
> What sound it makes ?
croa croa
> Thanks !
> Play again (y/n) ?
And in the next game it would be able to "recognize" crow.
I know it is simple but I remember I was impressed a lot by this stuff ;D
Bye,
Petr
Petr, neat. I never saw that game example. That is cool, so while you play it learns. Very Neat!!