Permalink
Browse files

more exercises

  • Loading branch information...
1 parent 609b8c6 commit 895c33730734429e7e2b2394b2d36ef5f4be079e @paulwpagel committed May 17, 2009
Showing with 60 additions and 0 deletions.
  1. +29 −0 Readme.txt
  2. +4 −0 hoist.txt
  3. +27 −0 loops.txt
View
29 Readme.txt
@@ -1 +1,30 @@
This project is designed to provide a place for exercises which craftsman can solve to sharpen their skills.
+
+
+
+Types of exercises
+- design style: like the bowling game
+- maths
+- algorithms
+- data structures
+- emergent/evolutionary design
+- repair
+- clean code
+- refactoring
+- porting
+- crossing paradigms
+- concurrency
+- parsing
+- little languages
+- loops
+- caching
+- optimisation
+-- reduce memory footprint
+-- reduce cpu usage
+-- trading space versus memory and vice versa
+- switching data structures
+- kinds of duplication
+- removing patterns
+- off by one errors
+- ranges
+- bugs
View
4 hoist.txt
@@ -0,0 +1,4 @@
+Learning how to hoist variables out of for-loops
+- identify invariant expressions in loops
+- extract a variable that doesn't have side-effects
+- extract variables with no-side effects versus those that have only 1 side-effect
View
27 loops.txt
@@ -0,0 +1,27 @@
+I think that people
+would be surprised by the amount of depth that there can be in
+something as superficially simple as a for-loop. For instance:
+- simple incrementing for-loops such as counting from 1 to 10 printing the index.
+- simple decrementing for-loops such as counting from 10 to 1 printing the index.
+- using for-loops to replace recursion for instance traversing a tree and printing out the nodes
+- learning to reason about nested for-loops
+- looking at the ways in which different languages implement them and
+getting a sense for the ways in which they are more or less equivalent
+but some languages have more powerful constructs than others
+- the evolution of modern varieties of for-loops
+- for-else loops for instance in Python
+- the interaction between for-loops and co-routines:
+http://en.wikipedia.org/wiki/Coroutine and McIlroy's original paper
+http://www.iq0.com/notes/coroutine.html
+- the relationship between for-loops and other kinds of loops e.g.
+while-loops, do-while loops and Knuth's loop and a half construct:
+http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf
+
+
+Implement each of these in one or more languages
+
+
+
+
+Hoisting:
+- learning how to hoist variables out of for-loops

0 comments on commit 895c337

Please sign in to comment.