Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I think everyone has their own program or set of features beyond "Hello World!", that they use when trying out a new language.

Mine is a guessing game:

I'm thinking of a number 1-10, guess what it is!
Guess: 3
Nope, too low!
Guess: 7
Nope, too high!
Guess: 5
Yes, You win!
Play again (Y/N)? N

What do you write?

share|improve this question

closed as not constructive by Jim G., ChrisF Mar 16 '13 at 21:04

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Is this an answerable question? I mean, by definition there are no wrong answers, if one does not accuse the users answering of lying –  keppla Jul 22 '11 at 7:05

9 Answers 9

It usually goes like this:

  1. Hello World
  2. Hello [user inputted name]
  3. A few problems from Project Euler
  4. A linked list
  5. A simple blog engine (either terminal or web-based, depending on what language)
  6. And from there I dive into a project that I want to work on (but don't care if the design gets mangled as I learn my way through a new language).
share|improve this answer

Whatever I needed to write in the new language in the first place.

share|improve this answer

I'll often try to write a Tetris clone. It touches on a bunch of things, including performance, UI, and synchronization/timers/etc.

Any language that can't make that simple is just a toy.

share|improve this answer
    
How do you define "simple"? Say, I'm learning C or C++. Writing a Tetris clone as the first project wouldn't be very obvious/straightforward, but neither of those languages is a toy. –  Anna Lear Sep 14 '10 at 17:23
    
It'd be obvious and pretty straightforward once you understand how Windows or Qt or whatever does things. (That'd be a prereq for any low- or mid-level language: knowing how to use the underlying system. Even some high-level languages require that.) And Visual Studio (and AFAIK most other IDEs) will create a bare-bones C or C++ app for you, so you can basically just work on the code to run the actual game. –  cHao Sep 20 '10 at 19:59
    
not even hello world? Just right into Tetris? Man...you're a far more ambitious programmer than I am, that's for sure. –  Casey Patton Jul 22 '11 at 21:58
2  
"hello world" is overdone (just about every book about the language already includes it!), and doesn't give a decent language any real workout. I don't really get a feel for the language til i've done something non-trivial with it (which requires that i go and figure out "ok, this is how you do timers...this is how you watch the keyboard"...etc.) –  cHao Jul 23 '11 at 15:21

Basically, I redo the first year of CS:

  1. The first 40-50 Project Euler problems to learn number processing.
  2. Some command-line utilities to learn text processing.
  3. A program that involves a large graph search (e.g. a Klotski puzzle solver) to learn data handling and optimization techniques (and possibly GUI).
  4. An interpreter for a language I already know to learn everything else.
share|improve this answer
1  
+1 for making me discover Project Euler! Thanks bro! –  Dacav Sep 3 '11 at 22:06

My very short list

  • hello world
  • You said [something user said]!
  • (Big jump) An IRC bot
  • Whatever else I'm interested in/paid to write
share|improve this answer
  • Hello World
  • RSS Reader (This one usually hits a lot of the high points without having to worry about storage or having a data source...feeds are everywhere)
  • Blog Engine (Now I bring in data persistence, since I have everything else down.)
share|improve this answer
    
I like the RSS idea. Do you do more web programming than stand-alone, just out of curiousity? –  Michael K Nov 3 '10 at 17:51
    
I do a little bit of everything, but it's mostly services/backend and web with some mobile development thrown in. –  Ryan Hayes Nov 3 '10 at 19:25

followed by a very simple prime number generator, then whatever is on my mind at the time.

share|improve this answer

I like to do some I/O exercises(both file system and console), then a text adventure game, because it helps me understand the way data structures are used in that language (it really helped when I was working on Lisp). They're also fun to make.

share|improve this answer

I Google for a tutorial on the language and follow that, usually. If there isn't one somewhere on the language's website then that's not a great sign. More often than not, I've looked up some examples before even downloading the language toolkit in order to get a feel for what to expect (there's so many languages popping up that you can't hope to try them all, so best to stick to languages with features you find interesting).

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.