Bitwise or bit stupid?

I’ll hold my hand up right now and confess to being bit stupid, I was really disappointed with my score in a recent php proficiency test and most of my downfall was bitwise operators (the rest was array functions I’d never needed to use before and I’ll tackle that in another post).

So what’s all the fuss about?

Continue reading Bitwise or bit stupid?

PHPUK Part 3: Comedy, Chris and Closing

Who do you call… Myphp-busters!

Reeling out of Hank’s Microsoft talk I rushed to get a seat for my ‘must see’ talk of the day Myphp-busters: symphony framework. I’ve been dabbling with frameworks for a while as they seem to be becoming a vital tool to increase productivity (especially important for us freelancers) and aid collaboration and team-working by reducing ownership of code (ie. everyone has a better chance of following the code in that clever widget you just built).
Continue reading PHPUK Part 3: Comedy, Chris and Closing

PHPUK 2009 Part 1: Cutting edge and Community

I was really excited to find I was able to go to the PHP conference in London on the 27th February this year, following a fortuitous set of circumstances and I’m glad to say all my excitement was well founded!

It’s great to be part of such a large friendly community and I was really happy to catch up with folks I’d met at PHPNW and talk about the changes to our industry in the last few months. Despite a global downturn it appears that the world of php development is still above water and in some cases actively thriving. So to the talks…
Continue reading PHPUK 2009 Part 1: Cutting edge and Community

Happy St David’s Day

There would have been a lovely image of a daffodil, taken today, but flickr has hiccups…

Happy St Davids Day anyway!

Update: as flickr is feeling better:
Happy St David's Day

Displaying html code listings your blog

I’ve long admired technical bloggers who spout seemingly reams of code listings to illustrate and support their blog articles, whatever the subject.

My recent forays into testing html5 and reporting the findings has lead me to want to produce my own listings. Really simple I thought, just dump the plain text from the source between two <code> tags and hey presto, one listing. Um… No, not quite that simple. It works fine for css – it’s considered plain text unless found in the <head> of a document between <style> tags. Html, however, is more tricky as the browser wants to render it <code> tags or no <code> tags.

Veteran code geeks may laugh and point at my obvious stupidity but I can honestly say it was only after several frustrating minutes of forum searches that the doh! moment struck and I remembered html entities.

So for anyone else out there bashing their head on this seemingly simple conundrum here’s the solution:

  1. type or paste your html code into your favourite blog software between <code> tags
  2. change every & to &amp;
  3. then change every < to &lt;

If you fancy showing the line numbers as well you can always mark up each line as a line item <li> within an ordered list <ol>.

Simple – now I know that is…

… happy code listing!

Fixing footer styling

Happily I appear to have fixed the issue with footer styling as detailed in my last post. Oh to have such an easy answer to all my problems!

The addition of
{display:block;}
to the css told the browser (in this case firefox 3.0.6) what sort of element <footer> is and therefore how it should be dealt with.
Result – display as originally expected:

screen shot of firefox 3.0.6
screen shot of firefox 3.0.6

Big thanks to Bruce and David for pointing out this simple but effective solution.

Do not adjust your set it’s just HTML5

I’m lazy by nature and the less I have to type to get something working the better. This is what attracted me to HTML in the first place: meaningful tags reducing the need for div-itis. Adoption by the browser manufacturers seems to continue at their own pace (whatever that really means) and in the mean time something I expected to look like this:

screen shot of firefox 3.0.6
screen shot of firefox 3.0.6

well lets just say, it just didn’t. Not good…

Continue reading Do not adjust your set it’s just HTML5

Advice for a journey and life

A young friend is off on a long journey soon and as I wondered how best to wish him well I came up with the following. Of course me being me and being my age I couldn’t resist a fair chunk of (probably unwanted!) advice…

I just wanted to say good luck on your journey to new lands, I hope you find what you’re looking for there. Since I have a huge dollop of zen in my philosophy, the way I looked when I was searching was to look for koans, short phrases containing nuggets of truth. You find one that enflames the senses and opens the soul and you live by it for a while until it no longer needs to mean anything, then you find the next, kinda like signposts on the path to life. You find them in the moments you listen to. Hope that helps… and when all else fails, have fun 🙂

I guess it’s not a bad view of life for anyone.

Welcoming in 2009

One of the resolutions this year was to post more on my blog and as it’s already 18th of January before the first post of 2009 I may be behind schedule…

One of the delays has been just not feeling comfortable with the look of my blog and the ever present Damocles sword of updating the blog software. I use wordpress and seem to be updating the software more often than updating the blog. Hopefully since I have taken the hour this morning to carefully backup the old site, check my config file changes and install a stable version of 2.7 this will no longer be an issue – at least until 2.8 comes out.

I’ve also treated myself to a new theme, I’m not sure about the blue but the basic style layout is ideal. As I hope to write on a number of varied subjects that interest me, I’m not going to be happy with an overtly geeky or typewriter or photography style – especially if I’m advocating the best use of chilli in parsnip soup at the time.

So the plan is – and I’m telling all of you so I don’t back out – to write more on my journey into php, my latest love hate relationship with html5, my favourite organic veg inspired recipe of the moment, the tai chi move I can’t get my head around and maybe my latest photography walk with highlights.

It’s a tall order perhaps and I may not succeed with everything all of the time but if I learnt only one thing in 2008 it was that if you don’t aim for the stars, you sure as hell ain’t gonna get there.