« November 2005 | Main | January 2006 »
December 31, 2005
2005 - Come as a student, leave as a friend
"Come as a student, leave as a friend". You'll find this writ on the Well House Consultants mugs that you drink your tea or coffee from, and elsewhere - our "spoken logo" as I read in a book the other day.
One of the most noticeable personal changes in the past year or so has been the our coming out - from a smaller circle of people who inhabit a couple of niches to a much wider range of contacts and friends. 12 months ago, diaries were free many evenings but now I'll often look at scheduling an extra session with a trainee during a course (that's a service we're happy to provide to look at a specific application of the technology we teach) and found that I've only one or two suitable gaps on the week. And we're delighted with this development - not only from the personal satisfaction, but also because it's a chance for us to give something back - be it Lisa on the Bowerhill Villager, or me on Melksham's threatened train services. And we've met some remarkable but quiet people on both of these activities.
Business-wise, it's been a year of gentle consolidation. I can't point back to any big developments but I could come up with a number of less dramatic items - from the opening of our separate dining area in the Spring through to a major web site update in the Autumn, with online booking, further DDA compliance work and additional data mining techniques to help people find - rapidly - the resources that are relevant to them. Web traffic has increased dramatically, and in real life the number of physical visitors to our office has leapt too. On the other hand, telephone calls and faxes have dropped right off - technologies that have been overtaken for many uses, perhaps?
It's probably fair to say that every single course has been updated at least a little during the year. With Java 5 and Tomcat 5.5 and the ongoing "connector story", perhaps the biggest changes have been in the Deploying Apache httpd and Tomcat course. But then there's been big developments too in MySQL - now up to version 5 - and PHP, where their version 5 (with more emphasis on Object Oriented PHP) is easing out the older version 4. These new versions don't change the fundamental principles of programming in the technology, but they do open up new opportunities for applications that need to be mentioned right through training courses. They also lead, at times, to cumbersome ways of achieving a goal being replaced by a more efficient approach that needs to be documented and taught.
Although you'll see me as your tutor when you attend a Well House Consultants course, there's no way that I could do the job without the rest of the team - and that's right through from Lisa putting in far, far more than a standard working week and keeping me on strategic track, through Leah (currently holding the fort while we're away on holiday - THANK YOU) - to the folks who help our with specific areas from cleaning to providing lunches, and from gardening to banking services to delivering the post. I know that almost everyone's fulfilling the particular role they have because it's what they want and enjoy - but I still want to conclude my last post of the year with a huge "Thank you - I really appreciate what you do" to everyone, and to look forward to an exciting 2006 that will be even more of a pleasure for everyone.
Posted by gje at 03:01 AM
Related topics: via article database
More about Graham Ellis of Well House Consultants
December 30, 2005
San Francisco

Classic Holiday Snaps ... we're moving on from San Francisco; an interesting place to visit but I can't say I've left my heart here. It's cosmopolitan, it's fun, there's plenty to see and do but being asked for a dollar on every street corner soon tires. Not saying homesick, but it sure makes me appreciate home and our circle of friends.

Posted by gje at 01:58 AM
Related topics: via article database
December 29, 2005
Taking the dog for a walk
I noticed it first at San Francisco airport, while waiting for the last member of our party to join us. A very VERY posh young lady walking around, also on the "meet and greet" run. And in her arms, this little dog carried as, it seemed, a fashion accessory.
Looking around here, this business of "taking the dog out for a walk" that gives only the human being the exercise seems to be quite the in thing here - you'll find men and women of all sorts of shapes and sizes (but inevitably looking as if they're fairly well off) carrying these minihounds.
I'm trying to make out if this guy in my picture chose his dog to match his hair, or if he's dyed his hair to match his dog. The idea that he might have dyed the dog .... hey, I guess any thing's possible.
Posted by gje at 02:46 PM
Related topics: via article database
December 28, 2005
The relevance of the hairy woodpecker
We're into the forefront of technology ... and also into niche training. So how does that relate to this picture of the hairy woodpecker?
It's an inhabitant of a niche environment in the Big Basin park (near where we're holidaying), and it's specialised and does well in that niche. I felt there was a bit of a parallel there. And it was also a great opportunity to test out some new technology; that wasn't the easiest of pictures to capture!
This Hairy Woodpecker is found in the low-lit museum at the park Headquarters, and the new video-cum-still camera that I'm testing has a low light setting but no flash - you really can't keep flashing with a video cam. Personally, I'm quite impressed with the results ... here's more of the picture.

Posted by gje at 03:34 PM
Related topics: via article database
Is training seasonal?
I just wrote in an email enquiry about a course about "The first Apcahe http and Tomcat course of next season. Is our training really seasonal?
For us - involved in training primarily in the UK in Open Source languages and other technologies - it is, slightly seasonal but we're fortunate that the season runs for 11 months. The off-season which runs from a week or so before Christmas to mid January is a welcome chance to holiday, to catch up with paperwork and to plan for the next year. We're still very much open for bookings, and we've even got a Python course running from 9th to 11th January.
A couple of days back, we took a tour up to the Napa and Sonoma valleys - a chance to let someone else take care of the transportation for a change - and we happened across these two gents, leaning on the boot (trunk) of their car and passing the time of the day. We've had some time to "chew the cud" too - review 2005 and look forward to 2006, recharge our batteries and freshen up for what's going to be a fascinating next year. Watch this space!
Posted by gje at 01:11 PM
Related topics: via article database
December 27, 2005
Repeating tasks with crontab
Some things happen every day - or twice a day, or weekly ... in the background behind our web site - things like the rotation of log files, generation of reports and copying the Opentalk Forum into archives. We don't trigger these things manually!
On Unix and Linux systems, your crontab lets you set up jobs to be run in a regular (or irregular) pattern according to day of month, month, hour, minute and day of week. Simply use the command crontab -e on your server to edit your crontab, and insert one line per job required. For example:
11 13 * 3-9 * cp /home/wellho/summerpm.jpg /home/wellho/public_html/iotd.jpg
would copy an image called "summerpm" to an image called "iotd" at 11 minutes after the hour of 13, every day on the month, March to September only, every day of the week and:
1 2 * * 6 cp /home/wellho/weekend.jpg /home/wellho/public_html/iotd.jpg
would copy the image called weekend at one minute after 2 every Saturday morning.
Not every web space provider allows you to run crontab jobs, but if it's there for you, it's an invaluable tool. Just remember to never type in the word "crontab" on its own as it deletes all your existing jobs and replaces them with whatever you care to type at the keyboard!
Posted by gje at 02:37 PM
Related topics: via article database
December 26, 2005
The world didn't stop for Christmas
Walking along streets yesterday it was quieter than usual - save for the people asking for money who seemed to be around in even greater numbers than usual. Perhaps that's because people are more generous to them at Christmas so they're all out - or perhaps it's simply because they've got fewer people to ask. Alas - it turns the city we're in from somewhere to say "Wow - I want to come back" to somewhere to say "That was an interesting place to visit".
News just "heard" via email this morning that the senior man at our accountants went missing about a week ago - story from paper. I'm all at sixes and sevens over this. His car found on a major estuary bridge; reports of someone climbing over the side; I would be delighted but- frankly, surprised if he turns up alive.
Yesterday also brought a personal "hit" from Lisa's ex. There are some people who do well by climbing on merit, there are others who do well by trampling others down as they climb - by fighting to get more than their fare share of the same cake rather than working to improve that cake for everyone. Personally, I think it's a really dirty trick to .... oh - never mind. It's Christmas ... and this is "only" more money this time.
We have a good, dry home. Health, happiness, work we enjoy, great family and fun. If you - EVER - see me behaving like the accountant, like the street people, or especially like that ex, please pull me to one side, remind me of this post, and tell me what a huge mistake I'm making.
Posted by gje at 02:53 PM
Related topics: via article database
Morning image, afternoon image
"I want to show one picture on my website in the morning and a different one in the afternoon".
Doesn't that sound like it's a simple request ... yet - as ever with computing - it raises a whole lot more questions, with a raft of possible answers.
* Do you want the time from the server? Where's your server? One of ours is in California, and the other is in Germany! Or would you prefer the time to reflect where your main customer base is (the UK), or where people are browsing from?
* Do you want to change your HTML every 12 hours to pull in the new image, or to have a URL for the image that changes? Or do you want to run a timed job on the server to switch the image for you? Does it matter??
If you're looking for server or main customer base time to be reflected in the image, the easiest way is to use PHP for the image generation. Here's code to choose between two images based on the server's hour:
$hour = date("G");
$image = "psh1";
if ($hour > 12) $image = "chsid";
and you would write something like:
<img src=/whimg/<?= $image ?>.jpg>
actual HTML.
See a worked example with source code.
Variations:
1. Changing to a different (fixed) timezone is quite easy - use either the date or gmdate functions from PHP and add or subtract an appropriate offset.
2. Timing by browser is a little more tricky. I would identify the country using Maxmind and then work with a table of time zones such as those here and here. Even then, you'll have daylight saving to take into account ...
3. If you prefer to keep your HTML fixed, you can use PHP to generate your image - example (to display a random image) here on our forum.
4. A further variation if you want to change the image but use static images and pages is to use a regular timed job (crontab) to change the file on the server at the correct times.
Posted by gje at 01:54 PM
Related topics: via article database
December 25, 2005
Christmas is for everyone
Our amongst the holiday-season crowds yesterday ... we took in the Charles Dicken's Chistmas Carol at Midday at the local theatre, and in the afternoon took the streetcar to Pier 39. Tyler's first time in San Francisco, and he sucked in the place - the sealions, the shops, the arcades, the view out to Alcatraz and the Golden Gate. Dad, Lisa and I sat on the pier - pleasantly in the mid-60s - and in due course a street performer came along. Chatted with the guy - pleasant and knowledgeable and earning his living from his performances. Quite a crowd gathered and we enjoyed the show - much more of a show than anything spectacularly clever (not that I could have done what he did!).
Towards the end of the show, Mitch was pepping the audience up to pass his hat around, when a man approached him and interrupts. Mitch interrupts what he's saying - "Some things are more important than my show" he says, and he helps the guy ask if anyone can see his daughter from who he's become separated in the crowd. She - Rose - turns up a few seconds later across the crowd.
Christmas is for the kids and for everyone. We're doing it in our quiet way ... you'll be doing it in yours. However that is, have a great one.



Street Entertainers, San Francisco
Posted by gje at 02:22 PM
Related topics: via article database
December 24, 2005
Christmas Party
Yesterday, I came across this group, well-worn from a heavy schedule in 2005, and looking as if they were slightly the worse for wear after their office party. Ah - the effects of the new drinking laws look like they've spread rather wider than the centres of our cities, and rather beyond the groups that everyone was concerned about ;-)
Have a great Christmas, everyone!
More pictures from the same city
Posted by gje at 02:12 PM
Related topics: via article database
December 23, 2005
rich and famous
will never be rich, yet I am rich already.
I will never be famous, but already I have fame.
Written on 22nd December, 35000 feet over Greenland. No internet connectivity so I'm left to my own wisdom and a couple of those bound bits of paper things called books.
One can always think of things to do with more money. "When we are rich ... " suggest Lisa about flying a class up so that there's room to work on this laptop. Ah - but rich is having one and a half times the resources we already have. Yet we are rich already - the rich fabric of an enjoyed life, health, great kids and more things I want to do than I have time to do.
No one on this flight (apart from the sardine to my left and the sardine to my right) knows me. And that's as I would expect, and hope, and that's how it is for the majority of folks. But everyone gets their own fame - not 15 minutes, but ongoing, in their circle. And that's lovely - an earned fame.
I was down at Sainsbury's in Melksham on Saturday morning, looking for something I could cook for lunch for six. The Lions were collecting for Christmas - good on them, yet at the same time I just get so many requests for money. However, I've headed off-topic.
"Hello - I'll see you on the way out" I say to the guy who's collecting and I've gotten to know because of "the train thing" in the last few month. "Thanks, Graham, but put it to the train campaign" he says. And that warmed the cockles of my heart. The true Christmas spirit.
The Train Campaign isn't desperate for money. I'm quite happy to pay some small-run print and postage costs and my 2 pounds a year for the domain name (savethetrain.org.uk). What I really need is time, and people with time to add their voices.
And ... "The Spirit of Melksham" - perhaps also the spirit of many other friendly places, but certainly not what I was used to at our previous address where I felt like an incomer, even after 20 years. "The Spirit". An urgent email on Tuesday to people telling them of a brief window of opportunity, and a request to them to write in and take that window. Bless you, all of you who wrote back and said "Yes, I will". And the spirit's there too in the experts and officials, who we may have thought of as dusty shirts, penpushers or jobsworths; some of them emphatically are NOT. They've a hidden sea of great knowledge and wisdom, and they're happy to help the newcomer learn and explain things to him and help along the mutual cause. Gentlemen, I take my hat off to you and learn from you in my own teaching.
And the spirit bears fruit. Small questions answered, little contacts made that grow to bigger ones. It might not seem much to you, dear "Open Source" reader, but I now have - AT LONG LAST - a definition of "break even point" in traffic terms for a small country station such as Melksham. I now feel placed to discuss with some knowledge the "low traffic levels" that we're told about.
My fame has lead these good people to help support my quest. And from it, I gain a richness of fulfilment. Wow - thank you everyone.
Posted by gje at 01:28 PM
Related topics: via article database
A company we can work with
A knock on the door at a quarter to five. Anything unusual in that? Well, a little, being it was a quarter to five in the morning!
A taxi driver stands there, looking expectant at me and I appear, perhaps, just a little startled. The car wasn't due for another hour. But there's coffee on tap, 24-hour news on the TV, and with his early arrival we were able to beat the rush up to Heathrow and check in before today's pre-Christmas throng.
Whenever you perform a service for a new client, perform it as if it's an interview for a long series of jobs. And in spite of the early arrival, this airport transport firm has impressed. Good response to email, prompt follow-up on a couple of questions that weren't covered in the price list and FAQ, and a painless Paypal invoice - everything was set. Do they get any more business from us? Yes, they do; they know already of the return journey when we finish this trip, but what they don't realise is our changing business plans.
For years, we've offered to pick up students from Bristol Airport before courses and deliver them back there at the end. But with plans such as Well House Manor coming on board next year, we'll be stretched to the limit. We're great believers in having people do what they enjoying doing and what they're expert at and we're not - really - expert drivers with full knowledge of the back roads. G****y, on a course at the end of November will tell you of a serious traffic jam that had him only JUST in time for his flight. No - let's pass this one on to the professionals and I'll use the two hours I've saved to write and improve the Hotel Room Booking system, or to improve the notes on MySQL replication.
Oh - I should give them a direct plug, shouldn't I? They's Airport Specialist Cars on 01225 764141
Posted by gje at 01:00 PM
Related topics: via article database
December 22, 2005
Daily Image Santafied
The image on our home page varies day by day (also based on the user's country of origin). For a few days in the lead-up to and immediate aftermath of Christmas though, it's replaced by a picture of an older man with a white beard in a red coat, bearing gifts for the children. Here's how:
$daze = time()/(3600*24);
[regular code to set image based on day and/or browser country]
if ($daze > 13136 and $daze < 13146) $image="santa2";
Posted by gje at 04:28 AM
Related topics: via article database
December 21, 2005
Cancellations and penalties
We have a no-cancellation policy. Once your course is booked, we promise that we'll run it even if you are the only person on a public course. Yes, that does mean that we'll occasionally run a loss-making course, and that we sometimes even have to turn profitable business away to run that course.
But let's say you've booked a Python course, a subject on which I'm the only tutor, and I'm taken ill. I've been training for 15 years, and I've had to postpone a course 3 times - that's once every five years - and I don't think it's a bad statistic. And in all three cases, the customers were utterly understanding and both customers and tutor co-operated in re-arranging the (rest of) the course at their mutual convenience.
Last week, I turned down an opportunity to run a two-day private course early in the new year for a major company who were asking that in the event of cancellation or postponement for any reason (including tutor sickness), we pay them the total cost of the course. And they also wanted to evaluate the course after they had taken it, using their own criteria which were not specified, and decide whether to pay us the full charge or to make reductions (of up to 100%) if the product came out below their par. I have never seen anything else remotely like it for a short course! Oh - and it took them a month to send me these terms and conditions and they were looking for signed copies back much much quicker than that!
Were I running 10 full weeks of training for this company through the year, then perhaps I would have looked at it more closely, and attempted to negotiate. For two days, one-off, frankly ridiculous.
The two days that were held are re-allocated to office work, admin and meetings, and I'm really happy about it. Great chance to start the year strong, composed, and providing great courses to all the other people who have booked all our dates up through January.
Posted by gje at 08:43 AM
Related topics: via article database
December 20, 2005
MySQL permissions and privileges
In MySQL, users log in with a user name and password (the login also depends on their client computer's name or IP address which can be restricted). Each user account has a set of permissions which are set up to offer:
a) Global privileges over all databases managed by the current MySQL instance PLUS
b) Privileges over specific database(s) PLUS
c) Privileges over specific table(s) PLUS
d) Privileges over specific columns.
At the Global level, privileges range form "select_priv" which allows for data to be read (select commands) through to "shutdown_priv" which allows the user to shut down the MySQL service. Many of these are inappropriate "per database", "per table" or "Per column", so that although there are over 20 different privileges at a global level, there are only 4 at a column level.
Privileges are additive - in other words, a user has everything offered to him at the global level and then ADDS anything at lower levels.
On a typical ISP system, each account holder is given NO global rights and FULL rights over the database that bears his user name, or over all databases that start with his user name.
Posted by gje at 06:53 AM
Related topics: via article database
Useful link: MySQL training
December 19, 2005
Design - one name, one action
"When you're designing a piece of code, or a web page, or you're putting together an image, always keep one logical action or piece of work in one file or one named block. If you want to do several things, then write an encompassing element to contain them both."
Such is Computer Science Theory, but what does it mean, and why? Let me give you an example.

On the left hand side of our web page, we have an image that's 132 pixels wide by 300 pixels tall, and until the current version of our site it also included a band of 8 white pixels on the right to space the text in. Great - the site worked very well. Until we came to add in colour changes required under the UK's Disability Discrimination Act. Then we saw an ugly white line to the right of the image on all non-standard pages and had to make retrospective changes.
Had we used two images in a table to start with, "one image, one function", then not only would that problem have been solved, but also we could have made use of the images for other purposes. I'm glad to say that's done on the new site, which is why you can see images of Lisa and I to the sides of this page - great reuse of work and THAT's what allows us to do so much with such a small team!
Posted by gje at 09:21 AM
Related topics: via article database
December 18, 2005
Bigger Box Campaign
Am I the only one to get frustrated when I have to write a complete letter in a text area that's 3 rows and 20 columns - a nice looking form but totally impractical to use when making an enquiry - case in point this morning - about a non-standard travel requirement?
Whenever I'm designing a form I ask myself "what will people typically want to put in here?" and "what will the extreme case be?" ... and I try to cater, without exception, for the typical case. The extreme case will be given consideration and, screen real estate allowing, will have a box that's large enough for at least 20 lines of 40 characters to be seen - a reasonable window on his / her letter.
Posted by gje at 09:05 AM
Related topics: via article database
December 17, 2005
Copyright - how much can I legally copy?
I dropped off Dad at his place this evening and while he was making a coffee, I was reading "Private Eye". Wow - I wish I could write like that. And - goodness - they have it EXACTLY right in their "Signal Failures - Coping with congestion" article, which starts:
Growing road congestion is a potential banana skin for the Department of Transport and its new policy of slashing rail services in English regions. But officials have a cunning plan: ignore it
Yes. The slashing of our Melksham train timetable was confirmed last week and we're fighting - now a rear guard but not foregone cause via our Save The Train website. Fingers crossed; our case is a good one but it feels like knocking your head against brick walls with ... yes, officials ignoring questions even when forwarded by an MP, and with answers from them promised by the Under Secretary.
I wish I could quote the whole Private Eye article (penned by Dr B Ching) but it's his / their copyright; I'm allowed, as I understand it, to quote only short sections in critical review. So let me quote, and state my approval, for the following two short extracts:
Privatisation inflated the cost of providing local trains in northern England by 375 percent so that fares are higher and trains less frequent than they should be
and
Labour is doing its best to make rail uncompetitive with car ...
Our battle has moved on; our station has been franchised to the First Group, and the end game is to be played out looking with them at the commercial aspects of providing a more frequent service than requested by the Government. Perversely, the two trains a day will end up losing MORE money than the current five lose. An hourly train will stem the losses and would probably make a profit (all it needs is the same single coach shuttling up and down, Chippenham to Westbury). How can that be? Most people who use the busy train one way tend to use a quieter one the other, and users tell me that they WOULD use the service if it was more frequent and reliable.
Proof? The neighbouring town of Bradford on Avon is half the size of Melksham but the populations have similar transportation needs. Their station sells 10 times the number of tickets than Melksham, but they have an hourly service.
What a shame that due to copyright laws I can't reproduce the whole "Private Eye" article here ... but I can thank them for their excellent, spot-on writing, inspiration, and confirmation that I'm not out of step, nor out of my mind.
Posted by gje at 09:55 PM
Related topics: via article database
December 16, 2005
Packages in packages in Perl
In perl, all your variables (except "my" ones, which we'll leave for another day) are arranged into packages, and by default that's a package called "main". So if you write about a scalar called $jeremy, that's really $main::jeremy and if you write about a named block of code called &mary, that's really &main::mary.
Why?
So that, as your programs grow, you can arrange all the variables and pieces of code into their own uniquely named modules. That then allows you to use the same name several times over without a conflict.
Good news - but it doesn't go far enough so far; what I've described only goes one level further and module files (for example) would all end up in a single massive "pancake" directory. So the :: notation can be nested, and package namespaces can be nested within package namespaces. As far as file organisation is concerned, you'll be working with a directory structure. This sort of thing is very much used on the CPAN, from where you can download modules such as Net::FTP - to be found once installed in a file called FTP.pm in the Net directory.
Here's an example program and some modules that show this in action.
$ perl pk2lev
tutor
designer
beauty therapist
$
And the pk2lev program:
use ellis::graham;
use ellis::lisa;
use whelan::lisa;
print ellis::graham::job();
print ellis::lisa::job();
print whelan::lisa::job();
The directory structure:
$ ls ellis whelan pk2lev
pk2lev
ellis:
graham.pm lisa.pm
whelan:
lisa.pm
$
And a sample module file:
$ cat ellis/lisa.pm
package ellis::lisa;
sub job {
return "designer\n";
}
1;
$
Posted by gje at 08:40 PM
Related topics: via article database
Useful link: Perl training
Perl course during the week, getting married at the weekend
Ahmed (not his real name) is getting married on Sunday and last night should have been his traditional "shower"; his bride was having hers, but Ahmed's here with us on a Perl course in Melksham. Like all soon-to-be-marrieds I've come across, he's both looking forward with some excitement to the future, yet little concerns nag him. And it's such an important step that it's bound to be in his thoughts day and night and the little concerns grow.
We sat at the dining table into the evening, and chatted on a wide range of subjects from job prospects at small and larger companies, through will the in-laws interfere and how will things work out to some of our own Melksham plans and how Lisa and I, in spite of being a bit of an odd couple, have something special that works for us and I can't imagine things any other way.
Ahmed met his lady at University and has known her for 5 years. For the length of that time, they DO know each other as each really is (they can't possibly have been "on show" for the whole five years, can they?) and they're very obviously on the same wave-length. If she's half as caring and genuine as he is, they'll make a remarkable couple.
Wishing you, Ahmed and your bride all the very very best for Sunday, and for the future. Neither you nor I can know exactly what twists and turns the future may bring, but I know you've got a strong partnership there to carry both of you.
Posted by gje at 08:56 AM
Related topics: via article database
Useful link: Perl training
December 15, 2005
Halal in Melksham
Melksham never ceases to amaze me. And in a positive way. We've very used - very VERY used - to providing course lunches and handing special requirements; vegetarian, vegan, allergies, etc. as well as the simple "don't like"s. On a two or three day course, there are plenty of meat-free options which happily satisfy anyone with a Halal requirement ... but this week we're doing a five-dayer so I enquired. And, yes, I can easily get the appropriate dishes. "All of our meat is Halal" says our favourite restaurant, the Refa ... and I'm delighted. Yes - Melksham IS the right choice.
Posted by gje at 07:59 PM
Related topics: via article database
December 14, 2005
Getting favicon to work - avoiding common pitfalls
Ever wondered how to set up a "favicon" - one of those tiny logos that appear
in your "location" line of your visitor's browsers? Ever tried to do it and
found that - in spite of following all the instructions - it hasn't
worked. Yes, I've been there too - but you'll notice that "favicon"s are
now starting to appear on our web site!
What are the things you should know about "favicons" ... that will help you
to get them working on your site for as many of your visitors as possible.
1. The format for a "favico" is the .ico format ... originally a Microsoft
standard but now (slightly) more available. If you use a .png file it
will work on some browsers but not on others.
2. To work consistently, the image must be tiny - 16 pixels x 16 pixels.
3. Browsers cache icons and even clearing out the cache isn't guaranteed to
reset them - in fact it probably won't. I describe this as "supercaching"
and they do it because you want to come back to your bookmarks days, weeks,
months later. Which means that if you have a problem and fix it, it's
very unlikely you'll realise you've fixed it when you reload.
4. The original tag type for the link was "shortcut icon", but that didn't
conform to the standard and so it was sort of switched to "icon".
So it it little wonder that even we have had a few problems with this one!
My suggestion for putting up a favicon and getting it seen on the widest
variety of browsers in the quickest possible time (i.e how to also expire
supercaches)
1. Design the icon as a .png and CHECK that it's 16 x 16 pixels
2. Use a program such as png2ico to turn it into a .ico file
3. Give the .ico file a new name - do NOT call it favicon.ico (I've used whc.ico for ours)
4. Add the following two lines into each page's head block:
<link rel="icon" href="http://www.wellho.net/whc.ico" type="image/x-icon">
<link rel="shortcut icon" href="http://www.wellho.net/whc.ico" type="image/x-icon">
Posted by gje at 02:52 PM
Related topics: via article database
December 13, 2005
Greater Western Franchise Awarded
The big news today - the First group has been awarded the Greater Western Franchise to operate all train services to the West of London for the next seven years including all the expresses right through to the small but rapidly growing (or it has been) local line through our town of Melksham.
I'm unclear as yet what the proposed service level is for Melksham under the First Group - our line was under threat of severe curtailment (see our sister site) and none of the announcements make any mention of it. Frankly, it's hard to be optimistic - other threatened services get a mention in the announcement with "Sleeper saved" and "New through train to London" headlines. But I'm not making any assumptions and I've dropped them an email to ask.
The picture on the left was taken on the train last Saturday - a two car set, with standing room only. Yes, it was busier than usual with a group booking on the train but there were a heck of a lot of people other than the group too. Have a look at further pictures that we use - a number of different trains, all except one of the picture taken on or of a threatened service.
My congratulations to the First Group - your bid describes a lot of positive steps and I hope it includes similar positive steps for Melksham - a rapidly growing town where ticket sales have increased at a compound rate of 35% per annum for the past five years.
Posted by gje at 05:45 PM
Related topics: via article database
December 12, 2005
Apache httpd - serving web documents from different directories
If you're running a web server, first simple logic says that you should keep all of your web pages in a single directory tree that's got the same directory structure as your web site. And you can do this and have it work well in a simple case.
But what if you want to do a major upgrade from time to time, but leave your icons and help pages untouched? What if you want to make the standard pages supplied with Apache available but from a different part of the disc? What if you want to provide users each with their own area as part of the tree? What if you want to have a separate area for executable programs so they don't get mixed in with the documents?
You can achieve all of these features via Apache's alias and scriptalias commands, and set up the permissions on different areas using directory instructions. You must do that latter in parallel to safeguard your security.
Alias /icons/ "/usr/share/httpd/icons/"
ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"
Note the trailing slashes (important) and the difference between the alias and scriptalias commands - an alias is used for diverting directories of documents and a scriptalias for directories of programs; with a scriptalias, AS WELL AS diverting the URL, the web server will send out the results of RUNNING the file it points at rather than the CONTENTS of the file.
If you want to have one web page accessible under several names - for example is you're running a script to feed everything in a directory from a database - then have a look at mod_rewrite rather than aliases. A subject for another day.
Posted by gje at 09:39 AM
Related topics: via article database
Vision AND venture
Vision is not enough - it must be combined with venture.
That's what the slip of paper in my fortune cookie at the Chinese Restaurant told me last Friday night. A wise saying which I folded carefully and slipped into my credit card holder.
The lady at Chan's kitchen in Devizes where we eat from time to time was telling me, excitedly, how their current small premises on New Park Street will be just a takeaway in the new year as they move their restaurant to "The Elm Tree" a few hundred yards across the town. Vision (for there's not, I don't think, another eat-in Chinese in Devizes) and venture.
We have a vision for Well House Consultants in 2006, and we're working hard on the venture. Early days to shout too loud, but watch this space. Every year brings something interesting!
Posted by gje at 09:07 AM
Related topics: via article database
December 11, 2005
Santa comes to Melksham
Yesterday, we travelled up from Melksham to Swindon on the 13:35 train and returned on the 17:50. Over 100 pictures taken, many of excited children with Santa Claus who somehow had arrived on the following train (so the rumours WERE true!).
On the return journey, there were so many people on the train that it was more than even Santa could do in the journey from Swindon (which takes just 25 minutes) to see everyone. Fortunately, he had a few minutes to spare so he got off the train at Melksham Station and spent some time with the other children - and indeed there was plenty of time for photocalls.
When everyone had left and the station was quiet, we gave Santa a lift down to Westbury where he said he had some further business. I suspect he had given Rudolph and the rest of the gang the afternoon off and they were going to be found grazing in some field quite close to the station there.
Anyway - many thanks to Santa for making the day for so many young people, and to Gordon, John and the rest of their team for providing mince pies and glasses of wine. After all, it was a rare opportunity for some people who more normally drive to travel and to have a drink.
Happy Christmas!
Further pictures on our wiki - SantaTrain page
More about Melksham train services - Save the Train
Posted by gje at 11:30 AM
Related topics: via article database
December 10, 2005
Apache httpd release 2.2
I've just completed the presentation of a LAMP deployment course, teaching Linux - Apache - MySQL - PHP and on one of the machines we built (compiled from scratch) the very latest Apache httpd - version 2.2.0. With a major new release of a product, there's always a "what's changed" concern at build (and run) time ... I noted:
a) Installed server pointed just to a page that said "It works" rather than to a more formal page. I'm happy with this - having a formal page made it look like a real web site and not an in-progress setup
b) The configuration files for certain features have been split off into extra files that are included and the whole of each of the includes can be commented in / out. Another good move.
c) There's a backup (a directory called original) of the shipped httpd.conf and extra friends. Yet another step forward; the first thing I've always had to remember in the past is to take a safety-net copy of the config before I start messing (as one does on a course!) with it.
d) The server is configured to start up as user daemon and group daemon. We change this to user and group apache, but I'm still glad to see the change away from more dangerous accounts such as nobody which has / had a security issue if you were also running things like an NFS server.
During the compile (on Red Hat Fedora 3) the compile hung at one point; I changed the configuration option for the compiler from -O2 to -O1 (a very old trick indeed that one - learnt 20 years ago) and it went through on the second attempt. Possibly just a "core 3" issue.
Note - this was a quick and dirty test / install - I cannot report on details of how the new release runs in a production environment or how any of the options / modules go. We tested straightforward web pages, Perl scripts through CGI, users home directories through ~username. Oh - and we also installed PHP 5.1.1 and MySQL support (running 5.0.16) which went fine just by following the instructions for "Apache 2.0". Having our fingers crossed helped us as we did this, but I don't think it made any difference to how the system worked.
For Tomcat / Java users, I see that mod_jk and the AJP connector are now part of the standard server that's downloaded, although the course completed did NOT include Apache Tomcat for once, so I didn't have a chance to verify / first test that part. From a user's perspective, THANK GOODNESS for this addition as it's been a nightmare for as long as I can remember to find exactly the right version of the connector - especially if you happen to be installing from binary.
Posted by gje at 05:49 AM
Related topics: via article database
December 09, 2005
Javascript events - a good example
Complete a form, submit it to the server, get the response page back. Typical web form filling which I sometimes describe as "batchlets" - almost back to the old style batch processing where you make up a complete job and submit it exactly has was doing in the 1970s - except that now it takes 120 ms to get a response rather than 120 minutes.
If you want local validation of your data before you submit it to the server, you need to use a client side (browser embedded) technology such as Javascript. Within your Javascript to can program events to describe actions which may (or may not) be purely local to the browser before the completed batchlet is submitted to the server.
I've just put a working example you can try showing javascript events and the complete source code onto our server. There's a further library of javascript demos too.
I love the Open Source / training world - networking, working with people, and passing back and forth great examples. And so big thanks to Keith Lovern for the today's example - amended and reproduced here with his kind permission.
Posted by gje at 06:34 AM
Related topics: via article database
Useful link: Java training
December 08, 2005
Proof needed? Please just use common sense!
I'm fighting to save the train service to Melksham - it's under threat at the very time that its use and the town are growing rapidly - a victim of a complex set of artificial circumstances and decisions that defy logic taken afar.
As part of the my campaign, I am suggesting that a reliable hourly service - that's 15 trains a day - would be used much more than the current service of a third of that, and that the service could be provided from Chippenham to Westbury based on a single coach train shuttling up and down - in other words, much of a muchness in terms of resources. But then I'm asked to make a business case / prove my suggestion. And whatever figures and statistics I come up with, I'm told they're not a proof. Too true - the ONLY proof is in trying it out.
Let's see. Ticket sales are around 70 per day. And a County Council survey has analysed passengers parking at Chippenham station to catch the train - suggesting a figure of 70 people per day doing that. So that's a doubling of traffic straight away is those people would switch to their local train and - people tell me - they WOULD if it was reliable and regular.
Bradford-on-Avon is a town about a half the size of Melksham - it's just 6 miles up the road from us, but railway-wise it's very different - it's on the Cardiff to Portsmouth line and enjoys an hourly service each way, which is the level I'm suggesting for Melksham.
Journeys from Bradford-on-Avon? 10 times those of Melksham (2002/3 ticket sales - the latest I have for BOA - were 220000 v 19000 (now risen to 27400) at Melksham). In other words, the average inhabitant of Bradford on Avon uses the train 20 times more often that the average Melksham person.
I can't offer you, Mr Whitehall, any PROOF that increasing the Melksham train service by a factor of 3 would increase the usage by a factor of 20 - it probably wouldn't. But surely there's evidence to confirm that within the realms of statistical proof it would increase many-fold. And a tripling of the service would NOT involve a tripling of costs. But that's another article and one I'll post elsewhere.
See our Melksham Train website for more details.
Posted by gje at 07:38 AM
Related topics: via article database
December 07, 2005
Three life changing comments
Has your life been changed by a chance comment or apparently casual comment? Did you realise the possible consequences of the comment at the time?
"Can Lisa come along too"
By a friend asking if her chum Lisa could come along on a boat trip. Lisa and I are now married.
"Do you know of an Internet cafe in Melksham?"
By email, from a gentleman in South Africa. His daughter is now my daughter-in-law
"Sadly still not sold"
To Lisa and me in reply to a survey of local accommodation earlier this Autumn. Watch this space to learn more about the "Well House Manor" project under which we'll be providing accommodation for business visitors to Melksham (and our own trainees) from next summer.
Posted by gje at 01:57 PM
Related topics: via article database
December 06, 2005
New Road
Choosing a name for your home? Or for your child or cat? It never ceases to amaze me how some people come up with words / names that aren't entirely appropriate - names that describe the current situation with accuracy but which - with just a moment's thought - they must realise will get outdated. Ever been introduced to a big tomcat and told that his name is "Tiny", seen a warped old politician on TV and seen him referred to as "George Bush JUNIOR", of visited a Victorian town and walked down a street labelled "New Road" ....
Posted by gje at 11:36 PM
Related topics: via article database
December 05, 2005
Passport office - a much improved system
I'll admit it - I had put off the renewal of my passport for too long as Christmas seemed a long way ahead but the adverts have started to appear on the TV, the first snow of the winter appear on the roads, and Wessex Trains have emailed me about three "Santa Specials". Yikes - I had better get my passport renewed.
A deep breath, a form grabbed from the Post Office, and a trip to Newport scheduled for today. Then a cry of horror as I filled the form in yesterday and read that it's now done by appointment only. Oops, but a call on Sunday afternoon got me an 08:30 appointment for today (Monday).
I had been to the Passport Office once before to sort out an issue of needing a second passport and I recalled a hot and steamy room full of people waiting (I've done the same thing at Croydon too, but that's another story). But I was very VERY pleasantly surprised.
The passport folks have sorted out what used to be a nightmare system and it's now quick and easy. Indeed, I was admitted a few minutes before my appointment, given a number, and helpfully directed to the photo booth that I needed to use. My number was called WHILE I WAS STILL TAKING MY PICTURE and the security guard helpfully offered to walk my pictures over when their 55 seconds processing was up. I was out of the place by 08:35, to return in 4 hours (but it should be available in 3!) to collect. A morning spent Christmas shopping, then!
And so, by Midday we were away, by 1 collecting a repaired computer in Bristol ... oh - didn't I say that we try to combine our trips. There was a third thing too, but that's another post.
Posted by gje at 04:53 PM
Related topics: via article database
December 04, 2005
An occasional chance, and reducing data to manageable levels
If there's a 1 in 5 (20%) chance of it being a dry day at the moment, a 20% chance of it not being freezing cold, and a 20% chance of me having a day that I'm not training or otherwise involved, then it follows (since the conditions aren't related) that there's just a 1 in 125 or less that 1% chance of all three co-inciding. A.k.a. "fat chance".
Which is why you would have found me and Lisa, yesterday, re-roofing the conservatory / store room in which newsletters, envelopes, cables and 101 other business supplies are kept. The plastic sheeting on the roof of this '60s addition to our place was - to put it mildly - life expired and there was a real danger of some of the things kept in there getting damaged so we simply couldn't wait for a co-incidence of three 1-in-5s. "Between showers" is, I think, the best way to describe what we did; it was a darned sight dryer that the last few days which have lead, once again, to the formation of Lake Melksham.
Interestingly, SQL SELECT commands also use this principle of "a proportion of a proportion is a tiny bit of data" to reduce the amount of information supplied back to the using application by a database. In a select command, you specify which columns you want, and you also specify which rows you want. Which leads to a rapid data reduction. For example, if you have a 10 Mbyte database table and you select just 4 columns out of 20, and then just 100 rows out of 10000, your result set will be just 20k.
Posted by gje at 10:35 AM
Related topics: via article database
December 03, 2005
Open source questions? Anyone can ask.
"Do you answer questions from ANYONE on your Opentalk forum, or just from people you've trained" ... Asked by a delegate on last Friday's MySQL course.
I answer good questions from anyone. Questions from people who've been on courses tend to be excellent questions - on topic, not easily resolved by a quick look at regular reference material, and written in a language that's common to me and the questioner (the Queen's English). Questions asked by people who've not been on courses, on the other hand, tend to be fuzzier and sometimes hard to understand and sometimes I get the feeling that the questioner hasn't bothered to think that someone's giving his time up for free to answer.
You'll notice I've used the word "tend" there and it IS just that - a tendency. It's actually quite rare for a past trainee to ask a poor question / ask poorly which rather goes to show that people leave our course with a knowledge to thing and understand the subject that we've covered even if we can't possibly have answered every question they have within the handful of days they were with us. And any question of this type from someone I know can quickly by clarified / improved with an email.
I'll try to help people I don't know who ask poor questions too - but often this will be a little frustrating and these days I give up quite quickly; sorry, but I'm not going to plug through 200 lines of source code because you've reported "does not work" and not even told us what the error message is. Nor am I going to provide a complete "correspondence course" on PHP via the forum and a series of question and answers over a long period; it's simply not the best way to learn the whole subject and the questioner should really go on a course - if Melksham's not convenient, there are other courses in far flung corners of the world ...
4th December ...Adding on to here ... if people are gracious enough to "give back" - for example to follow up with "yes that worked" or "that didn't work because ..." then I've got all the time in the world for them; they're giving back to me and to the forum, helping us build up an ongoing resource that others will find (and find useful too) when they do a Google search.
If I spend a long time crafting an answer and I get nothing back - then am I going to be so keen to help that same person in the future? It really doesn't need to be much to complete a thread or a correspondence but I'll admit to being just slightly shocked at the rudeness of the guy from New Zealand who wants to set himself up as a python trainer, and the woman from Iowa who's so busy selling hosting enough for three pages at $299 a year that she hasn't the time to even say "Thanks" let alone help me complete the story her thread started to weave.
Posted by gje at 12:21 PM
Related topics: via article database
MySQL - an FAQ
We're becoming a serious MySQL resource, with many technical articles, examples, forum posts and blog entries answering those difficult-to-resolve issues you may have come across. You might like to bookmark (or link to) this page.
Eleven recent articles on MySQL ...
Flashbulb moments - facts that clarify the "what" and "how" of MySQL
Saving a result set locally for use in a spreadsheet
Setting up and running master and slave servers (replication)
Finding Orphan (unconnected) records in a database
How to translate a requirement to a table design
Complex select example - UNION, HAVING, GROUP etc
Exact, like and fuzzy matching of criteria
A PHP tool for ad-hoc MySQL queries
Summing or averaging a column for each unique value in another column
and some old favourites:
What to do when you have a running system and realise that the design needs an overhaul
The difference between a JOIN and a LEFT JOIN
Uploading, storing and retrieving images in a BLOG
Writing joins of more than two tables
How to design and implement a many-to-many mapping
When to break the rules of normalisation
The vital difference between "Empty" and "Don't Know"
Using old client programs (4.0 and prior) on new servers (4.1 and later)
Posted by gje at 07:34 AM
Related topics: via article database
Useful link: MySQL training
December 02, 2005
Crazy Day-sies
What a mad start to December! Life seems to be spinning faster rather than slower and I sit here at % O'clock in the evening thinking " I haven't even written the Mouth yet". On one hand tired from the day and looking just to collapse and on the other hand exhilarated.
Three courses this week; a mixed level of students on the Monday / Tuesday course lead to something of a recast for the Thursday / Friday course for the same project team ... including a couple of fresh examples with data that's much more closely akin to what they're used to. Post has included - already in December - a letter from our MP with a reply about the train campaign from the Department for Transport, a letter from the taxman asking us whether we own or have any association with No.s 404A and 404B, The Spa (We don't, 404 is enough ;-)), and a letter replying to our Well House Manor project approach to the local council planning department telling us of their ability to support in principle. Page 41 of this morning's Wiltshire times features my mug shot and a "My Wiltshire" piece .. they seem to think that my life is slightly untypical and of some interest, and I'm just off the phone from arranging a radio interview to be recorded next Tuesday.
Tomorrow, wind and rain allowing, we're re-roofing the conservatory / store room. Sunday, headed out to South Wales and as ever will be killing two birds with one stone - trying out a hotel now that we're looking to move somewhat into the accommodation business (yes, I got a plug in for that in the paper!) and then popping in (and queueing I'm sure) in the passport office on Monday Morning. Monday evening we'll be back and meeting potential Well House Manor tenants (I don't think I mentioned the cottage the other day) which leads on to Tuesday, the next course, and that interview.
Frenetic, but we love it. And I've some GREAT MySQL posts / ideas to put up over the weekend too, but I just feel like having a nontechnical one this evening. "Lisa - have we got a bottle of wine in ..."
Posted by gje at 05:02 PM
Related topics: via article database
December 01, 2005
MySQL - JOIN or WHERE to link tables correctly?
MySQL tables can be joined using two different syntaxes - one that simply lists the tables to be joined and then uses a where clause to select how the join is done, and the second using an explicit join keyword. Here's an example of both syntaxes in use, linking a table of estate agents (realtors) to the houses they have currently got for sale:
select agent, town, phone, aid, agid, sid, locate, asking from agents join sales on aid = agid;
select agent, town, phone, aid, agid, sid, locate, asking from agents, sales where aid = agid;
The results produced are identical and in the case of MySQL I understand that they both run with equal efficiency - the "where" format one being recognised by the MySQL daemon as a join and converting it across.
However, I strongly recommend that you use the join syntax.. Here's why ...
There are two types of element in a database selection command - there are MANDATORY or RULE elements which effect the validity of the data returned and if you get them wrong, the data back is going to be just plain rubbish. For example, if you were to join a table of estate agents to houses based on the street number of the house, you might well get a result set out but it would be a complete fantasy, with agent number 12 linked to all people who happen to be selling a house at number 12 in the street. So joining tables MUST be correctly applied and is a RULE element.
By contrast, choosing the data columns you want, the order of sorting, and whether or not you want properties over 200000 pounds to be returned is an OPTIONAL or REQUEST element - although you may not get back want to want if you give your MySQL the wrong request, what you'll get back will be the answer to a question that may be validly asked.
By using a join clause, you're labelling the connection of the tables as being a RULE whereas any where clauses you apply are REQUESTs. This makes automated coding much cleaner, and automation much easier.
If you want to try out this example on your own MySQL server, you can view and save the data and MySQL commands from here
Posted by gje at 06:46 AM
Related topics: via article database
Useful link: MySQL training