« A new "entry level" controller for cost conscious applications | Main | Multitasking in 4 easy steps. »

Call it like it is!

Are you aware that SPLat, like any decent programming language, lets you use meaningful names for inputs, outputs, RAM variables etc? Which of the following fragments say the most to you:

      WaitOn    5
Off 3
or
      WaitOn    FullSensor
Off FillValve

Imagine now that you refer to the FullSensor 75 different times in your program. Then accidentally Production wire the sensor to input 4 rather than input 5 on 250 control boxes.
Which job will be easiest and safest:
1. Rewiring 250 boxes

2. Changing

      WaitOn    5
to
      WaitOn    4
in 75 places in a 3000 line program.

3. Changing

      FullSensor   iEQU    5
to
      FullSensor   iEQU    4
in one place?

And which form will it be easiest for you or someone else to read in 6 months or 6 years time?
One of the golden rules of programming, and a sign of a professional, is to write a program in a style that is clear and uncluttered. Use named "resources", use whitespace to effectively separate functional sub-blocks of code and use comments to describe what a block of code is doing.

This blog entry will not function fully without JavaScript
A very large number of websites rely on JavaScript to work properly. This one is no exception. If our website has worked for you in the past but just broke, you probably installed IE7, which seems to default to disabling JavaScript. There are good instructions for enabling JavaScript here. We recommend FireFox, the Open Source browser.


TrackBack

TrackBack URL for this entry:
http://www.splatco.com/cgi-sys/cgiwrap/microcon/managed-mt/mt-tb.cgi/11

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


About

This page contains a single entry from the blog posted on December 16, 2006 6:40 AM.

The previous post in this blog was A new "entry level" controller for cost conscious applications.

The next post in this blog is Multitasking in 4 easy steps..

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.33