The Well House Newsletter - Sunday, 4th December 2016
About us and this newsletter [link] ...
Previous editions: November 2016September 2016July 2016May 2016March 2016January 2016November 2015September 2015July 2015 • this is the current edition

For the Webmaster, Postmaster and moderator Training from Well House Consultants Tcl, Tcl/Tk and Expect Running a training and hotel company Melksham Linux and Shell Programming The Perl Programming Language and its use Python Programming And also ... Apache HTTP and Tomcat Servers Fun and Flames Java and the Java Environment PHP - the language and its application SQL and MySQL Public Transport General Programming Topics C and C++ Programming Keynote Articles Well House Manor - Hotel and Training Centre Around, about and nearby to Wiltshire Ruby and Ruby on Rails Programming in Lua Client Side Languages (HTML, CSS, Javascript)
Keynote article ...

Regression testing - via a very short C testing framework

Code testing is important. Separation of code into separate, managable sections is important. Retesting of code running all the old tests is important when the code sections are enhanced / debugged.

At the end of this week's C course, we wrote a whole series of pieces of logic relating to web server log files - loading data into dynamic (realloc'd arrays of structs, and then extracting data from those structures. And we wrote an initial main routine to run and test from the command line. For initial development, that's great but ...
... the main couldn't remain as we started to build with the logic
... lots of sections / routine groups need testing.

Solution?
• Rename main to a different name such as test_access and leave it in the original file
• build a tiny test harness that runs each set of tests and correlates the results
• have the test harness send standard output (stdout) within the tests to a file

Result?
A rudemintary regression testing system, where each time you add a new set of routines or change something, you can rerun all the tests and get an automated set of replies.

The results of running the test suite look a bit boring:

  WomanWithCat:cj16 grahamellis$ ./framework
  
  .F..
  Failed 1 test(s) out of 4, passed 3
  
  WomanWithCat:cj16 grahamellis$


Commented framework source is [here] and tests and routines to be tested [here] and [here].
(this article written on 2016-01-29)

Other articles ...

Linux and Shell Programming
[4587] shell - bash. Writing conditional tests and statements - the options available
[4586] Extending your bash shell with aliases, functions and extra commands
[4585] What is make? What is gcc?
[4584] Bash ... some new scripts to - handling user input
[4491] Web Server Admin - some of those things that happen, and solutions
Top or Show all for Linux and Shell Programming

Apache HTTP and Tomcat Servers
[4283] Can a legitimate forum post become illegal a year later?
[4234] Change to Libel and Defamation laws from 1st January 2014
[4064] Apache httpd - a robust, open source web server
[4001] Helping search engines with appropriate 400 error codes
[3999] Handling failures / absences of your backend server nicely
Top or Show all for Apache HTTP and Tomcat Servers

C and C++ Programming
[4635] Encapsulating logic in functions and structs - the C approach to Object Oriented techniques
[4634] Regression testing - via a very short C testing framework
[4633] String handling in C - new examples of extracting integers from a string
[4632] Remember to ask the question before you listen for the answer
[4566] C - why is slow to write and debug) but fast to run?
Top or Show all for C and C++ Programming

Melksham
[4726] TransWilts Partner Update for Melksham Area Board - (new - 2016-11-07)
[4704] Three months in community rail pictures
[4701] Pretty at the station too
[4694] Supported Bus Services in Wiltshire - analysis of written-in comments
[4693] Wiltshire supported bus service consultation, early 2016 - interim results published
Top or Show all for Melksham

Training from Well House Consultants
[4705] Course dates - from October 2016 to December 2017
[4689] Training Course schedule for summer and autumn 2016
[4602] Training course and hotel room prices - 2016
[4588] What teach you in a week stays with you for a decade
[4564] Perl, PHP, Python, Lua, Tcl, C++, Ruby - final public courses for 2015
Top or Show all for Training from Well House Consultants

Running a training and hotel company
[4520] No cold sales calls please - but delighted to hear from others!
[4474] Effect on external factors on traffic to our web sites - an update
[4468] Four in a Bed - most popular answers
[4443] Seventh stay away this year - and it's still only February!
[4415] Buffet review - taking the price into account
Top or Show all for Running a training and hotel company

Well House Manor - Hotel and Training Centre
[4715] Well House Manor - Still five out of five! - (new - 2016-10-30)
[4666] Spring at Well House Manor
[4644] In your room at Well House Manor, Melksham, Wiltshire
[4614] PC Plod - alive and scaremongering in Wiltshire?
[4613] Our best hotel customers help us ... to help them ... be our best customers.
Top or Show all for Well House Manor - Hotel and Training Centre

For the Webmaster, Postmaster and moderator
[4714] The technical article feed continues - personal updates more proactive on Facebook now! - (new - 2016-10-30)
[4568] Moderation - and the tendency to over-moderate
[4492] Almost so wrong, but perhaps it's right for some?
[4403] The unbalanced relationship between customer and provider
[4385] A booking that looks too good to be true? It probably is too good to be true!
Top or Show all for For the Webmaster, Postmaster and moderator

General Programming Topics
[4691] Real life PHP application using our course training MVC example
[4626] Singleton design pattern - examples and uses
[4591] From single block to structure and object oriented programming
[4589] Principles or a GUI and their practical application using wxPthon
[4575] Learning not just what a program does, but how to design it in the first place.
Top or Show all for General Programming Topics

PHP - the language and its application
[4655] Image indexer / thumbnail display scripts in PHP
[4652] Testing new algorithms in PHP
[4642] A small teaching program - demonstration of principles only
[4641] Using an MVC structure - even without a formal framework
[4628] Associative objects - one object within another.
Top or Show all for PHP - the language and its application

Java and the Java Environment
[4432] Java web application for teaching - now with sessions and clustering / load balancing demonstrations
[4431] A Java servlet that is also a stand alone program. And a server that is also a web client.
[4430] The spirit of Java - delegating to classes
[4428] Using the lead - passing arrays and other collections in Java
[4427] Java example - for loop and conditionals from course exercise
Top or Show all for Java and the Java Environment

Around, about and nearby to Wiltshire
[4702] Up and down TransWilts - some pictures off the rails!
[4653] Coats of arms - towns and authorities in Wiltshire
[4623] Rambling from Westbury
[4622] Frosty morning, beauty of Wiltshire
[4265] A lovely meal in Swindon - just a short walk from the station
Top or Show all for Around, about and nearby to Wiltshire

The Perl Programming Language and its use
[4700] Obfurscated code - it might work, but is it maintainable?
[4682] One line scripts - Awk, Perl and Ruby
[4620] Perl 6 - a Practical Extraction and Reporting example!
[4611] Hungarian, Camel, Snake and Kebab - variable naming conventions
[4610] Sorting by key or by comparator - Perl 6
Top or Show all for The Perl Programming Language and its use

Client Side Languages (HTML, CSS, Javascript)
[4310] Problem ... I want to print a series of numbered forms
[4277] Sending a message to the server and changing text on a page when a button is pressed
[4037] Cascading Style Sheets and formatting your web page
[4036] HTML tags uses in these blog articles
[4035] Special characters in HTML
Top or Show all for Client Side Languages (HTML, CSS, Javascript)

Ruby and Ruby on Rails
[4681] Ruby testing with RSpec - a new example
[4680] Processing data line by line - iterator in Ruby with yield
[4679] Reading in XML in Ruby with xmlsimple
[4678] Expect with Ruby - a training example to get you started
[4676] Running shell (operating system) commands from within Ruby
Top or Show all for Ruby and Ruby on Rails

SQL and MySQL
[4493] Forgotten / lost MySQL root password
[4487] Starting MySQL. ERROR! The server quit without updating PID file - how we fixed it.
[4481] Extracting data from backups to restore selected rows from MySQL tables
[4406] Fixing damaged MySQL tables - Error 1712 and Error 2013
[4390] Checking MySQL database backups have worked (not failed)
Top or Show all for SQL and MySQL

Tcl, Tcl/Tk and Expect
[4616] Still teaching Tcl in 2016?
[4525] What does Tcl do if you try to run a command that is not defined?
[4524] Tcl - a new example for data reformatting
[4523] Catching failed commands and not crashing the program in Tcl
[4522] Loading packages in your Tcl program
Top or Show all for Tcl, Tcl/Tk and Expect

Programming in Lua
[4574] repeat until in Lua - a one or more rather than a zero or more loop
[4573] Classic style OO code - in Lua
[4572] Tables with values and code in Lua - looks like an object?
[4571] Lua - using modules to add your own utilities
[4569] Lua - changes to how integers and floats are handled - 5.2 to 5.3
Top or Show all for Programming in Lua

Python Programming
[4724] From and Import in Python - where is the module loaded from? - (new - 2016-11-06)
[4723] Conditional operators in Python - (new - 2016-11-05)
[4722] Embedding more complex code into a named block - (new - 2016-11-04)
[4721] When to check an object type - Python isinstance example - (new - 2016-11-03)
[4719] Nesting decorators - (new - 2016-11-02)
[4718] Defining an object that is a modified standard type in Python - (new - 2016-11-02)
[4717] with in Python - examples of use, and of defining your own context - (new - 2016-11-02)
[4716] Profiling your Python program - (new - 2016-11-01)
[4713] Equality (in Python) - (new - 2016-10-30)
[4712] A reminder of the key issues to consider in moving from Python 2 to Python 3 - (new - 2016-10-30)
[4711] Convering from Python 2 to Python 3 - an update, and the 2to3 utility - (new - 2016-10-30)
[4710] Searching a Json or XML structure for a specific key / value pair in Python - (new - 2016-10-30)
[4709] Some gems from Intermediate Python - (new - 2016-10-30)
[4708] Scons - a build system in Python - building hello world - (new - 2016-10-29)
[4707] Some gems from an introduction to Python - (new - 2016-10-29)
Top or Show all for Python Programming

And also ...
[4731] To Oceanside and San Clemente Pier - (new - 2016-11-23)
[4730] San Juan Capistrano - (new - 2016-11-23)
[4729] The oldest part of Los Angeles - (new - 2016-11-23)
[4728] Visiting Los Alamitos Bay Yacht Club - (new - 2016-11-23)
[4725] Writing Python 2 such that Python 3 is easy - (new - 2016-11-06)
Top or Show all for And also ...

Public Transport
[4727] Learning from travelling further afield - (new - 2016-11-09)
[4706] Melksham trial train service is to be made permanent - (new - 2016-10-02)
[4703] What do people use the bus for in Wiltshire - survey interim results.
[4699] Melksham Rail Development Group - a celebration of 20 years
[4695] Melksham Rail Development Group becoming Melksham Rail Users Group
Top or Show all for Public Transport

Fun and Flames
[4720] Celebrating our diversity rather than discriminating for it - (new - 2016-11-02)
[4651] Pressure selling in the fire safety business
[4630] The story behind the bus cuts, and what they could mean
[4392] Interview conditions,and other instructions to staff
[4304] Please do not ask me to be the chair!
Top or Show all for Fun and Flames

Keynote Articles
[3164] Brown - or Mrs Sally Brown, accountant from Whitstable?
[2384] Looking ahead to the Autumn season of training and accommodation
[2228] Where do I start when writing a program?
[2216] Past Delegate Offer - Summer Holiday / Weekend Break
[1975] Well House Manor Hotel - on plan for 2009 business guests
Top or Show all for Keynote Articles

Unclassfied Articles
[4576] If it's Tuesday it must be Belgium?
[4509] Throwing a die - exercise in Ruby
[4508] Melksham to London by train - dont buy more than you need
[4484] TransAtlantic crossing - the starter
[4242] A busy January
Top or Show all for unclassified

For the Webmaster, Postmaster and moderator Training from Well House Consultants Tcl, Tcl/Tk and Expect Running a training and hotel company Melksham Linux and Shell Programming The Perl Programming Language and its use Python Programming And also ... Apache HTTP and Tomcat Servers Fun and Flames Java and the Java Environment PHP - the language and its application SQL and MySQL Public Transport General Programming Topics C and C++ Programming Keynote Articles Well House Manor - Hotel and Training Centre Around, about and nearby to Wiltshire Ruby and Ruby on Rails Programming in Lua Client Side Languages (HTML, CSS, Javascript)

A little more about this newsletter ...

At Well House Consultants, we run niche IT training courses ... and we run a hotel for delegates on those courses and other visitors to Melksham too. And we make a lot of friends - have a lot of ambassadors with whom we want to keep in touch. So every day Graham (that's me, writing this piece) puts together an article or two which might include the latest sample programs that I've written during the current course, new information about Well House Manor - our business hotel, tips on search engine optimisation, announcements of upcoming public courses, pictures of local places, and even (on occasions) rants and whimsical pieces to keep those friends up to date and in touch. The feeds are available directlt via the Blog - "The Horse's Mouth", they're on our Twitter Feed and you can find me at my LinkedIn profile. But most people just want to look us up occasionally - every month or two, and then to catch up on the latest news just for their particular subjects of interest ... and that's what this newsletter is about

You'll find above the titles of ALL the new articles written in the last two months, listed by major subject area, and showing as (new) with their date of publication. You'll find additional articles in each category too - topping each category up to a minimum of five articles. And you'll find a link at the end of each section which lets you expand that section to show the titles of every article that's been published in that section. After all, "the old ones are often the best ones", aren't they?

go to Top or other editions November 2016September 2016July 2016May 2016March 2016January 2016November 2015September 2015July 2015 • this is the current edition


Training sample © 2016, WELL HOUSE CONSULTANTS LTD
This is http://www.wellho.net/demo/newsletter.php
Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
Phone: +44 (0) 1225 708 225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net