PHPdom

I got a-thinking the other day (I do that occassionally) and thought how great it would be to be able to separate content from code – HTML from PHP – in a similar way to asp.net. Of course that quickly led me onto thinking about the Document Object Model, which allows JavaScript to interact with a HTML document and manipulate the content.

The obvious stuff would be there: innerHTML, getAttribute, setAttribute, appendChild, removeChild, getChildNodes etc. Fantastic, I thought, I could keep my logic and database-y stuff complete separate from nice clean template documents. It would be a revolution for PHP, and I would be hailed as a genius.

It’s a good job that I had a quick search to see if anyone else had done it, as someone definitely has. Not to mention it’s even part of the PHP5 core (OK, that’s actually for XML documents, but could be mangled to work with XHTML).

This has taught me two things:

  1. I’m not nearly as clever as I think I am
  2. Searching the web before opening my mouth proclaiming how great I am might save me from looking like a pillock

Quick introductions to web technology

A friend of mine from the GAWDs community is in the process of setting up a new directory website (well, it’s much more than that, but you’ll have to head over there to get the full picture). There are some useful articles on his site explaining various aspects of web technology, here are some you might find useful:

And there’s more where they came from. Everyone say “Thanks, Vince!”.

Cartoons I have Known and Loved

There are some hugely talented cartoonists out there in WebWorld (not to be confused with WaterWorld, which is more wet in any number of ways). Thanks to the wonders of feed subscription I can keep up to date with all of my favourites very easily.

So here’s my top 5 favourite cartoons available on the web:

5) In at number 5 is OK/Cancel drawn by the esteemable Kevin Cheng. It’s like Dilbert (see number 4) but in an even more believable world. In fact I sometimes wonder how his bosses at Yahoo let him get away with it; no doubt they have meetings behind his back in which they discuss how to avoid becoming the next Cheng target.

My favourite recent cartoon was this subtle dig at online advertising*.

* This link was brought to you in association with ChumpMonkey Enterprises, manufacturers of high-quality chumpmonkeys.

4) At number 4 (only at number 4?! I hear you cry) is the insightful and oh-so-true Dilbert. OK, Dilbert is a classic amongst anyone in the IT industry, but he only makes number 4 for me, mainly because of the vagaries of my brain, but partly because Scott Adams’ blog is, on the whole, funnier. Not funnier in a ‘that’s funny’ kind of way, I mean funnier in a … remember those monologues that Kryten used to have in Red Dwarf? You get the picture.

My favourite recent cartoon was this one which illustrates why, sometimes, carts are better before horses.

3) Slipping in at number 3 is Bug Bash by Hans Bjordahl, a delightfully colourful cartoon showing the lighter side of programming. More than once have I used a technique directly from this cartoon to cover my ample behind when something has not gone as … optimally as it could have.

Take this, for example. My favourite recent cartoon shows how words can be used to give someone the slip. Funny, and true.

2) Just missing the top spot at number 2 is one of the web’s most popular sites: gapingvoid. While Mr MacLeod may be doing more wine promotion than cartooning at the moment (he has a living to make) his extensive archives are full of absolute gems. And with quite often anything up to a dozen new cartoons appearing even on an average day, there is plenty to be going on with.

This little beauty is my recent favourite. Partly because his simple but brutal style still amazes me, but mostly because he makes public what goes on in all our heads.

1) Ranking in the top spot is my very good friend Dave with his Cartoon Church. He’s not an A-lister like Hugh MacLeod or Scott Adams, and he’s not into software like Kevin Checng or Hans Bjordahl. But, and this is the key for me, his sense of humour ties very closely with my own. Sure, I’m quite a bit more manic than he is (he’s actually a quite shy, retiring sort of chap) but his skewed way of looking at the world is something I find resonates with me at a deep level. Or perhaps that’s just the three bean soup repeating on me.

So many favourites to choose from. However recently I have sniggered repeatedly at the perfect gadget, even if I am one of those idiots with white headphones.

So, long may internet cartoons continue. Special mention must also go to a very recent discovery, XKCD, which is proving to be a worthy find. This 90’s flowchart nearly made me fall off my chair.

What is Web 2.0

It’s been a bit of a mad week, what with work, more work and a brief timeout to recover from a cold. However this video has been aking the rounds recently, and I think it’s great. It’s certainly a great use of showing abstract ideas in a concrete way.

Invaluable CSS techniques (and people)

Here’s one for you CSS jockeys to bookmark: 53 CSS techniques you couldn’t live without. I knew about half of these, but the others will come in really handy as well.

UPDATE: If you’re looking for the best of the best CSS gurus to handle your large web project this bunch will do you proud (tell them I sent you, they’ll say "Chris who?"). But if you just need a small project doing then you could hire me (tell me I sent you, he’ll give you a good deal).