MattCook
Posts: 16
Joined: Tue Feb 21, 2012 1:46 pm
Location: S. Manchester

Re: Learning to Program - Tasks

Fri Mar 09, 2012 7:25 pm

There have been (quite entertaining, but utterly futile) threads about what language is the BEST (TM).  I suggest that a more useful thread would be suggestions of programming tasks.  These could be achieved in any language, and if the program produces the required result, then it has worked. Simple.

These should range from the "Hello Universe" type of nonsense, through "Enter values and output result" types, on to GUI and Animation tasks.

The major problem I find when sitting down to learn these modern languages (I've been coding RPG since the 80s...) is that I need something hard enough to be interesting, but achievable (by me).  I suspect that most people will face a similar What Now sticking point.

A good suggestion I read was to code Noughts and Crosses (Tic-Tac-Toe).  Initially read and display in text form, but then improve over time with Computer Plays, Graphic display, and then Networked Player V Player.

Anybody have interesting challenges to set ?

Matt

User avatar
johnbeetem
Posts: 945
Joined: Mon Oct 17, 2011 11:18 pm
Location: The Mountains
Contact: Website

Re: Learning to Program - Tasks

Fri Mar 09, 2012 8:10 pm

A text version of "Hunt the Wumpus" is a nice size IMO.  It a nice, gentle introduction to data structures.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: Learning to Program - Tasks

Sat Mar 10, 2012 8:32 pm

I'm not quite sure what I'd pick, to be honest.  I suspect the basics of "programming" are covered by the "usual suspects" (hunt the wumpus, solitaire, hammurabi, soduku solver / generator, anagrammer, etc).

Once you can do all that lot, it's a question of picking something you want to do, and learning how to do it.

Yes, that sounds fatuous. It is.

I'd probably (for the sake of keeping it interesting) suggest picking apart the mechanisms behind a "classic" video game and reimplementing it.  An easy one would be "Breakout", then "Berzerk", something like "Defender" might be harder.  There's lots of stages covered in that, from working out how the various elements interact (via playing the damn game), how to encode those actions and interactions, you can probably involve some OO, an event loop, some graphics, and so on.  But all of is in the reach of a "new" programmer.

andyl
Posts: 265
Joined: Tue Jan 10, 2012 11:05 am

Re: Learning to Program - Tasks

Sat Mar 10, 2012 9:12 pm

Some other suggestions -

Conway's Game Of Life.  As well as the normal graphics stuff and the celluar automota algorithms you could do stuff that reads / writes to files.

Hangman - read the words file for the computer to choose a word for you.  Also network p2p play.

Minesweeper or a reimplementation of Mined Out (the Speccie/BBC game)

Tetris.

Even good old basic Space Invaders - I remember writing one on the Commodore PET mumble years ago.

But above all don't keep on doing the same sort of thing over and over again.  If you do a game, then try something involving networking and files next.  Maybe something to do with twitter feeds or webpages.

But above all share your code.  It is great when it works, but some people will be able to suggest other ideas where it could have been implemented differently/better.  IRL a lot of professional developers have code walk-throughs where the same kind of thing happens.  Hopefully people will be sensible and adult enough to say "Did you consider doing X for Y?" or "did you consider modelling this object in this way rather than the way you did it?" rather than saying "you've done it all wrong".  The idea is to make the beginner think about why they chose a particular solution.  Getting a working program is good and fun, but it requires self-reflection and practice to become really good.

Mark22
Posts: 2
Joined: Wed Dec 28, 2011 5:36 pm

Re: Learning to Program - Tasks

Sat Mar 10, 2012 10:04 pm

Isn"t the biggest problem (at least in the UK) going to be getting this added to the national curriculum so that there will be time to teach kids how to programme? After that, a library of "things to try" and "things that have been done" will get kids to enhance existing programmes.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Learning to Program - Tasks

Sun Mar 11, 2012 11:18 am

What about nightmare park?



Probably the first game I ever played on a programmable home computer (Pet 8k). Quite engaging
Alex Eames RasPi.TV, RasP.iO

Francois Thunus
Posts: 7
Joined: Tue Sep 06, 2011 2:29 pm

Re: Learning to Program - Tasks

Tue Mar 13, 2012 9:22 pm

Mark22 said:


Isn"t the biggest problem (at least in the UK) going to be getting this added to the national curriculum so that there will be time to teach kids how to programme? After that, a library of "things to try" and "things that have been done" will get kids to enhance existing programmes.



Hope is in sight: http://coderdojo.com/

therealeasterbunny
Posts: 77
Joined: Thu Feb 02, 2012 5:53 pm
Contact: Website

Re: Learning to Program - Tasks

Thu May 30, 2013 5:50 am

Ooohhh... Nightmare Park for Pi.

I've actually just released it for Android - search for it on Google Play - it shouldn't be rocket science for me to pop it on Pi too as its written in Java :)

Return to “Staffroom, classroom and projects”