The Well House Newsletter - Wednesday, 24th April 2024
About us and this newsletter [link] ...
Previous editions: March 2024January 2024November 2023September 2023July 2023May 2023March 2023January 2023November 2022 • this is the current edition

Public Transport Training from Well House Consultants And also ... Tcl, Tcl/Tk and Expect Programming in Lua Python Programming Well House Manor - Hotel and Training Centre Apache HTTP and Tomcat Servers The Perl Programming Language and its use Ruby and Ruby on Rails PHP - the language and its application C and C++ Programming Linux and Shell Programming Melksham SQL and MySQL For the Webmaster, Postmaster and moderator Java and the Java Environment Fun and Flames Running a training and hotel company Around, about and nearby to Wiltshire Client Side Languages (HTML, CSS, Javascript) Keynote Articles General Programming Topics
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
[4487] Starting MySQL. ERROR! The server quit without updating PID file - how we fixed it.
Top or Show all for Linux and Shell Programming

Apache HTTP and Tomcat Servers
[4708] Scons - a build system in Python - building hello world
[4491] Web Server Admin - some of those things that happen, and solutions
[4434] Public training courses - upcoming dates
[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.
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
[4633] String handling in C - new examples of extracting integers from a string
[4566] C - why is slow to write and debug) but fast to run?
[4565] Allocation of memory for objects in C++ - Stack v Heap
[4563] Formatting and outputting your own classes in C++
Top or Show all for C and C++ Programming

Melksham
[4738] Melksham Chamber of Commerce - my final Presidents report
[4706] Melksham trial train service is to be made permanent
[4704] Three months in community rail pictures
[4703] What do people use the bus for in Wiltshire - survey interim results.
[4701] Pretty at the station too
Top or Show all for Melksham

Training from Well House Consultants
[4769] Python, Tcl, Lua and other Open Source programming courses for 2018
[4751] Final day of training at Well House Manor - Python, Lua, Tcl and C/C++ continue at The Spa, Melksham
[4705] Course dates - from October 2016 to December 2017
[4689] Training Course schedule for summer and autumn 2016
[4671] Ruby training, half a world away
Top or Show all for Training from Well House Consultants

Running a training and hotel company
[4613] Our best hotel customers help us ... to help them ... be our best customers.
[4603] Happy New Year. Our customers are our ambassadors
[4543] Saturday morning at Well House Manor
[4521] Should we get an AA or Visit Wiltshire hotel assessment?
[4468] Four in a Bed - most popular answers
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!
[4644] In your room at Well House Manor, Melksham, Wiltshire
[4582] A near-empty plate of pastries - sign of a breakfast enjoyed
[4567] Japanese and Malaysian food in Melksham
[4379] Well House Consultants / Well House Manor - Prices for 2015
Top or Show all for Well House Manor - Hotel and Training Centre

For the Webmaster, Postmaster and moderator
[4651] Pressure selling in the fire safety business
[4520] No cold sales calls please - but delighted to hear from others!
[4492] Almost so wrong, but perhaps it's right for some?
[4474] Effect on external factors on traffic to our web sites - an update
[4426] FileMaker Day to Unix Time conversion
Top or Show all for For the Webmaster, Postmaster and moderator

General Programming Topics
[4763] Regex Reference sheet
[4707] Some gems from an introduction to Python
[4673] Separating detailed data code from the main application - Ruby example
[4663] Easy data to object mapping (csv and Python)
[4656] Identifying the first and last records in a sequence
[4652] Testing new algorithms in PHP
[4645] What are callbacks? Why use them? An example in Python
[4641] Using an MVC structure - even without a formal framework
[4634] Regression testing - via a very short C testing framework
[4632] Remember to ask the question before you listen for the answer
[4628] Associative objects - one object within another.
[4581] Thin application, thick objects - keep you main code simple. Example in Ruby
[4542] The principle of mocking - and the Python Mock package
[4505] Regular Expressions for the petrified - in Ruby
[4457] Test framework for TCL - Tcltest - some examples
[4448] What is the difference between a function and a method?
[4430] The spirit of Java - delegating to classes
[4421] How healthy are the stars of stage and screen?
[4410] A good example of recursion - a real use in Python
[4401] Selecting RECENT and POPULAR news and trends for your web site users
[4396] Java Utility class - flexible replacement for array. Also cacheing in objects and multiple catch clauses example.
[4394] Philosophy behind object design - and how I applied in to a Java example
[4391] Refactoring Perl applications to give them a rosy future
[4387] Regression Testing my website - Cucumber and Watir
[4380] Behaviour Driven Development / Ruby and Cucumber
[4374] Test driven development, and class design, from first principles (using C++)
[4359] How to avoid too many recalculations within an object
[4346] A behaviour driven example of writing a Java program
[4336] Test Driven Development - a first example of principle in C
[4330] Java - factory method, encapsulation, hashmap example
[4325] Learning to program - what are algorithms and design patterns?
[4320] An example of Model-View-Controller techniques in a Perl / CGI script
[4318] Learning to Program - how we start to teach you at Well House Consultants
[4206] Writing the perfect program in Tcl?
[4153] Rooms available tonight - how to code an algorithm from first principles
[4114] Teaching CodeIgniter - MVC and PHP
[4098] Using object orientation for non-physical objects
[4096] Perl design patterns example
[4066] MVC and Frameworks - a lesson from first principles in PHP
[4061] Seamless, integrated IT - we have a long way to go!
[3979] Extended and Associated objects - what is the difference - C++ example
[3978] Teaching OO - how to avoid lots of window switching early on
[3954] Lesson 1 in programing - write clean, reuseable and maintainable tidy code
[3844] Rooms ready for guests - each time, every time, thanks to good system design
[3843] Caching Design Patterns
[3810] Reading files, and using factories to create vectors of objects from the data in C++
[3790] Solution looking for a problem? Lookahead and Lookbehind
[3788] Getting more than a yes / no answer from a regular expression pattern match
[3785] Programming languages - what are the differences between them?
[3721] Naming blocks of code, structures and Object Orientation - efficient coding in manageable chunks
[3716] Learning C++ - a design pattern for your first class
[3650] Possessive Regular Expression Matching - Perl, Objective C and some other languages
[3609] How do classes relate to each other? Associated Classes
[3608] Design Patterns - what are they? Why use them?
[3607] Designing your application - using UML techniques
[3548] Dark mornings, dog update, and Python and Lua courses before Christmas
[3542] What order are operations performed in, in a Perl expression?
[3516] Regular Expression modifiers in PHP - summary table
[3461] From flowchart to program - code design for the newcomer
[3456] Stepping stones - early coding, and writing re-usable code quickly
[3454] Your PHP website - how to factor and refactor to reduce growing pains
[3451] Why would you want to use a Perl hash?
[3366] Specification, Design, Implementation, Testing and Documentation - stages of a (Java) programming project
[3329] Perl from basics
[3262] Some SVG Elements, pixel and percent positioning
[3261] Scalable Vector Graphics - easy, low bandwidth, high resolution, dynamic.
[3251] C++ - objects that are based on other objects, saving coding and adding robustness
[3237] Using functions to keep look and feel apart from calculations - simple C example
[3213] Should I use Open Source or Commercial software?
[3211] Computer Graphics in PHP - World (incoming data) to Pixel (screen) conversion
[3169] Rekeying a table - comparison in #Ruby #Perl and #Python
[3152] Jargon busting
[3148] OpenGL / C / C++ - an example to get you started
[3120] Learning to write good programs in C and C++ - separating out repeated code
[3112] Public and private courses - subjects available for 2011
[3102] AND and OR operators - what is the difference between logical and bitwise varieties?
[3100] Looking ahead and behind in Regular Expressions - double matching
[3093] How many toilet rolls - hotel inventory and useage
[3091] How do regular expressions work / Regular Expression diagrams
[3072] Finding elements common to many lists / arrays
[3063] Comments in and on Perl - a case for extreme OO programming
[3049] Computer Graphics is fun - even if Java Applets are Old Hat
[3042] Least Common Ancestor - what is it, and a Least Common Ancestor algorithm implemented in Perl
[3026] Coding efficiency - do not repeat yourself!
[3003] What will we be teaching in six years?
[2973] Learning to program - where to start if you have never programmed before
[2964] An introduction to file handling in programs - buffering, standard in and out, and file handles
[2953] Turning an exercise into the real thing with extreme programming
[2922] Getting the OO design write - with PHP a example
[2909] Be gentle rather than macho ... regular expression techniques
[2898] Programming Standards from the start!
[2865] Relationships between Java classes - inheritance, packaging and others
[2844] Learning about Regular Expressions in C through examples
[2834] Teaching examples in Perl - third and final part
[2806] Macho matching - do not do it!
[2804] Regular Expression Myths
[2800] The Merchants And
[2769] Easy - but for whom?
[2758] But what will you DO with all those pictures?
[2755] Books in the store in the USA - still a portent of the UK market to come?
[2747] Containment, Associative Objects, Inheritance, packages and modules
[2741] What is a factory?
[2737] Improving your function calls (APIs) - General and PHP
[2715] Uploading an image, document or pdf via a browser (php)
[2700] The same very simple program in many different programming languages
[2641] Object Oriented Programming in PHP
[2633] Why do I teach niche skills rather than mainstream?
[2612] The Model, View, Controller architecture (MVC) - what, why and how.
[2586] And and Or illustrated by locks
[2563] Efficient debugging of regular expressions
[2550] Do not copy and paste code - there are much better ways
[2536] All the Cs ... and Java too
[2535] When should I use Java, Perl, PHP, or Python?
[2510] The music of the stock market
[2507] Admission
[2505] I almost put the bins out this morning
[2501] Simples
[2415] Variable names like i and j - why?
[2393] A first demonstration of OO, including polymorphism
[2380] Object Oriented programming - a practical design example
[2364] Getting it right from the start - new programmers
[2327] Planning!
[2326] Learn a new programming language this summer.
[2322] Looking for a practical standards course
[2294] Can you learn to program in 4 days?
[2245] Client side (Applet) and Server side (Servlet) Graphics in Java
[2228] Where do I start when writing a program?
[2199] Improving the structure of your early PHP programs
[2189] Matching disparate referencing systems (MediaWiki, PHP, also Tcl)
[2173] Basic OO principles
[2171] Cleaning up redundant objects
[2170] Designing a heirarcy of classes - getting inheritance right
[2165] Making Regular Expressions easy to read and maintain
[2099] Should I maintain the programming code on my own website?
[2092] Tracking difficult bugs, the programmer / customer relationship
[2048] Learning to program in PHP, Python, Java or Lua ...
[2022] Pre and post increment - the ++ operator
[2001] I have not programmed before, and need to learn
[1990] Speaking all the languages
[1985] Learning to program as a part of your job
[1976] Where is this IP address, IPv4 and IPv6
[1963] Best source to learn Java (or Perl or PHP or Python)
[1949] Nuclear Physics comes to our web site
[1864] Object Oriented Perl - First Steps
[1860] Seven new intermediate Perl examples
[1853] Well structured coding in Perl
[1850] Daisy the Cow and a Pint of Ginger Beer
[1849] String matching in Perl with Regular Expressions
[1840] Validating Credit Card Numbers
[1799] Regular Expressions in PHP
[1607] Learning to program in Perl
[1605] Learning and understanding scripting programming techniques
[1596] Selling curry to the chinese takeaway
[1543] Learning Object Oriented Principles (and perhaps Java)
[1538] Teaching Object Oriented Java with Students and Ice Cream
[1513] Perl, PHP or Python? No - Perl AND PHP AND Python!
[1480] Next course - 7th January 2008, Regular Expressions
[1435] Object Oriented Programming in Perl - Course
[1391] Ordnance Survey Grid Reference to Latitude / Longitude
[1372] A taster PHP expression ...
[1345] Perl and Shell coding standards / costs of an IT project
[1230] Commenting a Perl Regular Expression
[1224] Object Relation Mapping (ORM)
[747] The Fag Packet Design Methodology
[728] Looking ahead and behind in a Regular Expression
[687] Presentation, Business and Persistence layers in Perl and PHP
[630] Hostnames spring forward
[592] NOT Gone phishing
[534] Design - one name, one action
[507] Introduction to Object Oriented Programming
[485] North, Norther and Northest - PHP 5 Objects
[462] Big number
[453] Commenting Perl regular expressions
[272] More to programming than just programming
[227] Bellringing and Programming and Objects and Perl
[209] FAQ - Perl or PHP
[202] Searching for numbers
[148] Programming in isolation
[116] The next generation of programmer
[80] OO - real benefits
[76] Learning to program in
Top or Show all for General Programming Topics

PHP - the language and its application
[4655] Image indexer / thumbnail display scripts in PHP
[4642] A small teaching program - demonstration of principles only
[4627] Caching results in an object for efficiency - avoiding re-calculation
[4626] Singleton design pattern - examples and uses
[4483] Moving from mysql to mysqli - simple worked example
Top or Show all for PHP - the language and its application

Java and the Java Environment
[4428] Using the lead - passing arrays and other collections in Java
[4427] Java example - for loop and conditionals from course exercise
[4422] Objects - from physical to virtual or abstract - Java
[4420] Flexibility in input - read from file, web resource or keyboard
[4419] Java Inheritance example - group of classes - step by step
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
[4622] Frosty morning, beauty of Wiltshire
[4265] A lovely meal in Swindon - just a short walk from the station
[4233] Open for the new year - Imber
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?
[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
[4609] Mapping an array / list without a loop - how to do it in Perl 6
Top or Show all for The Perl Programming Language and its use

Client Side Languages (HTML, CSS, Javascript)
[4037] Cascading Style Sheets and formatting your web page
[4036] HTML tags uses in these blog articles
[4035] Special characters in HTML
[4034] The VERY basics of a web page ... and web site
[3532] Sharing the user experience - designing a form with the customer in mind
Top or Show all for Client Side Languages (HTML, CSS, Javascript)

Ruby and Ruby on Rails
[4682] One line scripts - Awk, Perl and Ruby
[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
[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
[4481] Extracting data from backups to restore selected rows from MySQL tables
[4436] Accessing a MySQL database from Python with mysql.connector
[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
[4762] Coverage map in Tcl - how many times has each proc been called?
[4678] Expect with Ruby - a training example to get you started
[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
Top or Show all for Tcl, Tcl/Tk and Expect

Programming in Lua
[4753] Lua, Tcl, Python, C and C++ courses - at our Melksham HQ or on your site - forward from July 2017
[4575] Learning not just what a program does, but how to design it in the first place.
[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?
Top or Show all for Programming in Lua

Python Programming
[4724] From and Import in Python - where is the module loaded from?
[4723] Conditional operators in Python
[4722] Embedding more complex code into a named block
[4721] When to check an object type - Python isinstance example
[4719] Nesting decorators
Top or Show all for Python Programming

And also ...
[4768] 2017 - the final six months
[4767] Some thoughts on 2017, and looking forward to 2018
[4761] Looking forward to the autumn.
[4759] Sale of effects and furniture - 12th and 13th August 2017
[4756] Learning how to be a more effective community partner
Top or Show all for And also ...

Public Transport
[4770] GW franchise - my response
[4765] Breich Station - current pictures, and future options
[4764] Some thoughts on the closure proposal for Breich station
[4760] Rotary Talk, 25/7/2017
[4727] Learning from travelling further afield
Top or Show all for Public Transport

Fun and Flames
[4392] Interview conditions,and other instructions to staff
[4354] Wiltshire Police - assuming someone is guilty just on the say-so of a member of the public?
[4329] Does Santa Claus need a CRB check?
[4304] Please do not ask me to be the chair!
[4282] On tipping - and the expectation of a tip
Top or Show all for Fun and Flames

Keynote Articles
[2483] Clustering on Tomcat
[2384] Looking ahead to the Autumn season of training and accommodation
[2144] Looking for a career change - Physician to Web Site Designer
[1955] How to avoid duplicating web page maintainance
[1857] November and December Public Course Schedule
Top or Show all for Keynote Articles

Unclassfied Articles
[4766] Moving on from Sunnyside and Devizes
[4758] Even more images!
[4757] Images ... continued
[4733] Python examples - updates under way
[4732] Reviewing TransWilts performance 2015-16
Top or Show all for unclassified

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

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 March 2024January 2024November 2023September 2023July 2023May 2023March 2023January 2023November 2022 • this is the current edition


Training sample © 2024, 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