MySQL suckage

mysql> select t1_id, value, length(value), substr(value, 1, 1), length(substr(value, 1, 1)) from t1;
+-------+--------+---------------+---------------------+-----------------------------+
| t1_id | value  | length(value) | substr(value, 1, 1) | length(substr(value, 1, 1)) |
+-------+--------+---------------+---------------------+-----------------------------+
|     1 | £200   |             5 | £                   |                           2 |
|     2 | test   |             4 | t                   |                           1 |
|     3 | €200   |             6 | €                   |                           3 |
+-------+--------+---------------+---------------------+-----------------------------+
3 rows in set (0.00 sec)

And in today's lesson, we learn that characters and bytes are not necessarily the same thing...

Edit: OK, so the MySQL reference docs do actually document that length() returns the length of the string in bytes (and char_length() returns the length in characters), but this is just putting a brave face on underlying retardedness.

  • Current Music
    Mesh - Crash
  • Tags
    ,

(no subject)

Cycled in to work for the first time this year. It was just a bit foggy at the start:



Although that cleared up pretty quickly by the time I was past Alperton:



Not had any joy getting ShoZu or similar installed to quickly post photos from the phone. I suspect Vodafone crippled it intentionally to try and get you to use their "Live! Studio" crud. Hence the lo-res photos. Can still download full photos via USB... but don't have a cable at work.

Annoyingly, the towpath is being dug up/resurfaced or for some other reason blocked just around North Action. And the A40 cycle paths are blocked due to the bridge works. And then White City and Shepherd's Bush are both undergoing work that means the cycle lanes are blocked... might just take the bike back home on the tube: because the Paddington to Greenford mainline is down too. I think my timing of when to start cycling again sucks :|

culinary experimentation

Had a bit of a fun cooking day yesterday. Attempted an omelette for the first time, with reasonable success. Well it tasted good, and I've not keeled over yet. With kippers ftw. Later we made spicy lentil soup; fun because we don't have a liquidiser or blender, had to chop all the veg using just a cooking knife. Apart from chilli powder and garam masala getting *everywhere* this went pretty well; much more fragrant than bought-ready-made, and the relatively coarse chopping is OK if you don't mind the occasional chunk of garlic/ginger/red onion.

Finally, on to a Thai stir-fry mainly from stuff we picked up at Oriental City on Saturday. First time I've cooked something with ho fun, which is tasty although frying noodles probably not so good for the training regime :D Bags of tapioca flour look very dubious, and that gets everywhere too.

All in all, went pretty well. And I have a huge box of lentil soup to bring bits of to work for the next few days.
  • Current Mood
    recumbent recumbent
  • Tags

(no subject)

I'm finally having a massive clearout of my room, chucking out things like bills dating back to 2002 that have built up and been carried from house to house due to lack of sorting enthusiasm :| What fun.... currently sitting in Harrow as I'm here to get a shredder having dropped a load of stuff off at the recycling centre. Have loads of stuff to get rid of that doesn't really merit dumping: may try to flog on ebay or simply freecycle. Not sure how long this burst of energy will last :D Still, it's nice to be able to actually walk up to the window in that room.

I was walking around earlier and I think just a few sessions of going out running at lunchtime have already improved my legs; nice to know it's having some sort of effect! Patience is one of those things that imho is a learned skill, but never seems to come easily to me.
  • Current Music
    musak

(no subject)

2am and the foxes were having a territorial in our garden/over in the school grounds. Fun and joys of living near the edge of town (although foxes have adapted well enough to the city I suspect it could happen much farther in too).

I've signed up to do the London Triathlon in August. Hopefully avoid a repeat of September.... if I tear a calf muscle just before the race, I'm not going to try and limp through it this time. It'll take a few months before my bank account's recovered from all the physio treatment the first time round :(

New year, blah blah blah... looks just the same as the old one. "Huge, important, world-will-end-if-not-met" deadlines getting moved around- check. Rain and bloody misery- check. No winning Lottery numbers- check. Although apparently I've won a voucher for a two-day cruise for 4 around Genoa/Marseilles/Sardinia this summer. Hmmm.

Trying to have a clear-out of stuff at home--- take clothes I haven't worn for a few years to charity shops, hopefully sort through the crates of compacted bills and crap that date back to five years ago or more. Maybe even make space to be able to get to the shelves ni my room without having to clamber! Then at least some of the house will be usable...

(no subject)

so finally that's work over for this year. i've been working on the same thing almost solidly for the past year, not something that tends to happen much at LMN. just a few weeks to the next "unmissable, can't be moved, end of the world if not met" deadline (the first one was in June).

my N70 (phone) got run over by a car after flying out of my pocket while cycling; i now have a K770i as a replacement. seems workable enough, especially seeing as I don't really use the phone all that much. reasonably nice photos (for a phone camera) of the NMA gig last night, which was fun: although sitting up in the balcony instead of mixing it up downstairs made me feel all old :)

sue's off home tomorrow, and I'm off "home" (i.e. Colne, which isn't really home but I always call it that) on Sunday... and then visiting sister and brother-in-law for a few days in Staffs, then back on the 30th or so. Would be nice to do something other than sit at home on NYE... but then, sitting at home and watching the fireworks on TV is comfortable, at least...

hopefully in the new year will be able to start running again (calf muscle mostly healed now). this would be good as i've put 4Kg back on since getting injured :(

internet connection seems to be not so happy atm... although i seem to be at double my bandwidth allowance for the month, that might be why :} having said that, even the admin interface for the router is dog-slow... not that it was ever all that fast...

Edit: nope, looks like just that port in the back of the router drops lots of packets... moved the switch to a different one and all's better...

phew

so finally that's work over for this year. i've been working on the same thing almost solidly for the past year, not something that tends to happen much at LMN. just a few weeks to the next "unmissable, can't be moved, end of the world if not met" deadline (the first one was in June).

my N70 (phone) got run over by a car after flying out of my pocket while cycling; i now have a K770i as a replacement. seems workable enough, especially seeing as I don't really use the phone all that much. reasonably nice photos (for a phone camera) of the NMA gig last night, which was fun: although sitting up in the balcony instead of mixing it up downstairs made me feel all old :)

sue's off home tomorrow, and I'm off "home" (i.e. Colne, which isn't really home but I always call it that) on Sunday... and then visiting sister and brother-in-law for a few days in Staffs, then back on the 30th or so. Would be nice to do something other than sit at home on NYE... but then, sitting at home and watching the fireworks on TV is comfortable, at least...

hopefully in the new year will be able to start running again (calf muscle mostly healed now). this would be good as i've put 4Kg back on since getting injured :(

ow

Well, I'm still limping. I've self-diagnosed shin splints, which means several weeks' rest and a very gradual return to training... will try to get in to see a doc for a backup on that. So no Tree-Athlon tomorrow, and not too much jumping around for a while, gah...

And two-hour-long meetings with finance about the intricacies of reporting flight ticketing updates aren't much fun either.
  • Current Mood
    sore sore

London Duathlon 2007

London Duathlon 2007
Run 101:08:22
Bike00:56:38
Run 200:46:41
Total 02:58:12

Not a brilliant time, although given I was limping before I even started I'm going to regard getting round at all as a victory for bloody-mindedness. Looking at the preliminary results sheet, I'm second from bottom in the M30-34 category and about 15th from bottom in the race overall, despite walking for most of the final run. So not too shabby, and hopefully that means doing better next year won't be too big an ask :D

We have some pictures to follow, not had time to download them yet. After getting home, had a luxurious and decadent long bath, and then headed out for post-race curry. That final walk back up the hill from Sudbury Hill was cruel :( Will try and rest this week and get some sleep (for once!), and will see closer to the weekend if the Tree-Athlon is still going to be on, or if it would be better to skip it.

According to my HRM, I got through 2443 calories in 3 hours. Not sure I managed to load that many back up with curry afterwards, but I tried. Might still be recovering from col/flu too because both this and the last time I went out, my heart rate's been much higher than it should be...

typically good timing on getting injured

this is annoying. to avoid the Tube strike earlier this week I was cycling in to work, which was fine. however, i appear to have strained my left calf muscle, and now it's all stiff and sore, the day before the London Duathlon that I've been looking forward to for ages 8-| might just dose up on painkillers and limp round it anyway... actually i think the cycling bit won't be impacted too much, but running up a hill is going to be .... interesting.

in the meantime, i might try alternating hot baths and ice packs :|
  • Current Mood
    frustrated frustrated
  • Tags