Penguin
Annotated edit history of StuffToCode version 16, including all changes. View license author blame.
Rev Author # Line
16 JohnMcPherson 1 !!!Practise/Play
2
3 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.
10 StuartYeates 4
15 AristotlePagaltzis 5 !! HelloWorld
12 AristotlePagaltzis 6
15 AristotlePagaltzis 7 This is usually a ''very'' trivial program, but a good first exercise when learning how to use a new programming environment.
10 StuartYeates 8
14 AristotlePagaltzis 9 !! TPK
10 StuartYeates 10
14 AristotlePagaltzis 11 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.
10 StuartYeates 12
12 AristotlePagaltzis 13 !! 99 Bottles of Beer
14
10 StuartYeates 15 Make your computer sing the 99 Bottles of Beer on the Wall song.
16
12 AristotlePagaltzis 17 ''Very'' popular: http://99-bottles-of-beer.ls-la.net/
18
14 AristotlePagaltzis 19 !! Greatest Common Divisor
12 AristotlePagaltzis 20
14 AristotlePagaltzis 21 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.
22
23 Seems trivial? Sure, but it's a start.
24
25 !! Compound Interest Calculator
26
27 http://moneyethics.com/Articles/compound.html
10 StuartYeates 28
12 AristotlePagaltzis 29 !! Ward Numbers
30
10 StuartYeates 31 See Wiki:WardNumberInManyProgrammingLanguages
32
14 AristotlePagaltzis 33 A [graph theory | http://www.wikipedia.org/wiki/Graph_theory] problem that looks convoluted enough to get very high-level languages sweating.
11 StuartYeates 34
12 AristotlePagaltzis 35 !! A ProgrammingLanguage
36
13 ElroyLiddington 37 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.
10 StuartYeates 38
12 AristotlePagaltzis 39 !! Esoteric Interpreters
40
10 StuartYeates 41 [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.
42
14 AristotlePagaltzis 43 An example: [befunge.a68 | http://www.wave.co.nz/~glyn/befunge.a68], a [Befunge] interpreter in [Algol] 68 (the esoteric in the obscure).
10 StuartYeates 44
12 AristotlePagaltzis 45 !! A self compilation system
46
13 ElroyLiddington 47 [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].
16 JohnMcPherson 48
49 ----
50 !!!Possible Projects
51 If you have an itch to start/work on a project, but can't think of anything to write, here are some possible ideas:
52 * a GTK2 port/replacement of xtraceroute(1).
53 * A decent bridge program for linux (with AI players so you can play offline)
54 * AddToMe
55
56 ----
57 CategoryProgramming

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach()