« April 2005 | Main | June 2005 »

May 31, 2005

08:45 is a difficult time

Over the past couple of weeks, two of our clocks have stopped at a quarter to nine.

Co-incidence? Something macabre? A haunting?

Theory - at a quarter to 9, both hands of the clock are on the rise and the battery has to work harder to drive the mechanism and lift them. A scientific conjecture, and an explanation that I prefer to anything supernatural. Being a scientist, I await with interest our next stopping clock so that I can gain further evidence of a pattern, or lack thereof.

Posted by gje at 09:53 AM


Related topics: via article database
More about Graham Ellis of Well House Consultants

May 30, 2005

An O level comes in handy

It's late in the day for me to be posting - perhaps if you read this from a live feed, you've thought I wouldn't be posting today but, no, here I am.

Today has been a rare day spend at home, but largely away from the keyboard. 101 jobs around the house and office of a maintainance and repair nature have built up. For the majority of them we say "I know someone who can do that better that I could, and would enjoy doing it - I'll pay him to do it and earn the money to pay by giving a course" .... but there are some jobs that I wouldn't know who to ask and I feel competent in tackling.

Lisa has a pachinko machine - a cross between a slot machine and a pinball of Far Eastern origin - a family heirloom that's been carefully kept off to one side while we've been restoring this place ... but now is the time for it to come out of storage, and be cleaned up and used. But how to mount it? It's in a wooden frame that's about 20" by 30", but the working bits stick out at the back and are unprotected, and it needed wallmounting. Ahha - I know my Woodwork "O" Level would come in some time.

Side note for younger readers - "O" or "Ordinary" level exams used to be sat at the age of 16 - really bright students took around 10 or even a dozen, and there were different exams for the less bright ones. These days, the whole list have been replaced by the GCSE.

Woodwork. Ah yes - it was regarded by my fellow pupils as a soft options - I should have taken Latin or German or Geography as a "real" subject - but actually it wasn't a soft option at all. It was a very valuable useful art and it taught me to take pride in my work, to work with my hands, and to produce something that I could be proud of and to the best or my ability. So many of these skills that I use to this day and, if he were still around, I would be saying a huge THANK YOU to Mr Gilbert here for being such a stickler and for putting up with me and the three other mavericks who took Woodwork that year.

And so, today's project. A single frame in 5 x 1 timer (and a 4 x 1 base to allow ventilation but no dust ingress). Tenon joints on the corners, with the upper section appearing to lay over the sides, and the bottom appearing to be inset between the sides. Cutting list marked up and main pieces cut on a circular saw, tenons cut by hand. As the years go on, I find that I'm more and more accurate with such pieces even though I rarely use the skills these days - so only a little adjustment was needed. A single screw through the tenons at each corner (it grieved me to have to do that, but the pachinko machine is heavy), and 4 L backets to attach it to the wall. And a single hole in the top to allow a "cheat" cord to be attached to the release mechanism so that we can play and adjust the machine with neither key nor money.

A good job? Ummm - I'll go so far as to say a reasonable one. The machine fitted like a glove and is anchored by a single screw, yet feels rock solid. Lisa says she'll be painting the frame red, which is probably a good way to hide the knotty pine and one or two of the joints that aren't quite as snug as they should be.

Posted by gje at 05:51 PM


Related topics: via article database

May 29, 2005

the Stately Homes of England

We live in a beautiful part of the country and yesterday took the opportunity to explore Bowood (where the Rhododendron walks are open at this time of year) and Corsham Court. Both are within 10 miles of us.

Further pictures and information on Bowood's Rhododendrons

Further pictures and information on Corsham Court

Posted by gje at 01:41 PM


Related topics: via article database

Making programs easy for any user to start

If you write a program in Perl, your colleague writes a program in Tcl/Tk and your company runs an open source program that's written in Python, how do your users ensure that they get the right interpretter to run the program? You certainly don't want them to have to remember to type something like:

perl bestest
tcl greatprog
python goodprice

On systems running a Microsoft Windows operating system, you can simply give the programs appropriate extensions - .pl for Perl, .tcl for Tcl and .py for Python in my examples and - provided that the registry is set up correctly - the operating system will know which language interpretter to use.

On systems running Linux or Unix based operating systems, you have two steps to take:

a) The very first line of the file should start # - ! - then the full path to the executable language - typically:
#!/usr/bin/perl
#!/usr/bin/tclsh or #!/usr/bin/wish
#!/usr/bin/python

b) The file should be marked as being executable - normally done using the chmod command. Examples:
chmod ug+x bestest
chmod a+x greatprog
chmod 550 goodprice

On all systems you might also want to update the path that the operating system looks in for executable files using the PATH environment variable. Setting of this variable depends on which (if any) command line interpretter you're using. If you don't set the path, you can still run the program by double clicking it (windows explorer) or prefixing the file name with ./ to run it on Unix or Linux. Thus:
./bestest
./greatprog
./goodprice

Posted by gje at 10:44 AM


Related topics: via article database

May 28, 2005

How far should our support go

I think I've a huge amount of time for people who are learning Python, PHP and Perl ... delighted to help them via Opentalk or by individual email if they've got confidential information that they don't want to post.

But just occasionally, I feel I'm being taken advantage of - there's a small minority who seem to expect me to drop everything and answer them, for free, without even a "please" or "Thank You". A terse "Reply as soon as possible" on to the end of an email I just received caused me to chuckle. Well now - I do normally answer my emails as soon as possible but now that you mention it, perhaps I shouldn't give this one such a high priority.

Under normal circumstances, I think you'll find the levels of support I offer are quite extraordinary - have a look at all the solved questions on Opentalk, for example, and I'm always happy to put a little time into post-course advise for our students by email or even in person - if they feel it's worth travelling here for a couple of hours of assistance one evening, they can gladly have it. We're here for the long haul and looking after your existing customers and contacts is one heck of a better way to set up future business that a lot of "cold" prospecting. Yet examples written get added to course materials, opentalk answers get archived on public pages that the search engines index, so the very act of helping existing contacts does also spead the work for people who haven't come across us previously.

We've a saying "Come as a student, leave as a friend". It works - and you can be a student of the technology via this web site and become a friend just as much as you can become a friend if you come on a course.

Posted by gje at 11:03 AM


Related topics: via article database

May 27, 2005

UK Tax payment totals and where the money is spent

In looking up information for a post I was making elsewhere, I've been researching taxation levels in the UK - seeing how much government is spending on our behalf. And it's been suprisingly hard to get an overall picture. Do YOU know how much tax you pay in total (Income tax, NI, VAT, Petrol duty, road fund license, council tax, stamp duty, inheritance tax, etc) per year? Is that above or below average?

Central government is spending ("managed expediture") 520.8 billion in the 2005-2006 year. Council tax on 23.2 million properties will average 1015 pounds per property. Business rates provide further local taxation - but I've not come up with any reliable stats; my best estimate is (27/40) [East Sussex] of the amount of council tax or (26/59) [Waverley] or (28/42) [Neath / Port Talbot] (Sources - these council's web sites). And when is government income not taxation - is a fee paid for a Visa a tax? How about a prescription charge? How about rent paid for a council house? Lots of conundrums but ...

How much is central and local government spending per annum?

Central Government - 520.8 billion projected for 2005/6
Local Government - my estimate is an EXTRA 37 billion from council tax and business rates alone
Note - care taken not to "double count" central government's grants to local government

So with a population of 60 million, that means they're spending 9297 pounds per head of population - per man, woman or child. If you're a family of Mum, Dad and two kids, that's 37188 pounds.

Where does this income come from

Mostly you and me. In other words, that same 60 million people. We're a net contributor to the EU of around 4 billion pounds a year, so there's no income source there. I suspect we don't receive significant aid from foreign governments. There is a tax income (VAT and other purchase taxes like fuel duty) from tourists. Borrowing to spend (the National Debt) is just delayed expenditure from the same sources, and business taxes such as Corporation tax are also paid by us in the form of higher prices that we pay companies for goods and services.

Is the money spent wisely and well?

Ah - the move from facts and figures to views and subjective questions. I don't know. I started putting these figures together when reading a discusssion / argument concerning a mother of three teenage girls, each of whom is now a mother too, with all 7 of them living in a three bedroomed house provided by the government ... and on a total income (said to be their only income) from the taxpayer of 31000 per year.

The discussion has moved on to cover people who take the attitude that "I pay tax and therefore it's my right to have the state provide for me". And perhaps the other questions could be asked like "why should you expect the state to pay for the education of your children when you chose to have them ...?" ... to which question, I must admit, there ARE some very good answers.

Of the 8680 pound spend by central government on your behalf this year ...

1120 pounds will go to the NHS
763 pounds will go to local government (to help towards services such as police and education)
520 pounds will go to regional expenditure on Scotland and Wales
440 pounds will go to education
343 pounds will go to defence
135 pounds will be spent on Northern Ireland
75 pounds will go on international development
and 4200 pounds can't be accurately assigned as it goes on demand lead costs such as social security payments (state pensions - roughly 1000 pounds spend for each of us according to the pensions commission - but also unemployment benefit, disability benefit, etc)

Sources - treasury and budget reports and spending plan documents except where otherwise noted.

Posted by gje at 07:25 AM


Related topics: via article database

May 26, 2005

Gone Racing - Larkhill, Wiltshire

Yesterday evening, we went racing at Larkhill. Set high on Salisbury Plain behind a military camp down a dirt track, a glorious evening was had by all as we watched a very full card of seven races. Lisa and I chose the horse that we thought would win each race, but didn't bet.

A strong countryside "bent" was exhibited by most of our fellow racers - tweeds, plumby English voices, dogs, and "Fight Prejudice - Fight the Ban" posters and sweatshirts all around. Picnic tables set out amongst the cars, upperclass take aways (roast pork in a bap, genuine CORNISH pasties), and the beer tent. Bouncy castles alongside army tanks. Soldiers and bowler-hatted officials. Landrovers.

Then, of course, there was the racing.

Since the races are over two and a half miles, bincoulars and a good steady leaning post were mandatory - but there were other places you could see the horses too.

Around the ring, young ladies and young gentlemen paraded the horses prior to each race while we watched the form. For some stablehands, it was a battle of wills between themself and a strong horse that really wanted to get out onto the track, for others it was a walk in the park. Having decided which horse you fancied, you could choose your oncourse bookie or visit the Tote if you preferred

Each of the bookies was stood in a row on his stand, fixing and altering his odds as bets were taken - as "Pulham Down" looked to be in good shape, but "Porlock Hill" was sweating too much too early.

And then the race itself. Although the course was long, the commentary, blared out over loudspeakers kept us informed of the few pixels we could see with our bare eyes (or the few more with our binoculars) as the ran one and a half times round the circuit, over the jumps, and finishes at (!!) the finishing line just across from the parade ground.

I even managed to get a picture of the finishing line, with the winner crossing ...

The whole thing ran like a well oiled machine; as horses completed one race and returned to their trailers, the next horses were already arriving in the ring. Chance for just a quick snack before back to watching the spectacle. As a child, watching racing on the TV I used to think that half an hour was too long a gap between races but here, on the ground, it was just right.

All in all, a great evening's racing. If you get a chance, look up your local "Point to Point"

See our share data pages for further pictures.

Posted by gje at 08:00 AM


Related topics: via article database

May 25, 2005

The backtick operator in Python and Perl

In Perl, and in shell programs too, the backtick operator causes the enclosed string to be executed as a command and the result (as generated on STDOUT) returned.

In Python, it's different. The backtick operator causes the enclosed expression to be evaluated and returned as a string.

See string handling resources - Perl
See string handling resources - Python

Example - Python

# This works as the backticks convert the variable twenty to a string ...
twenty = 10 + 10
sentence = "The result is "+`twenty`
print sentence
# ... but this gives a run time error
sentence = "The result is "+twenty
print sentence

Example - Perl

# Reports on the disc utilisation on a Unix of Linux system
$abc = `df`;
print $abc;

Posted by gje at 12:48 PM


Related topics: via article database

Useful links: Python training, Perl training

May 24, 2005

1 in 48 steel

Is there a spelling mistake in today's title?

No - I'm telling you that if you make a steel casting, you've got to make the mould an extra 1/4 inch long for every foot as steel contracts by just over 2% as it cools and sets.

Posted by gje at 10:00 PM


Related topics: via article database

May 23, 2005

More maps

Following on from yesterday ... I've started to add grid references to our Melksham area guide pages ... the idea being that you click on the reference and you're shown a map - not only of the place you've asked about, but other recent places too. The system automatically gives you as large a scale map as it has available for the particular grid reference - I'm allowed up to 10 from the "get-a-map" service and I've actually gone with just six.

Some places to try:

Our Training Centre
Bristol Airport
Melksham Station
Chippenham Station
Cheddar (Village)
Elgin - Centre

Posted by gje at 07:32 AM


Related topics: via article database

Sales - the alternative close

When I attended a sales training course many years ago, it was suggested to us that an excellent way of pushing the prospect towards placing his order was the "alternative close" - offering two options so that his decision moved away from whether or not to buy, and to which of two alternatives ro select.

That's an interesting thought and something I've born in mind over the years; I'm not thrilled at the idea of pushing a prospect, though there are times that doing so is a service to everyone, and I'm not thrilled at the idea of restricting the options to just two. Case in point this morning - an enquiry from a customer who's looking to train up a complete team. Although training the whole group at once would be very practical (from my view point) and cost effective (from his), the team has an ongoing support role which must be maintained while they're learning the new technology.

I can up with a whole wide range of options - should I simply offer to run two courses? Should I offer training at the weekend when the support role can be closed down? Should I suggest that the trainees attend two successive public courses, or that the majority have a private course and those who are left as office anchors attend the subsequenct public course? Should I suggest they come to our training centre where they'll spend less on each tiny group and the groups will be away from the office and not subject to interruption? To offer just two options in these circumstances seems to me like it would be almost insulting, but to offer every option would be confusing. In the end, I decided to email through my three best suggestions, with a note that I would welcome an email or call to tune the best option further or to explore other possibilities. It won't close the sale quicker, but it will help better ensure that the customer gets the most appropriate possible product.

Posted by gje at 06:52 AM


Related topics: via article database

May 22, 2005

Ordnance Survey - using a 'Get a map'

Sunday, and a chance to play. I've been interested in the possibilities offered by Ordnance Survey's "Get a map" service - which allows (with limitations described on their site) their mapping to be captured and used on web sites in a not-for-profit way.

I've started to put up a whole load of pictures for visitors to Melksham and the surrounding area and I felt that I would like to be able to show where each of the pictures was taken on a map. So ... I've spent the last hour writing a PHP script to get my maths right.


Image produced from the Ordnance Survey Get-a-map service. Image reproduced with kind permission of Ordnance Survey and Ordnance Survey of Northern Ireland.

For the more technical readers, I've put a copy of the script into our PHP / graphics, etc training area. It takes care of all the letters and digits of a grid reference - e.g. ST914628, and you can give it any map captured from the OS provided that you tell it the centre grid reference of the image and how wide (in kilometres) the area covered is. It does the rest!

Posted by gje at 06:04 PM


Related topics: via article database

May 21, 2005

Accommodation and landing pages

I was going to write today about how we choose accommodation in Melksham to list on our web site and trainee's joining details - to help them find somewhere that's nearby, will be suitable for them, and they'll find a pleasure to stay at. However - it struck me that such information merited a longer article that should be placed in our solutions centre where it won't fade out in time as magazine-style articles do on "The Horse's Mouth".

Putting the right information in the right place is one heck of a task - and it's an even bigger task to add appropriate crosslinks so that people can find related information right across this site - which now comprises many thousands or pages. You'll find that we've upgraded and added to our indexing here in the last week - hopefully to help people who land onto more or less any entry page on our site to find cloesly related pages to the one they touched down on. Try, for example, each of the following links and see how you can navigate around to related material.

Coming to Melksham - a starting point

Components and layout in Tcl/Tk

Articles on web site usability, maintainability and navigability

Posted by gje at 10:07 AM


Related topics: via article database

May 20, 2005

Choosing a theme

Graham puts his marketing hat on.

We're going great guns with the new C and C++ courses (Announcement) - a very logical extension as I probably know C even better than Perl or PHP - but we needed a theme.

What are C and C++? They're languages that form the bedrock on which other modern languages are built; neither of them is a recent language, but between them they allow current day programmers to reach heights they couldn't otherwise reach. Oh - and the two languages are closely related to each other too.

So we've chosen a picture of the supporting Ironwork at Clevedon pier. This Victorian Pier has been restored to full working order and is now in truely beautiful condition in spite of its great age. The two great vertical supports for each leg of the pier are tied together with thinner struts, and rise to support the girders or the walkway above, keeping strollers and the people who use the pier to board the "Waverly" and "Balmoral" when they call above the waves and the dangers of the rocks.

This is the comlete picture from which I "sampled" the chosen image - we use images that are 132 x 300 pixel as our theme images thoughout our web site, using a PHP program (I probably shouldn't say that today on a page about C) to do the sampling and add in a border too.

I also like this picture because it's taken in England, but with a view of Wales in the background and this represents our international business.

The complete pier, looking out over a choppy river Severn estuary. The Severn is a very active river - the water looks brown rather than blue in this picture, and somewhat choppy. A little further upriver, where it narrows, you can sometimes see a tidal wave - the "Severn Bore" ... as the tide comes in with such spead and ferocity.


This view of the pier head makes it look incredibly tall out of the water - and that's not without good cause. The river here has the second highest tidal range in the world, and in order for boats to be able to use the pier at any time, this great tall structure was built.

Posted by gje at 10:43 AM


Related topics: via article database

Programming languages - a comparison

"It would take me a week to develop application XXX in C, 2 or 3 days in Java, and a day in Perl, PHP, or Python."

So I say when I'm teaching Perl, PHP or Python.

What do I say when I'm teaching C, C++ or Java? The same thing! But there are qualifications / differences / reasons and just because it takes much longer to develop a new application in C or Java, it doesn't mean that you shouldn't do it.

Perl, PHP and Python are all excellent languages for developing "glueware" code - and the majority of applications these days are what I describe as "glueware". That's data manipulation scripts, web server code for mining information from and updating databases, and so on and so forth.

I don't describe major system development as glueware though - for example, if I was developing a major banking system I wouldn't call it a glueware application and I might be tempted to look at a language such as Java or C++. Why, when I've already stated that Java is so much slower to develop? It's because Java is much more controllable - in other words, the encapsulation and interfacing is much more tightly defined and you can have separate developers write and test each building block, then expose only the necessary minimum of methods and code to the users of that building block. Maintenance should be easier, and code re-usabiity much higher, which goes quite some way to compensate for the extra development time. But Java code doesn't run particularly fast - so it might NOT be the answer for systems that are going to be heavily loaded.

C programs are written at a level that's much "closer" to the machine - this gives them the advantage that they're able to be very clever and to run faster - if you put the effort in - than any of the other languages that I've mentioned. And C++ builds on top of C to give a fast, close yet Object Oriented language - at the expense of some complexity and the need for a great deal of care and testing of code to ensure that you don't have "memory leaks" and the like. C remains an excellent choice for system level software and C++ for major systems and application suites that are going to be run on huge systems or in their thousands - where the cost of the slower coding can be offset against a very high utilisation in one way or another.

Posted by gje at 10:07 AM


Related topics: via article database

May 19, 2005

Development Environments

Although most of the software we provide training on is Open Source and thus available for free download, many of the development environments that are offered to aid developers are commercial products for which you'll have to pay money to buy a license.

We don't believe that people should come on a training course on a piece of free software, but return to their place of employment only knowing how to use that software through a tool which their employer then has to go out and buy. There are further reasons our training doesn't concentrate on development environments:

1. Trainees need to learn the language(s) from "the ground up" - to be able to understand code and what's happening without relying on a tool that might not always be available.

2. Seriously learning all about a development environment in addition to learning a programming language would reduce the time spent and dilute the concentration on the language, whihc is the real subject of our courses.

3. With most of the languages we teach, there isn't a single prevelant development environment - so if we were to choose and use one, it probably wouldn't suit the majority of people anyway.

4. Licensing costs to us would mean that we would have to increase our prices without the majority of our customers making an appropriate extra gain from the higher price.

We do demonstrate environments as appropriate, and in the case of Python encourage trainees to work with IDLE or IDE / PythonWin (depending on the operating system they've chosen). See David Mertz's review for further Python IDEs reviewed.

As a footnote, we have had an approach by a commercial development environment developer who asked up to use his environment exclusivley on our courses on XXXXXX (subject deleted!). He offered to give us "official trainer" status and free licenses for our own machines if we paid him for each trainee. The idea was that more people would come to us with that status. He would also require us to hand out dicount vouchers to each trainee so that they could go back to their workplace and be encouraged to order up his software. We declined the offer, and will probably decline any similar approaches unless any particular commercial development environment gets to be in use by the majority of programmers in a certain language - an unlikely scenario for a costed added to a free distribution

Posted by gje at 10:58 AM


Related topics: via article database

May 18, 2005

Supporting local business

With us living and working in Melksham ... I had to choose tyres from Avon Rubber (the biggest company in the town - manufacturers of products such as - err - tyres) I just had to choose their product when my car needed new shoes at 36000 miles. I fondly hope they were made in the town; I'm told that they were but I wouldn't be 100% sure.

Posted by gje at 10:01 PM


Related topics: via article database

May 17, 2005

What language is this written in?

It's been a long day ... I'm not sure whether to write about my drive back from Gatwick Airport this morning through the beautiful National Trust Woods at Holmwood, Abinger Hammer with its curious clock that hangs over the road, the Hog's Back where I stopped for a bacon buttie ... then on past Stonehenge and over Salisbury Plain.

No - you KNOW the beauty of this country already. I'll write about a piece of coding that I've just completed. Can you work our the language??

if (\$dirin == "$page{dir}" and \$parts[0] == "$page{key}.html") {
for (\$k=1; \$k<count(\$parts); \$k++) {
\$state = implode(" ",explode("-",\$parts[0]));
\$state = preg_replace('/\\.html/','',\$state);
\$forumlinks .= "<a href='/resources/\$parts[\$k].html'>Link to technical articles</a><br>";
break; # first only
}
}

Yes, we'll teach you all the subjects involved.

Answer tomorrow

.... Oops .... it's the day AFTER tomorrow ... I'll answer in a comment so that other folks can "play" the question without having the answer thrust in their face first ...

Posted by gje at 06:54 PM


Related topics: via article database

May 16, 2005

Making bona fide international marriages more difficult

Tough rules expose scale of bogus marriages screams the headline in today's Daily Telegraph. It's a story that tells us that the number of marriage applications at some venues has dropped by some 60% since the Asylum and Immigration act came into force in February. The act makes it compulsory for Foreign Nationals from outside the European Union to obtain a Fiancee Visa before they enter the country and may get married, or if here to apply to the Home Office for a certificate proving they have a right to be here.

The Daily Telegraph has it wrong. The new rules may have stopped a lot of bogus marriages, but they've also added extra hurdles to getting married in the UK for couples who are totally legitimate, but where one member of the two is a foreign national. They've thrown out the baby with the bathwater ... or rather, they've introduced such a difficult regime for the legitimate that they'll look for other ways.

My wife Lisa was born an American citizen, was raised mostly in the USA and lived there in Florida for many years before we met. We've both been previously married, both have children by those previous marriages, and it was a huge and carefully thought through decision for us to get married, and for Lisa to come and live here in England. Indeed - it was such a monumental decision that Lisa came over to the UK for several extended visits and we only made the final decision ... and got married here ... towards the end of that period. We then took a short holiday in the USA, during which we applied for (and obtained) a Spouse Visa for her at the New York Embassy. All totally "above board" - indeed the way we moved from the six month "trial" through to the permanent marriage and Visa was laid out for me during a most helpful conversation with a British Official.

That was 1998. Would we be able to do the same thing today? No - probably not. Let me try and work it out. After being here for a few months, Lisa would have had to return to the USA and apply for a fiancee Visa to re-enter the UK for us to get married - a whole extra stage of paperwork. And the New York Embassy is now running an "appointments only" system that would have required Lisa to go back for a much longer period. Then after getting married, there would still have been the need and expense of converting her Visa from Fiancee into Spousal. Much more complex system to reach the same (legal) end. Much more expense involved (yes, of course she's worth it!) but it does seem that the system has been made so much more complex and costly for those who are going about getting properly married that they'll be looking for other easier ways.

If Lisa and I were to be getting married this July? No UK wedding, but a holiday to the USA and a much more meaningless ceremony without friends and family in Vegas. Perhaps a delayed return - an enforced stay - in the States while the Visa was sorted out. And perhaps some form of blessing (had we been religious) or party (since we're not) on our return to the UK. That's what the new rules have done. They may have cut down on bogus marriages, but they're also stopping people who have every right to get married here from wanting to do so. The 60% drop that the Daily Telegraph quotes shouldn't be read as a total success - it should be read in part as a measure of the misery that it's inflicting on people like Lisa and me.

Posted by gje at 06:09 PM


Related topics: via article database

May 15, 2005

Maud Heath

Maud Heath sits atop her monument ....


... and I must look up her story some time.

That's just 15 miles from home ....

Posted by gje at 06:57 PM


Related topics: via article database

May 14, 2005

Growth pains

Our resources are growing - I've written over 300 entries here and there's 300 pictures on our web site that relate to our business. We have some 1400 source code examples and some 550 books listed and over 1000 topics covered on "Opentalk". Where web site visitors could easily find what they were looking for a while ago, that's now getting tougher - especially as they may "land" at any page from a search.

Over the next few days, I'll be endeavouring to improve navigability - by relinking the pages into groups by subject rather that by whether they happen to be a technical article, a blog entry, a picture or a forum question. And I'll provide backward and forward links too, and filters that let the user select to be stepped forward and backward only though certain subjects on their "trail".

Posted by gje at 05:11 PM


Related topics: via article database

May 13, 2005

Just in time - the talk is writ

I'm talking for an hour to 60 people at the University of the West of England this evening on "Open source - here to stay or a flash in the pan?". I've known about the talk for a couple of months, I had the choice to take it or not and I could have written it weeks ago ... so why on earth did I leave it until 5 O'clock this morning to get down to it? Perhaps because I craft my best throughts / notes / talks when I'm under pressure. "Just in Time" is the modern term for this, isn't it, and it's supposed to be efficient!!

The talk will appear on this site once it's been given ... queue up now at /share/heretostay.html

Posted by gje at 11:18 AM


Related topics: via article database

May 12, 2005

Writing a Tcl/Tk GUI is as easy as baking a cake

Designing a Graphic User Interface in Tcl/Tk is rather like writing a recipe.

With a recipe, you start off by listing the ingredients you need ... and in Tk you start off by defining your components (a.k.a. widgets).

With a recipe, you proceed to describe how the ingredients should be combined ... in Tk terms, that's when you feed them into a geometry manager to describe the relative positions of how they should be displayed.

Finally, a recipe may including serving suggestions. In Tk, you'll descibe some events and what action to take when the event happens.

Posted by gje at 10:32 AM


Related topics: via article database

Useful link: Tcl training

May 11, 2005

Call by name v call by value

All the programming languages that we train on provide the facility for you to write a named block of code and the call it from elsewhere - such blocks are known as subs in Perl, functions in PHP, Procs in Tcl, and functions or methods in Python. They're a vital part of any "grown up" programming system, allowing for modular coding and the re-use of common facilities between many of your programs.

Code blocks aren't used in isolation - they need to have information that they're to work on passed in, usually in the form of parameters. There are two ways of doing this.

You can pass in parameters by VALUE. If you do this, the contents of the variable are copied into the named block of code. That's a very safe way of doing things - since the value is copied in, any changes made to it within the named block of code will not cause any change to the data from which it was passed in the main code. If you like, this is rather like me handing you a photocopy of a document - no matter how much you draw all over the photocopy, you're not damaging my original.

You can pass in parameters by NAME. In a call by name system, a variable within your named block of code points to the same piece of computer memory as the variable in the calling code and if a function alters the content of a variable in a scheme such is this, it also alters the calling variable. This is like me loaning you an original document - if you draw all over it, you've damaged the only copy and it can't be recovered

So call by NAME is very much more flexible that call by VALUE - perhaps dangerously so.

Which scheme do the languages on which we provide training work?

In Perl, you're calling by name through the special list @_. It is, however, a convention to copy the contents of that variable into a named variable within your sub, thus making it look like call by value.

In PHP, you call by value by default. If you add an extra & (Ampersand) in front of the variable name in the function definition, you're telling it to pass parameters by name instead.

In Tcl, you call by value. If you need to call by name, you actually pass in the name as a value and then use the upvar command. This always takes a while to explain on the Tcl courses!

In Python, you call by name. Everything is an object, and you simply pass in a reference to the object.

In C, you're calling by value most of the time. If you preceed your called value with and ampersand (&) then you're passing in the address at which the value can be found - i.e. you're calling by name.

Posted by gje at 07:55 AM


Related topics: via article database

May 10, 2005

Farming yesterday

We gathered in the early evening - a queue to enter the Assembly Rooms in Warminster; about 30 folks when we arrived, swelling to around a hundred by the time 8 O'clock arrived and Weightwatchers moved out. A friendly lady walked along the line, checking with each of the ladies to ensure that she wasn't pregnant - something to do with the sheep in lambing season but I didn't catch whether the risk was to sheep and lambs or to the ladies. I didn't see anyone leave; I'm thinking that none of the folks in this queue was expecting ... and I think they have read and taken to heart the no smoking, no cameras and no mobile phones rules for later in the evening as they were using them (and abusing their bodies) with gay abandon at that point.

We were attending the live start of the reality show "The Farm", an event being run at a farm just south of Warminster on the old road up to the Imber Ranges. Bussed out from Warminster, our convoy turned left off the main road up the single track lane to towards the back of beyond where a fairy-tale floodlit cottage appeared as if by magic - totally out of place; we watched for an hour, cheered and clapped when we were told ... and watched the 10 "celebs" as they arrived at the Farm, were interviewed and entered the house. Truth be known, though, I'm getting old. I know Orville the Duck who came in second or third with his handler, Keith Harris ... but most of the others weren't known to me though they look a colourful bunch; a group designed to make interesting TV, I'm sure but I'm not sure how well this bunch of models, porn stars, actors and ventrilaquists will be able to milk a cow or even cook a slice of toast. No doubt we'll see over the coming weeks.

What does come through at these live TV shows is just what a well oiled machine is backing the whole thing up and how professional the back stage people and the presenters are. Fascinating to watch as they move around an reorganise during commercial breaks and film clips. There was something about the "stars" too; most of them also come across as professionals who are throwing a persona to the camera but yet you end up with a suspicion that "off set" they're more normal people doing a job. Perhaps the whole farm will be an act.

Posted by gje at 07:55 AM


Related topics: via article database

May 09, 2005

Bristol Airport this morning, The Farm this evening.

A Bristol airport run this morning - collecting a trainee arriving on an early flight from Belfast for the Tcl course that started at 09:45. I took the opportunity to pick up a copy of the airport's April to October flight guide and update our web site to list extra destinations. Lots of publicity for the first intercontinental flight fron Newark (for New York) which starts its daily run later this month. Less glamerous other new routes include Berlin and Zurich.

This evening, Lisa has booked places for us in the audience for the start of "The Farm" - a celebrity reality show that's happening (is that the right term for a reality show?) at Warminster. I'm expecting very little and a long evening - that way I have a chance of a pleasant surprise!

Posted by gje at 02:52 PM


Related topics: via article database

May 08, 2005

Within about an hour

I live in a beautiful country and a beautiful area of that country. I've appreciated it for many years and always hankered after more time to explore ... I use to dream of writing a series of books "Within about an hour" which would give me the opportunity to look around further in our own locale, exploring hidden places off the beaten track that could be reached within an elastic 60 minutes.

With customers visiting us on training courses in Melksham, and with our new content management system to help, I've been able to take a whole fistful of pictures this Spring and document them ... start in our home town of Melksham and explore from there. Last Wednesday, it was a great pleasure to walk in the evening with a could of fit customers along the canal and stop at a pub for a meal and a pint. Thank you, Lisa, for driving out to collect the three of us after your evening meeting!

This weekend, we've ventured ever so slightly further afield in the last 36 hours, and I would like to share some pictures with you. These aren't, realistically, places you would make in the evening after a course but come down a day earlier, or stop into the weekend that follows, and you'll find they're almost on the doorstep.


Clevedon - on the coast just beyond Bristol


On "The Levels" - the flat ground in North and mid Somerset


Towards the top of the valley above the Cheddar Gorge

And I have 00s more snaps too .... see our touring pages.

Posted by gje at 05:18 PM


Related topics: via article database

May 07, 2005

Training courses in the C language

We're niche training providers - we choose to teach subjects that others don't feel that there's enough volume in but which, never the less are excellent technologies. And we're always listening for new trends. The first Well House Consultants course - 2 days on Perl that was the the predecessor of the current Perl Programming - was written in response to a handful of requests from professional contacts, and from that tiny seedling our whole business has grown.

I have noted, of late, requests for C and C++ training. The requests have been growing, and that's largely because C (especially) has reverted to being a niche language. Although almost all modern computing is based on underlying system software and languages which are themselves written in C or C++, the need for most programmers to actually code in C is no longer there. And yet ... there are some requirements there, and there are now fewer places where you can learn C itself.

I've written and run C courses in the past. I've got a great deal of C experience - I've probably done more C than Python and Tcl put together ... so perhaps now is the time to dip a toe back in the water and say "If you're looking for C or C++ training, please let me know".

Posted by gje at 07:29 AM


Related topics: via article database

May 06, 2005

Lambdas in Python

In Lambda Calculus, lambda abstractions (functions) are defined as functions that relate one variable to another. So in Python, a Lambda is a single or inline definition of the functionllity of a transformation of one (or more) objects into another (one or more) objects.

On our main website, you'll find both an example of the use of a Lambda function in use and an example showing how the same is achieved without a lambda

Posted by gje at 07:19 AM


Related topics: via article database

Useful link: Python training

Dining full circle

When we opened our Melksham training centre in 2000, lunches were served in the dining room, coffee in the library, and I trained in the conference room. The "back office" was literally that - the larger room to the rear of the training floor. As we grew, the office moved to another floor and we converted the room released into a larger customer lounge and eating area. Yesterday, in a further expansion we completed the circle ... we're now serving lunches back in the old dining room, with the customer lounge remaining available purely as rest and relaxation area.

Posted by gje at 07:07 AM


Related topics: via article database

May 05, 2005

General Election day, UK

It's the day of the general election - a chance for each of us to choose our representative for parliament in each of the 650 or so single-member seats (constituencies) throughout Great Britain and Northern Ireland.

In the majority of the seats, the incumbent (or his / her political party's appointed successor) should be elected without there being any "real" contest. The overall outcome - as to which party holds the majority of the seats - will be decided in perhaps 100 of the seats which are descibed as marginal, and in those seats each party has a core following of sheep who'll vote for them "come what may". The real decision comes down to the choice of perhaps 1 in 50 of the eligible voters in the country as a whole, and how effective each of the party's machines is in getting their supporters to bother.

In our Devizes seat, Michael Ancram of the Conservative Party won last time with 47% of the vote. That's a majority of nearly 12000 over the next canditate - the Labour party - with 25%. The Liberal Democrats got 21% (and yet there candidate this time tells us that she's "The only real alternative as Labour can't win here" - that's ... err ... and interesting piece of logic to say the least). I WILL be voting, although I'm not thrilled by any of the candidates. 63% of people in Devizes voted last time.

Once all the votes are in, they'll be counted - many overnight and some (for the more remote areas mostly) during tomorrow and results will be declared one by one. Once a single party has the majority of the seats, its leader will be invited to continue as (or to become) Prime Minister and he continues (or takes over) withe immediate effect. Very different to the system in, for example, the USA.

A thought. 47% of 63% last time was 25159 votes out of an electorate of 86000 - in other words, less than one person in 3 actually said they wanted Mr Ancram to represent them. Oh what a frail foundation underlies this supposedly solid seat.

Posted by gje at 07:26 AM


Related topics: via article database

May 04, 2005

Dentist's Waiting Room Syndrome

I have just opened an email offering "April Specials"

Err ... it's the fourth on MAY!

Posted by gje at 11:37 AM


Related topics: via article database

May 03, 2005

What - no switch or case statement?

Both Perl and Python lack a switch and case type contruct that you'll find in almost any other programming language. Why's this?

Switch and case, where provided, give a multiway branch capability but - quite frankly - I've always found them to be messy constructs in all the various languages that I've used. So perhaps the authors of Perl and Python are forward thinking rather than cramming their language with "me also" type facilities. You really DON'T need them!!

In Python, you can use a dictionary of code objects and there's no need for any conditional statements at all - very clever (if a bit obscure), so I've put an example into our course follow up examples

In Perl, you can use a label to "mimic" a switch - again, I've provided an example so that you can see the detail if you wish.

Posted by gje at 03:54 PM


Related topics: via article database

May 02, 2005

Sharing pictures of Wiltshire

A colourful collection taken yesterday ...








I love this part of the country

Posted by gje at 08:28 AM


Related topics: via article database

May 01, 2005

A reminder that the customer is King

Every so often, I like to be reminded how NOT to treat customers - if necessary by "suffering" the poor treatment myself. And today, I'm writing here to publicly thank the Azuza Coffee Bar in Hughenden Yard, Marlborough, Wiltshire for their classic example of how not to look after customers.

Update - December 2005 - see feedback from Azuza added at end of article

Lisa, Dad and I walked in at about 20 past four, found a table, read the menu. Lisa and I went up to the counter to order cream teas... "we're not serving food any more" says the curt young lady and we settle, reluctantly for cups of tea and a fruit smoothie. So why am I upset? Because for the next 15 to 20 minutes they were bringing out food for everyone else, it seemed. Including food for people who hadn't even been in the place when we arrived.

So what happened? Didn't they like the look of me? Perhaps they didn't - here's my picture and you can judge for yourself. But I have another theory. Lisa's accent is clearly not of local origin and Marlborough's a tourist town. I think the staff member just couldn't be bothered with a visitor ... not realising she was dealing with a (vocal, it turns out!) local.

If you catch me - EVER - treating people differently like the Azuza or you feel I've got something (anything) wrong, please TELL ME. My email address is plastered all over this site and I welcome the input. But I'll admit that I ask you to tell me .... when I didn't follow up in Marlborough. I was embarrassed enough as it was, didn't want to make a scene in front of Lisa and Dad and I let it ride; stiff British upper lip.

As we walked out, Lisa suggested that we might have done better had I been wearing an "I'm blogging it" T shirt. I doubt that would have made any difference - they don't seem to have an email address or website so I can't drop them a quick "oy ....". Or perhaps they have it right - enough customers and they really don't want us.

Next time I'm in Marlborough, I'll be back at Polly's tea room, where they were queuing right out the door today. Hindsight reminds me that something good is worth waiting for; our customers wait for a week that's available or the next running of a public course all the time ... and I should have done the same for tea!

Footnote - if you're reading this and associated with the coffee shop mentioned, please do let me know what happened and I'll be happy to add balancing comments onto this entry.

Feedback - a few months after I posted the above item in some frustration, I got a call from one of the co-owners of Azuza, who was very apologetic and assured me that they had had a few problems that he believed to be resolved. A follow up letter invited me to present myself (with the letter) at the cafe and enjoy a complimentary something. I'm not going to take up this offer in quite the way it was made - of COURSE I would get good service and feel mighty embarrassed too, but I have noted that next time I want afternoon tea in Marlborough, I'll look in on Azuza and see if they're doing any better. It may be a while as I'm mighty busy, but I'll report back here. Feeback added 12.2005

Posted by gje at 07:43 PM


Related topics: via article database