A more advanced "Hello, World"?

5    26 Jun 2015 17:12 by u/spiraldancing

So, "Hello, World" is the tried-and-true first program written by new programmers, and old programmers starting a new language.

I'm looking for suggestions on a more advanced default program/project, that one can write fairly quickly (10-60 minutes or so), that is likely to make use of a wide variety of a language's features, and will allow for decent comparison/contrast of of features between languages.

For instance, I will sometimes write a tic-tac-toe game, or a word/letter frequency analyzer, in a new language as I start learning it, to get a hands-on feel for the differences from languages I already know. So, maybe I already answered my own question, but I'd like to hear what other people think might make good projects for this.

7 comments

2

One simple idea that I like is writing a little program to open commonly used files instead of manually navigating and double clicking. It touches on basic GUI use (creating a window & some buttons) as well as using built-in OS operations. This obviously doesn't cover a very wide range of features, but still could prove somewhat useful if expanded upon.

1

It's a great question but there is a caveat to it: what platform are you aiming at?

Which of the following applies:

  • desktop OS application
  • desktop website (non-mobile interface)
  • mobile website (geared specifically at low-bandwidth and small screen)
  • mobile application (native)
  • mobile application (non-native, e.g. uses HTML/CSS/JS instead of Objective C/Java)

Here are my two credits worth of thoughts on each.

On the desktop I'd go for a calculator. It can be as simple as basic arithmetic to more advanced features like graphing output on a formula using a GUI library.

A website, either desktop or mobile, do a blog. Not just any blog, but one written using object-oriented code. Do role-based permissions, repository patterns, events, JSON (or XML) API, handling uploads, etc. Can be done with or without a framework.

Mobile apps I'm not really well versed on a concept that would be great to cover basics of each. For that, someone else will have to chime in.

1

Similar to tic-tac-toe, writing Blackjack is also a good one. You can make it as simple or complex as you like: start off with just text-based and then create a UI for it.

0

Found it. Here's what I was looking for ... rosetta code.

0

Writing a basic infix to postfix converter, or a small calculator. A lot of string manipulation, function modularity, file I/O, basic dictionary/array data structures.

0

I usually do two things after "Hello, World". First, I check that I can perform simple mathematical operations. Second, I check that I can open files, read from them and write to them.

0

I usually write a database-backed and/or file system backed to-do list application to learn a new language. Usually, 60 minutes is more than enough. If there's plenty of time, also add user login feature, so there will be different list for different user.