« February 2006 | Main | April 2006 »
March 31, 2006
Python to MySQL
We've added some Python to MySQL connection examples on our web site - using the mysql-python open source download from sourceforge.
For the installation, you MUST ensure that you have the MySQL include files and libraries installed before you attempt a build, and that you set your PATH to point to that version of MySQL - otherwise you can get a rather frightening page full of errors. Here's a checklist for you:
1. Install MySQL into /usr/local
2. set up mysql-python
download, unzip and untar, cd to directory.
export mysqlclient=mysqlclient
export PATH=/usr/local/mysql/bin:$PATH
python setup.py build
3. Install mysql-python
become administrator
python setup.py install
I've run the above on both Fedora and Suse ...
Sample program sources:
Hello PySQL world, documented
Bare bones application using recommended classes
Example of using a MySQL database from Python in a web based (CGI) application
Posted by gje at 06:46 AM
Related topics: via article database
More about Graham Ellis of Well House Consultants
Useful links: Python training, MySQL training
March 30, 2006
An unhelpful error message from Apache httpd
"Your program doesn't work". Such reports cause technical support staff to be pulling their hair out. "In what way did it fail" they'll ask, hoping for some clue that can point them towards their caller's problem.
So why does on earth does an Apache httpd web server report:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
whenever anything goes wrong; it's roughly saying "That didn't work" !!
It's intentional! ... Httpd gives a generic message for all failures that may relate to scripts its running and how it's configured exactly so that the web site visitor who gets the message won't be able to work out what's going wrong and won't be able to glean internal / structure information that can help him find any weaknesses there may be.
The web developer who looks after the web server, though, will be able to look in the log files and find a better message - such as:
[Thu Mar 30 20:02:44 2006] [error] [client 192.168.200.66] Undefined subroutine &main::loaltime called at /home/vweb/cgi-bin/t500.pl line 3.
which tells me that the Perl programmer who wrote the script wrote a call to a function loaltime rather than one called localtime ... easily fixed!
If you want to change the less than helpful error message / error response page to your own less that helpful error page, you can use and ErrorDocument directive in your httpd.conf file, of in a .htaccess file if you want to do it on a per-directory basis. Example:
ErrorDocument 500 "/resources/failed500.html"
where the file failed500.html if your error page
Posted by gje at 07:13 PM
Related topics: via article database
March 29, 2006
Dressed up for a phone call
In a recent survey of British telephone users commissioned by the Post Office, some 40% of men and 27% of women admitted to talking naked on the phone.
Who do YOU speak to on the phone? Are they .....
Posted by gje at 07:26 AM
Related topics: via article database
Stopping and restarting Apache httpd cleanly
If you'r running an Apache httpd server and you need to restart it, then you may be used to running:
apachectl stop
apachectl start
and in close succession, those should cause only a minor blip in service of perhaps a second or two; the sort of thing that can be put down to a "sticky internet". But you can do better
apachectl restart
Runs a configuration test before it stops the old daemon so that if you've editied your configuration file and introduced a fatal error, it won't go ahead with the stop. It also means that the restart is at electronic speed after the stop, curtting the blip. But you can do better
apachectl graceful
Runs the configuration test, AND allows currently open connections to be concluded before rebooting - thus ensuring that no-one gets a partial page as you cycle your httpd.
Note - if you have allowed per-directory changes to the configuration via .htaccess files, then you don't need to restart the server in any way when they're changed - they are checked at every web site "hit".
Posted by gje at 05:18 AM
Related topics: via article database
March 28, 2006
Web Application Components
When putting a web resource together, we want to keep what each individual user needs on his computer simple - REAL simple - which means that all the work and the complexity needs to be at the server side.
I'm running a deployment course that started yesterday and it's only when I started to think "what should I include in this course" that I realised just how many technologies were involved. So I started off with a board diagram and started putting the components up, each represented by a book from our library. Starting off from the ground level, you need an operating system (Fedora Linux has been chosen), with admin and networking skills, and a web server with HTML and the other components such as style sheets, Javascript and a little about images.
General Deployment resources are indexed by subject here on this web site
Many server side applications run under CGI - better know something about that and someone needs to write the applications and maintain them - perhaps in Perl, PHP or Python. If your applications are going to be major ones, Tomcat may be a better vehicle to serve with (ah, but you'll probably still need httpd too), and you'll want some XML skills in order to understand the Tomcat configuration files - and the other XML data you'll be handling too, together with Schema to help validate your XML and XSLT in order to format it for the display
Perl and CGI resources are indexed by subject here on this web site.
PHP resources are indexed by subject here on this web site.
Python resources are indexed by subject here on this web site.
If your application is to be Tomcat based, then you'll be using Java. Described as a simple language, complexity is added by the huge array of classes available and the various web interfaces such as Servlets and JSP that in essence are an alternative to the CGI approach. You'' need to manage your Java code - perhaps with ANT, and your data in a database - contacted via JDBC drivers, talking SQL, and running a daemon such as MySQL
Java resources are indexed by subject here on this web site.
MySQL resources are indexed by subject here on this web site.
CAN there be yet more? Yes, there can! there will be a number of other side technologies that may turn up - this week, for example, the Tcl language is used as a configuration tool for a piece of third part software and common login databases are supported via LDAP. The server needs to be running a mialing daemon, and there are mailing lists to look after too, and the little issue of security!
The there's a whole aspect we haven't even considered - the design of the whole thing. As Java is OO based, you have better understand those concepts and the more formal methods such as UML to document and share your design round a larger team. You'll be content managing so as well as databases you'll be looking at blogs, forums and wikis. And also the whole look and feel of the site - what to do and how NOT to do it too. Human engineering!
On the more commercial side, you'll want Google, MSN and the other search engines to register your page and send traffic to the right place, and perhaps you'll use adwords or other advertising to help this. "Search Engine Optimisation" is often the name given to this huge topic. Be aware, too, in the UK of the DDA (Disability discrimination act), Copyright laws, unsuitable content, data protection registration, and so on. And make sure that your pages are in good, clean English (or other source language).
Tcl resources are indexed by subject here on this web site.
And have a look too at the non-technical index and another look at the deployment index too.
And why "The Gardening Year" at the end of my stack of books? That represents the subject of the web site - knowledge and enthusiasm there will take you a long way!
Posted by gje at 05:44 AM
Related topics: via article database
March 26, 2006
Keeping the visitors happy and browsing
For a clock to work, every cog must be in place and meshing correctly with the next cog - otherwise the whole things falls over. And so it is with a web site too. It's no good having a superb look and feel with no content, or good content with no navigation to get to it, or no marketing to bring people to your site in the first place.
Our web site has grown from strength to strength - our weekly stats show that 203 people searched for Python Tuple and got directed to our site as a result in the last 7 days, and 3121 people included the word Java in their searches over the same period. (Those are neither the top phrase, nor the top word, by the way - can you guess what they were?) . But that's only a part of the story - we want people to find the page they reach of interest, and stay on our site and explore other content.
Towards the end of last year, we updated the look, feel, and navigation of our website - something that really needs to be done from time to time as technologies and content changes, and a structure that was great in 2003 isn't going to be quite so great for 2006. The top-right navigation area of that new look is show to the left of this text.
But that's not the whole story - we couldn't do better than make an educated guess in November as to where people were going to be landing, and how they were going to move round the site. So over this weekend, we've picked at our log files and looked at the search terms used by some of our newcomers, how long they've stayed, and where they've gone. That's been very educational, and a gives a much different view to raw log files.
As a result of this work, we've made some small but, we believe, significant improvements - you'll see that they're quite subtle from the top-right navigation area as it now looks at the end of the weekend.
What did we learn / change? Amongst other things:
* Few people now arrive through our from page, so we wanted to make it very obvious for them how that could get to the top of the site they had landed on. Have you ever come to a page from a search, but found it hard to find the context in which it was presented?
* We have relabelled our "Navigation off" button to be "Printer Friendly", and added an icon. It's a bit twee, but people know what that means if they want to print our page out. And, yes, our printable page DOES include a full URL every time so that people can find where they got the printout from later!
* The "next font larger" and "next font smaller" are replaced by four specific font sizes, and we've done something similar for colour alternatives. We've replaced the term "My Wellho" with "customise" as we think people will understand that better and actually use it!
* The "contact" section that was in the middle of the menu has been moved to the end - again, that's where people expect to find it. And we've added an "email us" link on that menu. Yes, I KNOW every page has an email link at the bottom anyway - but on balance we felt it was a good idea to have one at the location that most sites do these days.
Want to see if you can spot anything else? There ARE a few other little things too. Start off at our home page and perhaps we'll notice your footprint as we check to see how our changes have effected the site over the next few days.
Posted by gje at 04:50 PM
Related topics: via article database
March 25, 2006
The ternary operator in Python
The ? : operator that you may have come across in Perl, PHP, C and Java - known as the ternary or conditional operator - is ABSENT from Python. "But it's so useful" I hear you cry. Ah yes, but isn't this elegant:
val = float(raw_input("Age: "))
status = ("working","retired")[val>65]
print "You should be",status
UPDATE ... There IS now a "ternary" operator in Python (recent versions of Python 2, and Python 3) ... this post was orginally made in March 2006 ...
Footnote - the ? : operator in those other languages gives you a very convening short form of if, then, else where you can select a value based on a condition for printing or assigning to a variable; here's a Perl or PHP example:
$status = ($val > 65) ? "retired" : "working";
Great, useful, but yet another oddball structure on the language - I'm forever having to explain how an operator can have three operands and how you MUST have a : if you have a ? ... but in Python it's so natural to use a tuple ...
Posted by gje at 05:18 PM
Related topics: via article database
Useful link: Python training
March 24, 2006
Think about your design even if you don't use full UML
Even if you don't feel that your project is big enough to get involved with formal design methods, many of the lessons of UML and some informal design diagrams can help you get a clear view of what you're going to be doing be for you start, and can help you come up a good, thought out and reliable plan before you waste a lot of time writing experimental code up a blind alley. No need to use posh symbols on your diagrams - just a few boxes will do! Try:
1. A use case diagram, showing the major data elements, and which of your user communities supplies, updates and reads which elements
2. Object diagrams, showing the various components of each of your data types and what it does
3. Class diagrams, showing how your various classes inherit from each other and at what level each of the methods should be written
4. A Deployment diagram, showing where the various component are kept - not only the live components, but the backups, source code and the whole system including the older versions and version control
5. Sequence diagram showing how transactions go through the system with each element picking up and passing data to and from the others
6. State diagram, showing the state of object types (including, in web use the state of each uses' session object). I can't believe I left this one so late to mention!
7. Procedural diagrams - a.k.a. flow charts - showing how the logic goes together.
Even if you don't draw these out on paper for each project, it's no bad thing to think through each of the 7 aspects as you work out what you're going to do - a few minutes of consideration of the big picture reaps huge efficiency rewards as you put together your application or suite.
You can download a .pdf file from our open training notes site that shows you examples of each of these diagrams - just follow the "links under _Object Orientation - design techniques.
Posted by gje at 07:06 AM
Related topics: via article database
March 23, 2006
Can some food be TOO different?
Do you like what's sometimes described as "ethnic food"? Or do you think you like such food, but what you're eating is really so Europeanised that it bears little resemblance to the food that's really eaten in the country that's said to be the source? I can recall the joy with which "Mrs Happy Valley" cooked us 'true' Chinese food rather than the more usual British food that's normally available at her establishment, and I know full well that Chicken Tikka Massala isn't on the menu anywhere in India.
Lisa and I ate out at a Nigerian restaurant in London on Tuesday night. The value was astonishing, the staff / owner welcoming, and the cooking was superb. I can't fault any of those. But the traditional African fayre - authentic, I have no doubt, was so far from what we're used to that the best I can say is "nice to have tried" rather than "we'll be rushing back". Indeed, I come to describe the food and I'm somewhat lost for words that conjure up both the quality of the cooking and presentation, and at the same time the unusualness of the ingredients and combination - indeed, some I simply couldn't identify.
Posted by gje at 12:54 AM
Related topics: via article database
March 22, 2006
Making use of disabled facilities
I've been training in the City (of London) today - so central that I was just a few yards from the base of The Monument to the great fire of 1666. For such venues, I don't even attempt to get my clients to provide a parking space; usually they have none available and it becomes a nightmare to unload and to park - the London taxi works well - a cheerful cabbie from a hotel (WITH parking) on the edge of the congestion zone and I end up on the pavement in front of the customer's office, all the stuff I need on my trolley, and raring to go.
"Thank goodness for disabled lifts" I thought to myself as I saw a flight of magnificent stairs up to one of those rotating doors, but with a slide slope up to a lift just around the corner. Up the slope I went, pressed the button by the lift gate and it popped open, and onto the platform I went. Pressed the "up" button.
Nothing.
Pressed the button again.
Nothing.
Tried to open the gate.
Locked behind me.
Ah. Right. Pressed the down button. Pressed the brightly coloured button with a picture of a bell on it.
Nothing
Hmm. Now - I COULD leave the trolley on the platform and climb over the gate. I could see if I've got a stick or something long enough to reach the release button I used to get onto the lift ...
I do make use of ramps, lifts, hotel rooms that are primarily provided for the disabled - they're a huge help, and why shouldn't a resource if it's otherwise not being employed be of such use? The hotel chain I use the most has even told me that their disabled rooms are usually the last to go, and is usually happy to provide one - although I do qualify my booking by telling them to move me if they need to.
Alas, the office block in the City doesn't take the same view. After a few minutes, a "jobsworth" appeared, told me how fortunate I was that he had spotted me on the security camera, and went off to get the release key. When I told him that most offices were very happy for me to use the disabled lift to get in, he told me that "we're not most offices", but he wasn't able to tell me how I could have known that ahead of time, on the pavement at the base of the steps. He was also at a loss to tell me how a person in a wheelchair would have faired any better - indeed such a seated person might have been stranded for much longer, hidden inconspicuously behind the waist-high gates on the platform.
I recall writing a "Horse's Mouth" a long time ago concerning the disabled ramps in Leeds and their lack of fitness for purpose. And I know they weren't unique. But I'm afraid that this Monument Street office takes the biscuit. Yet every cloud has a silver lining; as we plan Well House Manor, we're doing our best to provide good disabled access and avoid such pitfalls; I welcome the education that 10 minutes on the platform and the janitor's attitude has given me and promise to try to do better.
Posted by gje at 06:52 PM
Related topics: via article database
March 21, 2006
Easy feed!
Want to provide sites that work close along side you with a feed of your blog? In recent versions of PHP, you can include a remote file from their server in your page. Here's a little example that's on our site - we're pulling down a piece of PHP via a URL.
Want the latest news from Well House Consultants? Read
<?php include("http://www.wellho.net/hml.inc"); ?> on
"The Horse's Mouth".
If you've PHP 4.3.0 or later, and allow_url_fopen is allowed, then the above example should work for you and give you a link where the text will change each time I post a new article on "The Horse's Mouth".
Both the site offering a service such as this AND the user site need to be aware of the security implications; our hml.inc file is open to anyone to read (and so must NOT give away secrets like passwords), and the user site must trust their supplier to be competent not to compromise their security. But with closely linked sites, it can work well.
Note - the included file must NOT have a parsed extension such as .php ... otherwise it will be run on the site offering the service rather than being shipped down to the user site..
This is a working example, so you can see the source code through the URL shown above. I've also indexed it and you can see it here in our resource library
Posted by gje at 07:29 AM
Related topics: via article database
March 20, 2006
Morning Post
Have you noticed how I usually post "The Horse's Mouth" in the morning, whereas the most natural time of day for a diary - surely is the evening, logging an event or events of the day?
I rise early and that gives me an excellent few hours of fresh, concentration time to go through a whole series of jobs, sequentially, that need to be done. A chance to knock off ducks one by one, and to give deep thought to issues that need such without a series of interruptions.
From 8 O'Clock or so on a course morning, we're then into our busiest period - but still sequential - where we check that the fridge is full stocked, the loos cleaned, computers ready, coffee machine primed with fresh milk .... ready for ...
Come 9 O'clock (or come course delegates) and the sequential mode switches totally to a parallel processing system which I've learnt to handle, but it sure ain't anything like as productive. I don't expect of plan to get ANY substantive quotations, technical answers or the like done during the day - that's why you'll often get an "I'll answer overnight" acknowledgement of emails, or a promise to send detailed information by the start of the next working day if you phone.
Ten to Nine as I write. The lull before the storm of customers. I'm looking forward to that welcome storm, having checked off at least a few of my things on my "mustdo" list in the past 4 hours.
Posted by gje at 08:51 AM
Related topics: via article database
March 19, 2006
Please Register with Opentalk - but just once!
Our Opentalk forum provides a great place where newcomers to Perl and PHP, Python and MySQL can ask questions that they can't find answer to in the books they have, or where they can discuss which of two ways of tacking a problem would be best. I encourage past course delegates to sign up (it's free) and then ask questions - the questioner gains by getting an answer, and we gain by getting a database of questions answered - a dynamic FAQ.
Like all good ideas and systems, there's a tiny minority who wish to abuse a forum such as ours, so we have a number of basic ground rules that you sign up to when you join. No personal attacks, no "spamming", no advertising (though a single announcement of a product of yours if you declare your interest is very welcome) and no copyright or illegal stuff.
Funny, though, how even with the ground rules in place holes occasionally come to light, and so it came today that I felt I should add another rule - only one account per person. You may ask who on earth would WANT two accounts, and you may ask "what's the harm ..."
Well - I've been around on forums for a while. I've always felt that it's not a good idea for the same person to sign up for a forum under two different names. I've seen maverics arguing with themselves in an attempt to draw others into a flame war on other boards, and I've seen people wishing to have two "persona" - to both have their cake and eat it, or to sign up under a new name when they've managed to build up a healthy disgust for their activities or views under their old one - (again, that's elsewhere and not on Opentalk - on Opentalk we don't mind if you're an adult who dresses up in oversized babies nappies although that's something that would be so off topic it wouldn't be appropriate on any of our boards!)
However, even if there is no malicious intent, registering a second name confuses the other members of the board and misleads them so I'm putting this slight tightening of the rules in place.
Posted by gje at 09:27 PM
Related topics: via article database
March 18, 2006
A person of few words
6U, 40 degrees C
That was a typical answer from John, who provided my "third level" technical support a few years back when I looked after the RasterFlex family of Graphic boards for Sun Workstations. The answer told me all I needed to know (but nothing else!) and would have left my European customer base feeling that it had been barked at them, and fearing to ask for any detail or clarification (such as "is the 40 degrees a sea level spec?"). Get to know John, meet his wife and baby in when visiting the parent company in the USA and you realise it's just his way; a clipped response of few words, with no extra provided - and yet he would go out of his way to resolve questions and issues and his real persona was not what was projected in his email.
I have to say there are times that a short email does say enough, but I send a longer one. And there are times that copy lists can get too long for their own good. But I really appreciate being cc'd / kept in the loop and to receive emails with just a bit of padding - otherwise I end up with this feeling - often groundless - that I'm hanging on by my finger tips and there's no safety net.
John - I hope your life's going well. If you're ever bringing the family to show them our old stamping grounds with Vitec and Connectware, I hope you'll let us know and look us up. And I hope your email will say enough so that it doesn't fall inconspicuously between all the others.
Posted by gje at 11:23 AM
Related topics: via article database
March 17, 2006
Denial of Service ''attack''
We've had 45000 page requests in the last week from the University of Illinois - 17000 of which were within a period of a few hours yesterday. Not bad going? Had we been recommended to the whole University as a site worth seeing? Alas, no; all the requests were coming from a single host computer, which is quite remarkable seeing that we've not got anywhere like 17000 pages on our site, and it's also quite remarkable as those extra hits came after I had been in email contact with the University who had promised to desist.

uiuc is a quarter of our daily traffic
and that was just in a couple of hours
The university has apologised to me, and I owe an apology in turn to people who have had trouble with our site in the last few days - we've been working to counter this traffic, which was causing a denial of service to our regular users. It's been quite an interesting couple of days!
So - what happened?
An Overview of automated browsing
The web was designed for human browsers - visitors who pull up a page and then come back seconds or minutes later for another page. But the protocol used is a straightforward one, so it's very easy to write automata (robots and crawlers) that go methodically through a large number of pages at electronic speed.
Automata such as this come in various flavours::
* Search engines such as Google, Yahoo, MSN and others which the site owner encourages for his own purposed
* Other engines such as the turnitin "bot" where a commercial outfit reaps all the content of a site for their own (or their customer's) purposes - in this case to sell universities and anti-plagiarism service.
* Utilities which are intended to gather a series of pages for an individual so that the individual can pre-load a few pages over a slow line for more efficient browsing
* Automata written or run with the purpose of causing disruption or expense to the web site owner.
Good practise for automated browsers
Technically, it is very easy indeed to run an automata - one you wrote yourself, or one that's out there already. But that doesn't mean it's good practise to do so, or that you'll be welcomed if you do. Automata should:
* check a file called robots.txt in the domain's home directory from time to time to see if they're welcome, and respect what it says. Details
* declare themselves to be automata (and which one they are) via the user agent string that is usually sent in all requests. This should include a URL in case the site they're visiting wants to know what they're up to
* respect the bandwidth and resources of the sites they visit, and the needs of other users to those sites - in other words, not visit a lot of pages in quick succession, nor call up lots of pages in parallel.
Alas, malicious automata (they're in a tiny minority, thank goodness) don't respect these rules. And another minority - not quite so tiny - don't fully understand these rules and their effect on sites they visit. And so, these days, web site owners need to consider defences and safety nets.
If more that 100 pages are requested in 300 seconds (I think those are the figures; we change them from time to time) on our web site, from a single location, we start to get worried and our web server provides a delayed response - it sleeps the request for a few seconds to throttle back the visitor and to give others a chance to have a look in.
So what happened in this case?
That's worked well in the past, except it seems that this latest attack (which evidence tells me was research code written without sufficient knowledge or thought to the effect it would have, rather than being malicious) was made from a cluster of parallel processes ... so that if one was put into a delay, others simply jumped on as well and we had so many concurrent visitors to the site that the queues couldn't cope. Rather like an ambassador being sent along to discuss something in diplomatic terms, and when he's kept waiting for his turn, the troops being sent in behind. Sorry, University of Illinois, this host is banned. Bully-boy tactics such as these are not acceptable, especially from a centre of excellence in learning which should know better
Posted by gje at 06:07 AM
Related topics: via article database
March 16, 2006
West Wilts Railway Users Group and trains to Lacock
Some of the telephone enquiries we get these days are more than interesting - Lisa took a call the other day looking for a Mr [name deleted] who's name appears within some test data on our web site; it appears that the gent who phoned was owed quite a bit of money by the person named in our data. A pity from the caller's viewpoint that he had found just test data, with the forename of one course delegate and the surname of another put together for test purposes.
A phone call asking for details of how to get by train to Lacock is also memorable; Lisa explained we were a training company, then proceeded to help, explaining to the caller that although the railway line passes Lacock there isn't a station, and that the caller would have to transfer to the bus in Chippenham complete with a walk across the town.
And yesterday, I took a call looking for the web site of the West Wilts Rail Users Group. Ah - I know the answer to that one too; they're working towards having a web site, but don't have one yet. And, yes, I did put my caller - the local radio station - in touch!
Such are the day to day pleasures and incidents of having a prominent web site!
Posted by gje at 05:58 AM
Related topics: via article database
March 15, 2006
Checking for MySQL errors
It's worrying when a web site that's been rock solid starts giving intermittent problems - and even more worrying when those intermittent problems just fade away and you're left unsure as to what was the cause of them. I'm afraid I'm the sort who wonders if and when the issue will return.
And so it was yesterday, when we were failing to connect to our databases from our web site - quite a serious situation as we use the databases throughout the site for "back lists", for tailoring pages to suit each individual's stated country and languages, and to help prevent denial of service attacks. And the failure was ugly, too.
As an short term measure, I've put in a couple of re-tries on the connection, and I've caught and flagged the mysql warnings by adding an extra @ in front of the MySQL connection and query calls in the PHP. Failures are now flagged with a neat warning in the page head, so that any of us who sees that message will be able to note / act on it, and customers get a professional message and not a page that, frankly, looked broken.
But this morning, it's a crisp and bright start and running fine.
Posted by gje at 07:28 AM
Related topics: via article database
Useful link: MySQL training
March 14, 2006
PHP - London course, Melksham Course, Evening course
An answer to an enquirer ... I'm posting a part of this here as it compares and contrasts some of the options available if you want to learn PHP.
"""There's a variety of PHP course available, as you say ... and not everyone needs a course; some people do very well self-taught or from books.
I did a comparison a while back on my Blog, comparing a set of evening classes in London, and regular training courses in London, against our own. The comparison is at:
http://www.wellho.net/mouth/55_Evening-classes-to-learn-PHP.html
Each course has its target market, its strengths and weaknesses. In favour of our public course, I can quote:
* Class size maximum of 7 delegates to ensure plenty of attention to each person's specific needs.
* Quiet venue condusive to good learning, in a training centre that's away from the hustle and bustle and where you can arrive early and stay late to study further, with the tutor present, if you wish.
* By using a purpose-fitted training room so we don't have "London costs", nor the cost of hiring a conference room at a hotel and setting it up each time. We provide a very high quality product at a price that's lower than it would be if it was held "in town".
* Training notes written by the tutor who presents the course, who also does a great deal of "live" PHP work; I have also taken time (and invested money too!) to spend time with Rasmus Lerdorf (the guy who wrote and looks after PHP as well as other open source gurus such as Larry Wall, Mark Lutz, and Monty Widenius to ensure that what I present is correct, mainstream, and robust for future developments.
* Rather than present only from the dry set of notes, our courses use what I describe as an "active learning" technique to get the maximum effective teaching in what's quite a short time. See my blog again:
http://www.wellho.net/mouth/628_Active-Learning.html
If you want to see what others say, have a look at Oxford University ..
>http://www.oucs.ox.ac.uk/learning/technical/index.xml?style=printable#programming
Other courses / providers must speak for themselves, but we are NOT well geared for:
* Delegates who wish to take the course in associate with a visit to London or another major city where they can enjoy the nightlife, or who have an objective of making a large group of new friends learning the same technology.
* Delegates who need to commute to and from home on a daily basis - perhaps because of family responsibilities.
* Delegates who wish to learn in small chunks of a few hours a week rather than on a crash course.
Sorry - I believe in our product and I go on about it a bit; we do have places available on the next course, which is in May. And, yes thanks, this week's is running fabulously. But then PHP is great fun, so that's the norm!"""
Posted by gje at 08:15 AM
Related topics: via article database
Useful link: PHP training
Lost Camel
I lost my "Camel Book". You would think that with over 600 books on the shelves, I wouldn't miss the odd one - but each book has its own particular features and certainly amongst my 23 hot favourites I'll spot any that are missing within a few days. What a mystery - had a delegate taken it accidentally and been too embarrassed to return it later?
A posting elsewhere, taking me to task for withdrawing my support for a more general campaign against a potential fresh round of railway closures, took me quite aback. How odd - with all the work I'm doing and spinoff that I hope helps others - that I get slammed in public and a quite upsetting email too.
The Daily Telegraph, that has arrived while I've been writing this item, talks of Internet Plagiarism being rife at a British University. That very much brings to mind a most outstanding post at the weekend on our Opentalk forum. Such excellent writing that I wondered if it was a "cut and paste" job, and there were other little clues that pointed the same way in the formatting. Yet - why on earth should someone cross post an article on Operating Systems in this way?
But ... there's spirit and good in people. All around. All mysteries solved and matters resolved.. The book had fallen down the back. A quick email exchange with Lee (and a phone call from him) concluded that I had written a note that could be read in two ways, one quite contrary to my intent. We're now [back] on the best of terms. And Scott who wrote the Opentalk article is simply an excellent orator - even his "yes, I really wrote that" note was beautifully crafted!
Posted by gje at 07:17 AM
Related topics: via article database
March 13, 2006
Using a MySQL database from Perl
Both Perl and MySQL are major pieces of open source software with a multitude of facilities available - yet you can use them together with just a tiny piece of software "glue" - the DBI and DBD::MySQL module pair from the CPAN (comprehensive Perl archive network).
Once you've got Perl and MySQL installed, the mysqld running, and DBI available to you, inserting data is as easy as connecting to the database:
$cid = DBI -> connect ("DBI:mysql:forsale:192.168.200.66","trainee","abc123");
and running your insert:
$cid->do ("Insert into agents (agent,phone) values ('$ARGV[0]','$ARGV[1]')");
Selecting and displaying records needs a couple more lines of code, since you have to step through ("iterate through") the result set very much like you would read through a file - necessary because the result set may be too big to process all at once. After connecting, prepare and execute your SQL SELECT command:
$action = $cid->prepare("Select agent,phone from agents");
$action->execute();
and you can then step through your result set row by row:
while (@row = $action->fetchrow()) {
print "Call $row[1] to reach $row[0]\n";}
Link - Complete source code of the example that I've quoted from.
We now cover interfacing Perl to databases such as MySQL, and Oracle and Sybase which work through the same mechanism, briefly on our learning to program in Perl course if any of our delegates with to interface to a database. We also cover the subject in more detail on our MySQL and Perl for Larger Projects courses.
A caution - if you're writing a program such as the example I've quoted here that will be used by people other than yourself, you need to add a little extra code to "clean" the user's input - check that it's data that you really want in your database, and that it's not formatted like a piece of malicious SQL to run what's known as an "injection attack"
Posted by gje at 06:07 AM
Related topics: via article database
Useful links: Perl training, MySQL training
March 12, 2006
If it's Sunday, it must be Bedwyn
Taunton last Saturday, and Warminster on Monday. Melksham on Friday and Bedwyn today - 4 railway meetings in 8 days, and a chance to listen to and speak with the MD of First Great Western, their operations manager for the South West, our MP, and numerous other speakers. Alas, the whole train cut thing still looks like smoke and mirrors with everyone pointing at everyone else. Doing what I can, helping inform our MP of which line Melksham station is served by, and that it's NOT going to be just a case of getting other passing trains to call. Bit depressing, really; as a bit of an educator, I felt I should have been able to have gotten that point through, especially to someone who had some transport responsibilities in the past.
"Normal service" needs to resume here. As I've been working on the train stuff this week, Lisa's been working hard on Well House Manor and I'm probably NOT supposed to be putting up a link yet, but, heck I'm proud of here work and impressed even by the draft!.
Posted by gje at 06:41 PM
Related topics: via article database
March 11, 2006
How similar are two words
Do you want to help your web site user find what he's looking for on your web site, even if he mis-spells a name or word in a search? PHP provides you with three facilities - soundex, metaphones and Levenshtein distance calculations - which let you compare two words and see how similar they are when written (levenshtein) or spoken (metaphone, soundex).
I've put a demonstration up for you to try - it's here - using metaphones and levenshtein - here's the "engine" at the heart of the code:
$ident = levenshtein($first,$second);
$meta1 = metaphone($first);
$meta2 = metaphone($second);
if ($ident) {
print "Words are $ident levenshtein steps out<br>";
if ($meta1 == $meta2) {
print "But they sound the same (metaphone $meta1)\n";
} else {
$id = levenshtein($meta1,$meta2);
print "They sound different too - metaphones ";
print "$meta1 and $meta2 are $id steps out\n";
}
} else {
print "Words are identical\n";
}
The complete source code is available too if you want to get in deep.
Having learnt how to see if two words are similar, you'll want to know how to make lots of comparisons against a single word when you're writing a search algorithm. That's another day's story perhaps, but it's something that we do as a matter of routine by keeping a database table of metaphones ....
Posted by gje at 06:26 AM
Related topics: via article database
March 10, 2006
Simple but rugged form handling demo
There are some weeks (OK - MOST weeks!) where I have great fun during training course writing examples in front of the class that help with their application of the subject being taught. And this is one of those weeks.
It's an added pleasure where the demonstrations are web based, because I can then put a running copy up onto our web site and share the fun with everyone.
Here is a little demo - nothing too complex - that lets you enter in some values to a form. It validates the entries, gives you opportunities to correct errors without having to rekey everything and produces a nice final result. Not rocket science, but the sort of thing so many web sites need. As it's a training example, I'm able to put up the source code too and I've even built in some documentation.
Oh - the application is also "bullet proofed" so that users are prevented from doing lots of the nasty things that can be done to an interactive web page ... or rather, if they try, they'll be thwarted!
Posted by gje at 07:35 AM
Related topics: via article database
March 09, 2006
Training Centre Pictures
If you've not been in to our training centre, here's what the training room looks like:

Link to larger image
and here's the customer lounge:

Link to larger image
We provide private and public courses at our Melksham, Wiltshire training centre in Open Source languages such as Perl, Python, PHP, Ruby and Tcl and associated subjects such as Tomcat, MySQL and Linux. Class sizes are small to ensure that there is plenty of tailored attention to each delegate's requirements, and every aspect of our centre is tuned to make it the most effective learning experience you'll find around.
Public Course Program
Private Course Quotation
Course summaries
Posted by gje at 06:57 AM
Related topics: via article database
Progress bars and other dynamic reports
If you've got a program that runs for a long time, your users will wish to be kept informed of progress and how much longer there is to go. Now that's not always easy to predict (and I'm sure that most of you have made fun of such forecasts in the past) but its's much much much better than sitting staring at a blank screen.
There are a couple of "gotcha"s the first time you try to write a neat status line that overwrites itself repeatedly during the running of your program - it's not JUST a case of switching a \n (new line) to a \r (return) character. Three things that can be gotchas are:
1. Buffering. When your program outputs, you see the results on the screen but NOT right away - all programming languages buffer their output and write it out in a fewer, larger blocks or "buffers", typically writing the buffer out when a new line is thrown. It makes sense really - you wouldn't dream of having the rubbish man come around to collect the wrapper every time you finished a packet of crisps as that would be inefficient. Better to wait for his visit each Tuesday. In coding terms, though, if you don't *have* a \n character going out, you have to tell your program to flush the buffers under a different regime.
2. Output channel. If you output to the screen, that's great. Except that if you output to the screen in the same way that you output your results, they can appear mixed up and if the program's user runs via a redirect or pipe, the progress report AND real results both get written to the file. Result? No progress bar seen on the screen and, frankly, a mess in the file. Better to output to STDERR which is usually available to you and was originally intended for error message output.
3. Droppings. If you're overwriting each report line with another, then you have to be careful that report lines don't get shorter; if they were indeed to get shorter, then spurious characters can get left at the right from older lines and give the user a confusing report. A report line that concludes with directorys remaining - xxx where xxx is 110, then 105, then 92, then 84 ... will confusedly report 110, 105, 925, 845 .... Better to use a specific with format such as with Tcl's format command, printf in Perl, or the % operator in Python.
I've put together a source code example in Perl showing these three issues resolved in a simple program and there's a much fuller example that adds a real time completion estimate and an interrupt and intermediate report capability too.
A quick aside of forecasting time-to-go. You may have to start off with a very rough guess as forecasting a long event based on a very short-to-date run is notoriously hard, so do come back during your run from time to time and re-evaluate your total time estimate!
Posted by gje at 05:54 AM
Related topics: via article database
March 08, 2006
A pile of sand? Where do we stand?
I have in my hand ... a grain of sand.
Is it a pile of sand? No - it's just a GRAIN of sand. One grain can't make a pile.
Let's add a second grain. Is that a pile? Clearly not. And how about with a third grain? It's very hard to draw the line, and it's very hard to say "THAT is a pile but THAT wasn't" at any time you add a grain.
Is twice a week "frequent"? If that's how often the bus runs, then it isn't, but if it's how often you're expecting someone to do a job and they contact you and say they can't at the last minute, then it's far too frequent. And what on earth are "low numbers" of people using a train? 3200 tickets per year? For sure, that's a low figure. 27000? Well - we're told that's low too so we've got a further 30% more traffic in the three months from September to December, and we've made our points for retention strongly but firmly to the managers involved. Consultation inputs close today; let's hope that that we've put our point strongly enough and we can save the train.
But I just wish that someone would turn round to me and say "a pile of passengers in 30,000" and we could know where we stand.
Photo - public information from National Institute of Standards and Technology
Posted by gje at 05:18 PM
Related topics: via article database
March 07, 2006
Carnival

It's only Tuesday, and yet Saturday seems an age away. We were in the town that claims to be the home of the largest illuminated carnival in the world (or I think that's what they said) and there were statues of Guy Fawkes inside and out.
Both statues proudly celebrated 400 years of the gunpowder plot, and were in Guy Fawkes home town of Bridgwater, Somerset.
Should one celebrate so infamous an event? Remember the anniversary of a tragedy for sure, but in what way? A phone call last night reminded me that on 17th April, it will be 40 years to the day since the rail services were withdrawn from Devizes, Melksham, Holt and many other stations in the area. Melksham was restored in 1985 but seems threatened again and I find myself wondering just what to do on Easter Monday ... a long way from the carnival atmosphere in which I started this post
Posted by gje at 05:18 PM
Related topics: via article database
March 06, 2006
What is your business latency and potential?
What proportion of your market are you capturing? What proportion are going to your competitors? What proportion are making do with a less-good substitute product and what proportion and simply not using any product?
I was listening to Alison Forster, Managing Director of First Great Western - the train company that runs all services westward from London and local trains too from 1st April, and some comments she made on this struck me.
Alison told her audience that for every passenger travelling on her routes, ANOTHER one and a half would do so if only they knew about the service and could be attracted to it.
Well House Consultants is based at Melksham in Wiltshire - not an obvious location for Open Source training, and yet we're rushed off our feet at times and when we're quiet it's because we've been short of marketing time - I would guess that in our business, our ratio is at least 1 to 1 and I'm looking there to new customers and not customer stolen from elsewhere.
Last week, I looked to make a last minute booking into a business hotel in Abingdon. "Hotel full" all over the place - checking the web site of one of the companies with hotels in every major town, they were full in Abingdon and in Newbury and in Oxford and in Reading - the best they could offer was Aylesbury. I don't know what their latency was, but it sure as heck was high!
Which looks very, VERY good for Well House Manor - I can foresee that we'll be providing services into markets with the capacity to grow and where there will be a shortage of exactly the products that we know and specialise in providing.
Posted by gje at 09:23 AM
Related topics: via article database
Odd one out.
Paddington Station, Oxford Station, Border's book shop in Bristol, Regent's Park, London and London Bridge station. Which is the odd one out?
It's London Bridge station. I've bumped into people quite unexpectedly that I know at all those places, and at all except London Bridge station it was former trainees. I feel quite / delighted / elated to meet up unexpectedly with people and it shows what a small country this is - but I confess to being glad it's something that remains occasional.
The topic comes up today as it was on Saturday evening in Bristol where I had popped for a quick browse through the computer books that I met up with Adam - or rather Adam spotted me - and we spend a delightful hour discussing topics as wide as pair programming, Ajax, Microsoft's client side components and etiquette in Saudi Arabia. There are just some of our customers who think and work "out of the box" and Adam's one of these - a brilliant mind and a real nice person too and it was a pleasure to spend time with him. The only surgeon - turned - geek I know. We sat and talked in Starbuck's and from crowds when we arrived, we were seated in a near empty coffee shop before we said our farewells and I hadn't felt the time passing for a minute.
Update - September 2008 - I have added a simple Ajax Example here, and Ajax is now covered on our PHP Techniques Workshop
Posted by gje at 12:50 AM
Related topics: via article database
March 05, 2006
Real chance to make a difference
As you may know if you're a regular reader of this board, I've been fighting to save the Train services through Melksham for a while now. Yesterday, I had the opportunity to personally question Alison Forster, the MD of First Great Western who take the service over in April. FGW are actively seeking inputs concerning the new timetable from all over the region via their web site ... but that's needed in just the next few days.
I have put a form up on our web site to allow REALLY easy feedback / input. If you've ever come to Melksham / are a would-be train user or feel that you might be, please PLEASE have a look and add your weight to our cause if you agree with it.
The link you want is http://www.savethetrain.org.uk/input.html for inputs, or here to learn more before your respond
Many MANY thanks
-- Graham
Posted by gje at 11:19 AM
Related topics: via article database
Copying a reference, or cloning
If you copy a variable in a program, you end up with a duplicate, right?
set second $first ... in Tcl
second=$first ... in shell
second = first ... in Python, Ruby, C and Java
$second = $first ... in Perl and PHP
Well - ALMOST right. For sure an assignment copies a variable, but where that variable is a reference you may be doing no more that assigning a second name to the same underlying data. For example, if I had a python object called charlie and I wrote thecat = charlie, then any subsequent changes that I made to charlie would also be reflected in data accessed via thecat and vice versa. When you think about it, this is a natural way of doing things and also efficient in that it does not duplicate data but it's quite a tough idea for programmers from a structured programming environment.
There are actually three levels of copying a variable in Python.
If you do a straight forward assignment, you're copying the reference - in other words, you're giving the variable a new name or an alias and content changes under either name will be reflected in the same objects. Our charlie and thecat is a good example of where you might do something like this.
If you use the deepcopy function, then you'll be cloning an object and you'll duplicate its content, so that any subsequent amendment to the original or the copy will be unique to the original or to the copy. If you had an object that contained this year's data and you wanted a new object for next year's data too, you might do a deep copy ... then change next year's data to reflect the event you are expecting to happen. Next year's data changes but this year's remains unaltered.
The third (intermediate) level of copying in Python uses a list slice notation and is described as a shallow copy. If you have a table of staff members and you shallow copy it, you'll end up with a new table of staff members. Take the copy, add in some extra staff, take some away, and only the copy is effected. However, each staff member object refers to the same data from both the original and new data sets, so if you change a property of an individual staff member - say their home address is altered - then that will change in both "copy"s. Once again, in the correct circumstance this is a very natural way to handle data.
Here are the three syntaxes - deep copy (i.e. clone), shallow copy and alias:
firstyear = deepcopy(team)
secondyear = team[:]
thirdyear = team
I've written these three examples into an example program available under the More on Collections and Sequences in Python section of our resource centre ... here are the results of running the program to see the effect of changes in firstyear, secondyear and thirdyear variables when the team gets changed.
The changes made:
team[2] = person("Charlotte","Cat's home entertainer",10)
team[1].setage(53)
and a listing of the various teams ...
Original team
Lisa
Trained as Graphic Designer
Aged 21
Graham
Trained as Support Manager
Aged 51
Charlie
Trained as Unknown
Aged 9
Team after changes
Lisa
Trained as Graphic Designer
Aged 21
Graham
Trained as Support Manager
Aged 53
Charlotte
Trained as Cat's home entertainer
Aged 10
Deep copy - no changes from original
Lisa
Trained as Graphic Designer
Aged 21
Graham
Trained as Support Manager
Aged 51
Charlie
Trained as Unknown
Aged 9
Shallow copy - some changes
Lisa
Trained as Graphic Designer
Aged 21
Graham
Trained as Support Manager
Aged 53
Charlie
Trained as Unknown
Aged 9
Normal copy (alias) - all changes shown
Lisa
Trained as Graphic Designer
Aged 21
Graham
Trained as Support Manager
Aged 53
Charlotte
Trained as Cat's home entertainer
Aged 10
Source code - here
Posted by gje at 07:12 AM
Related topics: via article database
March 04, 2006
Moral dilemma
Should I arrive late and walk in during the chairman's introduction, or should I arrive on time? That's a question that I'm faced with this morning.
"Arrive on time" you'll say and - yes - I would love to. Except ... this is a meeting about public transport and the only way I could get to Taunton on time is to drive. I feel caught between a rock and a hard place; decision on a knife-edge but I'm going to go by car. I've NOT met the chairman before and don't want to be rude, and I don't want to miss much; if he were a long-standing contact, then a quick email and I would have been training ;-)
Posted by gje at 07:05 AM
Related topics: via article database
March 03, 2006
Apache httpd to Tomcat - jk v proxy
Many of our customers run both the Apache httpd and Apache Tomcat web servers - with good cause, since Tomcat is biased towards web applications where the same code is run many, many times over and httpd is biased towards serving pages and is better tuned for a much larger number of different pages but at a somewhat less frequent interval.
But the user (via browser) wants a single point of contact - typically httpd - with a number of mechanisms used to link the two servers. Jserv, mod_jk2 and warp are all deprecated, mod_rewrite can be used, but the most common link is done through httpd's mod_jk or mod_proxy modules. Historically, mod_proxy has been much easier to set up but has had a reputation for being much slower. Link - "The Connector Story"
Is mod_proxy's reputation for being slow deserved? How DO the speeds compare? The questions were asked during last week's deployment course in Glasgow and I thought I would - my first clear day - do some experiments to find out.
I set up a server (Linux, Fedora core 3, Apache 2, Tomcat 5.5) and set up both jk and proxy connections between them. I also set up an httpd alias to allow a direct httpd access to a web application, and an http connector on Tomcat to allow direct access via that server. I then benchmarked a plain HTML file of 1k in size, using the ab tool to load the page 1000 times in quick succession in four different ways.
ab -n1000 http://snowdrop:8080/latmjdemo/index.html > tomcat
ab -n1000 http://snowdrop/direct/index.html > httpd
ab -n1000 http://snowdrop/latmjdemo/index.html > jk
ab -n1000 http://snowdrop/felix/index.html > proxy
Running the test on a quiet network five times, with the ab commands running in a different order to balance out any caching issues, I got the following:
Direct access via httpd - 300 per second
Direct access via Tomcat - 483 per second
Access via both servers connected by jk - 307 per second
Access via both servers connected by proxy - 222 per second
What I expected? No, to be honest I was surprised that the direct access via httpd was so slow compared to the others. But then thinking it through, Tomcat is a great CACHEING server so it will perform proportionately far better on a test such as this that repeatedly hits the same page.
I was also pleasantly surprised to see that proxy was less that 30% slower than jk - I feared much worse. And thinking through the benchmark I ran, serving an html page is likely to be one of the data types that shows up the difference too - there's no gobs of Java code to be run to dilute the protocol time.
Conclusion? If you want every ounce of performance from your httpd / Tomcat pair, use jk. If you're not pushing it to the limit, then proxy's likely to be fine for you.
Posted by gje at 01:35 PM
Related topics: via article database
March 02, 2006
Hostnames spring forward
I remember Seal (Capital S as that was really the name) nestling in the bottom of my carry-on bag as I flew from London to Miami way back in the last millennium. There are only certain things you want to check in and - well - Seal was the Sun IPC workstation of 1992 vintage that formed the core of the Well House Consultants course development resource, running Framemaker and Perl for the purpose. A carefully wrapped keyboard in my case, and a monitor borrowed from David in Naples, and Lisa and I were well able to enjoy a week together AND get on with the exciting new course development.
Why was the computer called "Seal"? Well ... host names change from generation to generation. I remember trees, colours, planets and famous painters from way back (and I remember Snow White's seven dwarves too), but more recently we've been through generations of fish, water mammals (so Seal was around at the same time as Whale, Otter, Walrus and others), then on to the "Indian Cuisine" generation and we're now largely flowers and plants.
At each generation, hardware costs drop. I recall running course with two people sharing one computer. These days, with something like Apache Tomcat admin courses, delegate may even have two computers each - one to use as their own workstation (typically running Windows) and the second to use as the server that they're administering via the network (often running Linux). And so it is that I look through a list of the computers that I've got on site this week and I see ..
Buttercup and Campion, Nutmeg and Dandelion, Bhajee and Vindaloo. Foxglove and Flipper, Parsley and Tansy, Daisy and Chopsuey. And that's not to forget Snowdrop and Tormentil, and Elderberry and Thyme.
Yellow Crocuses are peering up through the gravel on our driveway, even through there was a vicious frost yesterday morning and snow fell while I was on site in Oxfordshire. Driving home, a discussion on the radio was arguing whether Spring should be considered to start on 1st March or 21st March. Whilst it certainly feels like winter, there's already signs here of an exciting spring ahead.
Posted by gje at 05:58 AM
Related topics: via article database
March 01, 2006
Choosing the right language
Why are there so many different computer languages? It's partly because there are many different types of things that need to be done in a programming environment and they require different mixes of facilities. And the addition of facility "x" which is really important for application "y" makes the provision of facility "a" that's important for application "b" impractical or rather tricky.
So, the question during the current course: "Why Python - what makes it different". Well ... here are some things that were relevant to my questioner:
* It's a SCRIPTING language that means no manual compile process, so it's great for codes that need changing frequently
* It's a STRAIGHTFORWARD language that's not overburdened with alternative facilities - removed complexity from the developer and maintainer
* It's OBJECT ORIENTED and that provides superb logic sharing capabilities between applications handing the same data types without naming conflicts
* It's a TRUSTING language that doesn't overburden you with the need to predeclare everything
* It's available CROSSPLATFORM - on the course, I have delegates on Mac, Windows and Linux platforms for example
* It's ROBUST and FORWARD COMPATIBLE and WELL SUPPORTED AND USED making it something you can rely on in the future.
"Compared to Perl" goes on my questioner. Now Perl may be the right language for many people because:
* It's a SCRIPTING language that means no manual compile process, so it's great for codes that need changing frequently
* It's a FULLFEATURED language that's got plenty of facilities and coding anything can be very fast indeed with all the range
* You can CHOOSE to write single block, structured or Object Oriented code meaning that it's suitable for small projects through to big systems.
* Perl assumes you KNOW what you're doing - leave things out and they get done for you. Makes for fast coding by the initiated.
* It's available CROSSPLATFORM.
* It's ROBUST and WELL SUPPORTED AND USED so you'll always have a good supply of programmers available
* It's being UPDATED to include modern facilities at the expense of old ones, meaning it's a language that will be around in 20 years!
Every force is balanced by an equal and opposite force, they say. And so it is that you can take many of the powerpointish bullets above and write an "opposite" statement that may turn people off the particular language. "It's full-featured" can also mean "there are so many ways of doing things that you'll end up with unreadable code written by contractors who are long since gone and is utterly unmaintainable unless you call them back in and pay them a fortune". Yes, I know that's a simplification but there's a seed of truth in there.
We offer Perl courses and Python courses and so we have a foot in both camps ... also PHP courses (PHP is a great language and often the best choice if you're writing a dynamic web site) and Tcl and Mysql ... every one of these is a great language for the right users ... otherwise I simply wouldn't include the subject in our public course listing.
Posted by gje at 11:21 PM
Related topics: via article database