A good quiz question might be “How many gifts were given during the carol ‘The Twelve Days of Christmas'”. The answer, 364, might be known by a reasonable number of people by now, but let’s look at the problem both from this perspective, and another perspective: how many legs were in those gifts?
Read more…
After the deployment if IPv6 to the cluster, I’m hoping to set up several other technologies including squid caches, local hosting of the master dns zones (stealth primary), and ultimately an ssl endpoint.
Read more…
This is something I’ve known for quite a long time, but if you’re ever thinking “it’s not that much extra power to add progress reports”, just make a mental note of exactly how many progress reports you’re making, and try commenting them all out.
BeebMaze generated a new maze in mere seconds, but at the same time, that was seconds too long. As part of refactoring, I took out the progress reports with the intent of putting them back in, since there wasn’t that many.
It now generates a new maze in about the time it takes to paint the screen once. :D
(Download this build from the build server now: Build #18)
One of the uni projects I’m doing is a Hotel Management system for “The Blackfish Hotel”, as part of the third-year group project. Part of this is an online booking system, where customers can book rooms in the hotel.
Our “customer”, the manager of the hotel, has asked for the website to have a version in Finnish as well as English, as apparently a large percentage of his customers are from Finland. This posed a challenging problem for us to solve… well… sort of.
Read more…
I’ve actually taken a bit of time to fix up, make user friendly, and publish a tool that I wrote a little while ago, and has been very useful to me.
The regular expressions tester engine basically provides a front-end to the Microsoft .NET Framework Regular Expressions engine, allowing you to test regular expressions you’ve written to your hearts content.
As usual, I’m releasing it as-is under the MIT licence, and as usual the source can be found on GitHub.
For a page which might have more information on it at some distant point in the future, but more importantly has a download and bugtracker link, see this page on my main website.
A couple of weeks ago, the IRC bot that we use over at Wikipedia’s Account Creation Assistance project decided it would stop giving notifications to the IRC channel. Previously, it used UDP as the transport between the web interface and the IRC bot. However, for some unknown reason, this stopped working.
After seemingly endless messing around with PHP, netcat, more PHP and a bit of telnet, I came to the conclusion that it was fucked, and there was no way to recover it with any ease.
Previously, the code looked something like this:
For receiving notifications over UDP, that was all we needed – it worked and was semi-secure. However, when it stopped working, I took a more radical approach.
You’ve probably heard of Amazon Web Services (AWS) by now, if you haven’t then I recommend you take a look.
One of the AWS services is something called the Simple Notification Service, which seems to be exactly what I want – a notification system. However, the only notification endpoints are HTTP pings, e-mail, or an SQS endpoint.
SQS is what I chose eventually – it’s another of Amazon’s services, the Simple Queue Service. This has the “advantage” of queuing all the notifications so if you’re offline you will still get them all. However, for our case this isn’t ideal, but the bot isn’t usually down for long if it goes down. So, I decided to go for SNS->SQS over HTTPS as the transport for the notifications, rather than UDP.
Of course, code needed changing – at first I thought drastically, but it turned out to be a much smaller change than I anticipated:
It looks small, just another explicit check to see if we actually received anything. That’s until you realise that I wrote another function to take some of the work off to one side.
There’s not much that’s changed, but it was an interesting technical challenge :P The only thing that has noticeably changed is the lag from notification generation to display on IRC – can be anywhere up to about 5s if you’re unlucky!
Growing tired of the poor strobe light applications available on Android Market, I decided to build my own.
Lots of the so-called strobe light apps which already exist on Market seem to be of the type which use the phone screen as the “strobe” – this isn’t good cos it takes a while to update the screen, and it isn’t as bright as the camera flash led.
My app is a very simple one – a quick loop to set the flash on, wait a while, set the flash off, and wait a while.
The two waits are configurable with sliders, with values of anything from 0 (theoretically) to 500ms.
The only problem is the fact that developing camera-based applications on Android is a bit of a dark art – not all manufacturers seem to use the Camera API to access their camera. Therefore, camera-based apps can be a bit hit-and-miss as to whether or not they will work. As I only have the HTC Desire, I can’t test it on anything other than the Android Emulators, and my actual phone. I have, however, had reports of it working on a number of devices, including the Samsung Galaxy S2, HTC Incredible, and the HTC Evo 4G. There have also been reports of it NOT working on the Galaxy Tab, Droid X, and the XT720 Milestone.
As all the flashing takes place in an infinite loop, there’s no time to handle GUI events. Therefore I branch out the flashing bit to a separate thread, and use Handlers to make the necessary calls back to the main thread to update the GUI as necessary.
The main reason to update the GUI is to make sure that should the strobe thread get stopped in any way, such as on activity changes or screen re-orients (currently disabled) etc, the GUI “enable” toggle button actually shows the correct status, as well as to easily display any error messages as necessary.
There’s still a few outstanding bugs (screen orientation!), and there’s a few changes I’d love to make to it, but it’s coming along quite nicely, I just need more time to actually work on it!
Quite a bit has happened recently!
I’ll try and give a bit of info about each, there’s quite a lot to write about though!
EyeInTheSky
An IRC bot which stalks changes to Wikipedia based on regex matches. Read more
caterpie beedrill as minecraft server
Those of you who use my Minecraft server will know that the server known as “caterpie” was bad. Any more than one person connected, and it would lag to the depths of hell. I’ve replaced it with a 1.7G beast of a server, still running as an Amazon server instance.
stwalkerster.co.uk
I registered a new domain! I’m still in the process of setting the thing up though, but that will become my main website, not quite sure what I’m gonna put there yet, but it’ll probably replace what webspace I had at http://helpmebot.org.uk/~stwalkerster/
ACC‘s IRC Bot, ACCBot
A couple of weeks ago, the IRC bot that we use over at Wikipedia’s Account Creation Assistance project decided it would stop giving notifications to the IRC channel.
I’ll write more about this at a later time, hopefully soon, but probably when I’ve finished messing with my new site :P
strobe light
Growing tired of the poor strobe light applications available on Android Market, I decided to build my own.
I’ll also write more about this too at a later time – I think this bit and the last one need their own posts.
EyeInTheSky is one of my newer projects, an idea which I’ve stolen from two other people.
Wikipedia has so many modifications being made to it that it’s just not possible to keep an eye on everything you want to watch. While the MediaWiki software has a feature known as a watchlist, it’s neither flexible nor easy to use in my opinion.
EyeInTheSky is an IRC bot (seems to be my speciality!) which monitors the Wikimedia IRC recent changes feed, compares every entry to a set of regular expressions and reports them to a different network.
It’s possible to set up the bot with an entire XML tree of regular expressions matching on the username, edit summary, and page title. There are also logical constructs which allow more-or-less unlimited regexes to specify what exactly you want to watch.
For example, with this tree, I could specify I wanted to stalk all the edits which are made by someone with “the” in their name, “and” or “or” but not “xor” in the page title, and with “train” in the edit summary:
I also can set a flag, something that I can then set my IRC client to respond to, and it will speak that flag for every stalked edit.
Of course, it’s not just edits that can be stalked this way – log entries are sent to the IRC RC feed in the exact same way. It’s just a case of specifying Special:Log/delete as the page title to get the deletion log, for example. The entire log entry except for the time/user is sent in the edit summary field. This means the same system can be used to stalk log entries as well.
The bot logs all stalked edits, and is capable of emailing the entire log to me, so I can clear the log when I disconnect from IRC, and when I get back on, I can email the log, go through what I’ve missed, and catch up.
I’m planning on making it multi-channel too, with probably multiple people able to command it to email them the log. I can already tell it to not email certain stalks, especially as some of the stalks that have been set up are not things that interest me, but rather interest other people. I just ignore those when it reports them, and have it set not to email me for those stalks.
There’s quite a lot this little bot can do, if you want to learn more, I’d recommend taking a look over the source code, and see what you think!
The source code is available on GitHub here.
Hey folks
Just thought you’d love to hear about a few things I’ve been doing in Minecraft recently!
PIXEL ART!
I decided to make the Google Chrome logo from coloured wool in Minecraft.
I took the Google Chrome Logo:
Reduced it to 32x32px (actually, I initially found a 32x32px image :P):
Applied this GIMP Colour Palette to it to adapt the colours to the wool colours in Minecraft (Image -> Mode -> Indexed, using custom palette – you’ll need to right click the palettes window and import it first):
(this is the one I’m actually using, if you use the one above, you’ll end up with this)
Build in Minecraft!
I’m considering building all the major browser’s logos, but I’m having a hard time finding the resources to do just Chrome’s. And Chrome has gone and got itself a new logo in the meantime…
Because I was finding it hard to know what I needed, I also built a spreadsheet. This spreadsheet knows all the requirements for the wool blocks, asks you what you need to complete the project, what you currently have, and goes away and calculates what else you need to gather.
If you want to download it, feel free to. I’ve released it under CC-BY-SA, so do whatever you want with it under the terms of that licence (attribute me and share any changes you make under similar conditions, otherwise do what you want). Details are in the file.