Posted by Kate Phizackerley on Friday, February 20, 2009

I'm feeling proud of myself today. For a couple of months I have wanted to replace emoticons like :) in my sidebar twitter lifestream with an emoticon image like *happy. At the same time, I've also managed to tidy up the stream to get rid of direct tweets. (I'd had a workround using a Yahoo pipe before but it was ugly as people could have followed the wrong stream.)

It's got the most impenetrable line of code I have written in many years. Take a look at this:

Array(/(.*):\)(.*)/,/(.*):\((.*)/,/(.*);\)(.*)/,/(.*):bz(.*)/,/(.*)%%-(.*)/,/(.*)\\:D/(.*)/,/(.*);\)\)(.*)/,/(.*)\(%\)(.*)/,/(.*):D(.*)/,/(.*):-/(.*)/,/(.*)>:D<(.*)/,/(.*):[P\p](.*)/,/(.*):-\*(.*)/,/(.*):-O(.*)/,/(.*)X\((.*)/,/(.*)B-\)(.*)/,/(.*):\)\)(.*)/,/(.*):\(\((.*)/,/(.*)[/\\\]:\)(.*)/,/(.*):-&(.*)/);

It got so bad I wrote another programme just to write this line of code for me.

The emoticons in the sidebar here are tiny but I can use the same code and just point it at a different set of emoticons to get big 3D ones. I'll probably set up a separate life stream blog with big chunky graphics as a demonstration.

All of which to many of my readers is probably goobledygook. Maybe, but along the way I have mastered Javascript, JSON and regex. That signifcicantly increases what I can do - for instance the recent comments was a sideline out of this project.

1 comments:

Debbie K said...

Hi Kate
I just droped by to see how you are doing.
I specialise in goobledygook & use it more often than English.
In any language you are one special lady & a true friend.
Take care
(((((((((hugs))))))))
Love
Debbie

Search

Admin Control Panel