« September 2004 | Main | November 2004 »

October 31, 2004

Distance Learning

From time to time, I'm asked about providing "distance learning" for Perl, PHP, Ruby, Python ... and it's an excellent question. It's something we're considered, reviewed, and no doubt will review again in the future ... but here's my views and our decision on the subject at present:

We don't offer distance learning in any of the subjects that we teach. We present our courses in the same room as our trainees. We are then being around to assist them during practicals and the whole group talks about the issues involved.

Our "conventional" training techniques lead to an excellent success rate amongst our students which it would be very hard, in my opinion, to achieve through any form of distance learning program. For a small minority of well motivated trainees, and for certain subjects, I know that such a scheme can work well - but it tends not to for the majority of trainees. Why?

a) Although our trainees are well motivated, they come from a diverse background so that it's very hard to make any assumptions at all about the starting point for a course. A good tutor, in the same room as a small group of students, can identify a "glazed look" very quickly and can fill in gaps in the background of individuals which would otherwise leave them severely disadvantaged for the rest of the course. [Link - example of facilities offered on a course]

b) With programming especially, the subjects taught on a course each form the building blocks for subsequent subjects, so it's essential that each subject is understood. We don't have the luxury of being able to say "oh - never mind - look at some other material later" or "you have reached the end of the material on this subject" as can happen with less personal groups and distance learning.

c) If you're programming (or learning to program), you need to be able to concentrate, and to be using a workstation that's loaded with software in a standard way known to the tutor. We can control the environment that we use for our public and private courses, but we have no such control over distance learning facilities where there may be constant interruptions, noise, and software that's not fully or properly installed or is an outdated version. Being away from / out of your office is a huge help.

d) As well as learning from the tutor, we find that our trainees also learn from interaction with fellow students which is not possible under most distance learning schemes. Even on a "conference call" setup, you don't SEE everyone.

e) We encourage trainees to bring along their own data / discuss their own requirements / write sample programs - exercises - that fit their own needs and this pro-active input from the students is (I think) difficult to achieve using a distance learning scheme.

I am aware that a distance learning program can be lower cost per student starting the program, and it can save on travel expenses too. Such savings are nullified if the trainee gets very little from the program, or drops out, and I believe that - at present - a classroom / conference room type environment offers the best training, and also the most cost effective. That's why we provide such a service, and concentrate all our resources on doing so to a high quality.

Footnote

About five years ago, it was forecast that the conventional training market would be decimated by distance learning - but that simply hasn't happened. If cheap computer based training (CBT) really worked, then all the big employers would long ago have switched to it. I think they've come to the same conclusion that we have. If you're interested in a little further reading, we have an exchange on this in our forum archives

Posted by gje at 08:26 AM

More about Graham Ellis of Well House Consultants

October 30, 2004

mysql_connect or mysql_pconnect in PHP?

If you're connecting to a MySQL database in your PHP application, you'll find that there are two alternative connections - mysql_connect which establishes a new connection "each time" and mysql_pconnect which uses persistent connections. Which should you use?

Mysql_connect opens a new connection each time a PHP page is called up, and closes the connection down again at the end of the request. It's ideal for pages that don't have a heavy usage - doesn't need tuning, is straightforward internally. If you compare MySQL to a shop, this is the connection that you would use for a small shop where the door is opened each time a new customer wishes to enter.

Mysql_pconnect will also open a new connection when a PHP page is called up (at any rate, it will the first time after a server reboot), but it will NOT close the connection at the end of the request - instead, it will save it in a connection pool so that a subsequent request can continue to use the same connection. It's intended for pages that do have a heavy usage - where the resources burn up by opening and closing connections every time might have a severe effect on performance. If your local supermarket had a door that was opened each time someone went in and out, there would be a lot of needless opening and closing going on - better to leave it open and let a whole lot of people in and out at the same time.

But mysql_pconnect does require some tuning of the servers and you may need to limit the numbers of connections / children and configure timeouts and how to deal with idle children. The PHP website includes an overview of this to get you started.

Finally, it is worth stressing what a persistent connect does NOT give you. It does NOT give you sessions. It does NOT give you a per-site-visitor login. It does NOT give you any extra functionality. What it does give you - in the right circumstances - is an efficiency improvement.

[Further link - Using MySQL from PHP]

Posted by gje at 12:23 PM


Useful link: PHP training

October 29, 2004

Can't resist writing about Python

Home, a long week, a short post. I have things to write ... ranging from Python to Pyramid organisations (wait - that's not much of a range - they're close in the dictionary ;-) - but that will have to wait until tomorrow.

But that does remind me that "Python Dictionaries" are currently the top find on our site through search engines at the moment = perhaps pointing the visitor to our training module on the subject.

Really - a Python dictionary isn't "hard" - it's like a list, except the elements are named and not numbered, so they're unordered rather than ordered. These little changes lead to a slightly different syntax and different methods - but really they're fabulous. I must follow up further on this when I am supposed to be writing long ....

Posted by gje at 07:59 PM


Useful link: Python training

October 28, 2004

The Romans got it right

I'm giving a Python course just off the old Roman Road - Watling Street - at the moment. Now the Romans got their travel and transport right - which means that the canal's close by too - just beyond the hedge over there and - oh waits while room shakes that's the main line railway from London to Scotland.

Whenever I give a Python course, I'm reminded what a beautiful language it is ... and I could wax lyrical for hours ...

Posted by gje at 05:10 PM

October 27, 2004

Good value, low cost, cheap.

"Do you mean that's the price for the whole four days"?

A question I was asked yesterday ... from an enquirer who had thought he was being quoted a daily rate, and had just realised that the figure was being quoted for four complete days of training for him.

To be fair, he wasn't comparing Apples with Apples - rather he was comparing an Apple with something much bigger - perhaps a large watermelon. He had been set the task of sourcing a private PHP course and the costs he had been finding (from us and perhaps from others) had been uneconomic for his one-or-two-person group.

If required, we can run tiny private courses, but if you have just one or two trainees, please consider our public courses - the big expense in running a course is in the provision of a tutor and you can benefit greatly by sharing the cost. If you're working with PHP (or Python, Tcl, or Perl) as part of a tiny group of one or two, a public course gives you other benefits too - the ability to meet other trainees and learn from them as to their use of the technology too, and the chance to get away from the office and learn in a conducive environment.

Still think you need a private course for your tiny group because your need is just SO specialist? If that's the case, we'll add an extra day onto your course to cover those ultra-niche topics, and we'll only charge you at our good value public course rates.

Posted by gje at 04:20 AM

October 26, 2004

Life is frail

On October 16th, we said our farewells to our fellow passengers on the Perl Whirl / Linux Lunacy cruise - a group of less that 150 people. I have just learnt that Markku Verkkoniemi, a member of that group, passed away on October 19th as a result of a motoring accident.

I didn't know Markku personally, but he was certainly very much around and enjoying himself, and a "real nice guy" on the cruise. I've been reading in the last few minute and I understand he was also a distinguished linguist with many other hidden talents. To quote his cabin-mate from the trip: "He demonstrated how we should all live life to its fullest. So let's celebrate a good life and benefit from his example." Here, here.

Posted by gje at 08:50 AM

October 25, 2004

Should we call it 'Geekmas'?

There's a long gap in the UK between the August Bank Holiday in the late summer and Christmas day, the next public holiday .... yet there are then 7 public holidays in 5 months (Christmas Day, Boxing Day, New Year's Day, Good Friday, Easter Monday, May day and Spring Bank Holiday).

So, a couple of years ago, we declared the holiday of "Geekmas" over a weekend in November and had a small gathering (I think I should use the word "select", shouldn't I?) for whom Open Source is both a hobby AND a job around to join us.

This year, it's "grown up" a bit and we have a technical weekend on 27th and 28th November. Looks like we'll have a gathering of perhaps ten or a dozen people (not bad when you consider that most of our contacts are business contacts who treasure their weekends, and who live far from us) and I'm asking ... should we still give it the slightly frivolous name of "Geekmas".

Links:
Initial Announcement
Summary of talks and sessions (new)

If you're already expressed an interest, I'll be emailing you in the next few days. If not, please feel free to contact me - not quite "the more the merrier", but almost. Though I say so myself, the sessions look enticing and I know that your company would be great.

Posted by gje at 02:16 PM

October 24, 2004

No more 'Error 404' pages. Something better.

"If a user enters a URL on a web site, the web site should supply them with the information that they want." Wise words indeed from Rasmus Lerdorf, of PHP fame, on the recent GeekCruise. He was talking about "error 404" status pages and suggesting that web site authors could do better.

He was right, and he set me thinking; we already have a PHP tailored 404 page on this site, but I've improved it / hopefully done better today by "data mining" the URL for succinct information , and I'll be working further on it over the coming weeks - not that we have a problem; in the last 4 weeks our log files total just over half a million lines, with around 3000 of those being errors - mostly viruses / hackers trying to break in via Frontpage. But now you'll find:

* Pages that don't exist in the directory you give, but do exist in another, will be diverted.
* Pages that you call up with the wrong capitalisation will work correctly.
* Pages that you call up (with html extensions) that don't exist at all will do a "horse's mouth" search
* Pages remaining unresolved will give our home page

Some links to try:
/bristolzoo/entertainment.html
/lisa.html (I put that in because Lisa is a little timid)
/what/a/path/to/php.html

Posted by gje at 05:36 PM

October 23, 2004

What makes a professional photographer?

Earlier this month, we travelled on the "Costa Mediterranean" on a one week cruise, and we snapped hundreds of pictures. Some good, some dubious in their quality to say the least. And during the cruise we attended a most interesting talk by Kevin Gilbert, professional photographer formerly of the White House press core. The pictures he showed were spectacular and I would be delighted if I could produce photos a tenth as good as his (but then, he wouldn't be looking to give Perl courses, I don't suppose!).

Yet with the coming of good, low cost digital photography, the question can be asked more and more "what's the difference between a professional photographer and an amateur", and Kevin, putting himself down a little, answered that "With a professional photographer, you'll only see one in ten of the pictures he takes, whereas an amateur will show you all of his". What a thought-provoking comment though.

I took 408 pictures.

I've put 26 on line.

Here are links to five - one representing each port of call.
* Venice, Italy
* Olympia, Greece
* Ephesus, Izmir, Turkey
* Istanbul, Turkey
* Dubrovnik, Croatia

You'll find you can link to the other 21 pictures from links below the pages listed above.

Posted by gje at 11:27 AM

October 22, 2004

Variable Scope

One of the vital topics on all our programming courses is that of variable scope. Variable Scope may be defined as the area of a program in which a variable is visible, and how long that variable is accessible for.

Why do I describe variable scope as a vital subject when you can write simple programs in almost any of the languages we teach without any appreciation of the issue? Because it becomes vital as your code grows into a series of blocks - sometimes named (functions in PHP, procs in Tcl, def in Python, subs in Perl, methods in Java) and sometimes not (for example { to } blocks in Perl, inset blocks in Python). As a new programmer, you might think that all variables should be visible everywhere (this is often know as "default global"), but that's a bad default - the only language that has this default is Perl and that's for historic reasons. It will change at Perl 6!

Why is "default global" a bad default? Because it means that when you combine code from two blocks / files / sources, each must have variables who's names don't conflict with and other name in any other module and in practice that's almost impossible to ensure. Looking at a real-life example, in our household "Charlie" refers to the cat, but in the Royal Family "Charlie" might be used to refer to the Prince of Wales. Let's say that the Royal family comes to visit us (yeah, improbable I know!), and someone says "come here Charlie" .... are they going to get a cat or a prince?

Posted by gje at 07:32 AM

October 21, 2004

Five red flags

We have an enquiry form on our web site .... and over the years we've learnt that not all requests for information are a genuine interest in our courses. There's a number of "flags" that point to these requests made for other purposes - and I thought I spotted five such flags in a single request yesterday

* The request didn't state what subject the enquirer is interested in
* The request asked for information that is readily available on our web site
* The request asked us to fax information to a premium rate UK number (35p or 63c per minute)
* The request was submitted from a far East IP address
* No email address, no postal address, no "regular" phone number given

Do you know the amazing thing - I sent a short but polite fax saying "hey - this is a bit naughty" and actually got an answer. It seems that the guy concerned feels he's got a genuine reason ("I have this number to filter the crap that comes from cold calling") for having his own premium rate number, and is currently travelling in Japan .... and I'm now wondering whether or not I want to follow up and encourage business from a client who's quite prepared to waste his potential supplier's money in having them contact him back at their greater-than-normal expense.

Did I mention he let slip in his answer that he's asked four other training companies to fax him their schedules on his "I get paid some of what you pay for this" line ... and he implied that they have done. No wonder we're able to keep our costs down better :-)

Posted by gje at 04:58 PM

October 20, 2004

Special change

I've just been out to buy fresh milk and other supplies for today's Tcl course, and I got 3.88 change which I felt was rather special - one of each coin in common circulation.

Posted by gje at 08:12 AM

October 19, 2004

Case Sensitive?

PHP variable names are case sensitive, but the names of functions are case insensitive. Why is this?

PHP is a language that's designed to let you write a web page template into which you can insert additional tags to call up the functionality of PHP, and it originated in the days before xhtml when tags were case insensitive. So it's natural for those additional tags to be case insensitive too.

However, following on from other Open Source / Linux / Unix projects, for the most part PHP is case sensitive - a sensible approach as it avoids the loss by folding of 26 ASCII characters in your coding scheme. Also a sensible approach as those of us who use PHP and Perl and Python and other languages appreciate a certain amount of consistency.



It's very easy in PHP to write a piece of code that looks like a "dog's dinner" with a mixture of tags, code, SQL, English all in one file. Following a presentation last week on good PHP practice that I attended, I've written an extra example for our own courses and placed it in our solutions centre - you can see it on this site and learn more about it on our PHP Programming course too.

As an overview ..... split your PHP application into 4 files:


  1. A Top level that provides the URL for the visitor
  2. The page template
  3. Presentation helper logic
  4. The business logic

You can run the sample in our PHP demo directory

Posted by gje at 08:16 AM

October 18, 2004

Hard work, Hard sell

Got home, 9pm last night, from Venice and our Mediterranean Cruise. It was very hard work and we get back exhausted, but I think that's going to be a hard thing for me to sell to anyone who happens to be reading "The Horse's Mouth".

I can tell you of a revitalised enthusiasm for PHP, and for MySQL (although the enthusiasm was always there). Listening to the originators of MySQL and PHP talk about them, I came to realise not only what excellent pieces of software they are, but also to appreciate that the people behind them really know what they're doing, have future plans, have a great deal of sense, and these pieces of software will continue to fulfil their role for many years. I can also tell of a re-affirmation that the move from Perl 5 to Perl 6, though it is taking far longer than originally anticipated, is in the best long term interest of the language. I'll be writing more on these points, and in our notes, over coming days, weeks, and months.

For today, I have a Tcl course to give, emails to catch up on, and I need to recover from a week of travelling, lectures, eating, visiting ports and the rest of the hectic on-board life. Can I convince you that last week was very hard work??

Posted by gje at 09:50 AM

October 17, 2004

On line every 24 hours

Isn't the internet wonderful - here I am connected in from Venice's Marco Polo airport using my own laptop, looking out over planes arriving and departing ... we have a couple of hours window (slack) between the arrival of our boat and the departure of our plane.

Phone to email
Fax to email
People writing direct by email ....
and we can stay in touch and run the office from "The Med". Mind (and this is a HARD sell ;-) ) it was a business trip - you'll see comments appearing here and updates appearing in our courses, looking forward to the future having heard lectures by the authors of PHP, Perl and MySQL. Our training is on the current production releases of all these pieces of software and it will remain so. That's what our customers want to learn and use. However - we can (and do) have a brief look to the future on each course - introducing terms and concepts that are growing in popularity, and ensuring that we don't lead trainees down the road of functionality that's in the process of deprecation.

Oh - I've got off subject. Not unusual.

I was also commenting that we're on line at least once every 24 hours ... just been looking at past customer's questions, and getting ready for tomorrow's Tcl course.

Posted by gje at 02:44 PM

October 16, 2004

Rude old people

Yes, I *am* enjoying being on a cruise ship and attending Open Source lectures - you've see a few posts here on the subject in the last few days, so this is something slightly less techie.

Why is it that some cruisers have to push into queues? Why is it that some of them are so inhumaising to the ship's staff? I know I'm not alone in my frustration. Lisa took a lunch tray
yesterday and a little old lady came up to the obvious queue and pushed in, in front of me and between us. "I'll see you in a couple of minutes" I said loudly to Lisa "some people obviously don't realise there's a queue here or in a desperate rush ...." and I glared. The old lady stepped back out of the line. And another lady of similar size and age just behind me approached me and said "I'm so GLAD you did that. Thank you"

Dear everyone, please tell me if I'm ever needlessly rude, inconsiderate, or even if I have bad breath one day. I don't want to be like the examples I quote, but I fear it's easier to slip than I would like, and I *am* getting older.

Posted by gje at 05:37 AM

October 15, 2004

When will Perl 6 be available

OK - I have been asked this question so MANY times and ... up it came again this morning in a conference session presented by one of the developers and attended by the originator ;-)

"THERE IS NO OFFICIAL ANSWER"

Best current estimate - a year from now to a Beta release - that's October 2005
A further year to a production release - that's October 2006

Please do not treat this as anything more than a guestimate, and if it's 2005 by the time you're reading this (I wrote it mid October 2004) please look elsewhere on this site for my updates.

We already have a module on Perl 6 that we can include into our Perl courses already to give forward-lookers a view of the future and to help them plan.

Posted by gje at 10:14 AM


Useful link: Perl training

October 14, 2004

Getting the right level of trainer

There are tiers of trainers, and if you're choosing a technical trainer for yourself or your staff, you need someone from the right tier.

In the upper tier, you have Experts with a "Capital E". They really know their subject inside out, and they can present courses to highly technical audiences really well; I'm amongst these people this week, and it's enthralling to hear Randal Schwartz go through modperl in 45 minutes, or Brian Aker talking through MySQL server replication, clustering and cluster tables (different subjects) in a similar time.

The middle tier have a much broader subject subject knowledge, without being quite such experts on individual topics. I, unashamedly, put myself in this group and not "upper tier"; I don't need to be a hyperexpert when I'm called upon to teach Perl to a newcomer to programming, and I mustn't be a "one language only" guru when I'm helping people convert; it's just too narrow, and if you speak to the authors of the languages you'll hear them say "I made this C like" or "we picked up this from Ruby". Yes, and many trainees will be converting and will benefit from a broad teacher.

The lower tier, if you can call it that, includes trainers on other subjects who get some exposure to the target subject, and who will spend an hour or two on Perl / Tcl / PHP / MySQL as part of application training or management overviews. Such people often come on our courses, and I'm delighted to give them tips and techniques. I don't regard them as competition as they have a distinctly different job to do and, with a few bad exceptions, won't claim to offer a full course on the subject in question.

Let me repeat - I'm proud to be in the second tier, and it's a business decision that I'm there. I'm very very happy to take groups of nervous newcomers to [enter language] and take them through from basics to writing good professional code, introducing the philosophy as well as the mechanisms of the language, teaching good technique and comparing, with some authority, to other languages as we go. This is the training that most people want, and it's proven time and again by the number of requests we get train further groups for the same company, or the number of people who recommend us on to their friends and contacts. Our marketing indicates that the vast majority of our customers are referrals in this way and that's a huge vote of confidence by our customers.

Why am I writing this article this morning? Because I was shocked over dinner last night, seated with some of the upper tier people who had better remain nameless, to hear them talking about flying lecturers from the upper tier halfway around the world to present more fundamental courses. Bemoaning the lack of ability to charge what they felt the right rate should be, not realising that they can't charge the right rate because they're selling the wrong product - they're selling a Rolls Royce when the customer wants a Ford. Very nice indeed, but too expensive and too high maintenance. The real tragedy? They hadn't even looked at the Ford to see whether it did a good job - they had simply heard of it, and discounted it straight out with disdain. "Can't be any good" attitude.

I remember the particular contract they were using as an example. I was the Ford.

I don't mind competition, but I did "feel" the disrespect last night. This morning, it's mellowed. I'm thankful that they're not really able to provide the majority training needs. Occasionally one will "slip through the net" and a Guru will fly halfway around the world to present over the heads of his audience (yes, I HAVE seen this; I hope I'm not making the same mistake in reverse) but for the most part the customer will realise that he needs a course with plenty of hands on, a group which is small enough to give people some one-on-one time, and a trainer who'll be available for follow ups, and with associated subject knowledge to help put the whole in context. That's what I'm proud to provide.

Posted by gje at 06:42 AM

October 13, 2004

Too sittings

On this boat, there are two dinner sittings and they're called "too early" and "too late". There are 6 coffee machines, and they all close for cleaning from 3 to four in the afternoon.

Arriving Izmir, Turkey.

Posted by gje at 05:04 AM

October 12, 2004

Talk review - Idiomatic Perl, David Cross

David Cross's talk on Idiomatic Perl was excellent. I know of Dave from his book Data Munging with Perl so I had some idea of what he was going to be covering.

Now - I've been training in Perl for a number of years, so I didn't expect to learn much technically new, but I did expect to pick up nuances, subtleties, and an indication of a truly independent expert's view as to what is good and what is bad practice. Every programming language needs to have good facilities to cover each facet of its use, but Perl it seems has dozens of facilities for each need. And that's not necessarily a good thing because the code can be written in many styles. The trainer / course author, then, needs to be aware of what is common practice and what is being recommended as future common practice, and what should be avoided (and it's nice to know "why" too).

David - if you ever stumble across this, thank you for the talk. A strong reinforcement of some of the paradigms of Perl that I've been pushing, sometimes a little timidly, in our courses. A reminder of some excellent modules which I have neglected of late, but are now so main-line that they're in the Perl core. And a few golden nuggets which, in the spirit of open source I'll be delighted to use in my own work and spread further. Finally, one or two topics / words presented very differently to I present them - and an inspiration to me to vary, just a little, some of my performances.

Posted by gje at 04:00 PM


Useful link: Perl training

Present and future MySQL

An almost too-crowded schedule. Yesterday morning, the founders of MySQL, and I have posted more fully about their talks elsewhere on the site - here and here. In the afternoon, a talk by Brian Aker who's their director of architecture, which I found a useful approach to some other aspects of MySQL, such as release policy, numbering and naming, selecting your table type in MySQL, and replication / cluster. Also looking forward to the MySQL Administrator becoming more mainstream.

As you would expect from a piece of software that has sprung from no-where in the past few years to its now dominant position, there are some very bright people at the top. I'm also impressed by how they come across as human beings, and how they have a strategy and philosophy that drives them and their product forward. Seems to me that MySQL is already an excellent RDBMS system, and will continue to be so into the future with far fewer twists and turns than we would expect from an average product.

[This post and others on this board are held in a MySQL database that's maintained by a Perl program. Displays at http://www.wellho.net/horse are maintained in Perl, and pages at
http://www.wellho.net/net/mouth.html in PHP.

Posted by gje at 04:51 AM

October 11, 2004

MySQL - nuggets

I had great pleasure in listening to David Axmark and Monty Widenius talking about MySQL this morning. When I take up a new subject, I always feel a little apprehensive - am I presenting it as its authors intended? Who are the authors anyway - are they nice, sensible guys? Great news - Monty and David pass with flying colours on both counts and I'm even more of a protagonist for MySQL now that I was six hours ago. Full posts in the solution centre (see under MySQL) ... here are some nuggets ...

* It takes 3 days to test each new release of MySQL as all the releases are test-installed on a build farm to ensure it's RIGHT.

* "Inspection study shows code quality of MySQL is 6 times better than that of comparable proprietary code". This means that (for example) a recent decision as to whether to go for another Gamma release of 4.1 or to go production was obvious - it stayed Gamma.

* It's called MySQL after Monty Widenius's daughter My, who doesn't like the picture Monty uses of her during presentations.

* The "LIMIT 10,10" syntax extension was proposed by Rasmus Lerdorf, the guy who originated PHP.

Posted by gje at 12:52 PM

Geek Cruising

On board "Costa Meditteranea", early morning.

We joined the ship at Venice last night, an embarkation procedure that had us waiting 2 hours in a dockside warehouse to have our hand baggage security screened and to wave our passports and tickets at staff, but soon forgotten as we got on board, found our cabin, explored parts of this 10 deck floating "palace". I looked hard for a better word than palace, but couldn't find one. I wanted something that's over-the-top, new, people at your beck-and-call but with 900 staff and 2400 passengers, we don't have the exclusivity of a palace.

Sailed at 6, out between the islands and past St. Mark's, then on to a group meetup in the Rodeo bar. That's really why I'm here - a Geek Cruises styles as the Perl Whirl / Linux Lunacy / MySQL Swell, and so are perhaps 120 others. Surreal at the meetup to have Neil (in charge of the group) introduce a number of people from the Perl world. The guy a couple over from me turns out to be Rasmus Lerdorf, the originator of the PHP language that powers much of this website, and later I'm tongue-tied as we brush past each other. A little further over is Larry Wall, author of Perl which is the language in which this very application I'm writing in is written. Plenty more chances to meet, and I must remember I'm paying to see him and others speak, to ask questions of them, etc.

We're seated at tables of 8 in the restaurant, and Neil has placed many of the "Brits" together. Three eminent names at our table and a fascinating evening had by all. Notable that our table was the last to clear in the entire dining room, which must be significant of something though I know not what. And so to sleep, as the ship slides South down the Right Hand Side of Italy. MySQL sessions this morning and afternoon, and the port of Bari sandwiched in between. I had better post, wash, shower, and breakfast.

Posted by gje at 05:46 AM

October 10, 2004

Keeping up to date

I try to avoid "dentist's waiting room" syndrome on our web site - pages that are correct as they're entered but soon go out of date and look old. Here on "The Horse's Mouth" that's not so important as it's a diary (and some will say I should never come back and change history), but on the main area we require to be crisp and current.

This Open Source computing stuff is constantly changing, right? Well - actually WRONG. Who would want to learn to program in a language which is current this year, but out-of-date and replaced next? We have been writing Perl courses since 1996 and all the earliest examples will still work. But release numbers change, there are additions and changes to how the languages are used. Our course material and presentations are constantly being updated to reflect this - every one of our current courses has had at least a minor update in the last 6 months.

Suprisingly, one of the areas where we find a need to update the website very frequently is in the area of travel. We'll collect trainees from the local station where times of trains change with the season, and from Southampton and Bristol airports, both have which leapt forward in the flights they provide.

We flew out from Bristol Airport yesterday to Venice - that's a flight that was (I think) started by Go and taken over by EasyJet. FlyBE, Ryanair, Air South West, Eastern Airways flights in and out too - many new destinations. So I need to go back to our Web page and add to it: If you fly into Bristol Airport from Bordeaux, Copenhagen, Toulouse, Venice, Split, Bilbao, Barcelona, Nice, Bergerac, Brussels, Paris, Dublin or Amsterdam for a course on Python, Tcl/Tk, Perl, PHP, Tomcat, MySQL or Linux ... we'll collect you from the airport. Our offer's open to UK arrivals too and there the flights have stepped up; Edinburgh, Glasgow, Belfast are not new. Newquay and Plymouth are, but I do think that people would drive or use the train.

Posted by gje at 07:46 PM

Cafe keyboards

Isn't the web marvellous! Seated in an Internet Cafe in Venice I/m limited only by the problems I/m having finding at symbols and apostrophes [semicolon] [minus] [close-round-bracket]

Posted by gje at 10:13 AM

October 09, 2004

OO - real benefits

I was reminded of the real power of OO based systems and good object design yesterday. Taking a whole series of already-written classes, I was able to bolt together a new application based on the same data in just a few lines of code and get it running on a website too. The real saving comes not in the early development, but rather in the ongoing reuse. "Design Matters".

Posted by gje at 05:53 AM

October 08, 2004

Last day of Java

Friday, last day of "Java Programming for the Web". An exhilarating week with 3 keen students ... both old friends from "way back" and newcomers too. Would have been nice to have one or two more on this course (for purely commercial reasons ;-) ) but it's worked very well. With a Java course, I always take an example based on one of the trainee's real applications or interests, and this week we've had person objects, extended into lecturers and students. Lecturers earn a salary based on their age, students make a fixed notional amount in part time jobs, and we see polymorphism in action.

At about 9 O'Clock, we'll start putting JSP and Servlet wrappers around the examples that we've been writing this week ... by 16:30 finish there will be all sorts of interesting classes to be emailed back to the attendees as they return home.

Posted by gje at 06:08 AM


Useful link: Java training

October 07, 2004

Domain Registry of America

I'm posting this here ... with a link to more details on Opentalk at http://www.wellho.net/cgi-bin/opentalk/YaBB.pl.

Looks like (yet another) attempt to get people to pay over-the-odds to renew their domain name registrations. I'm thinking that anyone can set up as a renewal agent without any form of check or license .... personally, I'll stick with the companies I know or I hear of on recommendation.

Posted by gje at 08:22 AM

Telephone systems

Don't you just hate those telephone systems where you have to press 1 for "this" and 2 for "that" and can end up going through, it seems, a dozen options before you get to where you want? I know I do - so why have we just installed a clever system here?

We welcome personal calls from friends and contacts. We welcome enquiries about courses, technical questions (although often better asked on Opentalk) and follow ups on enquiries we have made. But we cannot be at the phone 24 hours a day, 7 days a week and, these days, business doesn't seem to be just 9-to-5!! You'll only reach our "clever system" if you call when we're training out of the office or away at a conference, or if you've happened to call at one of those odd times when everyone's tied up. Have you noticed how the phone always rings at the same instance that someone walks into reception?

Designing our system "script" seemed - amazingly - rather similar to web site design. A home page with clear information, easy navigation links to each option and getting where you want with as few key strokes as possible. Looking at how others have done it, and learning from their good and bad points ...

Our system is more clever than most! I know the British temptation not to leave a message, but please DO. If we're out of the office, messages are emailed to us (that's why we ask you to supply an email address for return contact) and we collect them, worldwide, on a regular basis. Faxes get forwarded to us in a similar way.

Now - here's a confession. We get very tired of unsolicited calls trying to sell us things; I know the people making the calls have a job to do - I don't blame them for the nuisance they cause, but rather I blame the people who have employed them. I'm tempted to add the following onto our system:
If you're contacting us to sell us your company's products, please press 2 and we'll tell you a little bit about us and let you know how to get in touch if you still think it's worthwhile.

And telling you about us? This is the sales information line. Thank you for calling us to tell us about your product. We're a small company (we describe ourselves as a "Mom and Pop" outfit) based in Melksham, Wiltshire, England. We're very busy indeed at present, so we're not looking for any assistance with marketing and advertising - there seems no point in generating more business than we can handle and we have a good market awareness program in place. Our service bills (phone, electricity, etc) are low, and we feel it would be more trouble than it's worth to switch to make a few pounds saving at the moment. We've just had extensive work completed on our listed building, so we're not in the market for windows or kitchens. Pension issues and financial planning are well in hand too. We support certain charitable causes, with whom we're already in touch.

Do you know ... having just read that back over makes me realise just how lucky we are ...


Local Melksham businesses (taxi services, B&Bs, etc) - let us know what you're offering as we often have visitors who need to stay or get around. See our getting listed with us page.

Full contact details are at http://www.wellho.net/resources/contact.html

Posted by gje at 06:25 AM

Learning to program in

There's a world of difference between learning to program in xxx language (i.e. learning your first programming language) and converting across from another language, The majority of the language training that we do is conversion courses, but certain courses such as this week's Java course are very much geared for the complete novice. On a newcomer's course it's advantageous to cover some aspects of analysis and design, spend a little time drawing flowcharts (and the annotating them with keywords and curly braces to show how they convert to code) and to provide many "cut and paste" type practicals where the trainee alters our examples rather than writing new code from scratch. On courses where we're converting established programmers - perhaps with years of experience of C - we'll cover language comparisons un-necessary for the newcomer, and we'll be having people unlearn the idea that variables are static in favour of the much more dynamic model that's used in more recent languages.

With Perl Java and PHP, our public course schedule includes offering(s) suitable for both programming newcomers and converters. With Tcl and Tk we find that the majority of learners have no (or little) prior programming knowledge and a "learning to program ..." approach is the norm for most clients. With Python, the vast majority of the client base has programmed before in another language; for newcomers to programming in Python, we'll lay on an extra day if necessary.

Posted by gje at 06:01 AM

October 06, 2004

It's just not cricket

We love living in Melksham and it's so easy to do net searches for resources in the town; perhaps we should be thankful that our forebearers loved it too and never left to set up an identically-named city elsewhere in the world. By contrast, we've found it very hard to search for bathroom suppliers in Bath.

We've also found it - err - somewhat interesting to find information about the open source piece of software called cricket - it's is a "high performance, extremely flexible system for monitoring trends in time-series data" which is great for watching over network traffic, web site trends and the like. Do a search for it, and what do you find - pages about sports and insects.

On a slightly more serious note - if anyone reading this has experience in installing, maintaining and configuring cricket (I know I have the odd regular reader who might), can they let me know. I'm looking to help someone out and it's a bit too much of a niche even for me. Thanks!

Posted by gje at 07:33 AM

October 05, 2004

pushd and popd

On every programming course, you're taught never to use the goto statement even if the language has one available, as you're creating spaghetti code that's hard to follow and maintain. I agree with the sentiment.

So .... why, oh why, .... when you're navigating around directories at a command prompt do you use the cd command - it's the shell's equivalent of directory goto as it leaves you jumping away from your current directory, and not leaving a return address for when you want to go back.

Have you come across pushd and popd? When you "pushd" to a directory, you save away on a stack the name of the directory you're moving from; when you "popd" you return. Simple, effective, ang great when you want to pay a temporary visit to a remote directory in a Unix or Linux shell.

P.S. They're supported in Microsoft's Windows XP too!

Posted by gje at 06:54 AM

October 04, 2004

vi - full circle

I started doing Solaris training in the early 1990s - it seems an age ago (probably because it is an age ago!) and one of the courses we did was an "Introduction to Solaris" course which ran for 2 days and had a quarter day or so on the vi editor. With the takeoff of our Perl and Java courses in the late 1990s, I gave up the contract Solaris training simply because there weren't enough weeks in the year and thought I was done with teaching vi.

We're now moving to a time where many web site owners are moving up from using shared space on ISP machines to running their own servers, typically Linux based, and typically based away from the site owner's desk - indeed, we have just bought such a system ourselves. With such a system comes the need to know how to look after a Linux, Apache, MySQL and Perl / PHP system (LAMP) and I find myself teaching LAMP Deployment courses.

It's almost like things have gone full circle; people need to be able to remote-edit (perhaps just tiny changes) configuration files. And what else to use but vi? Once again, I find myself teaching vi - though this time a "micro-vi" introduction of a bare minimum of commands, in a session that runs for about half an hour. If you're interested, I've put the text on line in our solution centre

Posted by gje at 04:37 AM

October 03, 2004

On Customer Service

Let's not forget - the customer is king!

I present training courses. It's a service business; it exists for the customer and so the customer is "King".

What do I mean? I mean that we listen to our customers and we provide them, if at all practical, with the service they've requested. We welcome their inputs as it gives us an opportunity to tailor what we provide to suit them even more closely, and an opportunity to improve our product further for the next set of customers. Following this philosophy from "day 1", we now offer a product that's second to none; we're busy to the extend of being rushed off our feet, and the majority of our customers come to us through referrals and recommendations based on previous courses - an easy sell.

I don't mean that we're able to meet every request of every customer, not to take every suggestion on board; we've been running our training centre for 4 years, so we have rather more experience with what works (and what doesn't), and many of the questions that come up are not new. BUT I STILL WANT THEM RAISED ... it tells me what's important to the client that I'm talking to, it alerts me issues that need re-appraisal, and it helps to remind me that every client is different. It's also an opportunity to explain, and to explore alternative which - although they're not exactly what was originally suggested - may prove even better by combining the client's fresh view with our experience.

Just as I'm a service provider, I'm also a service user. And I take the opportunity of being a service user to see how providers come across, and to learn from good and bad experiences.

Examples:

A customer requests to learn Perl, and its use in handling graphics on the web. We can deal with the "I want to learn Perl" easily enough - whether our customer is learning to program from scratch, or converting from another language. The graphics is a bit trickier - we do have training notes, but they're not included in our standard public courses because there simply isn't enough demand; rather, they're private courses only. Solution? We'll offer a "Perl Extra" day - a day that hasn't otherwise booked (usually a Monday or Friday orphaned by a four day course) and we'll run a one-on-one session for our customer. Do we make a profit on this? Not directly we don't, but we do ensure the customer books on the main course and we can be pretty sure he'll suggest our services to his colleagues too.

I'm attending a conference next week. It's quite a cost for the trip and the event, and it's a double cost because it means we'll have no course income for the week. But it's a vital part of keeping up to date with the technologies so that I can continue to give current information on our courses. This week, I received the schedule of the various sessions and my three top choices all run at the same time - very disappointing, especially since there was only limited opportunity to express preferences ahead of time. Others are disappointed too - "I'm doing both PHP and MySQL; why do they clash" was posted by several folks on the mailing list. The answer's come back - basically "tough - the schedule satisfies 90% of people" (and how do they know that with only limited opportunities given to express preferences?). His sidekick chimed in "you don't know how hard it is to organise" (really? thanks for making me feel small) and "even I want to attend a session that's scheduled while I'm lecturing" (yes, but you're being paid to lecture and the customer should come first). OK - rant over. Could the organiser have done better? He could have provided a way for his customers to give a full input on what they were interested in. He probably DID have to disappoint some people; with full information he would have know who was in that group, and he could have sent them a personal "sorry but it can't be helped" message. And he could have suggested to his sidekick that it's not a good idea to scorn the input of the paying customers, especially on an open list. Have I gained from this - yes, absolutely; when I look and listen to others, I learn from all their points, good and bad ;-)

A number of years ago when I was a contract trainer, I was giving a public course in a shared office facility and I was the only representative there of the company to whom I was contracted. The first day went just fine, but when I arrived half an hour before the customers were due on the second day, I found that there had been a break in and all the computers had been stolen. Not really time to do much before customers walk in and ... demand ... that the course continue as booked; I can understand this as the course has been scheduled for a while and it's a vital part of their jobs. But what to do. I sat down with them around the table, and explained that I'd only had a few minutes to think this through but I had come up with options (a), (b) and (c). Then I passed the ball. Could they suggest any other options that were open to me? Which option would they like me to take? The aggression melted, the chosen solution (a morning of board lectures while I was rushed a couple of machines for the students to share for the rest of the course) was the best that we could do in the circumstance for most of the attendees. One or two chose a different option (to come back for the full course the following time it ran) and everyone was happy.

It's inputs and experiences like these that have shaped (and continue to shape) our policy. Our station and airport pickup service is an answer to customer requests "How do I reach you by public transport". We don't cancel a course public course, even if there's just one trainee, because we know how much this could muck up that trainee's plans. We provide a choice of OS X, Linux and Windows machines for practicals. We have local books and maps to hand for trainees to borrow if they're staying in the area overnight .... and so it goes on. We have a saying "Come as a student, leave as a friend". And most people do.

Posted by gje at 10:04 AM

Comparators in Linux and Unix

I always say that it'll be a sad day when I don't learn anything ... I'm always delighted to pick up nuggets and reminders from
trainees on courses whilst appreciating that the major knowledge flow has to be the other way.

So, in the spirit of always learning, may I (re)present you with the sdiff command on Unix and Linux which came up while covering utility commands the other day. It compares two files and displays the differences side by side. As ever with *nix systems, lots of options!

Note - the wide output of sdiff doesn't translate too well to the formatter of standard blogging software. You may prefer to view deep in the mouth.

earth-wind-and-fire:~/oct04 grahamellis$ sdiff -w 110 vione vitwo
Vi. You either love it or you hate it.                  Vi. You either love it or you hate it. 

It's there on Unix and Linux, and it's an | It's there on every Unix and Linux, and it's an
editor written many years ago with the full editor written many years ago with the full
Unix philosophy embedded in it: Unix philosophy embedded in it:

* A maximum of actions for a minimum of keystrokes * A maximum of actions for a minimum of keystrokes
* A huge number of options to make it very useful | * A large number of options to make it very useful
in a wide range of scenarios in a wide range of scenarios
* Easy to use at the expense of being... * Easy to use at the expense of being...
Hard to learn Hard to learn
>
> It's worth everyone learning a few vi commands

If you're deploying an application on a Nix box, If you're deploying an application on a Nix box,
sooner or later you'll need vi. sooner or later you'll need vi.
earth-wind-and-fire:~/oct04 grahamellis$

Other comparator commands in Linux and Unix include:
diff - difference between 2 files as a "regular" report
diff3 - difference report between 3 files
cmp - file comparator ideal for binary data and use in scripts
comm - reports on common lines between files (similarities not differences)

Posted by gje at 07:35 AM


Useful link: Linux training

October 02, 2004

Red Luas - early life and times

A little off-topic, but it's been suggested that I post this piece to save it "for posterity". Hmm - not sure that this website will be around in 20 years time let alone posterity, but here's my account of part of a week that's unlikely to be repeated

It's been a long time in coming, but Red Luas was opened by the Taoiseach on Tuesday ... and I've had a chance to sample it Wednesday, Thursday and Friday.

Perhaps I should translate. Bertie Ahern, Ireland's Prime Minister, opened the new red line of the Dublin tram / light rail system last Tuesday. I was working for the week in Dublin, staying at a hotel near the Red Cow roundabout (the busiest in Ireland), and travelled on it in and out of the city centre several times.

First impressions? It's going to be a huge HUGE help to Dublin's traffic problems, especially from Tallaght, Ireland's largest "town", into the city ... but there are already teething problems showing up in the first few days, and how they're sorted out over the coming weeks will be critical to its success. Fascinating to see how the "metrics" of its usage changed in just a few days.

I didn't travel on the Tuesday - in fact, I only heard that the tram was opening that day, with free travel for 6 days, by con-incidence. In any case, I was working out of town. I did spy a tram from the hotel, though, running through what has appeared to be a construction site for years. I understand that the trams were all crowded, and I saw all the crowd control barriers down town in the following days, so I don't think this was unexpected. I do understand there was a collision between a car and a tram on Tuesday - apparently, the drivers haven't got use to the trams yet, and apparently there's been a noticeable increase in broken legs at Dublin's emergency room due to cyclists getting their wheels caught in the tracks. No doubt they'll learn or sue ...

Wednesday, early evening, and I walked across to "The Red Cow" stop and boarded the tram that pulled in within a couple of minutes. They're three articulated sections long and declare they have seating for 56 and standing capacity for a further 198 (and space for 2 wheelchairs). Modern, sleek, well lit.

We pulled out.

And we stopped one tram length later at a light controlling traffic coming off the M50 motorway; move on after what seemed like an age to a bridge over the motorway where ... guess what ... we stopped at the lights controlling traffic going ON to the motorway. Moved on a few seconds later to a third set of lights where the tram tracks cross the main N7 coming into the roundabout and after this third pause, we moved on (with a squealing of wheel flanges) to run down a reserve in the middle of the dual carriageway N7. Standing behind the driver, looking ahead out through the cab and reading his instruments I saw that we were rapidly up to 70 Km per hour - not a bad speed - as we covered the mile or two down to Kylemore, pausing only at one or two other sets of lights along the way. Then on to Bluebell and Blackhorse, where the tram joins the Dublin South canal.

This is a rougher area of town; anonymous housing in blocks of perhaps 30 to 50 years vintage, with very little for the children and teenagers to do. Ah - except this week. Free tram trips! And in they all pile! In at Blackhorse and out one stop later at Drimnagh. Or in at Goldenbridge and out again at Suir Road, in at Rialto and out at Fatima. Or if they're not pushing in and out of the tram, they're playing "chicken" and staying on the track until nearly hit, or putting pennies on the track to see if the tram will squash them. There's a youth with blood pouring down his face who just wanders clear of the tram as we get to Suir Road. Is his wobble the effect of his injury, or has he been drinking and fallen over? Everyone looks as we pass him, but the tram carries on.

After Fatima, the tram goes onto its own track into "James" (like all stations on the line also named in Gaelic - Ospidel san Seamus) and then runs down to Heuston Irish Rail station; I'm glad to see that connected, as it's always struck me as being rather out of town. After further traffic light delays (but shorter ones than at the Red Cow - it turns out that the trams can request light changes in some places), we cross the river Liffey and (more wheel squeals) turn right to follow the river, one street in. We've lost all the children now, but the tram is still full of people going down town, and as we approach Abbey Street (where I got off), you realise just how central you are and how much night life the city has. Truly, it has a good prospect of bringing in not only commuters but "ordinary folk" who live out in Tallaght for an evening in the town; no bad thing, me thinks - Tallaght is said to be housing and little else.

I wasn't just joyriding that evening - I was in the city to locate my venue for the next day, in the area between the docks and the city; I knew it to be a maze of one way streets and likely to be hard to find by car. Glad I made the trip; it looked like a shopfront in a steel-shutter secured semi-derelict back street (one way, of course!) ... which I could have driven past half a dozen times.

On Thursday, I drove into town and discovered that behind that roughlooking shop front was an elevator up to three floors of brand new, lovely offices in the walls of an old Grain Warehouse ... a lovely boardroom in which to present my course, a pleasant office environment and a great glass roof. A beautiful mixture of ancient and modern. And, as always seems to be the case, a great bunch of trainees. And (!!) they even have a few parking spaces in a secure garage a few streets away - one of the attractions of the building, I'm told.

Now - I had expected my tram trip on Wednesday to be my only use of the Luas in the week but a thought struck me ... why fight my way out and in by car that night? A quick check with my hosts and, yes, it was fine for me to leave my car in their garage overnight. So ... back to the Luas.

Rush hour, so I walked up to the terminus at Connolly to see if I could get a seat and so had the rest of the world. Three lines of crowd control barriers and a queuing system reminiscent of Disney (but no Mickey Mouse entertaining the crowds) and a not-too-long queue which I joined. But no trams at all. Never mind. The newly switched-on system told us that there would be one along in 5 minutes and another in 8; turned out to be accurate, but also to reveal a new problem of bunching; the Dublin trams have already learnt from London Buses that they should run in clumps - it's naturally going to happen as a slight gap in service leads to crowds that make loading an unloading slower for the first tram after the gap, thus delaying it further.

I GOT A SEAT!! And I was joined by a Mom and Dad and their two bright young children; out after school for a trip on the new tram. Mum and Dad doing their best, but Adam and Eden are going to grow up into interesting cases; running rings around their well meaning parents already, who are responding with empty threats. Eden did get a bit of a jolt when he didn't sit down when told (for the umpteenth time) and the tram started and threw him off his feet. Children are resilient, though ... he quickly bounced back to his mischievous self.

But there was something different that evening. As we went through the centre of town there were children, for sure, but - it seemed - more controlled. Ah, and then I noticed. People here and there in purple of Yellow jackets. And as we got out to Suir Road, where the bloody youth was yesterday, each of the stops was being looked after by a Garda [Irish Policeman] or two. Of course, you can't keep the Irish down and a merry local lady and her daughter of 9 or 10 took a seat nearby. The Mom pulls a can of Guinness out from inside her jacket, has a quick drink, and starts chatting with the lady and her daughter opposite, suggesting to that lady's daughter that there's no harm in having a quick drink even though it's against the rules. "Sure, but who's gooing to stop me ...." she says while her own daughter looks on, clearly very used to this and it's the most natural thing in the world ....

And, early Friday morning, I used the Luas to return to town to complete the course. Starting to settle down. No Garda, nor youth riders, probably because of the early hour. But a well filled tram that they think's going to carry 20000 a day into town. Took about 20 to 25 minutes, versus twice that in a car, and dropped me off in good time in the City centre. Quick breakfast, and on to work with the happy thought that this *is* going to solve some of Dublin's access problems, and to wish it well.

Posted by gje at 02:04 PM

October 01, 2004

John Toner

There's a notice at reception at my hotel asking John Toner to call at the desk. I found myself thinking how, in past ages, people were named after their trades - David Baker, Arthur Butcher and the like. Should be bringing this up to date - oh - wait - we already have Geoff Hacker, Nike Trainer and now John Toner.

Posted by gje at 06:01 AM