The Well House Newsletter - Thursday, 28th March 2024
About us and this newsletter [link] ...
Previous editions: January 2024November 2023September 2023July 2023May 2023March 2023January 2023November 2022September 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
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
[4523] Catching failed commands and not crashing the program in Tcl
[4522] Loading packages in your Tcl program
[4462] Server program written in Tcl using sockets
[4461] Reading from a URL, and reading Json, from your Tcl script
[4460] Using Object Oriented Tcl and the Tk toolkit together - real life example
[4459] Managing the window size (and layout) in Tcl/Tk
[4458] A new Tcl/tk example - a window to show system status
[4456] Objects in Tcl - iTcl - updated first steps example
[4455] Working out distance between places, using OS grid references and a program in Tcl
[4454] Everything is a string - even a list
[4453] Tcl variable names - no real limits!
[4398] Accessing variables across subroutine boundaries - Perl, Python, Java and Tcl
[4258] Keeping you Tkinter display up to date while monitoring
[4209] Lists in Tcl - fundamentals in a commented source code example
[4208] Tcl + Tk (Wish) - an introduction and revision example
[4207] Exception handling in Tcl
[4205] Regular Expression Substitution - Tcl
[3638] Sorting dicts and arrays in Tcl
[3629] Sharing lots of values in Tcl without having lots of global declarations
[3618] lists and struct::list in Tcl - Introduction to struct::list and examples
[3617] The fileutil package and a list of file system commands in Tcl
[3614] Tcl - dicts - a tutorial and examples
[3583] Expanding a list of parameters in Tcl - {*} and eval
[3582] Tcl collections - lists, dicts and array
[3576] Tcl - apparently odd behaviour of string trimleft
[3575] Multiple buttons calling the same proc in wish (tcl/tk)
[3572] Adding Expect on top of Tcl - what is it and where can I get a training course to learn about it?
[3571] Comparing loop commands in Tcl
[3570] Trapping errors in Tcl - the safety net that catch provides
[3448] Checking all the systems on a subnet, using Expect and Tk
[3429] Searching through all the files in or below a directory - Ruby, Tcl, Perl
[3418] Tcl packages, pkg_mkIndex, pkgIndex.tcl -what are they and why use them.
[3417] What is a namespace and why do we need them?
[3416] Storing Tcl source code encoded, and running via your own C program
[3415] User defined sorting and other uses of callbacks in Tcl and Tk
[3414] Passing back multiple results in Tcl - upvar and uplevel
[3394] The difference between lists and strings - Tcl
[3320] Reading the nth line from a file (Perl and Tcl examples)
[3287] Exceptions - Tcl style
[3286] Should we cover expect and/or Tk on our public Tcl courses?
[3285] Extracting data from a string / line from file - Tcl
[3192] Tcl - Some example of HOW TO in handling data files and formats
[3189] Tcl - the danger of square brackets in a while command
[3066] Separating groups of variables into namespaces
[3009] Expect in Perl - a short explanation and a practical example
[2681] Tcl - a great engineering language
[2476] Tcl - uplevel to run code at calling level
[2475] Quick easy and dangerous - automated logins via Tcl / Expect
[2474] Using Tcl and Expect to automate repetitive jobs
[2472] split and join in tcl and expect
[2471] A short form of if ... then ... else
[2468] What are Tcl lists?
[2467] Tcl - catching an error before your program crashes
[2466] Tcl - passing arrays and strings in and back out of procs
[2463] Tcl - a true interpretive, command based language
[2429] Tcl scripts / processes on a web server via CGI
[2261] Tcl - nice and nasty
[2211] Tcl/Tk - why does the canvas widget use a display list?
[2040] Error: Cant read xxxxx: no such variable (in Tcl Tk)
[1785] What is running on your network? (tcl and expect)
[1782] Calling procs in Tcl and how it compares to Perl
[1614] When an array is not an array
[1613] Regular expression for 6 digits OR 25 digits
[1602] Automating processes through Expect
[1601] Replacing the last comma with an and
[1531] Expecting a item from a list of possibles
[1529] Tcl - learning how to use namespaces, packages and libraries together
[1528] Object Oriented Tcl
[1475] Tcl/Tk - updating your display while tasks are running
[1474] Using Tcl/Tk resource files for flexible applications
[1473] Making a variable dynamically visible in a Tcl/Tk GUI
[1471] Cliff Lift simulator- Lynton to Lynmouth - in Tcl/Tk
[1470] fill and expand on Tcl/Tk pack command
[1469] Curley brackets v double quotes - Tcl, Tk, Expect
[1467] stdout v stderr (Tcl, Perl, Shell)
[1427] Arrays in Tcl - a demonstration
[1426] Buffering up in Tcl - the empty coke can comparison
[1412] Sparse and Greedy matching - Tcl 8.4
[1411] Buffering of inputs to expect, and match order
[1410] Tcl / regsub - changing a string and using interesting bits
[1409] What is Expect?
[1407] Reading from another process in Tcl (pipes and sockets)
[1405] Sorting in Tcl - lists and arrays
[1404] Tcl - global, upvar and uplevel.
[1403] Square Bracket protection in Tcl
[1402] Tcl - append v lappend v concat
[1401] Tcl - using [] or {} for conditions in an if (and while)
[1339] Packages and Namespaces are like Suitcases and Aircraft
[1338] Handling Binary data in Tcl (with a note on C)
[1335] Expanding a grid - Tcl/Tk
[1334] Stable sorting - Tcl, Perl and others
[1327] Tktable - Laying out data in a matrix - Tcl/Tk
[1283] Generating traffic for network testing
[1282] Stringing together Tcl scripts
[1277] AgtInvoke - a command to drive Agilent Tcl software extensions
[1268] Changes in advertising cut lines / Buscot / Tcl course
[1174] Installing Tcl and Expect on Solaris 10 - a checklist
[1173] Cheat Sheet / Check list for Expect maintainers
[1092] Tcl training - often for a larger group
[787] Tk - laying out your GUI with frames, pack and grid
[785] Running external processes in Tcl and Tcl/Tk
[782] Converting between Hex and Decimal in Tcl
[781] Tcl - lappend v concat
[779] The fragility of pancakes - and better structures
[691] Testing you Perl / PHP / MySQL / Tcl knowledge
[675] Adding PHP tags to an old cgi program
[596] The magic of -textvariable
[461] Shortened interactive commands
[445] Sticky news
[435] Expect for Windows
[409] Functions and commands with dangerous names
[404] How to check that a string contains a number in Tcl
[366] Error handling in Tcl through catch
[364] pu daily and p hourly
[362] The ireallyreallywanna operator
[349] Comments in Tcl
[309] Writing a Tcl/Tk GUI is as easy as baking a cake
[290] Object Orientation in Tcl - [incr-Tcl]
[287] Checking that all our servers are up and accessible
[286] Automating regular manual procedures
[212] Tcl/Tk (wish) Grid layout example
[210] Joining lists in Tcl. Indirect variables in Tcl.
[146] example of Tcl namespaces and packages
[144] Tcl sandwich - lists in Tcl
[133] Tcl embeds
[122] Passing arrays to procs in Tcl
[3] Looking for a donkey
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 January 2024November 2023September 2023July 2023May 2023March 2023January 2023November 2022September 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