Programming techniques?

Hello everyone, I am newish to programming. I have been trying to teach myself how to program an arduino for a while now and every time I start to get somewhere, life throws me another ball to juggle so it gets postponed. I have read several books on it (Getting started with Arduino, Practical Arduino, several websites + many tutorials) not to mention trying to reverse engineer the sketches to under stand how they work. I am currently in the middle of moving back to the states so my old duemilanove is packed away. There is a nice shinny uno in the mail though! I fly a lot of RC models, so my longterm goals are to be able to build a max7456 based and GPS equipped OSD, learn how to work with PPM and PWM to build my own RC transmitters. I would eventually like to build my own hexapod or even biped one day.

I have a pretty good idea of how the sketches work (but not have been able to write many since I have nothing to test them on) The one thing that every source has failed to explain is how they figured out how to make the sketch. The best example I am come up with is when I was in physics class, the teacher taught us to read everything, dump unnecessary information and write down all of the variables, all of the equations and to draw pictures of what is happening or will happen. A lot of the examples say "this is what we are going to do and this is how I did it." I know with larger sketches, there are a lot of variables to keep track of. Do you guys have notebooks where you make a summery of what will be done, how to do it, where to get more information, essentially schematics for the sketch?

I am currently working on a real simple model to start out with. It will have two "mouse" switches in the front to act as touch bumpers, one IR range sensor, and two cont. rotation servos for the main drive. The idea will to have the robot go forward until the IR range sensor detects an object infront of it. Then it will slow down as it gets closer. Once it hits the wall it can detect which sensor was pressed first, back up, turn in the according direction and keep going forward. Eventually I would like to be able to have it read PPM or PWM (depending on which kind I get) to make the robot compatible with "RC" electronics.

You might want to start with something even more simple. Break all that down into separate tasks and do one sketch each.

Arduino programming is C++ programming, so get some basic material on that. Maybe download a free C++ compiler to learn with. Its faster than writing/uploading/testing sketches, and these environments have free C++ debuggers. A debugger lets you step through your code, examine variables and do other handy things.

whiteglint143:
Do you guys have notebooks where you make a summery of what will be done, how to do it, where to get more information, essentially schematics for the sketch?

While I doubt many do it - one proper way to go about this is known as "process mapping" - aka, flowcharting. Visio (if using Windows - there are similar apps for other platforms) is your friend here, but you can also use pencil and paper if need be.

Start "high level" with the task or idea you want to flesh out; this level should consist of only a few steps (three for a minimum - your "start" label, your process block (a square or rectangle, with a description of what is happening at that level), and your "end" label - in the case of the Arduino, since it loops forever, this label will probably never be reached, but include it for completeness, perhaps).

Break out your high-level process block into a set of smaller sub-process blocks; you may at this stage need flow branching "blocks" (diamonds) - at each branch, there is only one of two paths that may be taken (corresponds to "if test then branch1 else branch2") - if you need multiple checks, use multiple stacked or other methods for the branching (but don't -ever- put multiple paths off a single branch - that is an "ambiguous" case, and will confuse you and others).

Lines between each section have a singular arrow at the end of the line, to show flow thru the flowchart. Lines connecting elements of the flowchart are "one-way" streets only, so to speak. NEVER put an arrow at both ends of a line; this is ambiguous. Instead, draw another line to show the flow back to an element.

On process blocks, you can add comments or such to represent data - you can also represent data variables being set using a parallelogram. With that said, let me try my hand at some bad ASCII art to detail a simple process flowchart - here's what you might start off with:

  +--------------+
  |    Start     |
  +--------------+
         |
         v
+-----------------+
|Do Something Here|
+-----------------+
         |
         V
  +--------------+
  |     End      |
  +--------------+

Then you flesh out the "Do Something Here" block:

    +--------------+
    |    Start     |
    +--------------+
           |
           v
   /-----------------/
  / Get Some Input  /
 / Into Variable X /<----------------------------------------+
/-----------------/                                          |
           |                                                 |
           V                                                 |
           +                                                 |
          / \                                                |
         /   \                                               |
        /     \               +-----------------------+      |
       /       \              |                       |      |
      +   X>5?  +----YES----->| Display Output On LCD |------+
       \       /              |                       |
        \     /               +-----------------------+
         \   /
          \ /
           +
           |
           NO
           |
           V
   +--------------+
   |      End     |
   +--------------+

Ok - so maybe that's fairly basic, but it should show the concept of what I'm getting at; what you'll find about this process is a few things:

  • You want to start small, and break those process blocks into smaller tasks
  • NEVER try to start at the detailed level; you'll get bogged down in the details, and won't complete the process (or you'll get lost)
  • If you find you have lines crossing all over the place, this is an indication of a problem:

a) make that area a process block, and lay out the details on another page
b) reorganize your logic - you are building "spaghetti code"
c) have you missed a step?
d) have you put too many steps in place?

  • Think closely about the steps as you write them down; once you have them down - take a step back/breather - and come back later...
  • You may find you missed something
  • Keep in mind the idea of "soft process steps" - that is, steps that are done outside of the computational process, that are necessary to the completion of the main process - these MUST be mapped too.
  • Think in terms of "inputs to a process" and "outputs of a process"; all processes have inputs and outputs.
  • Finally - I can't stress enough the importance of starting high-level, and working down to the details!

Something else you may find interesting (though it is usually used for management and business details, but some of the info is useful for programming), is the concepts, ideas, and such behind a methodology called "Six Sigma"; it can be applied to software design - although on the scale of small personal projects for microcontrollers, it might be overkill. However, for larger software systems and processes, it can be used to identify problems long before they crop up, or to identify issues in processes that might be causing problems, but it is unknown why...

Note that the above flowcharting is "bare bones basic" - there are other methods out there (entire books have been written on the subject over the past 60 years); one involves situations where data may flow to other sub-processes outside the main process; and you place the flowchart in a "timeline" format (flowing generally "downward"), with the different sections layed out in a horizontal fashion. This can be useful when you want to see how the data is truely flowing between separate but interrelated "layers" of a larger overall process.

There are other methods out there which could be used, but I think for basic projects, flowcharting and simple data modeling may be all that is needed (for instance, for larger complex processes, a method of software modeling could be used; but I think that may be well outside the scope - except perhaps for larger programs written for a Mega, or maybe larger overall systems in which the Arduino or other microcontroller plays a supporting role - such as a complex robotics system or such).

It will also be useful to use some kind of versioning controls for your source, so you may want to set that up in order to keep track of your revisions (both for the code as well as your flowcharts, and the rest of project).

Two replies and you already have two major methodologies described - top down - Crosh and bottom up - skyjumper. Many arguments have been had over which is best. Usually, the answer is " a combination of the two". Top down gives you structure and you fill in the details later. Bottom up finds a subset of the problem and solves it to make a component you can fit into the larger solution later. Both allow you to test early and often. Your problem Top down:

setup()
{
// do this later
}
loop
{
ReadSensors();
ActOnSensorInput();
}

You can write those two functions, to do nothing more than serial.print their names and you have a testable program. Next step perhaps, read specific sensors from the ReadSensors routine. Those can be stubs too, just printing what they will one day do. Then you can have them return fixed results, without ever reading a physical sensor. Refine and refine, test at each stage until, "Hey look, I'm reading the sensors and controlling the motors". Now to debug it.

Bottom up, looking at the problem, you obviously need to control the speed of your motors. Write a function SetMotorSpeed(motor1speed,motor2speed). Call it from setup, loop does nothing - the whole sketch is just a test harness for the function. SetMotorSpeed actually interacts with the servos and makes them run. Test the function, set it aside. Arbitrarily, next, you need something that will read the IR sensor - write a function for that. Eventually, you'll have a toolbox full of functions that work with your hardware, acting as an api that abstracts its details away. You may be able to see a way to slot them together as is, or you may need some controller functions to use them. Or, just maybe, it's time to use the top down approach to get a structure to put them in. It's hard to use either approach on its own - deciding which to use at any point in the project is a bit of an art that comes with practice.

Thanks for the replies! I currently have a macbook and there is a program called omnigraffle. It is a flow chart organization program that also functions as a 2D cad pretty well. (I also have a windows partition for everything else I need to do) Do you guys use any type of references like flash cards while programming?

I am still learning, so I will use my robot as an example.

To start, I would have to figure out my inputs, outputs and how I have to make them relate to each other.

The bot would be equipped with two servo motors for propulsion and two touch sensors. That is two outputs and two inputs. I plan on using my old duemilanove for this project. I would want the servos to go on pins 10 and 11. Since the touch sensors are "digital" they could go on 8 and 9.

The program would flow something like this (please correct me where I am wrong)

I need to declare the libraries, constants, and variables.

Next I enter void setup() to declare the pinModes and I am honestly not sure what else would need to be declared. I noticed most sketches declare a lot of stuff before the sketch enters void setup() Could anyone explain why?

After that would be void loop() From what I have read, void loop() is the heart of the program, like the motor in a car. I want the robot to always go forward until it touches something. Would it have to leave void loop() to another function to back up and turn depending on which sensor was pressed? After it finished backing up and turning, it would enter the main loop again and continue going forward.

I believe the program would look something like this:

#include <servo.h>  //includes the servo library

Servo leftMotor; //makes servo object for left motor
Servo rightMotor; // makes servo object for right motor

int leftBumper = 8; //left bumper is on pin 8
int rightBumper = 9; //right bumper is on pin 9
int leftBumperPress = 0; //variable to store left bumpers position
int rightBumperPress = 0; //variable to store right bumpers position
[color=red]unsigned long millis = 2000 //amount of time[/color]

void setup()
 {
leftMotor.attach(10); //attaches servo to pin 10
rightMotor.attach(11); //attaches servo to pin 11
leftMotor.writeMicroseconds(1500); //keeps servo centered
rightMotor.writeMicroseconds(1500); //keeps servo centered
}

void loop() //here is where it is going to get hairy!
{
leftBumperPress = digitalRead(leftBumper); //reads the state of leftBumper and assigns its state to a variable
rightBumperPress = digitalRead(rightBumper); //reads the state of rightBumper and assigns its state to a variable

leftMotor.writeMicroseconds(2000); //makes left motor go forward
rightMotor.writeMicroseconds(1000); //since left and right is reversed from each other, I must use opposite //command

if (leftBumper > 0) //sees if leftbumper has been pressed
{    [color=red]for( )//if true, reverses both motors for a certain amount of time[/color]
  {         leftMotor.writeMicroseconds(1000); 
            rightMotor.writeMicroseconds(2000); 
   }          
           [color=red] for()//makes robot turn for a certain amount of time[/color]
   {         leftMotor.writeMicroseconds(2000);
             rightMotor.writeMicroseconds(2000);
    }
}



if (rightBumper > 0) //sees if right bumper has been pressed
{    [color=red]for( )//if true, reverses both motors for a certain amount of time[/color]
  {         leftMotor.writeMicroseconds(1000); 
            rightMotor.writeMicroseconds(2000); 
   }          
           [color=red] for()//makes robot turn for a certain amount of time[/color]
   {         leftMotor.writeMicroseconds(1000);
             rightMotor.writeMicroseconds(1000);
    }
}


}

This is my first attempt at writing a bit of code, it isn't meant to work and I am telling you there are a lot of inefficiencies and problems but I tried my best to make sure the sytnax is right. Since my servos are continuous rotation, I chose to use servo.writeMicroseconds() instead of the version with degrees. I could probably make a variable like int forward = 2000 instead of using 1000, 1500 and 2000 for starting, stopping, and reversing.
I need to learn how to use the for() command with a timer, which is why I highlighted everything in red.
As I was saying before, I think it would be better to have something such as this:

void loop()
{
//robot drives forward waiting to touch something
//if left bumper is touched, program starts void backwards and turn right
//if right bumper is touched, program starts void backwards and turn left

}

void backwards and turn left()
{
//sets servos to reverse and turn left
}

void backwards and turn right()
{
//sets servos to reverse and turn right
}

Am I headed in the right direction? :cold_sweat:

yep; now fill in the parts before setup, create void setup(), and fill in void loop()

example:

byte leftbumper = 2; // will be on pin2
byte rightbumper = 3; // will be on pin3

void setup(){
pinMode (leftbumper, INPUT); // pin will be a input 
digitalWrite(leftbumper, HIGH);  // using the internal pullup resistor
// bumper press closes a switch to ground, pulling the pin low
// same for other pin

void loop(){
 if (digitalRead(rightbumper) == 0){
// go back & turn right
code_here;
}
if (digitalRead(leftbumper) == 0){
// go back & turn left
code_here;
}
// no switches touched
code_here;
//  to go forward a short duration, then back to top of loop to read the switches again
} // end void loop

I think people are forgetting something about the approach I mentioned:

Coding happens -after- you build your process map. The process map is a very, very important step. It graphically shows the process you are trying to implement (and indeed, building modules "bottom up" could be done as a part of this process - you can try it, at least - I wouldn't recommend it, though); this graphic will show you things (by its structure, as well as how easy or difficult it is to route the process lines) which will tell you whether your process is good, or whether it will result in spaghetti code if you implement it as-is.

Writing things out in pseudocode (or real code) can help get your thoughts organized; but such methods won't show you possible hidden gotchas (for instance, if in a process there are "soft processes" going on that -aren't- or -can't- be encoded into a program, then coding it won't help you - but you can easily define them in a process map/flowchart).

Only once you have gotten your process completely laid out graphically (as best as you or your group can manage) - only then should you attempt to code it.

I once worked for (years ago) a Six Sigma membership organization; we once spent about a month in meetings detailing our membership recruitment process - both how it was currently working, and how we wanted it to work. We applied all we knew about Six Sigma to the process. We had an insane number of flowcharts, process maps, etc - we discovered tons of things in our processes that weren't explicitly documented anywhere ("soft processes"); we also found more than a few issues, as well as issues within our software system that weren't known (because originally it had been a piece-mealed process). Doing this exercise, though tedious and long (seriously - there was an entire week where we did nothing each day but sit, discuss, draw flowcharts, and think about our process), ultimately showed me things about software development that I hadn't considered - and changed my mind about the use and usefulness of process mapping and flowcharting.

While it is a helpful tool after the fact - it becomes an even more powerful tool if you apply it before you even start typing code.

Only once you have gotten your process completely laid out graphically only then should you attempt to code it.

I feel obliged to point out that not everyone believes this. "Rapid prototyping" (code early, code often, start over if you need to) has proponents as well. To some extent, it will depend on where "the hard parts" are in your project. You can have a lovely flowchart that describes things at some level in great detail, and have all your bugs be in the nitty-gritty details. And you can have perfect bits of code that are sloppily combined to do the wrong thing.

A lot of introductory programming texts, including many of the Arduino intros, are very focused on the mechanics of getting anything at all to happen, and skip some the "Computer Science 120" concepts like "data structures" and "algorithms." (usually a 2nd semester class? You might look for books or online classes on those subjects.) There's a whole suite of "midrange" concepts in between "turn on a pin" and the high-level logic of making an autonomous vehicle behave reasonably...

I feel obliged to point out that not everyone believes this.

I feel obliged to agree.
The information density of most graphical representations is very poor, and miss out (because they mostly cannot be represented) many real-world constraints (aka "gotchas") like asynchronous events.

I haven't flow-charted (or Jackson structure diagrams, or Booch or...) in well over twenty years - ideas are invariably sketched out in some form of pseudo-code (C or occam based) and fleshed-out.

Its a while to wait (December). But I have a book coming out on this very topic.

http://www.barnesandnoble.com/w/programming-arduino-getting-started-with-sketches-simon-monk/1104771108

Sequence diagrams and all the other diagraming techniques in the UML pantheon can be useful on occasion as a way of clarifying your ideas. But most are only useful when you have lots of classes and lots of threads of execution. Which is not the case with Arduino. The phrase 'sledge hammer to crack a nut' springs to mind.

I find that careful "programming by intention" (the new buzz phrase for top-down) is a great way to write easy to read code with short functions thats pretty much as clear as psuedo-code or flowcharts.

The only diagramming notation I find useful in Arduino programming is state transition diagrams, when I have a particularly knotty parsing problem.

Also many of the principals of agile development:

  • dont be afraid to toss it away and start over. Its often quicker in the long run.
  • YAGNI - you ain't going to need it! - dont over engineer
  • Do the simplest thing that could possibly work

Having more of a hardware background then software, my program development tends to follow the method I've always used to build circuits for my projects. One circuit section at a time then test, then move on to the next stage. I might first build the power supply section, test it at various loads and check for noise or ripple, before moving on to the next stage. This worked well for Ham Radio projects in my past and I've stuck with it ever sense.

So my software development tends to follow the same strategy. If say I'm using a I2C device in a project, I might first write little test functions to be sure I understand how the device works and responds to commands by first writing a sketch to build the needed functions and test them. Then I leave that sketch for later and move on to the next section, maybe the display or user input controls, etc. Then only when I have all the sketches written to work with the individual subsections of the project do I then combine the functions I've written into the final project sketch.

This method may not be as fast as a good top down design, but does insure I make slow and steady progress and rarely have to 'start all over'. It also tends to be easier to troubleshoot the final sketch as all the 'tricky' functions have already been debugged.

So maybe that only works for me because I have no real 'deadline' or boss or team waiting on my production. :wink:

This method may not be as fast as a good top down design, but does insure I make slow and steady progress and rarely have to 'start all over'. It also tends to be easier to troubleshoot the final sketch as all the 'tricky' functions have already been debugged.

Actually its a really good approach - and not incompatible with top down, where you would just comment out or 'stub out' code yet to be tried.

Also I often write what the Agile SD world call 'Spike solutions' when looking at something new. These throw away sketches are just to understand something new. I often cut and paste from them as the 'real' sketch develops.

cr0sh, I started making a top to bottom flow chart. It was a little harder than I thought because as I went through the basic "robot moves forward, runs into object, backs up, turns" I started seeing all of the little things I forgot such as the internal pull-up resistors. (Thanks CrossRoads!) The more I did, the more ideas I got. Such as having a variable to detect the state and compare it to a timer to debounce the switches

I have read many tutorials on how to program the Arduino and most of the easier ones make sense, it's a bit harder to start "speaking" it and writing my own code. Much like watching a television show in another language as opposed to being in a foreign language class that actually teaches the knitty gritty. All of the books I have read so far just say "Do this to make this happen." I would really like to read something on how they designed the code, the processes they went through to find what they need, and how they kept track of it all for a robot or similar application.

This is something that really interest me so I am trying hard to learn. I would take a class on this in a heart beat but there are no opportunities for me at the moment. I just got done with a 2 year tour over seas and finally headed back to the states. I have flown model airplanes for a little over 12 years now, everything from foam chuck gliders to tricopters, even 40% 3D planes. I love tinkering and electronics has always been something that has fascinated me.

Practice makes perfect!

whiteglint143:
cr0sh, I started making a top to bottom flow chart. It was a little harder than I thought because as I went through the basic "robot moves forward, runs into object, backs up, turns" I started seeing all of the little things I forgot such as the internal pull-up resistors. (Thanks CrossRoads!) The more I did, the more ideas I got. Such as having a variable to detect the state and compare it to a timer to debounce the switches

I have read many tutorials on how to program the Arduino and most of the easier ones make sense, it's a bit harder to start "speaking" it and writing my own code. Much like watching a television show in another language as opposed to being in a foreign language class that actually teaches the knitty gritty. All of the books I have read so far just say "Do this to make this happen." I would really like to read something on how they designed the code, the processes they went through to find what they need, and how they kept track of it all for a robot or similar application.

This is something that really interest me so I am trying hard to learn. I would take a class on this in a heart beat but there are no opportunities for me at the moment. I just got done with a 2 year tour over seas and finally headed back to the states. I have flown model airplanes for a little over 12 years now, everything from foam chuck gliders to tricopters, even 40% 3D planes. I love tinkering and electronics has always been something that has fascinated me.

Practice makes perfect!

Something you've probably noticed from this thread, as far as programming techniques (and development techniques in general) - is that there really isn't any one "right" way to do things, but rather a bunch of different ways to arrive at similar answers. None of them are perfect, unfortunately. All should be investigated, perhaps learned and applied as needed where they seem to fit right. I would say for most things in the Arduino world, top-down flowcharting, or bottom-up strategies might be overkill; many times you can just code and play with it, and get what you want working fairly easily without having to go into a lot of detail.

It's only when you have a complex system in mind that you should begin to apply these methods and methodologies to a problem to solve it. That isn't to say you couldn't solve it without applying any of them - you could. The problem comes as to when to define the project as "complex"; that's a line that moves depending on a number of factors (most of all, perhaps, is the experience level of the individual or group implementing the solution).

Ultimately, hard-won experience and practice is the only way to become good at it...

:slight_smile:

Well one thing that is very different for arduino projects (and embedded controllers in general) is that one is usually designing both software and electronic hardware in parallel. This is quite different from traditional software projects run on general purpose computer systems. And I would never recommend building hardware first and then the software or visa verse, just too much opportunity for a whole lot of rework to creep in. Plus hardware is hard (and messy) to change after say a PCB has been already been completed.

I think some amount of prototyping for both the hardware and software for arduino projects is almost mandatory.

Lefty

The whole FPGA (Field Programmable Gate Array) thing is very interesting in that respect-- you define the hardware via software, in effect.

Arduino projects are typically quite small, in terms of code. Sure, the chip has 32k of program space, but in all honesty most sketches compile down to well below half that.. and things like "blink" compile down to next to nothing. Most projects involving microcontrollers are actually pretty simple, tens of lines of code in most cases, rather than hundreds or thousands.

That being said, it never hurts to learn some code hygiene. Especially when "seat of the pants" coding, take time to carefully comment your code. Later, when you return to make that code better, you won't be wasting time trying to figure out what a particular code block does.

Programming is not too difficult, actually- it's just an exercise of breaking down the problem and thinking the solution through. If you've properly thought through your solution, the code will be easy to write in any language. Don't forget to comment the code however, clarity in what your program is doing is the best design decision you can make.

focalist:
Don't forget to comment the code however, clarity in what your program is doing is the best design decision you can make.

Key to this also is using meaningful variable names; don't use variable names with only a few characters, unless the meaning of those characters is clear, or the variable name is for an index value or such. Your code should document itself; reserve comments for those areas of the code where even clear variable names and unambiguous code still fail to convey what the code is for at a glance. Don't comment obvious sections, and don't put comments like "this code loops 10 times"; those aren't helpful. Keep a lookout for sections of your code that repeat; chances are that code should be relegated to a function (ie, code reuse). Another tip is to save any optimization steps for last; pre-optimization can actually hurt you more than help (depending on the code involved and the complexity).

All that being said, I want an Arduino debug environment.

I searched all over for a similar general idea of what I want to do. I found this on www.tronixstuff.com. He takes a RC car and mods it to work with an arduino. When I started my robot, I wanted forward, left, back, and right to be their own separate functions and use void loop to check the sensors and call upon the appropriate code to do the function. In the general sketch I posted before, I had everything within void loop() depending on a lot of if's and for's. I am finding the hardest part of programming is going from "I want my robot to do this" to breaking it down what actually needs to be done while learning the building blocks at the same time. I know the code for the robot could be enhanced to have the robot back up in an arc, accelerate and decelerate, I think the best code would allow for those functions to be added on later.

This is not the code I intend to use but I like how it is structured. Just to get some more ideas, could you guys post the general flow of how you would do it?

/*

 Example 5.4

Control a toy remote control car with arduino - figure eight

Chapter Five @ http://www.tronixstuff.com/tutorials

*/

int forward = 12;

int left = 9;

int right = 7;

int del = 5000;

void setup()

{

pinMode(forward, OUTPUT);

pinMode(left, OUTPUT);

pinMode(right, OUTPUT);

}

// to make creating the car's journey easier, here are some functions

void goleft(int runtime)

{

digitalWrite(left, HIGH);  // tell the steering to turn left

digitalWrite(forward, HIGH); // move the car forward

delay(runtime);

digitalWrite(forward, LOW);

digitalWrite(left, LOW);  // tell the steering to straighen up

}

void goright(int runtime)

{

digitalWrite(right, HIGH);  // tell the steering to turn right

digitalWrite(forward, HIGH); // move the car forward

delay(runtime);

digitalWrite(forward, LOW);

digitalWrite(right, LOW);  // tell the steering to straighen up

}

void goforward(int runtime)

// run the drive motor for "runtime" milliseconds

{

digitalWrite(forward, HIGH);  // start the drive motor forwards

delay(runtime);

digitalWrite(forward, LOW); // stop the drive motor

}

void loop()

{

goforward(1000);

goleft(1000);

goright(1000);

}

Whilst I agree that Six Sigma techniques can have their place (I work for a Six Sigma org that uses waterfall software dev mostly)..... it doesn't half suck the fun out of everything and I think that the 'fun' part is what has made the Arduino so successful. It reminds me of the dissapointment. that I hear, that most people encounter when they decide to learn how to fly a light aircraft. They think - cool I can jump in my plane and fly anywhere I want! The reality is that they have to draw umpteen charts, check the weather, tell people blah blah blah urrghhhh.

I like the approach Si details and it's probably the closest to the way in which I work. I knocked together a simple project in an evening the other day using that method. It was fun and no flowcharts :slight_smile:

I'm not saying that cr0sh is wrong - we've clearly identified that there are a number of correct answers.