the life and times of a failed jedi...

- Friday, June 27, 2008 -

They really shouldn't


Because of being asked to design something for work, most rooms in the school now contain a poster which includes the above image of me. I love my job some days.

I kind of forgot that this all was here. Life gets in the way somewhat. I got a new cameraphone that has an extra two of megapixelings which I thought would mean I'd post a photo, but somehow an opportunity didn't present itself. Ah well. There's always tomorrow.

overandout.

Labels: , ,

- Thursday, June 12, 2008 -

so we dream/so we die

Hello again you cheeky beggars.

Even the Network's been bloggin' recently but not me.

I think birthweek is pretty much wrapped up now. Got some drinks next week that I can claim but that's it. I forgot to mention the Duke Special concert. That was a good time. We're going to see him with an Orchestra later on in the year. Should make for the good times.

I've been very tired recently. Probably without good reason. It's crap being tired when you're having a baby soon because everyone has some variation of the line "well you'll be even tireder come September". I don't care. I'm tired now.

Still, the solution - to my mind at least - is to have a nice break. So we're going to a hotel this weekend and leaving the Noock in charge. Nice. Then we'll have a nice ol' family time in Cambridge in Sunday. I shall have to look out my poetry book and boater so that I can stand on a punt reciting and quoiffing. I believe that is the custom.

There's not much else to say really. Work is going through some fascinating times, but all in all it's better not to say anything about that here at least.

overandout

Labels:

- Wednesday, June 04, 2008 -

Sell your farm and come to the city with me..

GENERIC WITTY COMMENT

- Saturday, May 31, 2008 -

tentative foray into php coding advice

If you're not interested in PHP coding please stop reading.

I'm open to correction on this, but I thought I'd put it out there in case it's helpful to anyone OR in case someone can point me to a simpler solution.

I've been developing the simple content management that powers the strangeday site news and gigs. The key points here are:
- I was using object oriented programming
- I used the PDO (PHP Data Objects) class for the database connections etc.

When it came to uploading, I quickly realised that my hosting provider, A Small Orange, has PDO disabled. So far so bad. However since I'd separated out what I was doing with the Object Oriented approach it was simply a matter of changing the database connection class and everything else would be hunky-dory.

Not so much.

My actual page was using the PDO Statement which gets returned as an array. Here's the final output code:


<?php
$i = 1;
foreach ($results as $newsitem)
{
?>
<p class='line<?=$i?>'><span class='newsitem'>..</span><?=$newsitem['title']?></p>
<?php
$i++;
}
?>


And here's the PDO code that was returning the query:


try
{
if ($squery = $this->dbh->query($query)) return $squery;
}
catch (PDOException $e)
{
die ("Database error @select: " . $e->getMessage() . "<br />\n");
}


My troubles began when I stopped using PDO::Query and changed to using mysql_query and mysql_fetch_assoc so that it would work on A Small Orange.

I ended up with an error in the foreach. What I wanted to do was change the connection side of things so that I could switch it depending on whether the hosting environment supported PDO or not.

What I needed to do was output an array that was functionally the same as the PDO Statement array. Here's what I came up with:


$result = mysql_query($query);
$squery = array();
while ($row = mysql_fetch_assoc($result))
{
$keys = array();
$values = array();
foreach ($row as $key=>$value)
{
$keys[]=$key;
$values[]=$value;
}
$squery[] = array_combine($keys, $values);
}
return $squery;


Obviously this needs error handling and I also wrote functionality into the class that would switch based on a PDO = true or false flag type arrangement but that's essentially my solution.

Comments/suggestions?

Labels: , , ,

another year goes by

I'm doing a little garden blogging today. Underneath a recently purchased gazebo (more fun if you prounounce it gayzbo I find) sat at our weathered but newly varnished table which happens presently to be crawling with ants.

And so to a thorough and all-encapsulating (all-encompassing?) report of the days that we find ourselves to be living in. No doubt the frivolity and general "larks" are a direct attempt to draw a contrast to the darkening days our nation is sliding into. If you believe the redtops at any rate.

Birthweek is still operational. You will be glad to know. I know I am. The programme has not been, perhaps, as comprehensive as in past years, but let me take you through a few of the highlights:

- a weekend at ashburnham where I was one of the team leading the musical side of things. Always a joy.
- McDonald's breakfast
- drinks!
- Family Harding meal
- Open Mic (the return of oh yes)
- Childhood heroes fancy dress partay
- worky drinks
- A drink with the Hatt
- Red Lion Open Mic

Still to come are:
- Family Hawks meal
- Bowling my brains out
- Giggity
- At least two "people who missed my partay" hookups
- GWS crew pubbity

That's not at all bad now is it. Plus - bowling my brains out. Damn!

I know you all want to know this, so here's the guestlist for the childhood heroes partay last nite:
John Lennon
Tony Hart
Malboro Man/Brokeback Mountain/A Cowboy (variously depending who you're talking to)
A Centurion/Gay Centurion (as above)
Jesus
Audrey Hepburn
Pocahontas
Tinkerbell
Bananaman
Wolverine
Wilma Flinstone
Peter Venkman - Ghostbusters
Ray Stantz - Ghostbusters
Baby from Dirty Dancing
Captain Pugwash
Indiana Jones
Wonderwoman
The Fairy Godmother
Huckleberry Finn
Slash
Woody
Ronaldo
80s Kylie
Marty Mcfly
Supergirl

There were probably some more as well as a bunch who came straight from work or "weren't down with that dressing up thang". Good times.

K that's it.

Look after your faces.

Labels: ,

- Sunday, May 25, 2008 -

Sage advice

GENERIC WITTY COMMENT

Birthweek Woop Woop

- Thursday, May 22, 2008 -

no, don't stop

no don't. stop.

Labels:

- Thursday, May 15, 2008 -

lemme take you to school

I probably have many things to say.

None of which are appropriate I deem.

Therefore.

I will talk to you about ASAP.

ASAP, as many of you will know (I don't doubt), stands for "as soon as possible".

I have deciphered (no need to thank me for the legwork here) two possible meanings for this phrase when appended to notes I may receive in the line of duty. I will posteritise (new word, folks) these new meanings right here. And this is just (and I mean that my dear peeps) for you. Yes you. Here we go:

1. I need this now if not sooner.
2. I need this as soon as possible. I understand that you have a dynamic workload and I understand that you have to prioritise said work depending on needs and then based on a "first-come, first-served" basis. Based on this understanding, I would like this work done at the earliest convenience your schedule allows given these parameters and allowing for an arbitrary sense of urgency you may place on pieces of work when faced with a dilemma caused by two pieces of work - one marked ASAP and one with a definite date - where the "definite-date work" came in after the the "ASAP work".

I'm also going to let you in on a little secret. Yes indeed. I process all work marked ASAP under the category assigned to the number two above.

That is to say: work marked ASAP is.. I can hardly contain my glee in saying this.. is NOT treated as urgent.

There is a VERY important lesson to learn here, kids. And it's not the obvious one (much as it pains me to say it). The obvious lesson is to mark your work as "NEEDED BY [date]". The slightly less obvious lesson is to not mark your work as ASAP unless you mean meaning number two (I get some people who actually do mean meaning 2 - they are glorious people). The lesson I'd hope you'd learn is this: TO MEAN WHAT YOU SAY.

The super super not expected lesson is to manage your suppliers. Yes, by all means mean what you say, but also plan in your own golden contingency. If you tell me you need it for 9am but you secretly need it for 11am... well then if unforeseen circumstances happen.. it's not all so bad now is it.

The corollary of this little theorem is that you never let on to me that you've been managing me. If you consistently tell me a certain time but always pick your work up late.. well it's a dead giveaway isn't it?

The secret secret about how I treat you in all of this? Well that's a secret now isn't it? I can't give away trade secrets, can I?

A-A-ohhhhh (verandout)

Labels: , ,

- Wednesday, May 14, 2008 -

Trend setter

GENERIC WITTY COMMENT

Just you see if I'm wrong.

- Friday, May 09, 2008 -

I did look for it last nite

This is a bloggin' post.

I know that becos I sin one before I ave.

Right. To business. We're sitting in the garden on a new swingin' chair and I can smell cut grass and all is right with the world. You see it doesn't matter what's going on around you you just gotta live the moment. Or whatever.

We had some talks last nite and the Open Mic nite (what used to be called Jack's but won't be any more - see below) may well be returning hurrah!

And Mr The Jack is back!

Hurrah!

Foop-ball is tonite. Hopefully that'll be good.

I know I'm not really saying anything here, but it's hard to say something when you're me because you have to justify it all so much. Mmmhmm.

I'm gonna go and enjoy life instead of typing about it.

ovout

Labels: , ,