tags:

views:

321

answers:

15

What is the first non-trivial app you'd write in a language you're learning or that you've just learned?

I'm currently trying to teach myself C#, and I'd like to write a non-trivial application to test my knowledge and to get more comfortable with the various libraries.

When I was learning Java some years ago, I decided to write a chat server/client that was pretty similar to IRC. I was wondering what the first app you choose to write in a new language is?

+1  A: 

You want a mix of application types that will test you in class design, data management, and implementation. Here are a few ideas:

  • Calendar Application with appointments
  • Simple Email application
  • Simple WCF application
  • Chat application (both web and winforms to make it challenging!)
Dave Swersky
+1  A: 

I'd choose an application that challenges you to a certain extend and the prepares you for your (possible) next assignment. I.e.: create web site with some AJAX if you plan to use C# with websites. Create a nice WPF application if you plan to go all graphical. What the application actually does is not really important, it's how you build it that counts.

It'd be grand if you're capable of having your application peer-reviewed though. Feedback is much more vital then a working application.

Your second project: try some enterprise tools, like NHibernate for database abstraction, Linq2Sql for the same, play a bit with nUnit or other testing framework. My experience: forcing yourself to use these, show a lot more of the C# language then you'd ever encounter with just building apps. Climbing the steep learning curve is well spend.

Abel
+1  A: 

I think a contact manager is a good place to start it covers (UI,Data persistence,Classes,File IO (for exporting contacts).

Data persistence = Database access.

Faisal Abid
+3  A: 

A blog engine. It's the new Hello World.

Seriously, I would try two approachs:

  • Write something that solves a problem I usually have so I keep motivated;
  • Try to do some exercises/challenges from the book I'm learning from.
GmonC
+4  A: 

It's almost traditional to write a simple Lisp interpreter. That's how I got my feet wet in C#, SML, and Prolog, and it really does help you to internalize the language's idioms and control structures, and of course you end up with a neat little toy at the end.

It seems to me that many of the other suggestions are more dependent on a language's libraries than on the language itself. Writing a blog engine, for instance, might be interesting, and might even be useful, but it seems to me that little of what would be learned would generalize to the language as a whole. Of course, it's important to know how a language's libraries can access network, database, and GUI functions, but that's the sort of thing you could easily pick up before a project; you can't really grok a language's semantics from a reference.

Thom Smith
+1, for pointing out that most other answers focus on certain specific libraries/language features.
MAK
Traditional? I know no one who would start there.
jmucchiello
A: 

I usually code an analytic solution to the N-body problem. He did said "non-trivial"! ;-)

Pete
+6  A: 

There isn't one. It depends on the problem I need to solve at the time.

John Topley
This. I generally have some kind of tool I need, or some process I want to automate at any given time, and I generally just write whatever that is in whatever language I'm trying to learn.
notJim
+1  A: 

I usually write a Mandelbrot set visualizer.

CesarGon
+2  A: 

If you are particularly interested in maths, a raytracer is a very good choice.

Demoscene

It allows you to use both basic and more advanced features in a cool real world application, requiring a mix of paradigms like object-orientation (design patterns), proceduralism, concurrency (multithreading) and functional programming (linq*, recursion) giving you a nice overview of different language features without relying on external libraries.

Its basic implementation is not too big or complicated, but the project is highly extensible if you like a bigger thing - You can always increase the level of detail or perfection, introduce a GUI (WPF*) or even create a domain-specific scene language showing how to use compiler compilers!

And - in comparison with other demo applications - raytracers have very nice outputs!

See this C# raytracer* as an introduction.

*Things marked with an asterisk are C#-specific but apply to other languages as well in slightly different forms.

Dario
A: 

One of the various prime finder algorithms.. Takes a few minutes and gives you a good idea of the various language of the language.

Ian P
A: 

A cookbook, a RSS feed, or a network client.

Dean J
+1  A: 

I go through the code kata site attempting to solve these exercises in the language I'm learning.

MarkPowell
A: 

I usually code some answers to programing challenges like problems. Just to solve some maths/logic, but trying to do things the new way..

Simeon Pilgrim
A: 

I wrote an XML-RPC client in C# as my first non-trivial app in C# after few hours of study.

Shailesh Kumar
A: 

I always write an encryption program first. It helps me to learn to use all the parts of the language in engaging ways without it being too overwhelming.

Isaiah