[Edu-sig] Techniques to force students to plan

Todd Whittaker todd@thewhittakers.org
Fri, 15 Nov 2002 13:34:20 -0500 (EST)


On Fri, 15 Nov 2002, Tim Wilson wrote:

> So what works? Is anyone aware of a technique that may be more effective
> than flowcharting? I'd love to get some ideas of things to try with our
> next project.

Are you doing object-oriented development in Python, or are you doing more 
procedural development?  If its more procedural, then there's a great 
visual flowcharting tool (i.e. you execute flowcharts) available at 
http://cis1.wku.edu/visual/ that can help with the design of algorithms.  
If it's more OO, then this isn't as much of a help.

What I've taken to doing in my classes (teaching OOP in Java) is to force
test-driven development with JUnit.  Students don't buy it at first, so
they'll write all the code, then write the test cases.  Once I show them
(projecting my laptop screen) how much easier it is, and how much better
the design ends up being, the light starts to go on. Also, with
test-driven development, they're forced to "evolve" the code (and
sometimes the interface) as more test cases are added.  Thinking of test
cases will cause at least some forethought about the algorithm.

Perhaps you could have them write the code to test their algorithm first,
and then write the algorithm.  That should at least delay their impulse to
code.


-- 
Todd
 
-------------------------------------------------------------
 Todd A. Whittaker  mailto:todd@thewhittakers.org
                    http://www.thewhittakers.org/~todd/
-------------------------------------------------------------