Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
Relative or absolute milkman

Rather contrary to current trends, we've just started taking regular deliveries of milk (+ bread + eggs) at our training centre from the local milkman. As we grow busier, it's more effective to have someone deliver to us as part of his round rather than having to make a special trip out. And our "mint on the pillow" approach to training means we really want to provide real milk rather than powder for the real coffee.

Monday's delivery - ace. Fine. AOK. A little bit of a stocking up order for the start of (another) busy week. For this morning, we asked for 5 pints of semi-skimmed milk. Sure - we got them. And a pint of Channel Island. And a pint of full fat. And bread. And eggs ...

At first thought - had our instructions been ignored? No - it turns out that our Milkman took our instruction as a relative path (i.e. changes from what we had on Monday) rather than an absolute path. Perhaps we should have written C:\ or / on the front of the order?

Why is this relevant to Horse's Mouth? Because so often people write their programs using a relative path when they would be better using an absolute, or vice versa, and it's a reminder worth making. Just this morning, I answered a question on Opentalk where my writer was having problems, I suspect, because of a changed current directory and a relative path.

When we look at file handling in Perl (or take a second or even a third look) - or when we get involved with file handling in PHP or Python or our other languages, we always try to stress careful file name selection in order to ensure that the user's script works correctly no matter what their current directory. I think I'll start telling my "milkman story" to help people appreciate the importance.
(written 2004-11-10 08:15:14)

 
Associated topics are indexed under
H109 - PHP - Input / Output
P207 - Perl - File Handling
Y110 - Python - File Handling

Back to
A Parallel for Perl 6
Previous and next
or
Horse's mouth home
Forward to
Expiration dates or times on web pages
Some other Articles
History around you
A case of case
The next generation of programmer
Expiration dates or times on web pages
Relative or absolute milkman
A Parallel for Perl 6
Avoid the wheel being re-invented by using Perl modules
Training notes available under Open Distribution license
Friday, busy week!
URLs - a service and not a hurdle
2259 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

© WELL HOUSE CONSULTANTS LTD., 2009: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho