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.
(written 2010-08-02)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Q100 - Object Orientation and General technical topics - Learning to Progam [116] The next generation of programmer - (2004-11-13)
[1605] Learning and understanding scripting programming techniques - (2008-04-08)
[1963] Best source to learn Java (or Perl or PHP or Python) - (2008-12-28)
[1985] Learning to program as a part of your job - (2009-01-10)
[2001] I have not programmed before, and need to learn - (2009-01-19)
[2048] Learning to program in PHP, Python, Java or Lua ... - (2009-02-19)
[2092] Tracking difficult bugs, the programmer / customer relationship - (2009-03-20)
[2286] New to programming? It is natural (but needless) for you to be nervous - (2009-07-14)
[2294] Can you learn to program in 4 days? - (2009-07-16)
[2326] Learn a new programming language this summer. - (2009-08-06)
[2504] Learning to program in ... - (2009-11-15)
[2505] I almost put the bins out this morning - (2009-11-16)
[2973] Learning to program - where to start if you have never programmed before - (2010-09-28)
[3120] Learning to write good programs in C and C++ - separating out repeated code - (2011-01-04)
[3551] Some terms used in programming (Biased towards Python) - (2011-12-12)
[3895] Flowchart to program - learning to program with Well House - (2012-10-14)
[4008] Reading and checking user inputs - first lessons - Ruby - (2013-02-17)
[4318] Learning to Program - how we start to teach you at Well House Consultants - (2014-11-16)
[4322] Learning to Program - the conditional statement (if) - (2014-11-21)
[4323] Learning to program - Loop statements such as while - (2014-11-22)
[4324] Learning to program - variables and constants - (2014-11-22)
[4325] Learning to program - what are algorithms and design patterns? - (2014-11-22)
[4326] Learning to program - comments, documentation and test code - (2014-11-22)
[4337] Learning to program sample program - past its prime, but still useful - (2014-12-02)
[4575] Learning not just what a program does, but how to design it in the first place. - (2015-11-06)
Some other Articles
Community consultation - a true open inputAmbassador or Anorak?Redirecting a page - silent, temporary or permanent?Groupsave tickets - 3 or 4 train tickets for the price of 2Programming Standards from the start!The Land of the Black LabradorLAMP - Linux, Apache, MySQL, PHP - install, configure, administerGlobal Computer Maintenance DepartmentSorting people by their namesExclamation marks and question marks on ruby method names