// reeftank controller guidance plz

Lots of good advice here. A traditional approach for complex system development is "Stepwise Refinement".. championed by Nicholas Wirth, who created the PASCAL language.

You could write the outline of your system with Procedures for each major function like ControlPump or ReadLightSensor or ReadClock or ReadUserInput, but have those procedures at first do nothing at all. You could define your State Machine and debug the logic it implements with long delays and outputting the State Variable to the serial monitor to see where you are. Make your procedures put out phoney expected data to see that it is handled correctly. Leave the real-time type things until last.

See: Arduino Playground - HomePage (Thanks Alexander Brevig) and maybe the example at: http://arduino.cc/forum/index.php/topic,37153.0.html

You'll be glad you implemented a State Machine when you can find out where you are every time and Why..

If you get your skeleton constructed properly and well controlled, you can start adding flesh. Flesh is weak and will break, but you can handle one thing at a time.

If you can relax and get into the "Oh, that's an interesting Problem!" mode and avoid getting bent out of shape and thrashing, you may find you LIKE this stuff!