Learning to program in ...
These are bullet point topics to accompany the "Learning to program in ..." days which are available to complete novices in front of Well House Consultants programming courses. The day is presented using examples in
PHP,
Lua,
Python,
Ruby,
C, C++,
Tcl,
Java or
Perl as appropriate, with examples written in front of the class so that they'll see not only WHAT a programmer does, but also HOW a programmer decides on what to do.
Stored programs ...
• A series of instructions in a text file
• Each instruction separated from the next somehow
• Instructions run sequentially
Running a stored program ...
• Need to translate from text to runnable
• Compiler, load and go, and interpreter options
• Need for library routines
Hello World ... and Hello delegates too
• Why we do a "hello world" example on every course
• How "Hello World" works in [target]
• Try it yourself.
• Cross-operating system issues
Operators and operands (or commands)
• The two language patterns, and which [target] uses
• Writing a numeric expression
• Bodmas and brackets
Variables
• Storing a result under a name for later use
• Variable naming rules
• Declaring variables - type, size and scope, perhaps?
• Integer, Float, String and Boolean FAMILIES
• Other types and your own types
• Strong or weak typing
• Casting, converting and co-ercing
• Outputting a variable's content
Constants
• Writing constants - implicit type
• Language support for constants
• Giving constants a name - for maintainability
Your first useful program ... needs user input
• Reading from the user
• Converting a string into the right type
• The need for validation (to come back later)
• Exercises!
Conditionals
• Boolean Conditions
• Optional coding
• need for blocks to define how much is optional
• elseif and else
• Testing needs increased
• if - unless - switch - note shorthands for later
• what is equality
• equality in floats
• nesting
• Exercises!
Loops
• repeating block of code
• difference to conditional
• need to ensure you always exit the loop
• break and perhaps others
• Exercises!
Algorithms - a first bite
• Accumulator
• Min, max, average
Documentation - a first bite
• Comments
• Commentish code
• User documentation
• Exercises!
From here on, we're looking far more at demonstrations to show the delegates the way ahead - there's a revision of how the subjects above relate to the particular language on the main programming course that follows the "learning to program" day, and we'll go on to cover many of the following topics in much greater depth too - and with practicals!
Structure and more blocking
• Avoid repeated code via loops
• Avoid repeated code via named blocks
• Parameters in, parameters out
• Why default global is convenient but bad
• static variables or a clean start?
• Scoping in [target]
• Namespaces, and Structured and OO code
Collections
• Need to store multiple values under a single name
• Accessing via indexes
• Keys 0 based, 1 based, or not based at all.
• Fixed or variable length?
• Dealing with overflow
Pointers
• Extended collections (objects, structures, unions)
• Passing multiple bits of data as one
• Multiple names
• Symbol table and heap model
• Garbage Collection
Loading and Libraries
• Don't reinvent the wheel
• Sharing code between programs
• Sharing code between programmers
• Library Load order
• Mixing languages
• Version Control
Design
• Structured programming and the OO model
• What the user requires
• UML - using the concepts at least
• Future Proofing
And also ...
• Usability, maintainability, robustness and legality
• Debugging and tools
• Other algorithms - sorting and selecting
• Coroutines, parallel processing, threads, network resources
• Coding environments and standards
• Updates and language upgrades
• Security - abuse, misuse and error.
• Tailoring Standard Applications
• User training and support
• How does it work on The Web
• Open source, sell your programs, or just use yourself?
Footnote ...
• HTML, XML and SQL are not PROGRAMMING languages.
• But stored procedures, XSLT and even bash are.
(written 2009-11-15, updated 2009-11-29)
Associated topics are indexed under
Q100 - Object Orientation and General technical topics - Learning to Progam [3551] Some terms used in programming (Biased towards Python) - (2011-12-12)
[3120] Learning to write good programs in C and C++ - separating out repeated code - (2011-01-04)
[2973] Learning to program - where to start if you have never programmed before - (2010-09-28)
[2898] Programming Standards from the start! - (2010-08-02)
[2505] I almost put the bins out this morning - (2009-11-16)
[2326] Learn a new programming language this summer. - (2009-08-06)
[2294] Can you learn to program in 4 days? - (2009-07-16)
[2286] New to programming? It is natural (but needless) for you to be nervous - (2009-07-14)
[2092] Tracking difficult bugs, the programmer / customer relationship - (2009-03-20)
[2048] Learning to program in PHP, Python, Java or Lua ... - (2009-02-19)
[2001] I have not programmed before, and need to learn - (2009-01-19)
[1985] Learning to program as a part of your job - (2009-01-10)
[1963] Best source to learn Java (or Perl or PHP or Python) - (2008-12-28)
[1605] Learning and understanding scripting programming techniques - (2008-04-08)
[116] The next generation of programmer - (2004-11-13)
C050 - C and C based languages - C - General [3129] Extra courses - C and C++ - (2011-01-12)
[3053] Make - automating the commands for building and installing - (2010-11-16)
[2848] C course - final course example puts it all together - (2010-07-02)
[2763] Our C and C++ training course are on Open Source platforms - (2010-05-13)
[2669] Efficient use of dynamic memory - C and realloc - (2010-03-10)
[2536] All the Cs ... and Java too - (2009-12-13)
[2091] C, C++ and C# ... Java and JavaScript - (2009-03-20)
[2086] C Programming v Learning to Program in C. Which course? - (2009-03-17)
[2002] New C Examples - pointers, realloc, structs and more - (2009-01-20)
C051 - C and C based languages - C++ - General [3587] C++ Courses - do I get official certification at the end of my Well House course? - (2012-01-20)
[3250] C++ - how we teach the language and the concepts behind the language - (2011-04-17)
[3155] Rake - a build system using code written in Ruby - (2011-02-03)
[3067] Using C and C++ functions in the same program - how to do it - (2010-11-24)
[3052] Getting your C++ program to run - (2010-11-15)
[2851] Further C++ material - view new or old - (2010-07-04)
[2577] Complete teaching example - C++, inheritance, polymorphism - (2010-01-15)
[2370] C++, Python, and other training - do we use an IDE - (2009-08-21)
H050 - PHP - General [3530] A typical weekend?? - (2011-11-28)
[3025] Learning to Program ... in PHP. Course examples. - (2010-11-01)
[2663] Improve your PHP on a weekend away - (2010-03-05)
[2589] Your PHP code does not work? Here is where to start looking. - (2010-01-18)
[2559] Moving the product forward - ours, and MySQL, Perl, PHP and Python too - (2010-01-01)
[2430] Not just a PHP program - a good web application - (2009-09-29)
[2400] Are you wanting to learn PHP? - (2009-09-08)
[2227] Learning PHP, Ruby, Lua and Python - upcoming courses - (2009-06-11)
[2222] A (biased?) comparison of PHP courses in the UK - (2009-06-07)
[2097] PHP Course - for hobby / club / charity users. - (2009-03-22)
[1722] PHP examples - source code and try it out too - (2008-07-26)
[235] Preparation for a day's work - (2005-03-04)
J050 - Java - General [3573] New in Java 7 - and why we are not running public Java 7 courses - (2012-01-08)
[2861] MySQL and Java - connectivity past, present, and future thoughts - (2010-07-09)
[2420] Exceptions in Java - why and how - (2009-09-24)
[2417] Java Programming Fundamentals - (2009-09-24)
[2114] Which Version of Java am I running? - (2009-04-02)
[2087] Comparing Java Courses - what can we do? - (2009-03-17)
P050 - Perl - General [3407] Perl - a quick reminder and revision. Test yourself! - (2011-08-26)
[3332] DNA to Amino Acid - a sample Perl script - (2011-06-24)
[3322] How much has Perl (and other languages) changed? - (2011-06-10)
[3093] How many toilet rolls - hotel inventory and useage - (2010-12-18)
[2971] Should the public sector compete with businesses? and other deep questions - (2010-09-26)
[2825] Perl course - is it tailored to Linux, or Microsoft Windows? - (2010-06-25)
[2783] The Perl Survey - (2010-05-27)
[2736] Perl Course FAQ - (2010-04-23)
[2374] Lead characters on Perl variable names - (2009-08-24)
[2242] So what is this thing called Perl that I keep harping on about? - (2009-06-15)
[2228] Where do I start when writing a program? - (2009-06-11)
[1897] Keeping on an even keel - (2008-11-21)
[1750] Glorious (?) 12th August - what a Pe(a)rl! - (2008-08-12)
[743] How to debug a Perl program - (2006-06-04)
[400] New in the shops - (2005-08-01)
R050 - Ruby - General [3158] Ruby training - some fresh examples for string handling applications - (2011-02-05)
[2866] Ruby - how does it compare and where is it the right language? - (2010-07-11)
[2826] Ruby - training for automated testing users - (2010-06-25)
[2605] Ruby on Rails - a sample application to teach you how - (2010-01-30)
[2104] Ruby Programming and Rails - 4 different courses in one - (2009-03-26)
T050 - Tcl/Tk - Tcl, Tcl/Tk and Expect - General [3286] Should we cover expect and/or Tk on our public Tcl courses? - (2011-05-11)
[3192] Tcl - Some example of HOW TO in handling data files and formats - (2011-03-04)
[2681] Tcl - a great engineering language - (2010-03-17)
[2474] Using Tcl and Expect to automate repetitive jobs - (2009-10-24)
[2429] Tcl scripts / processes on a web server via CGI - (2009-09-27)
U050 - Lua - General [3528] December courses - PHP, Python, Perl - and a weekend Lua course - (2011-11-24)
[2947] Teaching Lua to a Perl advocate - (2010-09-06)
[2555] Bookkeeping - (2009-12-29)
[2492] Lua Classes - open enrolement - (2009-11-04)
[2331] Certification Revisted - Lua - (2009-08-09)
[2318] For Lua Programmers AND for Town Planners - (2009-08-02)
[2315] New Lua Examples - for last weeks delegates - (2009-08-01)
[2309] Lua training class in Spanish - (2009-07-29)
Y050 - Python - General [3519] Python - current versions and implementations (CPython, Jython, IronPython etc) - (2011-11-13)
[3489] Python courses and Private courses - gently updating our product to keep it ahead of the game - (2011-10-20)
[3463] Busy weekend of contrasts. - (2011-10-03)
[3076] Python through the Snow - (2010-12-01)
[2822] Python training courses for use with ESRI ArcMap software - (2010-06-23)
[2778] Learning to program in Python 2 ... and / or in Python 3 - (2010-05-24)
[2394] Two days of demonstration scripts in Python - (2009-09-05)
[2367] Learning to program - how to jump the first hurdles - (2009-08-20)
[2285] Great new diagrams for our notes ... Python releases - (2009-07-13)
[2020] Learning Python - many new example programs - (2009-01-31)
[2017] Python - a truly dynamic language - (2009-01-30)
[16] Python training - (2004-08-16)
Some other Articles
Community Area Partnership - inaugural AGMAdmissionGood example of recursion in Python - analyse an RSS feedLearning to program in ...Melksham manslaughter case concludes - sort ofMonday night, Tuesday nightSimplesDynamically formatting your results (Lua)ourdog is Greyhound, Staffie and Ginger Cake