<<

ofoVOLUME 5, NUMBERf 2 coursecourseWINTER 2005

A GLASS ACT Blowing the Blues WORKING TOGETHER Apache httpd and Apache Tomcat

SPECIAL SECTION Guide to local accommodation He who dares, forums

It’s traditional ... at the end of your train- ing course, the last you ever see of your tu- tor is the tail lights of his car as he turns the corner out of your office. I admit it. I was frightened. Here was Lisa suggesting that we provide a feedback page where people, where any- Marketplace in the town centre is one, can ask questions about the subjects we only a mile from our training centre teach, about the examples we provide, and about us. A page where people can come Is it the place to be? after their course and ask, “I tried this but can you give me a further explanation?” or “Is Melksham the right place to have our “Why isn’t this working?” or “Can you sug- training centre”? gest an easier way?” A question we ask ourselves from time to It hadn’t been tried before. Oh, there are time, and we come up with a resounding, Contents now plenty of forums on the Internet, but “Yes, it is!” when Opentalk was launched there were The town’s well connected – it’s just 90 He who dares, Forums ...... 2 far fewer. And there remain very few open minutes by train from London and about 20 Is it the place to be? ...... 2 forums operated by training companies. Yet minutes off the M4. Our training centre is Wiki Watch ...... 3 Lisa had it exactly right; we’ve now got more purpose-fitted for the Open Source courses we run, in a quiet and historic building, and The X-Y-Z’s of sharing ...... 3 than 600 registered users and it does give our customers another way besides emails yet with the best of facilities, ranging from Function Convention ...... 4 to get back to us after the course, and to stay the “best coffee in the West” through to a li- Brag Page ...... 5 in touch, continuing to learn long after the brary of more than 600 books, and 10Mbit Internet right to your training system. Expect for Windows ...... 6 course has ended. It is quite a task answering the questions In the evenings, there are places to go, Getting to our centre ...... 7 that come up every day. And I’ve been do- places to eat, and there’s plenty of places PHP: it takes all sorts ...... 8 ing it now for a couple of years. So what’s in to stay. As we updated our accommodation list for this issue, we wrote to more than 50 Bristol Blue Glass data study .. 9 it for me? Why do I do it? It helps me know what questions are be- separate establishments within a few miles. The makings of a cat ...... 11 ing asked at the moment so that courses You’ll find that our new list includes many Latest Versions ...... 13 can be updated to reflect current require- old favourites, with a fresh sprinkling of new blood. Local accommodation ...... 14 ments. It keeps adding question-and-answer content to our web site so that people using Mapping your site ...... 16 the search engines get directed to us more Cat Charlie gets into the Apache httpd and Tomcat ...18 and more. And it keeps us in contact with Blue Glass spirit. A training web site ...... 20 our customer base so that ... if ... they need Schedule ...... 22 more training in the future, or have a col- league who asks about learning the same Calendar ...... 23 skills, then they’ll remember us and refer Major web site update ...... 24 that colleague through. Your r’s from your x’s ...... 24 But most importantly, at the end of your course, you don’t see the last of your tutor. Geekmas back by popular demand We’re celebrating Geekmas again this year to the local Indian restaurant (going dutch on the 26th and 27th of November at our there!). The seminar picks back up Sunday training centre at 404, The Spa, Melksham. morning and carries on until lunchtime. Join us for two days of informal discussions See our accommodation list in this issue if and lecturettes with enthusiasts who want you want to stay overnight, and please let us to get together with other enthusiasts. See know if you’ll be coming. http://www.wellho.net/net/geekmas.html. Last year’s Geekmas was a fun gathering The free seminar starts late morning on of around a dozen techie friends and I man- Saturday, 26th November 2005. Snacks are aged to persuade some to give a short talk. provided at lunchtime, and the seminar con- I’m hoping to get at least half the people tinues to early evening, when we’ll adjourn who come to do a 10-minute turn this year!

2 www.wellho.net Well House Consultants, Ltd. Wiki Watch A WORD FROM GRAHAM ELLIS Since I wrote the last edition of “Of A glass act Course”, we seem to have been busier than This has been yet another ever, and I took the opportunity as I trav- record-breaking year for Well elled to courses, to meetings, and on holi- House ConsultConsultants.ants. WWe’vee’ve had ttoo sched-sched- day to put together a picture album of my ule extra courses in such popular topics travels using a demonstration piece of wiki as Apache httpd and Tomcat deployment, software written in PHP, and with code tak- and increased the frequency of this and en from the mapping application described of other courses, such as Python Program- on pages 16 and 17 to let you see just where ming. Private course bookings are being Graham learns the art of blowing glass from the pictures were taken. made well ahead, although we can usually Ben Taylor of Bristol Blue Glass, who learned find short term availability if you need to from Graham some skills for their web site (see get a group trained urgently and you’re pages 9 through 13 for more). flexible. this edition, we’ve updated our accom- An obscure cul-de-sac in a little market modation list (pages 16 and 17). Recently town in seems a strange location we’ve got much more involved in other for a successful high tech training centre aspects of the Melksham community too. such as ours. How do we do it? By provid- Many of our customers arrive by train, but ing a thumping good service so that our under the new franchise arrangement the customers become our friends and our services they use are being slashed out of ambassadors. By networking and giving existence. Our campaigning web site at technical assistance and advice above and http://www.savethetrain.org.uk, covered in beyond what’s expected to our custom- more detail on pages 20 and 21, is inform- ers, and indeed to any enquirer we can ing people who live around here, and deci- http://www.wellho.net/share/bath.html reasonably help. And by making sure that sion makers too, as to how vital the service our services are known about by blowing is for us and the community, and we’re our own trumpet (or blue glass) in “The hoping to get the decision amended. Horse’s Mouth”, via our Opentalk forum, and via this newsletter, “Of Course”. We bring business to Melksham. The majority of our trainees travel some dis- tance and stay locally during the course, eating at local hotels and restaurants. In

The X-Y-Z’s of knowing when to share If you write a simple web application, a journey to Dover. http://www.wellho.net/share/bowood.html you’ll be taking the user’s form input and There are times, though, that inputs from other data you can glean (such as his IP ad- different users must be shared. Any system Start off your exploration of our area at: dress and previous page [referer]), and per- that’s selling a product with a limited stock http://www.wellho.net/share/melksham.html forming actions that give a result. These re- level needs to take account of the number sults can be calculations, database lookups of each product already spoken for, and a What is a wiki? or a combination thereof. When you’ve sale of the very last copy of a book to User sent the result back out to the user, the con- W means that the site must tell User Z that It’s a content management system where nection is completed and the you’re sold right out. a user can click on a button that says “I server’s resources are released. There are three levels (or want to edit this page” and easily change the As applications get more persistences) of information content. No fuss, no hassle. It’s a Web Page complex, the user inputs will be in web applications. There ERIC S. PIOTROWSKI for Dummies, so to speak. Extra pages can made in a series of pages that is transient data used with- be easily added. We’ve chosen to add new need to be linked together into in a single request, session pages by simply (mis-)typing a word, starting a session and, most commonly, data used within a series of with capital letter and including a capital cookies will be used to provide the string to requests from a single user, and application- letter in the middle too. For instance, typ- tie together the requests from User X and wide data that’s shared between all users of ing “NonSense” anywhere in a paragraph of keep them apart from the requests of User the application. It’s vital for the application text will not only identify this word as being Y. Such segregation is vital. User X, booking designer to be aware of all three categories, clickable, but it will create a referring web a ticket to Newark, really doesn’t want his and to be able to identify which data should page, too. booking mixed up with Y, who is planning be given which globallity and persistence.

Winter 2005 www.wellho.net 3 PHP RULES OF THUMB Function Convention Brag Page

“There’s a function to do that.” up with other user’s data! PHP provides a you can write your own function. So I say on every PHP course. Because built-in solution through the $_SESSION With your own function, the world is there’s a function to do almost anything superglobal array, and a series of functions your oyster. Write it once, save it in an in- standard that you want. such as session_start. And a lovely so- cluded file, and you have your own PHP ex- That’s why I can take a morning to code lution it is too. tension. We have a single included file for something for a web site in PHP that would You want something nonstandard? Well, almost every page of our site. take me a week in C. there just might be a function to help on Here’s a call from our “Save the train” site Of course, the devil is in the detail. Note the PECL or PEAR (that’s the PHP Ex- that we use to return a string that contains I wrote that there’s a function to do AL- tension Community Library and the PHP the HTML to tell the user when the next MOST anything STANDARD ... Extension and Application Repository), or train to and Swindon leaves: Some standard facilities that you’ll want $mtof = array(“05,52,t”,”07,45,o”,”13,35,t”,”17,02,t”,”21,33,o”); in PHP don’t lend themselves to handling $sat = array(“08,01,t”,”13,35,t”,”17,00,t”,”21,50,t”); through a single function. Take sessions, for $sun = array(“12,44,t”,”16,43,t”,”21,03,t”); example. Sessions occur when a user wants if ($engworks) { to visit a series of pages, making selections $sat = array(“08,20,b”,”13,50,b”,”17,15,b”,”22,10,b”); on the way through, and has his informa- $sun = array(“12,59,b”,”17,00,b”,”21,04,b”); tion and context remembered for when he’s } completed his use of the site. But he cer- $swindon = nexttrain(“Chippenham and Swindon”,$mtof,$sat,$sun); tainly doesn’t want his information mixed

4 www.wellho.net Well House Consultants, Ltd. Ah, it’s a hard life, but Brag Page someone’s got to do it. We have a lot to brag about! Students on courses ... we’re proud to have trained a wide variety of students on public and private (single company) courses, at our training cen- BragBrag PagePtre and at theira offices throughoutg the British Islese and be-

$mtof = array(“05,52,t”,”07,45,o”,”13,35,t”,”17,02,t”,”21,33,o”); $sat = array(“08,01,t”,”13,35,t”,”17,00,t”,”21,50,t”); $sun = array(“12,44,t”,”16,43,t”,”21,03,t”); if ($engworks) { $sat = array(“08,20,b”,”13,50,b”,”17,15,b”,”22,10,b”); $sun = array(“12,59,b”,”17,00,b”,”21,04,b”); } $swindon = nexttrain(“Chippenham and Swindon”,$mtof,$sat,$sun);

Winter 2005 www.wellho.netwww.wellho.net 5 CODING IN TCL/TK Expect for Windows

A sizable minority of trainees on Tcl courses are Tcl mainly because of its Expect # Expect for Windows - ping a host and guess its distance from you extension, which allows the programmer to # tested on ActiveState release 8.4.11 automate a series of command line actions, starting them with a “spawn” command, source expect.tcl sending text via the “send” command, and log_user 0 spawn ping $argv checking the response via “expect”. 8 miles Expect runs the process(es) you spawn in parallel to your expect script, and it can also expect -re {[<=]([0-9]+)ms} { support multiple simultaneous processes; puts “alive - $expect_out(1,string) ms trip time” this has made it difficult to port to operat- if {$expect_out(1,string) > 250} { ing systems which don’t have a Unix-type puts “Server is very distant (e.g. Australia)” base (i.e to Microsoft Windows); past re- } elseif {$expect_out(1,string) > 100} { leases have been old and flaky with the ex- puts “server is distant (e.g. USA)” ception of Active State’s release which was a } elseif {$expect_out(1,string) > 3} { licensable product. puts “server in in Europe” I’m delighted to report that ActiveState’s } else { Expect is now freely distributed and I’ve puts “Server is Local” just downloaded a copy and had a “play”. }

Worked very nicely in my limited test. } timeout {puts “No response from server”}

|

|

Above is a script that pings a server and - rather than reporting | |

|

|

|

|

|

|

|

back a page of stats - just guesses how far away the server is. |

|

|

|

|

|

|

|

|

|

|

|

|

Running that and testing all possible pieces of code, we get: | |

| | | |

C:\Tcl\lib\expect>tclsh plet www.wellho.net alive - 173 ms trip time server is distant (e.g. USA)

C:\Tcl\lib\expect>tclsh plet www.savethetrain.org.uk alive - 26 ms trip time server in in Europe

C:\Tcl\lib\expect>tclsh plet 192.168.200.66 alive - 1 ms trip time Server is Local

C:\Tcl\lib\expect>tclsh plet 192.168.200.69 No response from server

C:\Tcl\lib\expect>tclsh plet www.csu.edu.au alive - 324 ms trip time Server is very distant (e.g. Australia)

All of which look very much as I would have hoped! Download Expect for Windows from the ActiveTcl directories at: http://www.activestate.com Learn how to program in Tcl and Expect on our Tcl course; see: http://www.wellho.net/course/tbfull.html 6 www.wellho.net Well House Consultants, Ltd. M4 1 LONDON Getting to our training centre

BRISTOL J17 DIRECTIONS FROM THE M4 10 miles 1. Start out at M4 Jct 17 (A350/A429/B4122),Wilts A350 Follow signs for Chippenham on the A350 2. Malmesbury Road Roundabout At roundabout take 2nd exit following the A350 Kington 3. A350 Badger St Michael 9 miles At roundabout continue forward 4. Brook Kington At roundabout continue forward N Langley 5. Bumpers Farm (Junction with A420) At roundabout take 3rd exit 6. Chequers (Junction with A4) At roundabout take 3rd exit (signposted Poole, Warminster) A350 l 8 miles 2 7. A350 Lackham 3 At roundabout take 3rd exit 4 8. A350 Junction with A365

BRISTOL Chippenham At traffi c signals forward 5 9. A350 Junction with A3102/B3107 || || || At roundabout take 2nd exit || 7|| miles || || || 10. Berryfi elds roundabout || || A350 || || At roundabout take 2nd exit (signposted ) || || | | CALNE 11. A350/A365 Junction | | | | | | At roundabout take 1st exit (signposted Devizes) | A365 | | | DEVIZES | 12. B3112 | | | | | At roundabout take the 1st exit onto Spa Road - B3112 | 6 m B3112 | iles | | 13. The Spa |

|

| 6 | | Turn right into cul-de-sac | unclassifi ed |

| | 14. Well House Consultants Ltd BATH | |

| | | Turn left in last gated entry at 404, The Spa, Melksham (4-storey Georgian) | | | | Estimated travel time: 20 minutes in non-adverse conditions | | | | A350 | |

| 5

| mile

| | s

| | | A B C D E

| |

| | |

| |

|

| |

|

| |

|

|

|

| |

|

|

|

|

|

| |

|

| |

|

|

| | |

|

|

| |

|

| | 7

| 1 1

|

|

|

|

|

|

| |

| | 4 m | ile

| s

|

|

|

|

|

|

| Reybridge

|

|

|

|

|

| | | | |

| 2 2 A350| | | |

| | 3 m | ile | s

|

| | | | | | | | | | | | | | | | | | |

|

|

|

Whitley | 3 3

| | 2 | m | ile | s

|

|

|

|

|

|

BATH |

SHAW |

|

|

| |

|

|

|

|

|

| The Forest

|

|

|

|

|

| | 8 1 4 4 | m | | i | le | | | CALNE || 9 | | | | | | | | MELKSHAM | | | | | | Well House | | | | 13 Consultants | The Spa | | | | | 10 | 14 | BRADFORD-ON-AVON 12 | | 5 5 | | | 11 | | | A365 DEVIZES

TROW- BRIDGE Bowerhill A B C D E

Winter 2005 www.wellho.net 7 PHP TIPS

PHP:You can do a lotIt with takes a little Python all sorts

Put these numbers in order: 6, 1, 11. You’ll probably expect the answer “1-6-11” but in some languag- e-w-f:~/autumn05 grahamellis$ ../sep05/sortway es, and with some sort routines, you’ll get the answer back “1-11-6” instead. That’s because sorting character by character, 1 has a lower A demonstration of sorting value than 6, and 1 is the first character of the string 11. Here’s a test program in PHP that sorts two arrays. The first only 4, 7, 10, 16, 23, 40 contains numbers, and sorts numerically as you might expect and bay 10, bay 16, bay 23, bay 4, bay 40, bay 7 hope. The second contains strings with alphabetic characters and bay 4, bay 7, bay 10, bay 16, bay 23, bay 40 sorts ASCIIbetically, which is probably not the desired effect! earth-wind-and-fire:~/autumn05 grahamellis$

#!/usr/bin/php -q A demonstration of sorting numbers. It’s clean, and provides you with what you want. A wide variety of extra sort routines (asort, ksort and so on) $b} @original; Perl hashes cannot be sorted. Sort a list of the keys of hash in- print (implode(“, “,$first).”\n”); stead. print (implode(“, “,$second).”\n”); Sorting in Python Python’s sort routines use the _ _cmp_ _ operator for the ob- natsort($second); jects of the type that you’re sorting, so that they’ll sort numeric ob- print (implode(“, “,$second).”\n”); jects as numbers and string objects alphabetically. Nice and clean, ?> as you would expect with Python. Sorting in Tcl Our example concludes with a natsort call. This is PHP’s extra Lists can be sorted using the lsort command. Options available sort routine that lets you sort strings, but uses a natural order for include -dictionary, -integer and -real. 8 8 www.wellho.netwww.wellho.net Well House Consultants, Ltd. Bristol Blue a study in database Glass normalisation

The Bristol Blue Glass name is more than 350 years old. Every glass object is free- blown and hand- made, resulting in each piece being unique and collectable. Products are available for online ordering, as well as from more conventional out- fits such as the Bristol Blue Glass shop located in Bristol. www.bristol-glass.co.uk

continued next page Winter 2005 www.wellho.net 9 Bristol Blue Glass a study in database normalisation continued

Figure 1: Possible data +------+------+------+------+------+------+------+------+------+------+ | prodcode | proddesc | prodprice | proddate | totalmade | fi rsts | seconds | makerseconds | breakages | makers | +------+------+------+------+------+------+------+------+------+------+ | BB035 | 15cm bowl | 68 | 20050824 | 35 | 30 | 4 | 1 | 0 | Ben Taylor, Ben Gough | | BB035 | 15cm bowl | 68 | 20050825 | 15 | 12 | 1 | 1 | 1 | Ben Gough | | BB035 | 15cm bowl | 68 | 20050826 | 18 | 16 | 2 | 0 | 0 | Ben Gough | | BB036 | 20.5cm bowl | 80 | 20050825 | 10 | 10 | 0 | 0 | 0 | Ben Taylor | | BB036 | 20.5cm bowl | 80 | 20050826 | 10 | 8 | 2 | 0 | 0 | Ben Taylor | +------+------+------+------+------+------+------+------+------+------+

As with any business, Bristol Blue dundancy will become clear, as they have to in the data it holds”. Having updated their Bristol Glass, once the first blocks of data table design, Bristol Blue Glass wanted to Glass are looking to produce their have been entered. It’s then time to nor- transfer the data in the existing single table. goods efficiently, and for this they malise the database to save duplicate data But perhaps that wasn’t as straightforward entry and storage, to provide for a greater as they might have wished. need good management information consistency of the data, and to store it in First thing to do? TAKE A BACKUP! such a way that more flexible selections can The conversion can be automated using a that lets them enter and enquire be made. It’s also worth adding a unique id script. Since Bristol Blue Glass are familiar about trends from a growing data- to each row of each table so that particular with PHP, and using it for all their other data can be easily and uniquely identified. scripting, it’s sensible to use it for this con- base of information. The system will A new data model version too, even though it’s somewhat of To avoid data duplication, Bristol Blue an unusual application for a language that’s also help them with costing. Their Glass are separating their products first step was to start collecting some out into a much smaller table with Figure 2: How the script starts a single row for each product, and

10 www.wellho.net Well House Consultants, Ltd. Like a graceful vase, a cat, even when motionless, seems to fl ow. Bristol Blue Glass a study in database normalisation continued - George F. Will

The makings of a Cat Figure 1: Possible data +------+------+------+------+------+------+------+------+------+------+ 1 2 3 | prodcode | proddesc | prodprice | proddate | totalmade | fi rsts | seconds | makerseconds | breakages | makers | +------+------+------+------+------+------+------+------+------+------+ | BB035 | 15cm bowl | 68 | 20050824 | 35 | 30 | 4 | 1 | 0 | Ben Taylor, Ben Gough | | BB035 | 15cm bowl | 68 | 20050825 | 15 | 12 | 1 | 1 | 1 | Ben Gough | | BB035 | 15cm bowl | 68 | 20050826 | 18 | 16 | 2 | 0 | 0 | Ben Gough | | BB036 | 20.5cm bowl | 80 | 20050825 | 10 | 10 | 0 | 0 | 0 | Ben Taylor | The initial gather of The initial gather must A water soaked news- | BB036 | 20.5cm bowl | 80 | 20050826 | 10 | 8 | 2 | 0 | 0 | Ben Taylor | glass. Shaped like a bul- be cooled with com- paper (Evening Post) is +------+------+------+------+------+------+------+------+------+------+ let for the next gather. pressed air to aid the used to shape the initial next gather’s stability. gather of glass. intended to produce dynamic web pages. The script reads each row of the original 4 5 6 table, generates a new row in the product table if necessary, a new row in the manu- facturing record table, new rows (if needed) in the maker’s table and as many rows as it needs in the link table. The script in Figure 2 was written with The initial gather of The second gather The head is formed a few lines of statistics being output to the glass is plunged into a is quickly forced into and then the sides are browser as it ran, as an aid to checking its furnace full of molten shape, again using the fl attened with the wet integrity. It was then archived off the server glass. wet newspaper. newspaper. to stop it accidentally being rerun! continued on next page 7 8 9 Figure 2: How the script starts

if (! $prods[$row[prodcode]]) { 10 11 12 # New product - create product row $qp = “insert into products “. “(prodcode, proddesc, prodprice) “. “values (“. ‘”’.addslashes($row[prodcode]).’”’. “,”. ‘”’.addslashes($row[proddesc]).’”’. The cat needs to be re- The legs are pushed The fi nal touches to the heated in the glory hole into shape using off ears; pulled to a point. “,”. for further tweaking. cuts from an old warn $row[prodprice]. out saw blade. “)”; mysql_query($qp); 13 14 15 $prods[$row[prodcode]] = 1; }

# add row to main table $qp = “insert into manufact “. “(prodcode, proddate, fi rsts, seconds, makerseconds, breakages) “. Finally the feet are cut The near fi nished cat is The cat is then squished “values (“. in with a pair of glass sat on vermiculite wait- onto a small puddle of ‘”’.addslashes($row[prodcode]).’”’. maker’s shears. ing for its base. molten glass. Voila!

Winter 2005 www.wellho.net 11 Bristol Blue Glass a study in database normalisation continued

The new data structure:

mysql> select * from manufact; +------+------+------+------+------+------+-----+ | prodcode | proddate | fi rsts | seconds | makerseconds | breakages | mid | +------+------+------+------+------+------+-----+ | BB035 | 20050824 | 30 | 4 | 1 | 0 | 1 | | BB035 | 20050825 | 12 | 1 | 1 | 1 | 2 | | BB035 | 20050826 | 16 | 2 | 0 | 0 | 3 | | BB036 | 20050825 | 10 | 0 | 0 | 0 | 4 | | BB036 | 20050826 | 8 | 2 | 0 | 0 | 5 | +------+------+------+------+------+------+-----+ 5 rows in set (0.00 sec)

mysql> select * from products; +------+------+------+-----+ | prodcode | proddesc | prodprice | pid | +------+------+------+-----+ | BB035 | 15cm bowl | 68 | 1 | | BB036 | 20.5cm bowl | 80 | 2 | +------+------+------+-----+ 2 rows in set (0.00 sec)

mysql> select * from blower; +------+-----+ | person | bid | +------+-----+ | Ben Taylor | 1 | | Ben Gough | 2 | +------+-----+ 2 rows in set (0.01 sec)

mysql> select * from link; +------+------+-----+ | mid | bid | lid | +------+------+-----+ | 1 | 1 | 1 | | 1 | 2 | 2 | | 2 | 2 | 3 | | 3 | 2 | 4 | | 4 | 1 | 5 | | 5 | 1 | 6 | +------+------+-----+ 6 rows in set (0.00 sec)

12 www.wellho.net Well House Consultants, Ltd. Bristol Blue Glass a study in database normalisation continued Latest Versions of Open Source Software as of October 2005

For use on Micro- PerlPerl 5.8.7 www.perl.com soft Windows-based systems, you may see http://www.cpan.orghttp://www.cpan.org Stable forfor additional modules prefer to download 5.9.2 ActivePerl, Active- DevDevelopmentelopment Tcl or ActivePython from ActiveState at http://www.actives- tate.com who provide Tcl/TkTcl/Tk 8.4.8.4.1111 www.tcl.tk these languages Stable ready compiled and 8.5a3 with install wizards for Windows Sys- Alpha rreleaseelease tems. Note that Ex- pect is now included within the ActiveTcl Expect 5.43.0 expect.nist.gov download and no Stable longer requires the purchase of a license. Python 2.4.2 www.python.org seesee hhttp://www.vex.net/parnassus/ttp://www.vex.net/parnassus/ Stable { forfor PythonPython resourcesresources Using the new data structure If you want to examine all the data us- PHP 4.4.0 www.php.net ing a single view, the command is now more see http://pera.php.net Stable complex: and http://pecl.php.net for additional resources 5.0.5 select * from ((manufact left Stable join link on manufact.mid = 5.1.0 link.mid ) join blower on link. Release Candidate bid = blower.bid) join products on manufact.prodcode = products. prodcode MySQL 4.1.14 dev.mysql.com Generally Available but the users won’t see that – just the devel- see http://dev.mysql.com for associated downloads oper will – and he’ll work it out once and such as the MySQL admin- 5.0.13 then cut and paste it, adding WHERE and istrator and the MySQL Release Candidate Query Browser LIMIT clauses as necessary. (Note: there’s a careful decision to be made as to whether to use JOINs or LEFT JOINs depending Apache Tomcat 5.5.9 jakarta.apache.org/tomcat on whether or not you wish for any orphan Note: Tomcat 5.5 Requires Stable httpd.apache.org a Java Runtime Environ- records to be reported. ment version 5. If you’re 5.5.12 Data entry will be much shorter and eas- using Java2 1.4, Tomcat 5.0.28 (Stable) remains Alpha ier. The script is available in full at http:// available for download. www.wellho.net/demo/bbg_high.php.

Some other interesting downloads ... PHPMyAdmin (from http://www.phpmyadmin.net). phpMyAdmin is a very popular tool written in PHP that handles the administration of MySQL over the Web. MySQL Connector/J (from http://dev.mysql.com/doc/mysql/en/java-connector.html) is a driver that connects Java Applications that comply with the JDBC specification to MySQL. In other words, it’s the “glue” between Java and MySQL that lets you reference a MySQL database from within your servlet or JSP. This connector replaces the org.gjt. mm classes, from which it is derived. The Simple Machines forum (at http://www.simplemachines.org/), written in PHP and using MySQL and released under an open source license, is an up and coming forum; we’re already using it at our save the train forum (http://www.savethetrain.org.uk/forum) and we’re looking to replace the engine behind Opentalk with in too in the next few months.

Winter 2005 www.wellho.net 13 Melksham Accommodation list

AccommodationMelksham We’re in touch with many of the owners of hotels and B&Bs through to luxury hotels, and from quiet suburban bed and breakfast establishments in and near Melksham. accommodation that’s literally a few yards from our training When you book a course with us, we’ll send you a list centre to town centre and countryside locations. of such places that consistently get good reports from our If you’re coming on a course, please contact the establish- trainees, together with a smattering of new places that have ments directly to check on availability of rooms and to make expressed an interest in being on our lists. your overnight bookings with them. And please ask us if you For this edition, we’ve checked and updated all the de- want further advice or suggestions, or if you’re looking for tails, and we bring you a full listing, ranging from simple something a little different, such as camping or self-catering.

Pictured: (top) The Spa B&B is in one of the same centre and easily walked from to our centre. former Spa lodging houses as Well House Consultants and Because a full list of amenities for the accommodations is right next door. (below, left) The Old Manor, a B&B indicated by D on the facing page is too long to fit on these also along Spa Road, is halfway between town centre and pages, it can be downloaded from our web site: http:// our training centre. Conigre Farm Hotel is almost in town www.wellho.net/downloads/WHCaccom.pdf.

14 www.wellho.net Well House Consultants, Ltd. Melksham Accommodation list D Alisa House Fieldways Hotel & Health Club Devizes, Wiltshire SN10 1SS The Crown Hotel Holt Road, Bradford on Avon Hilperton Road Telephone: 01380 828254 12 Timbrell Street Wiltshire BA15 1TR Trowbridge, Wiltshire BA14 7JP Facsimile: 01380 828254 Trowbridge, Wiltshire BA14 8PP Telephone: 01225 862020 Telephone: 01225 768336 www.foxhangers.co.uk Telephone: 01225 774245 Facsimile: 01225 862020 Facsimile: 01225 753649 Lower Lodge B&B www.alisahouse.co.uk The Old Ham Tree Inn D Frying Pan Farm Bowden Hill Ham Green, Holt Angel Best Western Melksham Lane, Broughton Gifford Lacock, Wiltshire SN15 2PP Trowbridge, Wiltshire BA14 6PY Market Place Wiltshire SN12 8LL Telephone: 01249 730711 Telephone: 01225 782581 Chippenham, Wiltshire SN15 3HD Telephone: 01225 702343 Methuen Arms D Telephone: 01249 652615 Facsimile: 01225 793652 The Old Manor 2 High Street Facsimile: 01249 443210 www.rpbp.dsl.pipex.com 48 Spa Road , Wiltshire SN13 0H www.angelhotelchippenham.co.uk Melksham, Wiltshire SN12 7NY Great Chalfield Manor Telephone: 01249 714867 Telephone: 01225 793803 At the Sign of the Angel Melksham, Wiltshire SN12 8NJ Facsimile: 01249 712004 Facsimile: 01225 793803 Church Street Telephone: 01225 782239 http://www.latonahotels.co.uk www.theoldmanor-wiltshire.co.uk Lacock, Wiltshire SN15 2LB Facsimile: 01225 783379 Moorlands Telephone: 01249 730230 The Old Manor House The Coach House, Station Approach Facsimile: 01249 730527 Hatt Farm 73 High Street, Semington Melksham, Wiltshire SN12 8BN www.lacock.co.uk Old Jockey Trowbridge, Wiltshire BA14 9JR Corsham, Wiltshire SN13 8DJ Telephone: 01225 702155 Telephone: 01380 870450 Beckerley View Telephone: 01225 742989 Facsimile: 01225 702155 D Beckerley Lane Facsimile: 01225 742779 www.moorlandsuk.co.uk The Old Rectory Cantax Hill, Lacock, Wiltshire SN15 2JZ Holt,Trowbridge D Newhouse Farm Wiltshire BA14 6QN Heatherly Cottage Telephone: 01249 730335 Littleton Telephone: 01225 782713 Ladbrook Lane, Gastard nr Corsham Facsimile: 01249 730166 Wiltshire SN13 9PE Semington, Wiltshire BA14 6LF www.oldrectorylacock.co.uk Beeches Farmhouse Telephone: 01249 701402 Telephone: 01380 870349 The Polebarn Hotel and Pig Wig Cottages Facsimile: 01249 701412 Old Manor Hotel Holt Road, Bradford on Avon Polebarn Road Trowle Common Wiltshire BA15 1TS Hilbury Court Hotel Trowbridge, Wiltshire BA14 7EG Nr Bradford on Avon Telephone: 01225 865170 Hilperton Road Telephone: 01225 777006 Wiltshire BA14 9BL Facsimile: 01225 863996 Trowbridge, Wiltshire BA14 7JW Telephone: 01225 777393 The Shaw Country Hotel www.beeches-farmhouse.co.uk/ Telephone: 01225 752949 Facsimile: 01225 777990 Facsimile: 01225 765443 Bath Road, Shaw Beechfield House www.hilburycourt.co.uk www.oldmanorhotel.com Melksham, Wiltshire SN12 8EF Beanacre Paxcroft Cottages Telephone: 01225 702836 Melksham, Wiltshire SN12 7PU Hinton Lodge Facsimile: 01225 790275 62b Paxcroft Cottages, Devizes Rd Telephone: 01225 703700 Great Hinton www.shawcountryhotel.fsnet.co.uk Trowbridge, Wiltshire BA14 6JB Facsimile: 01225 790118 Trowbridge, Wiltshire BA14 6BS Telephone: 01225 765838 D The Spa Bed and Breakfast www.beechfieldhouse.co.uk Telephone: 01380 871067 www.hintonlodge.co.uk 402, The Spa Pear Tree Inn Melksham, Wiltshire SN12 6QL Best Western Lansdowne Strand Top Lane The Strand Honeysuckle Cottage B & B Telephone: 01225 707984 Whitley, Wiltshire SN12 8QX Calne, Wiltshire SN11 0EH 95 The Common, Broughton Gifford www.melksham.org.uk/thespa Telephone: 01225 709131 Telephone: 01249 812488 Wiltshire SN12 8ND Facsimile: 01225 702276 D The Tollgate Inn Facsimile: 01249 815323 Telephone: 01225 782463 www.honeysucklecottage.org.uk Ham Green, Holt, nr Bradford on Avon www.bw-lansdownestrand.co.uk Pickwick Lodge Farm Wiltshire BA14 6PX Bythesea Hotel Guyers Lane Telephone: 01225 782326 Boyds Farm Corsham, Wiltshire SN13 0PS Gastard Bythesea Road Facsimile: 01225 782805 Telephone: 01249 712 207 Corsham, Wiltshire SN12 9PT Trowbridge, Wiltshire BA14 8HR www.tollgateholt.co.uk Facsimile: 01249 701 904 Telephone: 01249 713146 Telephone: 01225 776633 www.pickwickfarm.co.uk/ Travel Inn Cepen Park Facsimile: 01249 713146 King’s Arms #267 West Chippenham Way Market Place Red Lion Chippenham, Wiltshire SN14 6UZ Brookside Bed and Breakfast 1 High Street High Street, Rowde Melksham, Wiltshire SN12 6EX Telephone: 01249 462096 Lacock, Wiltshire SN15 2LQ Devizes, Wiltshire SN10 2QF Telephone: 01225 707272 Facsimile: 01249 461359 Telephone: 01249 730456 Telephone: 01380 726394 www.travelinn.co.uk D Kings Stile Cottage Facsimile: 01249 730766 D Church Farm 153 Bath Road, Atworth Ring O’ Bells D Wayside Atworth Melksham, Wiltshire SN12 8JR Chittoe Heath 321 Marsh Road, Hilperton Marsh Melksham, Wiltshire SN12 8JA Telephone: 01225 706202 Bromham, Wiltshire SN15 2EH Trowbridge, Wiltshire BA14 7PL Telephone: 01225 702215 Facsimile: 01225 706202 Telephone: 01380 850695 Telephone: 01225 754404 Facsimile: 01225 704774 Facsimile: 01380 850696 Lacock Pottery B&B Facsimile: 01225 340325 www.churchfarm-atworth.freeserve.co.uk www.waysideofwiltshire.co.uk 1 The Tanyard, Church Street www.ringobells.pwp.blueyonder.co.uk Lacock, Wiltshire SN15 2LB White Hart Hotel Church Farm Holiday Cottages D Springfield Gardens Church Farm, Broughton Gifford Telephone: 01249 730266 2 London Road 29, Kingfisher Drive, Bowerhill Wiltshire SN12 8PR Facsimile: 01249 730948 Calne, Wiltshire SN11 0AB Melksham, Wiltshire SN12 6FH Telephone: 01225 783413 www.lacockbedandbreakfast.com Telephone: 01249 812 413 Telephone: 01225 703694 Facsimile: 01249 812 467 D Conigre Farm Hotel Leigh Park Hotel Facsimile: 01225 703694 http://www.whiteharthotel-calne.com Semington Road Leigh Road West, Bradford on Avon www.springfieldgardens.co.uk Wiltshire BA15 2RA Woodpeckers Melksham, Wiltshire SN12 6BZ The Bear Hotel Telephone: 01225 702229 Telephone: 01225 864 885 Holt Road, Bradford on Avon The Market Place Facsimile: 01225 707392 Facsimile: 01225 862 315 Wiltshire BA15 1TR http://www.latonahotels.co.uk Devizes, Wiltshire SN10 1HS Telephone: 01225 865616 Coppers B&B Telephone: 01380 722444 Facsimile: 01225 865615 21b Leigh Road, Holt Longhope Guest House Facsimile: 01380 722450 www.woodpeckersbnb.co.uk Trowbridge, Wiltshire BA14 6PW 9 Beanacre Road www.thebearhotel.net/index2.html Telephone: 01225 783174 Melksham, Wiltshire SN12 8AG Woolley Grange Hotel Telephone: 01225 706737 The Black Swan Hotel Woolley Green, Bradford on Avon Devon Cottage Facsimile: 01225 706737 Market Place Wiltshire BA15 1TX 16 Leigh Road Devizes, Wiltshire SN10 1JQ Telephone: 01225 864705 Holt, Wiltshire BA14 6PW Lower Foxhangers Farm Telephone: 01380 723259 Facsimile: 01225 864059 Telephone: 01225 782557 Lower Foxhangers, Rowde Facsimile: 01380 729966 www.luxuryfamilyhotels.com Winter 2005 www.wellho.net 15 Mapping your site

To illustrate, visit our “on site course” page for your UK postal area, and the side image will be a map of Britain confirming that we’ve identified the code correctly. Ask for information about a public course, and we’ll give you a map showing how your home town relates distance-wise to our Melksham training centre. It’s all done through PHP scripts, using the GD extension. Perhaps you’re familiar with PHP generating HTML content. A call to the header function allows you to change the content type, and calls to functions such as ImageCreate, ImageFilledRectangle and ImageJpeg let you create a canvas on your server, draw on that canvas, and send it You the browser as a .jpg. are How do we do the maps, though? Through standard grid references. Here’s a snippet here of our postcode file: LE SK585045 Leicester LL SH782822 Llandudno LN SK975715 Lincoln LS SE299340 Leeds LU TL090213 Luton and our grid reference file that tabulates the first two letters: # Grid references - bottom left corner of square # This file contains the two letter codes used by the British To many of us, a # map reference systems. For example, ST914628 is: map is an intensely # From the West 300 x 10 + 914 = 3914 # From the South 100 x 10 + 628 = 1628 valuable diagram # Distances measured in tenths of a kilometre. 0 0 SV SW SX SY SZ TV putting places into 100 100 SR SS ST SU TQ TR context. 100 200 SM SN SO SP TL TM 200 300 SH SJ SK TF TG If you’re a provider 200 400 SC SD SE TA 100 500 NW NX NY NZ OV of web content, it’s 100 600 NR NS NT NU easier than you think 0 700 NL NM NN NO 0 800 NF NG NH NJ NK to provide tailored 0 900 NA NB NC ND mapping information 100 1000 HW HX HY HZ 300 1100 HT HU to your user. 400 1200 HP

16 www.wellho.net Well House Consultants, Ltd. Mapping your site

We use a regular expression (a very easy one!) to break up the eight-character grid refer- ence, and a couple more lines of code to work out a numeric Easting and Northing: preg_match(“/(..)(...)(...)/”,$highpoint,$parts); $xlocn = $twolettersx[$parts[1]] * 10 + $parts[2]; $ylocn = $twolettersy[$parts[1]] * 10 + $parts[3]; and then we work out the pixel position at which we want our marker, and see if it’s actually on the map. In fact, we do this with a series of maps so that we can use the largest scale we have available. $xpixel = ($xlocn - $lhs) * 1000 / ($rhs - $lhs); $ypixel = 1000 - ($ylocn - $bhs) * 1000 / ($ths - $bhs); if ($xpixel < 25 or $xpixel > 975) continue; if ($ypixel < 25 or $ypixel > 975) continue; Then it’s a question of loading the most suitable map backdrop and adding symbols: $im = imagecreatefromjpeg($best); ImageFilledRectangle($im,$xpixel-$symsize,$ypixel-$symsize, $xpixel+$symsize,$ypixel+$symsize,$colour); before sending out the completed image to the browser: header(“content-type: image/jpeg\ncache-control: no-cache, no-store\n”); imagejpeg($im); We are here

Ordnance Survey Grid Reference System

Winter 2005 www.wellho.net 17 Getting from A to B with Apache httpd and Apache Tomcat

You wouldn’t choose an aircraft for a journey of 10 miles, nor a car for a journey of 5,000. Yet both are pieces of transport that will get you from A to B.

18 www.wellho.net Well House Consultants, Ltd. And in a similar vein, you wouldn’t choose Apache Tomcat to serve your PHP web site, nor would you choose Apache httpd to run your online Java banking application. Just as you would use a combination of car and aircraft to get happening. It’s just that the two servers are cleverly configured. It’s from Brecon to Sao Paulo, or from Rome to Alnwick ... so you rather like enquiring about something at the tourist information, would use a combination of Apache httpd and Apache Tomcat to and having the person assisting you asking a colleague, then passing serve your total web presence. The servers are not competitors; each on that colleague’s answer. takes its own place in your jigsaw puzzle. An ongoing http connection works very well for many server set- How can Apache httpd and Apache Tomcat work together to ups, but not for all. Separate connections are established each time bring their combined facilities to bear on the same site? We came a request is referred, and the use of a protocol that’s not designed up with no fewer that eight ways. to closely tie two servers can lead to performance issues. The “con- 1. Different Hosts or ports nector” manual helpfully tells you to try out the options and see 2. Returned locations whether you’ll benefit from going the next step with your particular 3. Mod rewrite metrics. So what is the next step? 4. Mod proxy An ajp (Apache Jserv Protocol) connector between httpd and 5. Mod Jserv tomcat provides a closer link that’s not going to be started up and 6. Mod jk shut down all the time, and has been implemented in a number of 7. Mod jk2 ways; we’re now at ajp 1.3. The original Jserv module was obsoleted, 8. Warp and replaced by jk. Requirements for extra facilities led to the in- As a web site manager, you really want your users to access your troduction of jk2, and then later by warp; however, cross-platform site through a single server name – provide a one-stop shop – so the issues with warp and a setup that’s perhaps overcomplex with jk2 option of different hosts or ports probably isn’t a top choice. Nor is have led to both of them being deprecated, leaving jk as the current returning a different location, as that’s just masking multiple hosts ajp connector. and will lead to some clues in the location bar. No, you want your Code from the jk2 team is being re-used and rolled back into jk, users to contact a single piece of server software on one server, and and jk remains far from a plug-and-play solution with numerous have it refer onwards, transparent to the user, if necessary. installation and configuration options. But it is getting easier for Options 3 through 8 all offer this single point of contact for the the web server administrator to install at each new release. user, and, without exception, that single point of contact is httpd. Our two-day “Deploying Apache httpd and Tomcat” course cov- It’s well suited for receiving a high volume of requests, handling ers the installation and basic configuration of both the Apache web most of them and passing on just the heavy or Java ones to Tomcat. servers, and the connection of them through both modproxy and Mod rewrite and Mod proxy both make an ongoing http con- modjk. Clustering and load balancing are also overviewed, and for nection from httpd to Tomcat. In other words, your original client private courses, the schedule can be altered or extended to include (browser) contacts httpd as a server, which then acts as a browser practicals using our equipment as a server farm, under Linux or in turn and contacts Tomcat as a server. The user isn’t told this is Windows.

Winter 2005 www.wellho.net 19 USING THE INTERNET TO RAISE PUBLIC AWARENESS A training web site http://www.savethetrain.org.uk

to train operating company representatives, and from parish representatives through to “County”, and a sprinkling of campaign and specialist interest groups. It was heart- ening to see how everyone present felt that the decision to slash the services was a poor one, and agreed on moving forward with a publicity campaign both to raise traffic fur- ther on the current service, and to let the decision makers and potential future op- erators know that we care about the service and that it IS used. A 35 percent increase in ticket sales in the year completed just af- ter the invitation to tender was drawn up, and many other recent developments and statistics, rendered the data of a year ago outdated and unduly pessimistic. The web site uses the subjects we teach to help provide a changing interesting and informative read. See how the Next Train indicator changes during the day and know which weekends buses are running instead. See how the page top banners change, al- ways showing you a crowd of people using the service. See how the Stop Press banner changes frequently so that new arrivals to any page can be greeted with an urgent serv- ice message. Support and petition forms, of course, are more obviously server-side pro- grams. Then we’ve got a blog using Move- able Type, and a forum using Simple Ma- chines (SMF). Are we going to “Save the train”? I don’t know. This isn’t an easy battle to have cho- We’reWe’re 90 minut minuteses b byy a lotlot more.more. My keykey sen, but I DO know that the people at Mar- traintrain fromfrom London and 210210 communication v vehicle?ehicle? sham Street - the Department for Transport minutesminutes bbyy NNationalational ExpressExpress A webweb sitesite http://www.savethe-http://www.savethe- HQ - will now have heard of Melksham and Coach.Coach. So manymany of our traineestrainees train.org.uktrain.org.uk used in association with its case when they come to decide where arrivearrive bbyy trtrainain that it’s become a local newspapersnewspapers and rradio,adio, leafleafleting,leting, lelet-t- to award the franchise, and how to vary regularregular run forfor us toto meetmeet them at terter writing and mormore.e. it based on feedback that wasn’t available the local station at Melksham, either on the What have I learnt so far? That the whole when it went out to tender. evening before their course starts, or on the situation is very complex. The existing serv- morning itself. ice is already used far more than I imagined So you can imagine our displeasure at and would cause some real hardships, and finding that there’s a proposal to withdraw not just to us, if the service was to be slashed all but a single rush hour train through as proposed. Melksham from the end of 2006. It’s not We opened up our training centre to a a decision that I want to take lying down. public meeting in September; we got so To combat this, I’m getting publicity for the many people along that we had to take out current service, and learning about usage the conference tables and equipment and patterns, railway service franchising and fi- borrow 35 collapsible chairs, and the room nancing, local and government politics, and was full. Everyone turned up, from users

20 www.wellho.net Well House Consultants, Ltd. Back Issues All back issues are available by post to UK addresses at no charge. Please phone or email us for a copy or two. Copies of recent editions are also available to download from our web site: http://www.wellho.net/net/ofcourse.html.

Issue 1 Case Study - MPC Data embed MySQL Issue 8 Winter 2000/01 More Dynamic than an array Spring 2004 8 pages Expect / Tcl application 24 pages Perl Whirl 2000 - An Book review - “The Java Cookbook” PHP: What do the Alaskan Adventure letters stand for? Wellhokommen, Issue 5 Choosing which OS Bien Venue Autumn 2002 OO design Tcl/Tk and Expect 16 pages What’s a polecat? Handling Huge Data RegEx Hidden costs - Sample script Tcl up to date Quality matters Book Review - The Learning Perl as a Objects in Perl “New Camel” fi rst language Who teaches the teacher? The London and Dublin connection YaBB Python on either side of the pond Perl for Larger Projects Tk - updates of your Broadband Access for the Traveller screen Logging in to the BT Openzone service Issue 2 Portable PHP code Dining out in Melksham Spring 2001 Using PHP in stand-alone applications Brag Page 16 pages Running scripting languages fast References and variables in Perl Quiz - Perl, Java Open Source Bulletin Board What do you put into a fi le? and Tcl What defi nes quality software? Using FTP from Perl Issue 6 Getting to the core price of Fedora In and around Spring 2003 HTTP Developer’s Handbook Melksham 16 pages Blistering Speed Perl 6 introduction Issue 9 right to the laptop Public sector data Autumn 2004 What’s the latest When size matters 24 pages software version? Data Mining Legal aspects of a Is Open Source right for you? Online e-commerce web site Focus on Perl Standards Spring Cleaning Short tags in PHP Web logs and market research 10 relevant projects The speed of three from SourceForge A numbers riddle Issue 3 Coding tips Handling huge data Autumn 2001 Latest Versions PHP5: Switch? 16 pages Apple get it right Web site visibility Behind PHP Introducing our loo Mint under the pillow Java for a chat room Sample application in Perl Dynamics of web pictures What is XML? Data Protection act - buyer beware Extreme Programming Relating to MySQL Setting up Mac OS X OOP DeMYSTiFieD Access to Gaelic A rogue’s gallery of recent students Wireless networking Issue 10 Sessions and State Issue 7 Spring 2005 On the Oban road Autumn 2003 24 pages Perl 6 - State of the Onion 24 pages Geekmas greetings Are you under attack from Codered? PHP sticky boxes Java course notes Perl 5, Ponie, Perl 6 now available free Issue 4 SQLite Navigation skills Winter/Spring Python and Jython Travelling the world 2002 Opentalk - Tcl, Perl, Embedding Layers 16 pages PHP, Java, MySQL Libraries, real/virtual Keeping data secure Broadband update Who tends MySQL? Extracting text from Course materials Seat pricing GUI in Tcl/Tk Microsoft Word Open Source moves forward You can do a lot with a little Python documents in Perl Data structure design - link or copy? Cruising with the Geek gods Improved security in Deployment training - new growth area? Make your site’s URLs more friendly PHP 4.1 Latest stable versions of open source Simplifying complex joins Daemons Course schedule and calendar WHC welcomes new employee, Leah Cookies - European law and regulations Tailoring your web site Apress’s distinctive looks fi lling shelves The Parrot virtual machine Not only faster, but bigger too. Distributing open source applications

Winter 2005 www.wellho.net 21 Schedule Perl with a particular study of MySQL. language including Expect, libraries and Perl Programming 17-20 January 2006 regular expressions. Further topics cov- 5 days £1210 13-16 March 2006 ered on the course include writing your Covers the major features of the language 9-12 May 2006 own commands (procs), packages, librar- and their use for newcomers. This course Object Oriented Programming with PHP ies, namespaces and other - you’ll leave the now runs in conjunction with Learning to 1 day £330 course with a thorough grounding in Tcl. Program in Perl and covers version 5, with This advanced PHP course introduces 6-8 February, 2006 footnotes where appropriate to tell you you to object oriented programming prin- 22-24 May 2006 about Perl 6. ciples, and teaches you how they are imple- Tcl - the Tk Toolkit 12-16 December 2005 mented in PHP. 2 days £550 6-10 March 2006 4 November 2005 Covers widgets, geometry managers and 12-16 June 2006 17 March 2006 event handlers of the Tk GUI so you can Using Perl on the Web 7 July 2006 write and maintain graphic applications. 2 days £550 MySQL Relational Database 9-10 February 2006 This advanced course takes the Perl 2 days £550 programmer through to making full use of Structure, installation, administration, General Perl on the Web. CGI, mod-Perl, standards. database design and programming. Regular Expressions Sessions, cookies, content management, 21-22 November 2005 1 day £330 etc. 30-31 March 2006 Dedicated to pattern recognition and 17-18 November 2005 matching, dependent on recognizing 18-19 April 2006 Apache and Tomcat sequences of characters. Perl for Larger Projects Deploying Apache and Tomcat 17 February 2006 3 days £770 2 days £550 Deploying LAMP – This advanced course takes the Perl How to source, install, configure and Linux, Apache, MySQL, Perl / PHP programmer through the facilities provided support Apache and Tomcat for the deploy- 4 days £990 in the language which make it particularly ment of Java web applications. Installing and supporting applications suitable for larger projects. Objects, huge 17-18 November 2005 under open source technologies. data, SQL databases, XML, efficiency and 23-24 November 2005 6-9 December 2005 other topics. 12-13 January 2006 3-6 April 2006 14-16 November 2005 20-21 April 2006 Or, take them individually: 10-12 April 2006 8-9 June 2006 Linux Basics day 1 (£330) Linux Administration day 2 (£330) PHP and MySQL Python Linux Web Server days 3&4 (£550) Technology for PHP Python Programming Programming in C and C++ 1 day £330 3 days £770 13-14 February 2006 £550 Overviews the technologies that you’ll This Python course starts at the funda- C and C++ Programming need to make good use of PHP. A lead-in mentals, then studies collections, functions, 13-16 February 2006 £990 day for our PHP Programming course. modules and packages, and the use of and C++ for C Programmers 16 January, 2006 creation of data types, plus an overview of 15-16 February 2006 £550 8 May 2006 OO principles and an introduction to de- Extra Days PHP Programming velopment environments and resources. If you want to cover extra topics on Perl, 4 days £990 9-11 January, 2006 PHP, Python or Tcl/Tk that aren’t included PHP is a scripting language used to add 27-29 March 2006 in the public course, we can schedule a one- executable content to Web pages. This 5-7 June 2006 on-one with you at £440.00. Please email or course covers the fundamentals of PHP, phone us with your requirements. such as linking a series of forms together Tcl into a session, maintaining state, cookies, Tcl Programming Prices valid for bookings confirmed by 31 December security and other matters. We also cover 3 days £770 2005. See Web site for US dollar and Euro prices. PHP’s interfacing to relational databases, Fundamentals of the Tcl programming Prices do not include VAT.

22 www.wellho.net Well House Consultants, Ltd. Calendar Public scheduled courses are shown in tan. Open dates indicated as a guide only and are reserved for private, on-site courses. If you have three or more students and would like a course custom-tailored to your needs, please phone us to make sure the dates are still available. The office is closed for Christmas and Easter holidays.

NOVEMBER 2005 FEBRUARY 2006 PHP PHP 31 1 2 3 4 30 31 1 2 3

TCL TK 7 8 9 10 11 6 7 8 9 10

Perl Apache C/C++ RegEx 14 15 16 17 18 13 14 15 16 17

MySQL Apache 21 22 23 24 25 20 21 22 23 24

28 29 30 1 2 27 28 1 2 3

DECEMBER 2005 MARCH 2006 LAMP Perl 5 6 7 8 9 6 7 8 9 10

Perl PHP PHP 12 13 14 15 16 13 14 15 16 17

19 20 21 22 23 20 21 22 23 24

CLOSEDBANK HOLIDAY BANK HOLIDAY Python MySQL 26 27 28 29 30 27 28 29 30 31

JANUARY 2006 APRIL 2006

CLOSEDBANK HOLIDAY LAMP 2 3 4 5 6 3 4 5 6 7

Python Apache PERL CLOSEDBANK HOLIDAY 9 10 11 12 13 10 11 12 13 14

PHP PHP CLOSEDBANK HOLIDAY PERL Apache 16 17 18 19 20 17 18 19 20 21

23 24 25 26 27 24 25 26 27 28

30 31 1 2 3 1 2 3 4 5

Winter 2005 www.wellho.net 23 Major web site update: same great stuff, just better organised, easier to navigate If you’ve visited our web site recently, you’ll try – that’s our Blog – will be available by find a new look and theme throughout. Our date, by general subject area (theme) and -rwxr-x--- site has grown from six to 60, then to 600 and by subtopic down to which part of which now to 6,519 pages. Because of this growth, training module it refers to. And that’s in Knowing your r’s the ideal navigation structure for a site with a addition to our search facility that uses tech- from your x’s few dozen pages had been stretched almost to niques such as metaphones and levenshtein breaking point as the site became a few thou- distances to help you to the right place even What does -rwxr-x--- mean in the out- sand pages long. The information is all there, if you’re not sure of a spelling. put of a Linux ls (list symbols) command? but the user needed better tools for quickly Mining The first character indicates the type of locating the content he wants through a more Yesterday, we had 31 visitors to our site as file system object that the line describes, and consistent interface. a result of a search for “mysql left join” and the commonly found characters are: Some of the techniques we’re using to 30 who searched for “perl ftp”. Twenty-sev- a regular fi le keep more than 6,000 pages manageable: en searched for “posix regular expressions” - Next and last and 25 for “php string”. d a directory Over the years, pages had been added by Did each of these people arrive directly at using a “leaf and branch” directory structure, the right page for them? It’s unlikely. We’ve 1 a symbolic link with content lists and indexes at each level. got a lot of examples and good content and, Each index had been of a format appropriate chances are, they got close. But we can help You then have three groups of three char- to the specific content indexed. them do better. Our new navigation tools acters, which describe who can do what with On the new site, you’ll find consistent in- are aware of the search terms that users the file system object: dexing and “next” and “last” buttons that let entered to get to our site, and will suggest you move through associated content without other pages that might be appropriate, and what the user the need to (re)visit the index. You’ll also find relevant indexes too, to help them find ex- fi rst 3 positions (owner) can a navigation indicator to tell you where you actly what they want in the shortest number do are and let you jump several levels. of clicks possible. middle 3 posi- what the group History Office system links members can tions do We’re holding your history. Did you see The site now includes connections to something useful a couple of pages back? our office systems. If a course fills, the date what the other fi nal 3 users of the Then you’ll be able to return to it with a sin- is removed from the “next available dates” positions system can do gle click by choosing its title. page. If a private course is booked, the on- Double indexes line diary is changed to reflect it. A link for Would you like pages indexed by category, our staff gives further booking details. Within each of the three groups, read as or by subject and subtopic? You have both Exciting? Yes, and it’s an enabling update follows: available to you now. A “Horse’s Mouth” en- too. Just wait and see what’s to come next! r or - fi rst character an r indicates Your Contacts at Well House Consultants: readable Administration Lisa Ellis [email protected] second w or - Technical Graham Ellis [email protected] a w indicates character writeable Accounts/Contracts Leah Davies [email protected] or Phone +44 (0)1225 708 225 0845 8382 404 (Lo-call) x - an x indicates Fax +44 (0) 1225 707 126 0845 8382 405 (Lo-call) third character executable for Web site http://www.wellho.net a plain fi le or Postal Address 404, The Spa, Melksham, Wiltshire, SN12 6QL axessible for a directory Our office hours are 08:00 to 18:00 Monday to Friday. You’ll usually reach us at the weekend and in the evenings, too, as phone mes- If you see an s or a t (lower case) in the sages and faxes are emailed to us automatically. If you email us, we’ll receive your third position, it indicates that the “x” is set, email within 24 hours, 365 days a year. and conveys additional information for the This newsletter is published by Well House Consultants Ltd. and is distributed administrator. If you see an S or a T (upper free. Please contact us if you’re reading someone else’s copy and would like to be case), it indicates that there is not an X set. added to the circulation list, or if you would like to be removed from our list. Note that write permission to a direc- All material in this newsletter is copyright Well House Consultants Ltd., and may not be reproduced tory allows the person with that permis- in any form or by any means electronic without prior written permission of Well House Consultants sion to add files to the directory and delete except in the case of brief quotations embodied in critical articles and reviews. Well House Consultants files from within it, even if they don’t have has attempted throughout this publication to distinguish proprietary trademarks from descriptive terms by any access right at all to the actual file being following the capitalisation style used by the manufacturer. deleted.

24 www.wellho.net Well House Consultants, Ltd.