and.radio.wires

Code sample of the day

var openOrClose:Boolean = new Boolean();
if (_listM.listState)
{
openOrClose = false;
}
else
{
openOrClose = true;
}
_listM.setListState(openOrClose);

Posted in work on Thursday 15th of September 2011 by Mike | 0 comments

Labels: code sample

Finding the time to blog

...like the perfect sundae or the ability to lie about how crap I think a film like Scott Pilgrim vs. The World is, eludes me. Sam seems to find the time from somewhere. Perhaps when he gets a real job he will be less prolific, blog-wise. He has come up with some interesting posts recently, none of which have gone un-read and some of which will not go without an accompanying post on this site. But he and you will have to wait.

Posted in work on Thursday 30th of September 2010 by Mike | 2 comments

Waving hello to the future

Google WaveYesterday morning I received an, eggarly awaited, Google Wave invite. Google Wave is a web-based tool that amalgamates current forms of communication and collaboration in a real-time environment. There is a long, but interesting video on it here. It is something I've been very excited about for a while as it stands to do what so many other Google tools have done and reinvent the way people do things on the Internet.

Google Wave is currently live as a developer preview only, so if you want an account you can; sign up for one, be very nice to someone you know who has an account that allows them to give invites and coerce them into giving you one, or wait a few months for a public beta launch. For the majority of people the latter is going to be the only option available to them, but as it turns out that's not as bad as it may seem because; like all forms of communication or collaboration if you don't have anyone to communicate or collaborate with then its not much use. I've been able to make limited use out of it so far; having had a few conversations and played a couple of games of chess.

That isn't to say I don't like Google Wave, in fact I think its a fantastic idea. I particularly like the way that waves are structured as trees, allowing for someone in the wave to add a reply or comment to any part of a previous message. I also like the Playback function that allows someone to view the entire history of a wave incrementally. I'm also very glad that Google have decided to make the Wave protocols and APIs open, especially as I'd much rather have a Wave Client as a desktop application than as a web app.

The fact that everything is in real-time will certainly take some getting-used-to, although they mention in the video that there will be an option to turn that off, but even so it's odd that there is a gratuitous 'enter' button, and pressing the enter key doesn't trigger it.

So, even though I now have a Google Wave account it seems as though I won't get to use it to its full potential for a while; having to wait for the public release, and even then it could be some time before enough people start to adopt it. Still, good things come to those who wait. Wave on!

Posted in work on Wednesday 4th of November 2009 by Mike | 0 comments

Labels: Google Wave

Multiple sites using WAMP

I was doing some dev work for this site earlier today (creating a lightbox/slideshow using JavaScript) and I remembered how much of a pain it used to be working on my local server and having to swap files around when I wanted to work on different sites and also the difficulty I had in finding out how to set up multiple sites with WAMP, so I thought I'd quickly describe the process here. A lot of sites I found over complicate the issue; the process is:

1) Add the url of the new site to "C:WindowsSystem32driversetchosts" underneath the default lines for localhost like so:

127.0.0.1       localhost
::1 localhost
127.0.0.1 websiteName.local

2) Edit the apache httpd.conf file to include details of the new site underneath those for localhost like so:

<VirtualHost *:80>
ServerName localhost
DocumentRoot C:/wamp/www
</VirtualHost>
<VirtualHost *:80>
ServerName websiteName.local
DocumentRoot C:/wamp/www/websiteName
</VirtualHost>

And that's it.

Posted in work on Friday 28th of August 2009 by Mike | 0 comments

Labels: WAMP

Smells like iPhone

I've just finished creating a CSS file that will be rendered if someone browses this site on an iPhone. It's not massively exciting as I've not cut out any new images or anything like that because its mainly for my benefit - incase I want to post anything 'on-the-go'. It is the first mobile stylesheet I've created though, so thought it was worth a mention.

I've used PHP to sniff for the browser and then apply the relevant stylesheet:

$browser = getenv("HTTP_USER_AGENT");
if(eregi('iPhone', $browser))
...

The actual CSS was fairly trivial - just overwriting font-sizes and the like from the main stylesheet.

Posted in work on Thursday 16th of July 2009 by Mike | 0 comments

Labels: iPhone, css, php