radiac.net

diary - archive

February 2006

Optimus Keypad Looks The Suck

1st February 2006 at 08:392 comments

Ok, I know I'm not the only person who saw the Optimus keyboard with the customisable keys, and that I'm not the only one who saw the notice for some 'exciting news' on February 1st.

But then they went and released this: the Optimus mini three keyboard (see this Engadget article if the main site is slow).

It's a three button keypad. Three incredibly neat animated buttons, but still, just three. What can you do with three buttons on a peripheral device, when I've got a mouse right here with five customisable buttons?

And if it was selling for $30, I'd be tempted. $50 would still be a bit high, but still, it's pretty neat. But $100? For three buttons? Surely it would be cheaper and better to buy a small touch screen?

I am most disappointed. Anyway, time for the hospital!

Hospital Appointment Joke

1st February 2006 at 12:381 comment

Ok, so as you may remember, I was referred to a specialist at a hospital about my on-going nose issues. The fact that the hospital was an hour away was bad enough, but when I got there it was even more of a joke.

First of all, although I thought I had been referred to a specialist, I was actually referred to his clinic. That meant that I didn't get to see him, instead I saw a nurse. Now I'm sure that nurses are very competent, but they're still not doctors. Not that I think doctors are all that either, but that's a different story.

The nurse then did exactly the same thing as the two GPs I've seen - she asked me what happens, what I've been taking, and she looked up my nose. Oh, no, to be fair she did demonstrate her specialist knowledge of the Ear Nose and Throat field - she looked in my ear and saw some wax. Yeah, because I can see how ear wax would be blocking my nose.

Next she said that she needed to test me for allergies, only they didn't have the kits in Redruth. Here comes the best bit - she said she'd have to refer me to Treliske, right here in Truro where I should have been sent in the first place.

Yes, that's right, I saw GPs in April, September, November, waited until February for an appointment with the specialist who I didn't get to see, and now I have to wait another two or three months to see an allergy tester in Truro, who will no doubt need to refer me to a consultant in Newcastle to analyse the results.

Loving the NHS.

Spam: The Answer

3rd February 2006 at 15:20Comment

As you all know, I have been engaged in a battle with spam for many years. So far today, for example, I have recieved 15264 spams. This is not an unusual total.

Something needs to be done. A little while ago I wrote an open letter to whoever buys from spam, but short of resorting to buying an e-mail list to spam it out myself, it has become clear to me that it will never have the desired effect.

I have therefore come up with a simple solution. And no, it isn't arranging for an international hit-squad to kill all of the spammers. No, this idea is inspired, in fact, by the Kama Sutra.

I refer, of course, to the worm by the same name that was supposed to wreak havoc on the users of the internet today, by deleting their files. Now, the kind of people who are going to get infected by this worm are people who don't run firewall. Who don't have virus protection software.

Who are exactly the same group of people who will let their machine become part of a spamming botnet.

So there is a very simple and elegant solution, that will rid the world of spam, and net me my very own island paradise in the process:

  1. Get an island

    This is important. It can't be any old island, it has to be one that doesn't really belong to any country - because by doing so we will escape the long arm of the law. That little man-made island out in the north sea would do, but failing that, BoingBoing have a very appropriate link today to people who sell islands. Score.

    Although to be honest, I'm not so keen on the idea of buying an island - if it's not protected by any parent country, I can build a long-boat and invade with a small army of viking warriors, and we can rape and pillage our way across the island, just like in the good ol days. I will be publishing the application form shortly, if you are interested in joining my viking army. Yes, there will be broadband and wifi on the boat.

  2. Write a virus

    See, this is why we need the island - I don't want to go to jail. The virus will have to perform the very simple tasks of replicating like a bunny, followed by locking the hard drive a few days later. How it does these things doesn't really matter - e-mailing, exploiting vulnerabilities, renaming C:\Windows, deleting the MBR - who cares, it just has to spread and disable the machine.

  3. Write an antidote

    It would be a bit mean to break millions of computers around the world and not offer a way to fix them. Of course, it will only come bundled with free firewall and anti-virus software...

  4. Release the virus and antidote

    I am sure AV companies will be quick to offer their customers patches, but that's ok - they're not going to be part of a botnet anyway.

No, I am quite sure that it would all work very well; within a few weeks every vulnerable machine on the planet would be infected and disabled, and they would all have to install an AV+firewall to get it up and running again. All the rest of us would have to do is sit back and watch the spam river dry up, and the spammers try to find real jobs.

Some of you may say 'Well, why not just write a virus that installs the AV+firewall and then destroys itself without disabling the computer?' Well, it's simple - until something bad happens, people don't care. What happens if they go out and buy a new computer a month after the virus naturally dies? They won't have AV+firewall on it, that's what will happen. Whereas if they can't download their porn for a few days, they'll soon learn that viruses are bad, and they'll never leave their computer unprotected again.

Foolproof!

BEEEES!

6th February 2006 at 10:052 comments

I've just discovered the New Scientist Podcasts, and am currently burning them to CD ready for the next 5-6 hour drive back to Kent.

I've been working on this second Flash CD for far too long now, and I'm desperate to get it finished. The problem is that it's just so damned time-consuming. The first CD took me two months of 10am-5am days, but this CD is far more complicated than the first. And I'm only working during the day.

The activities on the first CD were all quite similar, most of them being based upon the same objects and library code - as a result, the code files for some activities were only 10-20 lines with about 400 lines of library. The average code size for the activities on the second CD is currently around 950 lines per activity, using 8 classes and three libraries which currently total 2200 lines. Obviously with Flash it's not all down to line count, and it's what the lines say that matters, but it still gives you an idea of how the two CDs compare.

I think my mistake was that I waited until the first CD was finished. My rationale was that if something in the first CD needed changing we should find out before we start the second CD, then we can get it right from the beginning. I thought that would be a couple of weeks, a month at most - I ended up sitting around pretty much from February until July while we waited for the slow cogs of bureaucracy to turn - 5 months where I could have pretty much finished the second CD.

Since then I've been working on it full time, apart from for a couple of months around September while I was moving house and had to deal with things related to all that. Over that time I have probably spent a couple of weeks working on the websites I maintain to keep that side ticking over, and there was that week over Christmas when I went home, but apart from that it's been ActionScript all the way baby. At times it's been hard to stay motivated with no pressure from above and no deadlines, and I'm sure some of my days could have been more productive, but I'm sure I'm no worse than the majority of the UK workforce.

So I'm going full speed, but I'm worried that they're expecting it soon, and dragging my first major project out over a year is hardly a successful start to being self-employed. I did 3-4 months of the year to dealing with family stuff, but really that's of no consequence to a company - it will just put them off having anything to do with me in the future, even if it is all settled now.

Hmm. I think what I'm saying is that I should probably stop writing this entry and get working :)

One last thing before I go - the comment spammers got in. How they did it I don't know, but I'm guessing they have some way of automatically noticing when their comments aren't getting through, then they investigate by hand and add some kind of template parser to their spamming bots. Either that or they perfected AI, and their next step is unleashing their death robot armies. I will investigate more when time permits.

Multiple Monitor Madness

7th February 2006 at 18:09Comment

For some reason, this is the first time I have tried using two screens from one computer. I've plugged my 19" crt into my laptop, and I must say, I can see why people like this. Having an extra 1600x1200 means that I can have two textpad windows maximised to compare files, or PSP on one and textpad on the other. Of course now I'm wishing I had yet another screen so I could have smartftp on that...

This definitely confirms in my mind that I want a multiple monitor setup for my main desktop back in Cornwall. But I'm still not sure how I want it to work - I not only want to have multiple monitors for one machine, but I also want to be able to use other machines through the extra monitors. For an example, I will resort to ASCII art:


Monitor    Monitor    Monitor
   |__________|__________|
              |
          Windows PC

I want that. That's easy. But as I say, I want to be running more than one computer from the one keyboard and mouse. It is also easy to use Synergy or VNC to share a single keyboard and mouse between several computers plugged into their own monitors:


Monitor    Monitor    Monitor
   |          |          |
Linux PC  Windows PC   Apple
   |__________|__________|
              |
          Synergy/VNC

But do any of you have any idea how I can combine these two approaches? I want to be able to run windows on all monitors, but switch the side ones to different machines. I could use the video ports on a couple of KVMs to let me swap the side monitors between Windows PC and the other machines, but then how would a Synergy/VNC setup cope with that? I am aware you can configure them to skip out a screen if the machine is turned off, and arrange the Synergy screens as 'Windows, Linux, Windows, Apple, Windows'; perhaps that is the answer. But that would suck when I have the linux and apple machines turned on, and I have switched all the monitors to Windows.

Perhaps I could run a VNC server on the linux and apple machines, and open clients on the windows pc side monitors - but surely that would make performance suck? Does anyone have any knowledge and experience of this?

I know some of you have used Synergy, and perhaps others have used VNC - does anyone have any ideas?

Perhaps I should just buy more monitors.

Help Me Buy Some Books

14th February 2006 at 12:053 comments

I'm about two weeks away from finishing the bulk of my Flash work, so I'm looking for some new books to support the things I'll be starting after that - google's nice, but it only goes so far. I thought I'd ask you for suggestions and recommendations - any help you can give me would be appreciated!

First up, PHP. I should say that I'm looking at PHP 4 - I'm thinking it still has a wider install base than PHP 5, and as long as I write well, it should work in PHP 5 too.

Efficient PHP. I have recently been testing the efficiency of different approaches to solving the same problem, by running variations of algorithms on test data and timing them. This is good, but is time-consuming and not foolproof. I'm after a book that would discuss the speed merits of avoiding the use of objects, details of when to use case instead of if, things like that to save me wasting time figuring it all out myself. And although I have my own ideas, I'm also interested in reading about what other people do in terms of caching and increasing the performance of PHP (without load-balanced servers and caching proxies).

PHP security. I've been developing server-side scripts for over 8 years now, so I'd like to think I have a good understanding of how to ensure they are secure. I have read through the online chapters of Essential PHP Security and they didn't have anything new in them, but I figure a more advanced book might show me a few tricks that I've missed. Although most server-side script security issues are going to be the same between languages, focusing on PHP might also help me avoid some PHP "features" that I haven't come across yet.

PHP documentation. I hesitated writing this because the online documentation is very good, and is supported by user comments, which are occasionally quite useful. However, it can never hurt to have a book sitting next to the keyboard.

Those three don't necessarily have to come in three separate books of course. I've had a look at the following:

  • Advanced PHP Programming - sounds like it might be good for the optimisation stuff, and it covers SOAP etc too which is a bonus
  • Essential PHP Security - the chapters I've read were a bit basic, but perhaps those were just the only ones I already knew ;) Cheap enough to be an acceptable risk, but is there something better?
  • PHP in a Nutshell - Perl in a Nutshell was great for quick reference, and this one sounds good.

Then there's MySQL. I've done quite a bit with it, but I don't think I could say I ever really mastered it. The databases course at uni didn't help, but perhaps that was the lecturer - wasn't he taken off teaching duty after that? Like PHP, the online documentation is pretty good and I can do what I want to do, but I wonder if it might be worth getting a good book - I'm sure there are good practices I'm not following, or features I'm missing. Perhaps the PHP books I get will already cover everything I need, but perhaps a MySQL book would be good too:

  • MySQL in a Nutshell - looks like a long list of commands with no overall concept discussion, but am I wrong?
  • High Performance MySQL - I like the sound of the stuff on indexing and query optimisation, but the rest of the book is beyond what I'm currently after; no load-balancing or replication for me just yet.

Have you noticed that I like O'Reilly books? I'm happy to get something from another publisher, it's just there are so many and I know that O'Reilly are usually pretty good.

I'm also frustrated by the lack of decent javascript documentation online. Although there are lots of excellent blogs that do go over concepts, there doesn't seem to be any site where everything is listed well and in one place. With the one notable exception of Quirksmode, most of the stuff online either seem to be left over from Netscape 3 days, or are snippets of half an idea on somebody's blog. So:

Javascript Reference. Something which comprehensively lists and explains the standard commands, but also goes a bit further. O'Reilly's JavaScript: The Definitive Guide sounds promising, but it was written in 2001, so I'm guessing it won't have much focus on the DOM or Ajax. There's a new edition coming out in June this year, but I want to have my CMS nearly finished by then. Perhaps I should be looking at getting the 2001 edition and using the internet or a newer Ajax book to support it - but any suggestions?

Ok, that'll do for now - there are more areas I want to work in, but those projects are still months away so they can wait. So please, if you have any knowledge of PHP, MySQL or Javascript, leave a comment! Even if it's just to say "I never done got a book on that, use google" :)

Thanks!

The Getmail-Maildrop Experience

17th February 2006 at 09:546 comments

I can understand why nobody commented on the monitor question (I've now got a KVM by the way), but I was most disappointed to only recieve feedback from two people for my request for book suggestions, both saying they don't use books. If anyone else has any ideas, please leave a comment.

Anyway, on to the e-mail. Until this week, I have been using fetchmail to download my e-mails, and then feed them in to Exim. It all worked quite well, although the cpu usage had a constant average of around 10%, and this week, fetchmail started terminating itself when things got busy, ie every few minutes.

So, I replaced fetchmail with getmail (thank you Andrew) - much better. Rather than delivering to an MTA, it delivers to a MDA; no SMTP madness, it just pipes the e-mail into a new process. For my MDA, I nearly went with Postfix, but in the end chose maildrop because the internet told me to.

Maildrop filters use regular expressions, so my 200+ rule whitelist was going to look very messy. I therefore wrote a small wrapper script that pulls all the rules from a nice simple text file, creates a filter file, tests it, and if all is well it swaps it for the live one. At some point I'll put on a web front end, and I'll be well away.

The internet seems to be missing one key fact about maildrop - how to test the syntax of the filter file, without trying to deliver mail. Simple answer:

maildrop .mailfilter.tmp < /dev/null

where .mailfilter.tmp is the filter you want to test. If there is an error, there will be output on STDERR.

I'm still not convinced by the getmail/maildrop combination; getmail is run from a cron job rather than a daemon, and maildrop is run once for every e-mail. That's going to be over 26,000 program loads a day, which seems a bit unnecessary when a daemon could run once, so I might look at writing an integrated solution at some point. Not just yet though - this seems to be working very well, and cpu usage is at a steady 0%! Sounds good enough to me.

I have been making copious amounts of notes on linux for the past few years, and at some point I will put up an bunch of hints, howtos and support scripts. But that will have to wait for some free time :)

My Diary Explodes With Delight

17th February 2006 at 23:161 comment

It is with some hesitation and trepidation that I am pleased to announce that I have moved my diary across to a MySQL back-end.

Yes, until today my diary has been running out of a flat text file. A 500 KB pipe separated text file no less. Oh the shame.

Well, this site has been running on the same code I wrote back in 2000 before I had access to MySQL, and since then it has waited patiently for me to finish my CMS. But that's still months away, so I rewrote it all this evening.

While I was at it, I figured it was about time I had an RSS 1.0 feed, and you can find that at http://radiac.net/diary/rss. This is my first live RSS feed, so although it should be fine, if I've done something wrong do say. It is a partial feed, no HTML, first three sentences only - my thinking is that'll be enough of a taster, but you'll still have to come here to see it. Is that so wrong? Let me know.

I also took the opportunity to add friendly URLs; /diary/archive/YYYY/MM works, but only for browsing months - individual entries are currently at /diary/id/NN, although I might add YYYY/MM/XX support later. There's also a shortcut for the latest comments (/diary/comments).

Now you can't complain! Well, you can, the content's not improved yet :)

Tom Baker Says

18th February 2006 at 11:451 comment

This is quite possibly the best thing that has ever been made: Tom Baker Says....

For those who haven't clicked the link yet, people sent things in to BT's speaking SMS landline service, recorded them and put them online. Really stupid, but so funny. Now click the link.

Return Of The Quake 2

21st February 2006 at 10:425 comments

Some of you may know/remember how addicted I was to Quake 2, err, 7 years ago (wow, I feel old). Since then my Quake 2 site has stayed online, but I lost touch with the people I used to play, and after a while all the servers shut down. Until now.

At the weekend I had an e-mail out of the blue, from someone in my old clan THG - he has set up a reunion site for all the players from the old Force 9 servers. There's a forum in there, and we've had a few games on the server quake2.muttsnutts.com.

And I've remembered how bad I really was. I'd got a bit cocky playing newbies on the school LAN, but there was a chap on the server yesterday who was a good player - to say I got beat on the second map would be a fair statement.

Firing up Quake 2 was great. It has been installed on all my machines since I first got it in 1998, and running around the levels everything came flooding back - it was like I'd never left. Only this time it was at a good resolution, and with pings under 500.

One thing I regretted, especially against the good chap yesterday, was that I never made friends with the railgun. If you gave me a railgun, put me 5ft in front of a barn and told me to hit the side, I'd probably miss and down a passenger jet. The only people I ever managed to hit were the ones who were moving through water. I used to blame it on the terrible lag I had on my dodgy phone line where I could hear women ordering lingerie, but with a 2mbit line I can't hide behind that any more. I have to admit it - I just can't rail.

Ahh, this all brings back so many memories! Good times. If any of you used to play online games and were part of a community, I'd strongly recommend you try to look up some of the old faces, see how they're getting on and what they're up to now, and arrange a little re-union match. It's a lot of fun.

And if you're reading this and you used to play on the Force 9 servers, go to thugsters.co.uk and log in!

Spammers Got In, And Made It Hurt

23rd February 2006 at 08:247 comments

Well, it took them 24 days to get around my simple spammer block, but last night they made up for it. I woke up to 377 spam comments this morning, so I'm afraid I'm going to have to make some more changes to the anti-spam system.

There was a single spam comment posted to one of the entries at some point in the afternoon, and the spam barrage didn't start until the late evening. That leads me to believe that my site was flagged up on a spammer's machine as not accepting their comments, and that they came here and added one manually to see how to get around the spam barrier. Their bot must have then come along later and done the damage.

Why do spammers love radiac.net so much? It's not just the comments - it's not yet 8:30, and I've already had 12,000 spam e-mails today.

I've got two tricks left after this to stop the spam comments, but if they still get through after those, I'm stuck. And extremely scared at the lengths these people will go to.

My Shoulder Hurts

24th February 2006 at 12:002 comments

Just recently my shoulders have started hurting. Not all the time, not both at the same time, but it will come on during the day, and then when I go to bed I can't lie in any position where it isn't agony. I'm not sure what's wrong with it, but it's probably muscular, caused by poor posture when I'm working. I'm now very concious of how I'm sitting, but I don't know if I'm sitting right.

The RSI in my wrists seems to have gone away since I changed tables and invested in some nice comfortable wrist-wrests, but if I've swapped that for the shoulder thing it's a pretty poor deal. The wrists just hurt while I was typing, but the shoulders hurt all day, all night and some of the next day too. Last night I couldn't get to sleep for about 4 hours - it took 4 ibuprofen and 2 paracetamol to dull the pain enough to sleep.

I think I should get a new chair, maybe that would help. I've got an Ikea leather one at the moment, but it's a bit low, and it doesn't support my back at all. What are you sitting on at the moment? How are you sitting? And does anyone have any suggestions for where to get a good chair from?

Comments Spammed Again

27th February 2006 at 14:58Comment

You must be getting bored with all this by now, but it only took them 4 days to get around the latest anti-spam measure. This means that spammer bots request a page, process it and submit that, rather than caching a solved form - not really surprising, but still worth testing.

So another change. Sorry Andrew, you'll have to change your greasemonkey script again :)

New Chair, New Books, New Birthday

27th February 2006 at 15:535 comments

At the weekend I went out and bought a new chair from Staples. It's comfortable and I think I'm sitting in a good position. Only time will tell if it helps the shoulder thing, but so far so good.

I also went and ordered some books from Amazon last week. Tell me again why Amazon are so great? Their suggested page didn't suggest anything I wanted to get, and I had to leave the order process 4 times because they wouldn't let me move back to change things. They didn't tell me I'd be able to change it all at the end, so now I feel very silly. But still, it's the principle of the thing!

Their stock management seems to be even worse, or at least the public end of it; they said two of the books would be 2-4 weeks, so I took those off the list, but I went back the next day and they were available for despatch within 24 hours. I'm still waiting for that order to arrive, but if their stock system had said 'more expected within 1-3 days' I would have put it all in the one order and it would have arrived on Friday. At least Dabs let you know when things are coming in.

More on the books in a few days time when I've had a chance to read them. A couple of them look good, especially JavaScript: The Definitive Guide, which has already spurred me on to pick up the JavaScript again. Bad Richard, concentrate on the ActionScript for now. I might document the development of some of my JavaScript libraries and put them up as tutorials at some point in the future - read that as I've started to write a tutorial, I'll see if I ever get round to finishing it.

And it's my birthday on Wednesday! Yay!