July 04, 2009

Westbury Bypass Refused - looking forward

The report of The Public Enquiry into the proposed Westbury Bypass was published a couple of days ago, together with the Secretary of State's decision based on that report. As someone who attended the enquiry briefly and made a statement, I have received a copy of the various papers from the Department for Transport, and from the Department for Communities and Local Government.

In summary, the enquiry recommended that the planning application by Wiltshire (County) Council be refused, and the Secretary of state agreed with that recommendation. Formally "He hereby refuses planning permission for the construction of a new single carriageway road with a climbing lane over part of the route, roundabout junctions, associated infrastructure and works in accordance with application number W.07.09002 dated 14th February 2007."

The covering letters and reports are in two sections - those relating to the Department for Transport and those relating to the Department for communities and local government. They are online:

Transport:
letter - http://www.gos.gov.uk/nestore/docs/transport/laos/westbury_ltr.pdf
report - http://www.gos.gov.uk/nestore/docs/transport/laos/westbury_report.pdf

Local Government:
letter - http://www.communities.gov.uk/documents/planning-callins/pdf/1271537
report - http://www.communities.gov.uk/documents/planning-callins/pdf/westburybypassreport.pdf

Public Enquiries such as this have tended to come down on the side of the official authorities who propose them in the past; such authorities have the full time team to present an excellent, logical case, the access to expertise, and access to taxpayer's money to fund the presentation of the case. They are the Goliaths at such enquiries. Organisations who oppose do not have access to the official funding, and are very much on their back foot through the procedure as they have to be reactive rather than pro-active, prepared for any "curved ball" which the proposing authority throws at them, and within their own funding. They are the Davids.

So the result is a bit of a surprise ... I'm not sure what proportion of such enquires recommend a rejection of major proposals into which so much time and public money has gone (millions of pounds that could have bought a train service for many years) ... but it's certainly something of a surprise. It is important to study the reasons given (summary), but it is doubly important now to look forward, and say what can and should we be doing for transport flows in this corridor, now with the changed metrics brought about by the refusal.

Local (i.e. council tax payer's) funding of the rejected bypass would have accounted for some 10% of the scheme's cost. We may now have a golden opportunity to look at how that money saved can be used, never the less, to meet the objectives of improved journey times through Wiltshire by both private and public transport, and reduced traffic levels through Westbury and elsewhere resulting in an improved environments there.

One such scheme is an appropriate passenger train service on the parallel railway - see here; that should be enhanced by better integration of different transport modes, which can be done at very little cost (and in some cases cost saving) ... encouraging people to use public transport where they can with a carrot rather than with a stick, in so doing reducing the number of vehicles using the current road network, leaving it clearer for those journeys for which there is no sensible alternative than private motor vehicles.

Posted by gje at 10:48 AM | Comments (0)

More about Graham Ellis of Well House Consultants

July 03, 2009

winmail.dat enclosure ... reading on an Apple

I use an Apple Mac ... run OSX ... and I have that problem of how to deal with applications data files. I have become a passed master at Word documents and Excel spread sheets! How about an attached file winmai.dat?

winmail.dat is used by thing like Microsoft Outlook ... so you can easily read it if you have Microsoft Outlook too. But I haven't.

Solution? TNEF's Enough from http://www.joshjacob.com/macdev/tnef/.

Drag and drop (sorry - this is a Mac world solution!) your winmai.dat file onto the application, and it'll be revealed to be a container like a tar or zip of stuffit file with loads of other files held in it. Click on the one you want (sorry - this is a Mac solution!) and you can get at that individual component.

Posted by gje at 06:47 PM | Comments (0)

July 02, 2009

Travelling


Six trains ... a bus ... four walks ... and a day's work too. Still - as you can see from above, a wide variety of places!

Posted by gje at 10:44 PM | Comments (0)

July 01, 2009

A chance to do the tourist thing

Just occasionally, work takes me to exactly the right place at exactly the right time ... and so it was this evening when after a good day's work I had a chance to let my hair down, join the leisure visitors, and have a look around York ... with some lovely lighting effects


Point of arrival in York


River


Maltings Pub


City Centre


Geese


Wall


Minster


A Pie and Pint to finish the day

Posted by gje at 09:36 PM | Comments (0)

June 30, 2009

Learning about others private lives

The woman sitting next to dad is worried about tomorrow's meeting now that Emily has had to pull out ... she wonders if Lucinda can go on her own and how that can be turned to her advantage. She left a curry in the bottom of the fridge, but is having her son check to make sure that it doesn't have cashews in it by carefully going through the ingredients. And she wants to be sure that he's going to be doing school work while it heats up, and before she gets home. He came second in today's singing competition, but it seems rather less well in the sports - but "it's the taking part that's important".

Only one carriage on the National Express train from London King's Cross to York (and on to Edinburgh) was designated a "quiet carriage", and judging by the number of people using their mobiles, that's about the right ratio. Dad and I sat there, hot and sweaty (the train was an old "125" with the air conditioning our of action in some carriages, and the people packed in to the remaining ones).

I used to treasure travel time as a time to regroup, to think, to make notes, to learn. And not really a mobile communications centre. I suppose I still do ... I used National Express's Wifi to check in briefly, then learned about my fellow passengers, as you can see from above. Was I snooping on them? Hardly - I couldn't but help learn all these things - there were no ear plugs provided at our seat, and certain speakers can probably penetrate ear plugs anyway.

Posted by gje at 06:36 PM | Comments (0)

Mysqldump fails as a cron job - a work around

Here's a curiosity ... running a mysqldump as a crontab job, nothing happens on one of our servers. Now I HAVE included the full path to the executable file in my crontab line, and I have redirected the output to a full path ... so something else is tripping it up.

What do I do? An Internet search and I discover that I'm not the first to have the problem (I didn't expect that I was) and that although no definite solution has been found on the places that I'm visiting (someone ditched MySQL and went to PostGRESql instead!!). it's suspected as being something to do with the rudimentary shell environment that cron provides.

I'm on a time-scale today, so rather that spend a long time finding out what was happening, I decided to spend a shorter time achieving what I needed in another way (a.k.a. a work around!). By writing a short script that includes the MySQLdump, I can get the MySQLdump to run under a full bash shell. And I can easily call up that script from cron.

Problem not explained / solved exactly ... but I have achieved what I need.

Posted by gje at 08:05 AM | Comments (0)

History is not always pretty

Around 200 years ago, Melksham was the largest town for many miles around - it dwarfed even places like Swindon. However, in the Victorian age it grew very much slower and it hasn't caught up yet. So looking around the town you'll find, hidden in odd corners, a very great deal of history.

This particular building backs on to the High Street - close to the rear of Asher's Cafe, and it seems to be a piece of history that's just lying discarded. And it's not alone

From the town centre, there used to be pathways to neighbouring towns. Some have become roads (and quite major ones). Others, such as Stratton's walk, have decreased in their importance into mere local alleyways, such as Stratton's Walk. If you follow the path beside the Baguette bar, you'll go through this uninviting passage then come out onto suburban roads and go past the Co-op ... following futher, I suspect it leads into the path to Redstocks, Rowde and Devizes although with some sections missing.

But the section n town ain't pretty!

There are other cut through / alley ways that also have historic significance - but are a little further out and a little greener. Hardie Walk follows the path of the Old Wilts and Berks canal. Well - at least it's green on one side, but wouldn't it be so much more welcoming if there was indeed still a canal here?

Posted by gje at 07:44 AM | Comments (0)

June 29, 2009

Tcl - nice and nasty

Tcl is a lovely engineers language ... but goodness you can do some nasty things with it, and write some unmaintainable code.

set count 1
foreach type {if while} {
  $type {$count < 5} {
    puts "yay $type $count"
    incr count
  }
}

Which runs as follows:

earth-wind-and-fire:~ grahamellis$ tclsh tty
yay if 1
yay while 2
yay while 3
yay while 4
earth-wind-and-fire:~

A sign of a pure interpretative language ... the code changing from an if to a while as it runs. Is this:
a) An example of how you should NOT write code
b) An example of polymorphism when you least expect it
c) A feature looking for a benefit
d) All three of the above
And the answer is, of course, (d)

Posted by gje at 09:54 PM | Comments (0)
Useful link: Tcl training

June 28, 2009

Important - the future of Melksham / Chamber of Commerce

There's a difference between 'urgent' and 'important' ... and one of the things that we sometimes do is get bogged down in the urgent without looking ahead to the longer term important. Here is a piece I have just written for the "Party in the Park" program ...

A message from the Melksham Chamber of Commerce and Industry

Did you realise that there are over 400 businesses in Melksham - from the large companies such as Cooper Avon and Knorr-Bremse through to sole traders working from home? Did you know that if you phone to respond to a charity appeal for an international emergency you may be calling Melksham, or that if you want to learn how to program for computer games, you could end up on a course in the town? Whether you're shopping in the town centre or contacting a firm in one of the industrial areas ... whether you're shopping on line or in person ... whether you're buying a product or a service ... Melksham has a great deal to offer.

We live in changing times. The recession has dramatically changed the operating model of many businesses, but there are local factors too. Melksham is earmarked to grow, with 100 acres marked for probable development. Traffic on the A350 will surely increase if and when Westbury is bypassed and the route becomes more attractive for lorries that currently travel through Bath. Recent changes in local government mean that the old District Council's functions have been taken over by the new unitary Wiltshire Council, with an 'Area board' covering Melksham Town and the surrounding area having its first meetings this Spring.

I was elected as president of the Melksham Chamber of Commerce late last year. I'm passionate about the town, and its future. Melksham is a diverse, friendly town and I am proud to represent it, to advocate its case for the future, and to encourage and help its businesses for the present through advise and networking. And I am delighted to admit that by helping Melksham, I help my own business - customers who buy in Melksham don't do so just from a single source - with a wide ranging, attractive and friendly combination of shops and services, they make Melksham as a whole their destination.

Melksham Chamber of Commerce is organising the "Spot the Oddity" competition for local traders that's running until 31st July in parallel with the Carnival and Party in the Park. That brings more visitors to town centre shops. We will be representing the businesses of the town at the West Wilts show from 23rd to 25th July in Trowbridge. We are organising a new businesses competition - a prize of 1000 pounds is offered for the Melksham area, with the winner going forward to the Wessex Association of Chambers final for a possible further prize. And we put the case for the town's businesses at meetings as diverse as the police budget consultation, town centre improvement committees, and planning hearings. At times the process may feel slow, yet I can already look back having been the President for just a few months and say that we can and do make a difference.

If you're a local business that's not already a member of the Chamber, then please join us. We're looking at the future of the town - where we will be in a year, or five, or ten. Do we want Melksham to be a dormitory town for Greater Chippenham and Greater Trowbridge, or a town with its own heart? Do we want a town centre that's throttled by traffic trying to park, a town centre that's mouse-quiet while traffic clogs up the bypass, or something else? The direction we take things may not be urgent, this week or next - but it is important for our future and our children's future.

See Upcoming Melksham events including Chamber of Commerce ones!


Melksham Chamber of Commerce and Industry - founder member of the Wessex Association of Chambers of Commerce.

Member services and benefits include:
* Regular networking with other local businesses
* Promotion and publicity for members
* Have a voice on local issues, and up to a national level with Wessex Association backing
* Regular training days on anything from Waste disposal to health and safety (often in association with other towns)
* Discounts and special deals for members from other members - 'worth hundreds'

We are open to all businesses no matter how small; membership fees are on a sliding scale based on the number of employees.

If you are reading this article ... email me if you are thinking of joining ... if you're a Melksham business, you should!

Posted by gje at 10:50 PM | Comments (0)

June 27, 2009

Grouping rows for a summary report - MySQL and PHP

It's quite quick and easy to write a loop that goes through a mysql result set and displays the content on an HTML page (but remember security of data, size of resulting HTML page, and the need to consider special characters such as <). But what if you want a shorter report, grouping records together in summarising blocks?

One way of grouping records - highly efficient if it provides the facilities you need - is to use the GROUP clause in your MySQL select statement. More flexible but slower, you can group within your web application. This example is in PHP, but the principles are the same for other languages.

Where you are counting records, you start off with an immediate 'problem'. When you have generated your first potential output, based on your first input record, it is exactly how I have described it - a potential output. You can't actually output it until later - when you have read in the next record to see if you need to increment the count, and realised that the next record is part of a new batch to be counted separately.

The solution to this problem? You save the record for output (in my example in the variable $prev_line) and a separate counter, and only when you find data that starts a new batch do you output the old one. Care must be taken to avoid a zero (null) record being output at the very beginning, and to flush the final record from $prev_line once you have completed the processing of your data set.

Here's the method I describe in (tested) source code:

<?php
mysql_connect("localhost","[username]","[password]");
mysql_select_db("[database]");
$rset = mysql_query("select ... order by ...");
 
$html = "";
$prev_line = "";
$tlc = 0;
 
# Fetch each row in turn
 
while ($row = mysql_fetch_row($rset)) {
 
  # Make up a (potential) row
 
  $line = "<tr>";
  foreach ($row as $item) {
    $icook = htmlspecialchars($item);
    if ($icook == "") $icook = " ";
    $line .= "<td>$icook</td>";
    }
 
  # If this is a new row, output any PREVIOUS
  # The store the current as "previous"
 
  if ($prev_line != $line) {
    if ($prev_line != "") {
      $html .= "$prev_line<td>$tlc</td></tr>"; }
    $prev_line = $line;
    $tlc = 1;
 
  # And if not a new row, add one to the count
 
  } else {
    $tlc++;
  }
}
 
# When done, add final row to output
 
if ($prev_line != "") {
  $html .= "$prev_line<td>$tlc</td></tr>";
  }
 
?>
<html>
<head>
<title>IP addresses of posts</title>
</head>
<body>
<table>
<?= $html ?>
</table>
</body>
</html>

You might want to add a further 'special case' to handle a completely empty result set rather than producing a blank table, and you might want to add a set of headers to the table so that you know which column is which.

Note that the algorithm used in this example relies on the MySQL query returning all the records in a grouping in a single clump - you would do this by making sure that your ORDER clause was appropriate. If it is not practical to clump in this way, you would keep all the resultant rows in an associative array, which you would sort prior to generation of the HTML. If you need to do that, it's a further reduction in efficiency (may not be a problem) and a further shift of logic from the MySQL engine to the PHP one.

Here's some sample data - from reporting on forum log files. For privacy reasons, I am only providing sample rows for my own user name ... and I have provided an expanded example which has also noted the first and last timestamp on each IP.

1grahame66.14.122.1341Fri, 26 Sep 2008 02:15:59 +0100Fri, 26 Sep 2008 02:15:59 +0100
1grahame66.59.98.2107Sat, 20 Sep 2008 19:45:12 +0100Sun, 21 Sep 2008 15:19:09 +0100
1grahame68.101.40.1001Sat, 11 Aug 2007 13:33:21 +0100Sat, 11 Aug 2007 13:33:21 +0100
1grahame69.85.104.479Fri, 20 Mar 2009 11:35:18 +0000Sun, 22 Mar 2009 18:49:14 +0000

Posted by gje at 05:57 PM | Comments (0)
Useful link: PHP training

Well House Consultants Ltd.
Copyright 2009