Main Content

Programming Standards from the start!

Archive - Originally posted on "The Horse's Mouth" - 2010-08-02 07:42:01 - Graham Ellis

Yesterday was a "Learning to program in ..." lead in day - for delegates who are new to programming, and will be learning one of the languages we teach; we cover basic principles, but in the way that they're applied to the language the delegate is learning (no starting with Basic and switching to Perl, or starting with Pascal then changing horses to C here!). Specifically, yesterday was Learning to program in Python ... and here is one of my very early "hello world" examples.

All programming courses seem to start with a program to output the words "Hello World" - it's the simplest program, and it shows the delegates how to edit the text of the program into a file, go through any steps to turn it into an executable and link it with libraries (no such steps in Python!) and then run it. Then we proceed to do a bit more.

Here's my second program ...

# This is all about the program
# Who, what, when, how (use and support)
 
print "hello world"
print "The sky is green the grass is blue"


You'll note that I've gone on to talk about sequences of statements that are run after each other (I also reminded the class of the need to save the file before they run it!), and I have already gone on to talk about adding comments and documentation.

Whether I'm teaching Python or Perl, Lua or C, Ruby or Tcl, PHP, C++ or Java ... I'm going to stress the need for writing robust, re-usable, supportable and maintainable code from hour one, day one. As far as I'm concerned, delegates should automatically be labeling their programs with details such as:
• What the program does
• How to use the program
• What version this is
• Who wrote it
• Where to get support / more details
• What the copyright is

For a listing of public courses coming up in the languages I mentioned above, see [here]. There are "learning to ..." courses for delegates new to programming, and other courses for delegates with experience in other languages, in all cases. Public courses take place at our Melksham, Wiltshire, England training centre - where we also have our own hotel rooms for delegates traveling to learn with us. And if you've a group of delegates, we can run a private course in Melksham, or in your own offices in the UK, in Europe, or beyond.