Penguin

Differences between current version and predecessor to the previous major change of StuffToCode.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 16 Last edited on Monday, May 9, 2005 1:23:14 pm by JohnMcPherson
Older page: version 1 Last edited on Monday, January 20, 2003 1:50:53 am by GianPerrone Revert
@@ -1,6 +1,57 @@
-Whenever I set about trying to learn a new programming language (very frequently) I often find myself stuck without simple exercises to do. I hope that if people add neat simple programming exercises here, it could be quite useful.  
+!!!Practise/Play  
  
-!!!Greatest Common Divisor  
-"The oldest known nontrivial algorithm is Euclid's Algorithm for computing the greatest common divisor (gcd) of any two positive integers (300 B.C.). The idea of the algorithm is based om the observation that, gcd( a,b)=gcd(b,remainder( a,b)), and that gcd(x ,)=x ."  
+If you find yourself stuck without simple exercises when trying to learn a new ProgrammingLanguage , try these. If you know a neat exercise that could stand to be mentioned here , please add it
  
-Seems trivial? I agree , but it's a start. 
+!! HelloWorld  
+  
+This is usually a ''very'' trivial program, but a good first exercise when learning how to use a new programming environment.  
+  
+!! TPK  
+  
+The [TPK Algorithm | http://cs.fit.edu/~ryan/compare/] is DonaldKnuth's HelloWorld. It doesn't actually do anything but it has an array, loop, conditional and function in it to make it exciting.  
+  
+!! 99 Bottles of Beer  
+  
+Make your computer sing the 99 Bottles of Beer on the Wall song.  
+  
+''Very'' popular: http://99-bottles-of-beer.ls-la.net/  
+  
+!! Greatest Common Divisor  
+  
+ The oldest known nontrivial algorithm is Euclid's Algorithm for computing the greatest common divisor (gcd) of any two positive integers (300 B.C.). The idea of the algorithm is based on the observation that, gcd( a, b ) = gcd( b, remainder( a, b ) ), and that gcd( x, 0 ) = x.  
+  
+ Seems trivial? Sure , but it's a start.  
+  
+!! Compound Interest Calculator  
+  
+http://moneyethics.com/Articles/compound.html  
+  
+!! Ward Numbers  
+  
+See Wiki:WardNumberInManyProgrammingLanguages  
+  
+A [graph theory | http://www.wikipedia.org/wiki/Graph_theory] problem that looks convoluted enough to get very high-level languages sweating.  
+  
+!! A ProgrammingLanguage  
+  
+Writing/implementing ProgrammingLanguage will teach you that all the bugs, wrinkles and flaws in the languages you've ever used are there for a reason: ProgrammingLanguage design is challenging and ProgrammingLanguage implmentation is __very__ hard and painstaking work. Plus, if you ever get it to the point where you have users, then they'll never comment on the 9/10s of the code that replicates what all the other languages do except to whine that it's not perfect.  
+  
+!! Esoteric Interpreters  
+  
+[Wiki:EsotericProgrammingLanguage]s, like [Brainf*ck], usually have small instruction sets and simple grammars. Interpreters for these languages aren't big programs but need a fair sample of a programming language's features to implement.  
+  
+An example: [befunge.a68 | http://www.wave.co.nz/~glyn/befunge.a68], a [Befunge] interpreter in [Algol] 68 (the esoteric in the obscure).  
+  
+!! A self compilation system  
+  
+[GCC] is written in [C]. The [Oberon] system is written in [Oberon]. Writing a [Compiler] in the language it compiles is a great way to make sure you understand the language. The hard bit, of course, is the [BootStrap].  
+  
+----  
+!!!Possible Projects  
+If you have an itch to start/work on a project, but can't think of anything to write, here are some possible ideas:  
+* a GTK2 port/replacement of xtraceroute(1).  
+* A decent bridge program for linux (with AI players so you can play offline)  
+* AddToMe  
+  
+----  
+CategoryProgramming