
Lisa and I came across this impressive array of locks on what we have since learned is probably the
back gate to the National Grid's Lacock Switching Station, about 3 miles North of Melksham.
[picture/details]
Our first reaction was "wow - that must be REALLY secure - what
are they doing in there?" as we imagined a group of five people all having to turn up and the same time in that bleak and desolate spot, with high power electricity pylons humming above to get into the place.
But a careful look at the picture later leads me to think that if any one of those locks in undone and the holding bar that it locks is removed, the over bars will slide to the left and the main bar can be removed; rather that been a very secure site indeed, there are simple five locks there so that the electric people, the water folks, the fire brigade and two others (the local council have powers of entry almost everywhere, so they probably have a key, and perhaps the ambulance service) can each gain access without having to wait for the others.
It's very common when writing code to link up conditions using
and and
or operators - in some languages written as
&& and
||, and it's quite tricky sometimes for newcomers to get their head round the enormity of the difference between then. I think I'll use this picture on future courses.
I have concluded that locks probably do work with "or" not "and" for another reason. The chain looks pretty flimsy, and a good pair of bolt cutters would get you past the gate in a jiffy. It's highly unlikely that such a lowgrade chain would have been used if the security of five locks all to be opened at the same time HAD been what this mechanism was about! (written 2010-01-17, updated 2010-01-20)
Associated topics are indexed under
Q101 - Object Orientation and General technical topics - Programming Principles [3551] Some terms used in programming (Biased towards Python) - (2011-12-12)
[3548] Dark mornings, dog update, and Python and Lua courses before Christmas - (2011-12-10)
[3542] What order are operations performed in, in a Perl expression? - (2011-12-07)
[3456] Stepping stones - early coding, and writing re-usable code quickly - (2011-09-24)
[3026] Coding efficiency - do not repeat yourself! - (2010-11-02)
[2964] An introduction to file handling in programs - buffering, standard in and out, and file handles - (2010-09-21)
[2915] Looking up a value by key - associative arrays / Hashes / Dictionaries - (2010-08-11)
[2878] Program for reliability and efficiency - do not duplicate, but rather share and re-use - (2010-07-19)
[2769] Easy - but for whom? - (2010-05-18)
[2737] Improving your function calls (APIs) - General and PHP - (2010-04-24)
[2550] Do not copy and paste code - there are much better ways - (2009-12-26)
[2510] The music of the stock market - (2009-11-22)
[2415] Variable names like i and j - why? - (2009-09-22)
[2327] Planning! - (2009-08-08)
[2310] Learning to write high quality code in Lua - (2009-07-30)
[2228] Where do I start when writing a program? - (2009-06-11)
[2022] Pre and post increment - the ++ operator - (2009-02-03)
[2001] I have not programmed before, and need to learn - (2009-01-19)
Q110 - Object Orientation and General technical topics - Programming Algorithms [3451] Why would you want to use a Perl hash? - (2011-09-20)
[3102] AND and OR operators - what is the difference between logical and bitwise varieties? - (2010-12-24)
[3093] How many toilet rolls - hotel inventory and useage - (2010-12-18)
[3072] Finding elements common to many lists / arrays - (2010-11-26)
[3042] Least Common Ancestor - what is it, and a Least Common Ancestor algorithm implemented in Perl - (2010-11-11)
[2993] Arrays v Lists - what is the difference, why use one or the other - (2010-10-10)
[2951] Lots of way of converting 3 letter month abbreviations to numbers - (2010-09-10)
[2894] Sorting people by their names - (2010-07-29)
[2617] Comparing floating point numbers - a word of caution and a solution - (2010-02-01)
[2509] A life lesson from the accuracy of numbers in Excel and Lua - (2009-11-21)
[2259] Grouping rows for a summary report - MySQL and PHP - (2009-06-27)
[2189] Matching disparate referencing systems (MediaWiki, PHP, also Tcl) - (2009-05-19)
[1949] Nuclear Physics comes to our web site - (2008-12-17)
[1840] Validating Credit Card Numbers - (2008-10-14)
[1391] Ordnance Survey Grid Reference to Latitude / Longitude - (2007-10-14)
[1187] Updating a page strictly every minute (PHP, Perl) - (2007-05-14)
[1157] Speed Networking - a great evening and how we arranged it - (2007-04-21)
[642] How similar are two words - (2006-03-11)
[227] Bellringing and Programming and Objects and Perl - (2005-02-25)
[202] Searching for numbers - (2005-02-04)
Some other Articles
A healthy, local breakfast in MelkshamYour PHP code does not work? Here is where to start looking.Freddies Wood and the K and A CanalBowerhill as a cycling communityAnd and Or illustrated by locksConsultation in Melksham, on Melkshams futureMelksham Food and Drink Festival, 2010Reducing image size on digital photos - PHPStarting to arrange the picture librarySnow scenes - and how snow effected our business