1 | 2

1 - 5   [7]

Return To The Severn

Relates to Surfing

Just come off a weekend of eventful bore surfing back on home turf in the River Severn. The four days of large spring tides were made all the more enjoyable by the presence of two of our French counterparts, Fabrice and Bruno, from the Gironde Mascaret surfers. The bore was not at its best, with the estuary, my preferred playground, out of action besides several ankle snappers. But the river itself offered some long rides, with a number of the local crew breaking the 2 mile mark for the first time. Our one regular female surfer, Irene, showed river surfing is not just for the men, by setting what we believe to be an unofficial Women's World Record for distance surfing with approximately 4km. While Fabrice set his own personal best of 6km, and Bruno narrowly missed breaking the French Mascaret record with a ride of 7.5km - unfortunately there were just too many Englishmen on the tightest bend, and a boat pick-up was called for mid-distance!

This may have been the last major action we see from the river for a couple of years as nearly all the lunar cycles (which determine the equilibrium tides) reach a coincidental slump. But I am hoping with a bit of rainfall, the estuary might fire up one last time before the year is out.

Posted on Oct 28, 2003 at 18:56:12. [Comments for Return To The Severn- 0]

How Safe Is Your Money?

Relates to Peregrinations and Security

The other day I received an email with reference to one of my online bank accounts, requesting that I confirm my email address (for security reasons) by supplying my account log-in ID and passwords! I do not feel obliged to mention the (reputable national) bank by name, but it is alarming that spambots and/or hackers are able to acquire email addresses associated with online banking accounts. The email itself was cloaked with the correct domain name for the bank, as was the URL link for confirming details. To further snare the account holder, the requested details had the correct (and quite specific) names used for this particular online bank account.

When I requested verification of the email from the bank, they confirmed they had no association with it, and that other users had also reported receipt. Surely as soon as the scam was first reported, all account holders should have been warned - an unsuspecting account holder could see their account wiped clean in a matter of seconds. I hope that users of internet bank accounts are aware enough not to fall for this kind of scam. Also, that the bank in question reviews its security strategies both externally and internally.

Posted on Oct 28, 2003 at 18:55:34. [Comments for How Safe Is Your Money?- 0]

Key Press Event Revisited

Relates to Accessibility and DOM Scripting, Firefox and Co

In a posting last month I presented an onkeypress event handling script to avoid the Mozilla browsers triggering the event when the user tabs of the anchor. This was achieved by calling an intermediary function when the onkeypress event handler was triggered that would call the final function (in this case a style switcher) only if the pressed key was return.

While this resolved the problem, I discovered the other day that a better solution is to just call the onclick event of the same anchor element when the onkeypress event is triggered.

<a href="#" onclick="setStyleSheet('sheet'); return false;"
onkeypress="this.onclick">Switch to List View</a>

This works fine on the Mozilla browsers and does not raise the problem when the function is called directly by the event handler. Also, there is no need to hard code this and it can be extracted to a DOM creation scripting once the page has loaded, thus making the markup ever so slightly purer.

Posted on Oct 15, 2003 at 05:49:05. [Comments for Key Press Event Revisited- 3]

What An Angel!

Relates to Peregrinations

My life at the monitor seems to have subdued the devil in me. Still my soul is now valued at a tidy sum of &pound;23867, putting me just outside the top 40 percentile for purity!?

See what you are worth.

Posted on Oct 15, 2003 at 05:47:08. [Comments for What An Angel!- 0]

First Steps Into Shells

Relates to Shell Scripting and UNIX

I have had Cygwin sitting on my Windows OS for some time now, and only utilised it occasionally to get to grips with the intricacies of the UNIX system. I finally decided the other day to put it to work a bit, and start learning Shell scripting. The main incentive being that my text editors and macros were not reducing the workload enough in reworking old web sites to improved standards and accessibility levels. In only a few days graft, I am already revelling in the offerings of text utilities like SED, AWK, TR and GREP, and I have a few reasonable scripts to rework the content of some of my HTML files.

As a little challenge to learn the language a bit, I have been working at a simple text routine to crunch Javascript files down for bandwidth optimisation. A while ago I tried a Windows tool called JSCrucher (I cannot remember where I found this, but there are plenty of tools available in this Google Search), but this repeatedly crashed my system, and the tools available in the Bash shell appear to make this task relatively easy. While Javascript source files are well spaced, indented and commented for easy editing, the uploaded file can have all comments and whitespace removed. However, a space does need to remain in variable and function declaration (eg var obj or function validate()). As an initial shell command, I came up with this little pipeline:


# place a dot separator in variable declaration
sed -e 's/var /var./g'               
# place a dot separator in function declaration
    -e 's/function /function./g'     
# remove all comments
    -e 's///.*[a-z]$//' testfile | 
# remove all whitespace
tr -d '[:space:]' |                  
# remove dot separator in variable declaration
sed -e 's/var./var /g'               
# remove dot separator in function declaration
    -e 's/function./function /g'     

As a newcomer to Bash and Co., I am sure there are more efficient ways to go about this, but it is always nice to get out of the blocks with a new language. I can see the UNIX text tools getting significant use over the coming months. Hope to play around with this a bit more, improve it and get it into a shell script which also creates a source backup of the Javascript file and can run batches.

Posted on Oct 15, 2003 at 05:45:26. [Comments for First Steps Into Shells- 1]

Breadcrumbs Trail

[ Home ] -> TW Blog -> Archives for October 2003
Site Map

The Severn Solutions website achieves the following standards:

[ XHTML 1.0 ] [ CSS 2 ] [ WAI AA ] [ Bobby AA ]

Page compiled in 0.006 seconds