[this is a bit of a random rant, excuse me whilst I ramble]
Every year, the sale of fireworks seems to come earlier and earlier.
In the UK, we used to use them on the 5th November (or the closest weekend). Now they seem to be in use from the 30th October to mid November. And then over the whole Christmas period.
When in the right hands, they can be great fun. But as people have more and more access to them, the fun becomes less.
- The sale of fireworks should be licensed in the same manner as the sale of alcohol.
- The purchase of fireworks should be more tightly controlled. Get them out of the supermarkets and corner-shops for a start.
- The use of fireworks should also be licensed. This would restrict displays to organised events and not 14 year old kids throwing fireworks down the street, or scaring fish.
I don’t want to be kill joy, but explosives need to be treated with respect.
Maybe I’m getting old and jumpy. I love the look of a good display. I don’t like having to fish the cat out from underneath the bed.
Finding a needle in a haystack is a wonderful bit of symbolism and I welcome its use in many situations.
It’s just the implementation of that symbolism that needs to be standardised. For forgetting the order in which a function expects variables to be passed in is tedious.
In PHP, for example, there are some very useful functions: in_array() and strpos() to name but two.
Usage is in_array($needle, $haystack) and makes sense as you want to check that the needle is in the haystack.
But, it’s strpos($haystack, $needle) that messes things up. You can’t look for a haystack within a needle!
So, because of strpos() confusing things, it’s quite often that I (and other’s I’m sure) mix the order, no matter which function is in use. Unless I’ve been using the function within the last few hours, I’ll most likely get it wrong.
These are long standing functions in a well established language, so there’s no hope of these ever being corrected.
For new functions, a possible answer would be to pass variables by associative array when the function has more than 1 variable input.
An example of calling such a function would be: myFunction(array(‘needle’ => ‘malteser’, ‘haystack’ => ‘bag_of_revels’));
This way, it wouldn’t matter which order you remembered to pass in the variables. As it happens, this is how I write my own functions.
Apparently, something similar is done in Python. Might get around to learning it sometime…
Strictly Come Dancing has never been the sort of programme to hold my attention.
But whilst I’m keeping my darling girlfriend company, I seem to be distracted from my laptop by the show.
The audience annoys me with their reaction to the judges. Bruce annoys me for having lost it years ago. But everybody else annoys me for humouring the old fool.
Yes, I’m getting old.
Applications which steal input focus are pure scum.
The only times that a new window should take focus are:
- application launched by the user.
- alert box instigated by the application currently with focus.
Whilst I’m coding in an editor, I do NOT want the virus scanner to pop up to say its finished running and expect me to care at that time.