Category: Uncategorized

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.

Busy getting things ready for biz – happy!

I am renting a host slice at slicehost.com. I decided to use these guys instead of one of the millions of places like hostgator or site5 because I end up with a web host that’s entirely under my control and I can use Apache’s multi-site thing to host several low-volume sites on there without it becoming expensive, plus have somewhere clients can go see what I can do. I also have total control of the slice and if it starts to squeak I can easily upgrade it or move the database to another slice without any hassle. A 256MB slice costs $20/mo with an extra $5/mo for a daily and weekly backup.

They have lots of tutorials telling you how to set up your machine once you’ve bought it.  Start here. Very useful if you’ve installed Ubuntu server anyway and want to get it all hardened and safe.

Colin also recommended these guys for fixed assets like images and so on to take the load off your machine. Cheap as chips and he has’t managed to use up the introductory $15 even though he owns a high traffic site.

I’ve been learning how to set up company email using google apps standard. So there’s now a mail on pharmarketeer.com for me and Rosie. Need to spend some pennies on cheapo business cards for when I go to networking events. Pharmarketeer has a lighthouse as its logo, and I have’t the dosh to pay someone who can do logos yet, so will go for Staples basic stuff for now.

But it all works, I’m not scared any more. I’ve done what I can – I am talking to people and showing what I can do.

Working with Mike on krowdbuy (watch this space – still very early days) and very excited about that too.

Also had a good time at the Kagu Ling opening yesterday and really looking forward to the Karmapa’s visit to Manchester at the end of July

Having a meeting tomorrow about some contract work that will keep the wolf at bay so that’s cool too.

I’m the happiest I’ve been in years even though I’m broke and facing a ton of work to sort it out. Humans are weird.

Strange situation – will work for money

I’ve still not been paid and must now be owed the best part of £10k. The company I still nominally work for is bust but has’t been wound up yet so I can’t get a P45 and the redundancy £. Bizarrely,  if I resign I will lose it and become just another creditor. I wo’t have a P45 and can’t sign on so my mortgage protection wo’t kick in because I made myself “intentionally unemployed”.

So I’m stuck until the company is wound up or I find another job and write the present nonsense off to experience. Hopefully get the redundancy dosh from the government eventually. This amounts to less than a third of what I’m actually owed if it ever arrives, in ever-decreasing proportions because it’s based on 8 weeks at a nominal amount.

The client we did the work for are willing to take us on as contractors and that means there should be something coming in, but it wo’t fix the hole, just let me start slowly paying my debts off again. The rate is much lower than the usual commercial rate too but that may change once the cashflow starts (another 8-12 weeks though). Or it might not (cynic, moi?). This is’t starting until the 1st July anyway.

The upside of this is that I have started to think like a business owner again and have started up my own company.  This is why I’ve published my novel and am starting to get my other stuff together – I want lots of small-to-medium income streams rather than one reasonable-but-unreliable one.

I had a moment this morning when I got up and I was in despair. I said that I could see us losing the house and all the things we’ve worked so hard for over the last 20 years. Rosie’s response was oh no we’re not. If Rosie says it it must be true, she’s much taller than me and I have to do what I’m told! Never cross a six-foot red head.

The Buddhist in me knows that impermanence is the lot of us all and you can’t fight having to lose stuff eventually. But I’d rather hang on until I’m losing it because I die of old age or give it away because I don’t need it any more, rather than some self-deception on the part of my former (but he is’t, yet!) boss.

If you need a Ruby on Rails programmer with 2 years’ Rails experience and 20 years of systems analysis and whatnot, contact me on francis AT francisfish.com.  Here is my CV  francis_fish_short_cv.doc

Onward and upward.

Archive fragments published

Finally!

The direct url is here.

Here is the blurb from the back cover.

We find ourselves at some time in the future “After the Revolutio”, following the trials and tribulations of Jay, an adjuster/investigator for WorldNet. Jay tries to solve the mystery of a priest drowned in his font and is pursued by the shadowy figure of Kervas. Before the Revolution Odine was trying to understand her place in the world. The interweaving of the fragments of her life and Jay’s help Jay to find out who and what he is. Odine was made by germ line manipulation and follows the Buddha in her own way.

Go on, buy one, you know you want to!

Archive Fragments ready for launch!

I redid the text based on my proof copy and am now pretty pleased with the result.

I created a new version of the book and have ordered 5 copies to see what they look like.

After that I will start o  promoting the book here and other places and see if people will buy it.

Quite excited.

Domain name shift to francisfish.com

I’ve just set it up so the primary domain here is www.francisfish.com.

Remarkably painless, I set up email using google apps a while ago so now my vanity project is complete. The old domain will still work. I have lots of google goodness I don’t want to lose.

The next thing to do here is put some links up to my books so (hopefully) people will start buying them, or at least reading them. I’m going to spend a bit of time on that now.

I got the first proof copy of Archive Fragments from lulu a couple of days ago and have just about finished realising what fonts work a’ stuff. I chose the Royal book size which is slightly bigger than A5 and it does’t work, the pages are too big. You can revise your project until you’re happy so that’s what I will do. I got the cover image of the bloody hand from istockphoto and like it. I thought it was a left hand until I had a d’oh moment and realised that it was the print of a right one.

I’m a little scared of publishing AF because it does’t do a lot of compromising and might offend some people as it is quite violent in places. I feel we have the right to be offensive and censorship in principle is bad, people have the right to their views and weird prelidictions but no right to ram them down someone else’s throat – the off switch is a good switch. But then someone talks to me about young teens accessing violent porn on t’interweb and I’m thrown into confusion.

There is’t an easy answer. I think all us adults need to think it through and decide what we’re comfortable with, regardless of what the tabloid papers think.

And I still have’t been paid…

If they break the law why can’t we?

Comment left here.

We can call them rude names here, and also be angry about the expenses that got out into the public domain. We don’t live in a totalitarian dictatorship where even speaking out would get us prison time or our religious beliefs would have us shot like dogs in the street. Sometimes we need to remind ourselves of that.

Myself I also don’t think we live in a democracy, either, because most of NuLabour’s (and the Tories before them) decisions over the last however many years have not been something I would have voted for and I know I’m not in the minority. The biggest of these being the Iraq war.

There was a lot of shite talked about Blair “needing to lead the people to make uncomfortable decisions” when we went in to that war and the majority were and still are against it. I feel that our armed services were severely let down by this and a lot of people who are willing to die on my behalf were used up like tissues by these cynical people. This offends me far more than the odd chancer taking advantage of their expenses, they should just be paid an allowance and be taxed on it and done with it. End of story.

Also in our unwritten constitution Parliament is actually only tasked with domestic affairs. Foreign wars are the remit of the monarch and the PM/cabinet. No amount of voting in parliament can change this. This is why those of us who have thought about this want the abolition of the monarchy and a written constitution. I’d also like a recall election like they have in the US, when Arnie got in (have’t laughed so much in ages, but the principle is sound).

We don’t live in a democracy, just a place where we can argue about the colour of the bike shed, but at least we don’t go to prison for dissent, and that’s a good thing.

Archive Fragments: Finally I get to finish something

When I was searching around for a second income the other week I realised that I have a lot of things around that I can sell multiple times, as in I have something like four novels I have written over the last 20 years or so.

My magnum opus is called Archive Fragements and is about 200 pages long, I’ve been writing it off and on for ever, usually in sustained bursts of a month or so’s free time and then going back to it after a year or so, editing that material, and then writing some more.

I’ve decided that I’m going to self-publish this using lulu (I’ll probably also pay for an ISBN so people can order it from places like Amazon), after I have revised the current draft, and use some targeted adsense and this blog to promote it. I think I will also release an electronic copy of it under the Creative Commons non-commercial share-alike licence, probably on Feedbooks. While some extra cash is welcome I’d also like people to read the damn thing. 

It also tracks my internal journey as a Buddhist over the last 10 years, to some extent.

I had the idea for a site where you could roll your own version of Archive Fragments by either using a random number generator where you set the seed for the numbers or assembling it in what you felt was the best order, plus adding new material of your own if you wanted to. This would all be Creative Commons NC, with me as the final arbiter on any commercial stuff (benevolent dictatorship being my favoured model, and paying lawyers fees to whiners not). I was trying to do this first and realised it was a waste of my time and much better just to finish folding the little paper boat and let it go downstream.

I’ve spent most of my waking time over this bank holiday editing the book ready for publication. I think some of the writing is pretty good, and some not. I feel excited about what is an interesting adventure and have more projects I can look at in the future if this one pans out.

I need a picture of a bleeding hand for the cover, preferably one that looks like it can easily be painted on a flag or banner, for reasons that will become clear if you ever read the book.

Archive Fragments: The back cover

We find ourselves at some undetermined time in the future “after the revolutio” looking through the eyes of Jay, an adjuster who represents a vague computer system called WorldNet. It uses him as a check and balance to ensure that its decisions are correct and humane. As part of this he also catches and punishes people who misuse resources. Jay believes that he is an amalgam, a person who committed terrible crimes and was punished by having other people’s memories forced into his head until he gained a sense of empathy and understood what he had done. The implanting process leaves particular marks on the body so everybody knows that he was, himself, adjusted. He is trying to atone for what he did by helping and preventing others from committing crimes against the commonality.

In Jay’s time there is an historical figure known as Odine. She was one of the architects of the revolution and quotes and musings from her many writings appear at various places in the book. Her story (or parts of it) are in the narrative. She became a national hero after she persuaded a child abuser who was above the law to end his life and was accused of his murder. She was also made, this time by people hunting for wisdom, on or around our current time frame. Her rise to fame and influence was the beginning of the process that resulted in the society that Jay lives in. This event is known as the Attack of Common Sense.

As the book progresses we get pieces of Jay’s attempts to unravel the mystery of a priest drowned in his font and flashbacks from the fragments of other people’s memories that are stored in his brain. They range from being a PoW in the Second World War, to suffering from a weak heart in hospital, to nearly drowning in a kayaking accident. Jay discovers many things about himself, and is pursued by the shadowy figure of Kervas, who helped make Odine.

Broke

Not having a huge amount of fun at the moment.

We’re waiting for some venture capital money to come through at the moment and I have’t been paid for April and probably wo’t see any cash until the end of May.

I ran out of overdraft at the weekend. 

We’re having a month’s holiday from the mortgage and I’ve arranged to welly one of the credit cards for something to live on, plus it turns out NPower owe us a lot of money on the gas bill but they have a rep for being extremely hard to get money out of, so I’m not holding my breath.

But fun I’m not having. When/if I get paid things should look up a bit but this is not good for the nerves.

I need to start working on other forms of income like my writing and so on.

Hey ho.