Friday, 11 March 2011

How To Ease The Pain of SAS in Production - Part 1

One of the many toys we got when The Bank bought The Other Bank way back in the mists of time was the need to use SAS and Business Objects. Full-featured Business Objects might be neat, but what we got, really is a frustrating mess and is painfully slow. Then there's SAS. People make very good money using SAS. It's mainly used in financial services, retail analysis and pharmaceuticals. It's inventor is not quite as rich as Bill Gates, but close. They have made a decision to put the resource into incredibly fast implementations of complicated statistical methods and basic data handling, rather than into user interfaces and a slick scripting language and IDE. That's a choice.

SAS may be a great analytical tool, but it really sucks when used for production. People will tell you that it’s really good “once you get used to it”. Which is a different way of saying "it really sucks until you stop minding". Unfortunately, SAS gets used for production: these are some hints about dealing with it.

The main issue is this: if SAS is being used for production, you’re in a non-professional data environment. expect the random SAS tables you're going to be using to have duplicated records, no defined key field and every sort of data abuse imaginable and quite a few more that aren’t. People really think it’s cute to store ID numbers as strings with leading 0’s.

If in doubt, use a proc sort with the NODUPKEY option on what should be the key field. I call this a "brute force de-dupe" because that's what it does. You will need it to de-duplicate the results of your queries on these megabyte messes. (If you’re using a table without a key field, you’re on your own.) And always do a brute-force de-dup to get the final table you’re actually going to use.

If you’re importing data from other people’s workbooks, assume they will change the order of the fields, the field names and the number of fields every time they give you the report. To be fair, this applies in any environment, but you can’t do much about it in SAS.

If you’re going to modify a reference table with a SAS script, take a backup first.

Never write a script that ends by committing updates. You CANNOT rely on the script to a) run all the way through without errors, b) produce the output in a format you think it should, c) produce the data you thought you were going to get, d) not suddenly create duplicate records because someone did something you would never think of doing. Finish a production script with a stats query that looks for tell-tale null field values, brings back volume and value totals you can check and so on. Commit the changes to your master table with another script.

Put all your temporary working tables into the rwork library. That way you won’t create long-term clutter. Whatever you write will be more portable, as everyone has an rwork library. (Unless they don’t have a server – then use work.)

Part Two follows...

Monday, 7 March 2011

March? It's March Already? How Did That Happen?

Oh no! It's almost half-way through March already. The year is almost over! I've organised no holidays, my life is vanishing before my eyes!

I do this every year. January drags by interminably, February comes and suddenly it's half-way through March and I have done exactly nothing all year. That I had planned on doing. Face it, the last six weeks have sucked. Big time. On Jan 25th I find out I haven't got a cancerous bump on my skull, but by Thursday 16th February, it's turned into an sebaceous cyst, which burst on the 24th. I catch The London Winter Cold on the weekend of the 19th and that stays with me for the next two weeks to he point where I even have a day's sick leave on the 22nd, and I'm still coughing a bit now. My back locks up and is painful between about Monday 8th February to about the 20th. I spent last week dazed on Night Nurse because how else was I not going to wake up at 01:00 hours coughing to clear my lungs? The weather has been grey, grey, grey. February sucked. Really. Sucked.

I've only just come out of it today. The weather was clear blue all day. I've been for a slow walk round Virginia Water, a pizza in Twickenham, a while sitting in a sun-trap corner of my garden reading a book on Leonor Fini I've had for ages, before giving the grass it's first post-winter cut and toddling off to see The Adjustment Bureau and falling in love with Emily Blunt. When I came out of the cinema, the sky was a hundred shades of sunset blue-green-orange-brown.



Which is what I call a day off. I'm still looking for holidays. I've tried looking at retreats. I'm getting the feeling that they are likely to be a bit, girly, well, middle-age womanly. On the other hand, if that means the usual hotel crowd stays away, put off by tales of yoga and self-revelation, maybe that's a plus.

Friday, 4 March 2011

Things I Saw Where I Lived and Walked: Part 9


The wooden boat was on the Parkland Walk, a disused railway line between Highgate and Finsbury Park, which ran past the block of flats where I lived for a couple of years in the early 1980's. Low tide at Watchet harbour, Somerset one summer morning in the late eighties. Snow in Bushy Park and a peek at Richmond Baths through autumn trees - I suspect late eighties as these are all Olympus OM10.

Wednesday, 2 March 2011

Remarks on the Phenomenology of Dating

One of The Gang asked me when was the last time I went on a date? I gave some sort of politely evasive answer like "my memory isn't that good", which evasion is allowed by may age and maturity. The real answer is "what the frak would I do that for?" Or rather "why the frak would I go through the motions?"

A date is two adults, after 7:30 in the evening, with the possibility of sex. If there's no possibility of sex, it's not a date, it's just a meal or a movie or a night at the opera. Now, at the end of every weekday evening I have to catch a commuter train - cab fares from central London are silly - so it's going to be an early evening. Sunday night is a school night, and so is Friday night because I have housework to do Saturday morning. Saturday night is for the under-thirties and people who don't get out during the week: grown-ups don't do Saturday night dates. This leaves zero possibility of sex. Even before we factor in the whole age thing. Let alone the differential looks thing (women my age look it, I don't: women who look the age I look are ten to twenty years younger, and they aren't going to date me). Why would I go on something that looked like a date, when I know in advance that it isn't? I can go to the theatre just fine on my own thank you.

It's actually worse than that. Though I would be good company, I doubt there would be one moment when I actually thought of whoever she was as a woman. A woman is a female with whom sex is a possibility: once it's no longer a possibility, she's not a woman, she's just a guy with estrogen.

I've begun to realise that this is actually a general phenomenum. I'll give you another example. I'm Pilates Class Guy. You've seen me: one guy, maybe two, in bloke-ish shorts and sloppy sweat shirt, wearing socks. The rest of the class are women of varying ages and looks, all wearing clothes that fit and with bare feet. If you're Pilates Class Guy, you realise after a couple of sessions that your natural masculine instinct to check out the women is a little, well, creepy in such a confined space. Especially when half of them would be as old as your daughter if you had a daughter. So you focus on the exercises, stop looking at the women and after a while, and I mean, in less than a class, they've stopped being women.

A person is someone with whom we have dealings, or the think we might have dealings, or wish we didn't have to. (The technical term for the last type is "assholes".) The someones on the escalators and stairs on London Transport aren't people: they're just mobile obstructions to be dodged round. The staff behind the counter at Fernandez and Wells are people: I have dealings with them. I don't know their names, but they are people. The Gang at work are people and personalities: I have dealings with them, gossip and banter with them, I take what I know about them into account in my dealings with them. The women in the Pilates class aren't people and even if they were, they wouldn't be women. Women are females-with-whom-sex-is-a-possibility. There is no possibility of sex with any of them.

In fact, actually going out on a date with someone I might, in other circumstances, have liked to go on a date with, would spoil it. As a fantasy date she's a woman, as a real date, she's someone I'm saying "Thank you, I had a lovely time" to, before I catch a ten o'clock train home, and has stopped being a woman. Which is a nifty little Catch-22. Or to put it another way: if you know you're coming back home alone at the end of the night, why they hell did you bother going out in the first place?

Now that last bit may be as much my fault, in that it's a blind alley I've driven myself into, but that's not the point. The point is the how it shapes my view of and feelings towards the world. It makes it a more empty place.

Monday, 28 February 2011

This Week At The Gym: Week 14

There's a nasty cold going round London and I had it last week. I made it through Monday, woke up on Tuesday realising there was no way I was up to commuting, so I missed the planned Abs class that lunchtime. Wednesday I went in because I had reservations with my sister for an early supper at Murano, and I had no intention of missing that. (Sweetbreads followed by pigeon followed by a pistachio souffle. Some of the best food I've eaten in the last five years.) I went for a run Wednesday lunchtime, and tried the SCS class on Thursday evening. This was the beginners class, and it's about doing some basic weights exercises fairly quickly without a lot of rest in between the sets. Light weights for the first time. On Friday morning, I was aching from the after-effects of the squats. We had different tutor for Friday evening Pilates, who took us through some different exercises that made other different parts of me ache. And I still have that cold.

So let's talk about "playing hurt and working sick". Listen to athletes and sportsmen / women, and they almost always have something wrong with them. It's so unusual for them not to have an ache, a cold, a sprained this or a tired that, they actually make a point of saying they're on top form. If you want to achieve and maintain a respectable level of fitness, you will be aching, occasionally in need of massages and osteopathy (athletes take regular consumption of both for granted) and cannot take time off from training just because you have a cold. If you have an actual thermometer-busting fever, sure, you stop because training on a fever can mess up your heart, but if all you have is a cold and a cough then you train, in fact, you compete unless your coach and doctor physically restrain you.

One of the many, many things the know-nothing Government health and fitness advice slides over is this harsh fact. If you want to make a serious difference to your fitness and weight, you are not going to do it by taking a week off every time you get a cold or feel under the weather. You'll lose at least four, if not eight weeks a year like that, and each time you do, you'll lose most of the progress you made in the previous period.

Friday lunch with The Gang took us to a Korean behind Centrepoint, where I had really tasty noodles and beef. That evening I weighed 88.8 kgs with a body fat of 19.8%. The weight will come off, as it's mostly water retained by the noodles, and possibly a reaction to the Fluox, but I am going to have to swear off the Friday lunches until I've hit the target weight.

My primary purpose is to get to the end of the day without having a drink. My second purpose is to get to the damn targets I've set myself. Everything else comes after that.

Wednesday, 23 February 2011

This Week At The Gym: Week 13

I talked about my back and shoulders last week. I spent the Tomatito and Rocio Moilinas concerts in minor pain waiting for an appointment to have my back massaged and clicked by the wonderful Taj Deeora, who has been undoing the effects of my bad posture and genetic lordosis for longer than either of us would care to remember. Now have a back that wants to move and shoulders that are easing off. I can go back to exercising. I ran last Monday and did Pilates on Friday: the two running sessions at lunchtime wedre cancelled due to pain.

My scalp is a mess, fortunately hidden by my hair. I'm seeing the doctor about that after I collect the car from its MoT this Monday. I'm taking paracetomol to ease the twinges from whatever nastiness is going on up there: it's not so much painful, unless something scores a direct hit, as distracting. I'm not good at ignoring my body when it demands attention.

My weight is 13st 12lbs, or 88 kgs in new money. My body fat is about 21%. I haven't been in this territory since I was... well, since about 1994 / 5 or so, when I quit smoking. I doubt my body fat was 21% then. I think my body is deciding whether this is all real or just a temporary aberration. Next week, I've booked myself in for Scs, Abs and Pilates classes, plus a run. This is for real. I've had a rest, probably forced on my intentions by my body. I have 2 kgs to lose and then I'm at target - see earlier remarks about diets. I'm kinda there on the aerobics bit, the Abs classes are to get me there on sit-ups. Press-ups are clearly more traumatic than I thought and will need approaching indirectly. With massage. It's still only February.

Monday, 21 February 2011

Flamenco Season 2011

It's February, so it's been the Sadlers Wells Flamenco Season. I saw Israel Galvan, Aida Gomez, Rocio Molina, Tomatito and Eva Yerbabuena. Which means I saw three of the best dance troupes - Galvan, Molina and Yerbabuena - in the world today. Yes, including the Royal Ballet and anyone else you want to mention.

Tomatito's band are a straight-ahead flamenco trouple: guitars, cantores and an athletic gypsy dancer, Jose Maya. Tomatito mixes flamenco with jazz, doesn't let his technique get in the way of expression when needed and has a preposterous groove - sorry, compas. In the second half of the concert, the band hit "an impeccable groove" and no-one wanted to go home. This is an example...



Israel Galvan will make you think several times about what flamenco, tap and modern dance could be. Cheeky, technically challenging, full of odd poses and supremely confident. His guitarist Alfredo Lagos was startling: there are a handful of people who can play a trill with their fingers and a tune with their thumb and still keep a beat, and he's one of them.



What do I say about Rocio Molina? Sexy, inventive, a confident young lady with a style all her own... He stage presence when she wasn't dancing reminded me of a guy called Miles, the way she would stand away and then suddenly take the centre for her dance and pull everything together. The set looked like something a top-end ballet company might do if it had the budget. Her cantoras, including La Tremendita, complemented and challenged her. This time round I was starting to regret I don't speak Spanish.



And so we come to Eva Yerbabuena, one of a handful of artists who have reached the point where, if you don't get what she's doing, that's your problem, not hers. The show was When I Was... set in the Spanish Civil War. I'm going to let a professional critic describe it. The show was about how flamenco isn't just a bunch of moves and neat tricks on the guitar: it's an approach, a mood, a style, a way of interpreting. The only non-Spanish form like it is jazz. Yerbabuana could pull in a Chaplin-esque routine and moves, and make them flamenco; she could take a straight modern dance piece you would stand and applaud the Ballet Rambert for doing - the cockfight - and make that flamenco; she could set a number of traditional pieces - including a beautiful shawl dance - in a dramatic setting you'd expect to see at the ENO. And she could create a moment like this...



that hypnotised everyone.

How many times do I have to say this? What these guys are doing, right now, is the best new work in dance on the planet today. Get over tutus and swans, or body suits and bare stages, and arms held "like a ballerina" and watch what these guys are doing, feel what they are performing. This is how it must have felt to be able to go downtown and hear John Coltrane, Ornette Coleman and Miles Davis play in the early sixties.