Author: francis

Comment left on review for Feeble Paradox

http://www.newstatesman.com/television/2009/11/high-drama-flint-king-paradox

This is the Beeb’s feeble response to Flash Forward – can’t be bother with that either, but at least they have writers who can write.

Best bit was trying to wake the sleeping tanker driver  by standing 50 metres away and shouting, instead of driving right up to the bridge and using the car’s horn like a normal person would. But then Tamzi’s hair might have got mussed and the cheesy special effect would have been harder to do.

The closing sequence with more photos sent from “the aliens”, including her lover looking pretty dead was so clichéd I burst out laughing.

Heroic Failure on the 13th of November

Had you down for Heroic Failure on the 13th of November
Could you oblige?
RSVP to me
We’ll have tiffin on the lawn, eat small tiger for tea
Measure nose to tail
Will be slightly longer than the other one you see?
Tasty tiger don’t eat me no more than necessary

Yeah, you said you’d be there one time I sighed
All my fault
Reciprocate the failure
Send card embossed with lillies
No sympathy
And a short doggerel by Minor Lakeland Poet

Tiffin on the lawn
Cucumber sandwiches

Do come to tea
Don’t confuse me with specifics
Or lectures on entropy
I’ll be your friend for now
And later sigh in memory

Do come to tea

Ok, I’m not perfect and I still get angry – but still try to deal with it

I suffered the misfortune of sitting next to an extremely inconsiderate man on the train on Sunday. I was subjected to 2 hours of having my leg felt and the paper snapped and wafted in my face by the most irritating elbow wielding person I’ve ever sat next to. I think he was trying to get me to move. He had his wife and child with him (at least I think it was his child, I don’t think I saw him make eye contact once).

When he started tapping the chair I meant to say “please stop tapping” but what came out was “for fuck’s sake” – whoops. Should have said something before I came to the boil. Me bad man. Me swear in front of the children of the inconsiderate and self righteous. I’m sure there’s a spiritual message there. I know there is. Maybe he has Tourette’s and I’m really in the wrong. It was like he was trying to pick a fight and was’t even aware of it. I hope that he’s not in any position of power or one day someone that works for him will pee in his coffee, or do something even worse!

Thing is, it’s two days later and I’m still feeling the karmic shock wave of my anger. Anger does this to me more often than I would like to admit. I did’t sleep properly on Sunday and had this boiling anger thing on Monday evening. I could’t believe that someone could be so selfish, and have so little self awareness, it was extraordinary. It was’t arrogance: he just did’t have a clue that invading a total stranger’s personal space and noisily flicking a newspaper every 15 seconds or so could be seen as an arrogant and aggressive, in fact downright rude. It was like sitting next to a toddler who needed a nappy change. Really bizarre.

So ok, I’m a Buddhist, by definition a pacifist and someone who will not follow (or at least try not to follow) emotionally destructive paths. So how do I work with this anger and the irrational wave of hatred (it was that strong) that kept creeping up on me? I finally worked out the shape of it on Tuesday morning. In the Tibetan tradition there is a meditation technique called Tong Len, that translates as “sending and taking” or “exchanging self and other”. I am not a qualified teacher and will not explain it here, but the essence of the practice is to imagine yourself into various people, usually starting with loved ones, and draw their suffering and pain into you as you breathe in and out – transforming it and taking it away from them. Then you gradually change the focus to people unknown to you and finally to your enemies or people who have hurt you. Go and get instruction from a qualified teacher if you want to try it – quite deliberately I have not given enough information here – you would’t give a child matches or let it play with electrical wires. My community’s website is here.

It’s important to stress that Buddhists see no difference between self and other; that all suffering comes from this fundamental misunderstanding (other being everything, not just people). You see something outside you, you start dividing things up into like/dislike/don’t care, you see yourself as separate from these things, and suffering follows from it because these “external” things apparently control how you feel and think (again this is simplified, but I hope correct). Ignorance makes us see the other; pushing and pulling makes us angry and confused, suffering is the result. For me meditation practice is about trying to relax the tightness of this spiritual knot and undo it by seeing and feeling the the world properly, viscerally, and without any sense of a barrier (because there is’t one). It can’t be forced – the more you push the more things push back.

(Yes, Star Wars fans, Yoda says it, kind of: Fear is the path to the dark side. Fear leads to anger. Anger leads to hate. Hate leads to suffering. He misses out the beginning (for a Buddhist): Fear comes from ignorance, from the false concept of self and other – the split making you afraid).

So this bloke is just another process spinning in the empty void like I am, the result of an endless chain of causes and conditions that go back to beginningless time and result in another deluded self hiding in a frail human body. He has no intention of hurting me and my feelings should not be changed by what he does. He can’t help his spiritual ignorance, limited self awareness and narrow view that does’t encompass total strangers like me.

I did’t do the practice, just thought about exchanging myself – one process for another – with him. I thought myself into his head, but kept my critical facilities. Then I realised other people don’t exist for him, so why should he show them any courtesy? This is probably overgeneralising, but the nub of it feels right. The guy must be quite broken in his emotional life, and probably is’t even aware of it. So the arrogance is actually an inability to empathise or relate, a fear that feels like an electric shock, the poor sod. On consideration I feel sorry for him, deeply sad that I did’t find something constructive to say that might have shaken him out of his distorted world view and woken him a little. I’m also scared for him: if he carries on winding people up without even knowing it you know it can’t end well, it could end extremely badly, and he wo’t even know why. 

So what I learned (again) is that you can’t win because there is nothing to win. But maybe you can grow a little if you are’t afraid of the pain. And the guy who could’t look people in the eye and was scared of everything, who was afraid to be happy, and comes across as very arrogant when really he’s afraid? That was me about ten years ago. So I can’t be critical. Still is me when I’m tired or not being mindful.

Next time, I will try to overwhelm whoever it is with gentleness, kindness and a little humour before I come to the boil. At least I know I’m broken.

Oh, and move my seat, even if the train is full. If he wants both seats let him have them – there’s more difficult and useful battles to have. Stubbornness does’t help either, but that’s another essay all of its own.

Imported Comments:

maxxxmagician

🙂

Tumbleweed Interview Candidates

In my present role helping a team become more agile I was asked to help with some interviews. We must have talked to about ten people. The profile is relatively unusual: Object-oriented PHP with MVC and some Oracle PL/SQL. Unusual but a lot of people claim to have at least some of it.

I’ve helped conduct at least two interviews where you ask a straight question related to a claim on a CV e.g. claims about knowing Object-oriented design patterns, I get what I’ve come to call the tumbleweed response. As in what happens when someone makes an unfunny joke and there is silence. The idiom comes from the cowboy movie where the wind blows across the silent plains and makes the tumbleweed roll by; there is nothing there! (Reeves and Mortimer fans will know exactly what I mean).

So, if you are going to be interviewed by me, remember the following:

If you claim to have designed databases with hundreds of tables you should be able to explain what foreign keys and lookup tables are. Third normal form? It’s a dying art. Look it up or don’t make the claim.

If you claim to know PL/SQL then you know the difference between implicit & explicit cursors, probably what ref cursors are and what in, out and nocopy mean and why you would use them. Bonus question – what are PL/SQL tables (hint: nothing to do with database tables, it’s a language construct, so don’t start talking about database tables – it means you don’t have a clue).

SQL: inner and outer joins, foreign keys etc. Why as well as what.

If you know J2EE or Java beyond having attended a one-day course tell me what might go wrong with singletons (have a read up about serialisation)? How and why do you implement an equals method (just look it up)? Bonus question – if you have read about trying to create enumerated types in Bloch’s Effective Java are there any problems with it? Double bonus – tell me about synchronisation and the actual order statements can be executed when optimised that breaks it. It’s a feature. I’m a bastard question: why have’t you read Effective Java? Do you know what POJO is, and why does it have so much meaty goodness? (See Bootnote – some of this stuff has changed).

If you claim to be well-versed in object-oriented techniques you sure as christmas is coming need to be able to tell me the difference between has-a and is-a relationships, and why they are needed. Plus the usual stuff about abstract classes, interfaces and so on. Maybe, as a bonus question, why dynamic languages don’t need interface or abstract – or do they? I like people with opinions.

Ruby – what is duck typing? Can you explain what method_missing does? What does yield do? What’s the difference between a string and a symbol? How do you pass a block to a function – why would you? What’s a mixin and why do they taste so nice and chocolatey? Bonus: Why is the splat operator so handy?

Rails –  how does an @ variable set in the controller appear in the view? What tools to you use to test model/view/controller code separately and together? Tell me why fat model, thin controller is a good guideline. (This question also works for PHP/J2EE and whatever framework you want).

(I will think up more RoR questions – readers feel free to chip in and I will add them).

Agile: What does YAGNI mean? What does PIE mean? What is TDD? Then, of course, why? Bonus: Demeter/Tight and loose coupling/…

Patterns: Describe MVC (why as well as what). Do you know what the conductor pattern is? If you claim to know patterns such as Factory or Singleton, then expect to be asked “what does a factory give you” (concrete class that implements a known interface, like a database connector or cross-platform representation of a GUI object) or “why would you use a singleto” (global data store, or even a factory!) Bonus question – what does “concrete class” mean? Expect why questions – anyone can implement someone else’s pattern – why was it a good idea?

General Programming: How do you track production system bugs down (this is open ended – no right answer – but have some idea, please!) Why is refactoring old code generally a good idea? Or is it a bad idea? What’s refactoring anyway?

I can’t be bothered asking questions about XML but there are plenty – I leave that as an exercise for you, dear reader.

Some of these questions overlap, obviously.

Bottom line: If you claim to know something then expect to be asked about it – I will bone up on the web if I don’t know to do you the courtesy of being able to shine – I want you to succeed, honest.

Bottom line: Don’t make claims you can’t back up. Don’t waste my time.

Envoi: I don’t know is a fine answer, don’t be afraid of it. You get more respect for it. Just don’t sit there watching the tumbleweed after claiming to be a world expert on something – it makes us all so embarrassed.

Bootnote: 2015

I believe that enums are now part of Java and the daft problems where the compiler would sometimes re-order code outside of synchronized blocks have been resolved. Not so sure about the singletons not being singletons when they get moved from VM to VM problem though.

TDD is effective if you look at the right things

http://theruntime.com/blogs/jacob/archive/2008/01/22/tdd-proven-effective-or-is-it.aspx

It’s nothing to do with the initial development. All about the long-term viability of the code. You can’t refactor or maintain something if you can’t prove your changes have’t broken it. I do believe that the code is better, as long as each test comes directly from the specification, it shows you have understood it.

The comment above about doing your own coverage using the debugger is naive. You can cover everything every time you make a change, or only the tiny bit when you make the next one? Then you start to have something really brittle. Not immediately, but soon (really soon) you will start to feel fear every time you change something. Then you’re in trouble.

This research is measuring the wrong thing. I don’t know how you’d measure the longevity of the code, but the initial build is only 10% of the effort in any large system. This is not taught at school and it should be. Writing maintainable code that has full tests is not a luxury. Far too many people think it is.

Ballmer not the darling of the stock market

Comment left here.

MS is a statistical outlier. A lot of its success was accidental and also built on allowing piracy in markets it could’t control in the early days. Ballmer/Gates so what?

You get one of these companies every generation or so and they hang around for a long time and Wall Street or the City of Lahndahn try to make everybody else be like them when that business model only works in a new market when no-one has any idea what to do next. It happens to be Microsoft because IBM’s leadership had no idea what they’d unleashed – it could have been IBM or any one of a number of other companies that have now gone to the wall because MS’s dominant position stifled them.

We have no idea who the next Microsoft even are. Ballmer’s just another guy managing a big company that succeeded despite itself. The market is changing and MS will do its best to protect its equivalent of the pianola until it disappears or is reinvented as a medium sized player in a different market. The idiom of the ice companies making sharper saws while ignoring developments in refrigeration comes to mind. None of the ice companies became refrigeration companies.

I think the next innovation will be in finding a way to consistently write large chunks of software that do useful things. MS are’t even trying to play that game, as their last disaster shows too clearly.

For and Against Test-Driven Development

Comment left here.

I’ve been training people on TDD and the first thing I said is you need to start from the functional spec and then (maybe) create a technical spec that is used to drive the tests. Understand the problem first – and then the tests are just part of writing the code as a whole, no biggie.

Writing small tests for small bits of code make you think small, with short well focussed methods that do stuff. Long linear honkin’ bits of procedural code are very hard to test properly. TDD has the accidental but very useful effect that you write stuff that is’t tightly coupled because it’s impossible to do efficient TDD with tight coupling, assuming you get how to do it well. That takes practice. I think you should give it another try from the beginning with something simple and notice how the structure of your code is better (IMHO anyway).

When I’m doing demos or quick tracer bullet things then I don’t bother, but then there are no consequences.

I agree that agilistas can be far too rigid – don’t substitute process for thought. Anyone who ever suffered under RUP (or any big MC company’s “method”) knows how painful this is.

Testers test functionality. Programmers test assumptions. Not the same.

Next life

These old teeth

When ground
Will be dust again

And how happy I will be

To shuck off this old form and its aches and pains
Things done wrong already and for always wrong
It can’t forget, just recycle and chew on the
Old bones of pain

To move on to something new
But the mistakes will still belong to this little me
This flotsam
This bubble on the edge of a wave

Lose particulars but not consequences

I can live with that

No choice

If death is sleep then why live at all
If death is sleep there are no consequences
If death is sleep do what you want

If death were sleep
I’d be asleep

Imported Comments:

Laurel Wingfield

You’re a talented poet, Francis. You manage to put across sorrow, regret, weariness and the feeling of being small and lost, very well. There is a lot of feeling in this. I liked especially, the verse that began, ‘To shuck off this old form, and its aches and pains…’ and ‘But the mistakes will still belong to this little me/This flotsam/This bubble on the edge of a wave.’

Rails authlogic: can’t use OAuth and OpenID plugins together

I’m trying to use both openid and oauth with authlogic. Looks like I can’t.

The plugins both override the active record save method and call the block you associate with it in the controller (this is done so that it can go to the external website and come back without a double render – very clever stuff). Prob is both will call the block, so you’ll get a double render. Can’t work out how to only call the block once and have tried using global variables but don’t like them because they are’t thread safe.

I’m sure I can sort this out but it’s taking too long, sigh, so on the shelf it goes.

This is the problem with trying to make a site available to everyone, but I think OpenID loses over Twitter for my app.

Usable fixes and suggestions welcome. I’ve tried @@variables in the controller but did’t work and don’t like them anyway.

To clarify some more:

I’m trying to save a user with the handy “register with Twitter” button supplied by the OAuth plugin and when it tries to do the validation both the OAuth and OpenID plugins call their own versions of save. This calls the block twice. At the moment it’s one or the other.


Free!!

I’ve finally been made redundant, which means I can apply for the dole and get my mortgage protection up and running. Had a lot of fun trying to get a machine that was running Microsoft stuff so I could use the on-line forms to set up a tribunal to try and recover the £11k they owe me. It just would’t work on my Ubuntu machine and then, when I booted it to Windows it started playing up. Meh.

I’m not sure if I’m going to need benefits because there are a few jobs out there but I think it’s best to get the ball rolling. I’ve paid a small fortune in tax and NI over the years and it’s supposed to be there when I need it, so we’ll see.

Having a row at the moment with some folk from a company called G24 who want me to pay for overstaying on a car park that has no signs saying what the time limit is, or that they will attempt to charge you. I wrote them a letter and they sent a useless form reply saying “my appeal had been denied”. I had’t appealed – I’d told them that they were’t being paid because I did’t know there was a restriction, clairvoyance not being a necessary requirement for a driving licence. It’s a racket, scaring people with official-looking letters and offering them a discount if they pay straight away of only £75! The local council only charge £30 if you overstay in a pay and display, they must think the people who live in Birkenhead have gold-plated toilets or something.

Also gonna give the DVLA a rocket for selling my personal details to these dodgy folk. Not amused. I do not remember giving them permission to use my details for any purpose other than legitimate legal ones required by the law. Going to ask for compensation because I believe that the only way to stop the govmint selling your details is to make it uneconomical. Yes, that’s a cynical view, but probably correct. Will give the compensation away if I receive any, but the principle is sound.

On a different tack I sent a letter to my MP Frank Field saying I supported his stand against people who were on the now abolished 10p rate of income tax being robbed by the government. About bloody time someone stood up to Brown. When I think of what he gave away to the banks, this dimwitted attack on some of the poorest people on fixed incomes really gets me cross.

Had a job interview last week that came to naught. Up for a contract role based in Woking on Monday. Busy looking for things to keep me occupied and learning new stuff, like for example cascading style sheets, that I have’t had much reason to look at. Funny thing is it reminds me of what I used to do in the old days with tools like Oracle Forms, where you had to mess with pixels and so on to get the layout right. Nothing changes, nothing is new. It’s a good time to look at all those hints and tips videos you bought or downloaded and did’t really look at properly, so that’s what I’m doing.

I don’t want to be an employee any more and am looking for enterprise grants and the like. Will see where that takes me next week.