Training, Open Source Programming Languages

This is page

Our email: • Phone: 01144 1225 708225

For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Ruby module R119
Ruby Miscellany
Exercises, examples and other material relating to training module R119. This topic is presented on public courses Learning to program in Ruby, Ruby Programming

This module covers elements of the Ruby language that you'll need to be aware of in your ongoing use, but may be specialist / occasional in their nature.
Related technical and longer articles
Modules, Mixins and Comparators in Ruby

Articles and tips on this subjectupdated
3799Ruby Documentation through rdoc
There are three vital elements in any code of significnat size that you write. • There's the code itself • There are programmer's comments which provide an overview of the internals and remarks on how you've done things, why certain decisions were made, known issues for future maintainers, ...
3783Load path, load and require in Ruby, and a change from 1.8 to 1.9
Ruby loads files through the require command from a list of directories held in the $: special variable, also known as $LOAD_PATH. Up to and including Ruby 1.8, this path list included . (the current directory) but from Ruby 1.9 it does not. Here's a sample program:   require "direct"   p ...
3622Loading Ruby classes - where does Ruby look?
If you're loading a Ruby class (or other code) from another source file, use the require function, and give the file name without the .rb on the end of it. Ruby will look in each of the directories listed in $: or $LOAD_PATH in turn, and that list usually includes . (the current directory). See that ...
3428How many days to Christmas?
It's only 107 days to Christmas ... courses for next year have already been scheduled [here], the days are drawing in quite quickly, and a Ruby program I wrote to show hoe the Time class works told me. Source code [here]. What's lovely about Ruby is that it has the flexibility of Perl, and the togetherness ...
3155Rake - a build system using code written in Ruby
If you're programming in C, C++ or Java, you'll be managing a large number of source files, and using a whole series of commands to build these forward into .o (object) or .class (java class) files, then - in the cases of C and C++ - into executable files. The make system has been around for as long ...
1889Ruby mixins, modules, require and include
A Ruby "mixin" is a way of adding extra code from a module into a class - thus giving the programmer the ability to share code between a number of classes in a way that's in addition to inheritance. So - in effect - it gives multiple inheritance. In some ways, you can compare a mixin to a (Java) interfaces ...
1890MySQL database from Ruby - an example
Both MySQL and Ruby are huge subjects - the former being an excellent database engine and the latter a superb programming language. Yet although each individually is a huge subject, linking the two (i.e. accessing data stored in a MySQL database via a Ruby program) is so each that it's almost trivial. Here's ...
1720Some Ruby lesser used functions
Tidying up (as one does after the recent server move!), I came across a list of functions in Ruby which are important at times, but not exactly top of the list ... and I thought I would share them here - with a few words on each - in the hope that I might save someone a lot of hairpulling at some stage ...
1586Variable types in Ruby
In Ruby: * Variable with names starting with a lower case letter are local variables * Names starting with a capital letter are constants - you can set them once each time you run a program and then they are fixed * Names starting with a single @ character are object variables - in other words, you'll ...
1181Good Programming practise - where to initialise variables
It's a good idea to initialise your variables directly before you use them for the first time if you're going to use them as accumulators. By accumulator I mean that you're going to write assignments such as:   $n += 4; # Perl   incr notepad; # Tcl   lappend flcodes [lindex ...
Examples from our training material
mixdem.rb   Mixins in Ruby - a short demo
pat.rb   Delivery objects - postman sort
rubytime   Time objects
taxcalc.rb   Tax Calculation Module
tcalc.rb   Tax Calculation Module for Mixin
wot.rb   Work out tax - use Taxcalc.rb
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
The comparator interface.
Additional standard functions and operators.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: • WEB: • SKYPE: wellho

PAGE: • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb