Posterous Shutdown is About to Break www.keyboardp.me Links

Today (April 30th 2013), Posterous is closing down its site making any blogs hosted there inaccessible to the public. The fact that it was closing down was announced previously which is why my blog is now on Tumblr. The downside, however, is that my existing links will no longer work as what would’ve been www.keyboardp.me/article-title is now keyboardp.tumblr.com/post/some-number/article-title.

Read More

Refactor Large Switch Statement Blocks with Actions

Update - Based on some feedback, I should add that this isn’t suitable for all scenarios (team-based project may require more consistent paradigms), but I think it’s a viable option for other use cases (e.g. one-person team, small project, prototyping etc..). Also, ICommand is just an example for my use-case but unrelated to the principle. I just came across this post on Stackoverflow which shows how it could be further extended for filtering and this post showing a refactor using a similar technique with the dictionary. 

I sometimes have large switch statements in my TellDJ code and these can not only look ugly, but they can be annoying to maintain. I figured I’d refactor my code and decided to come up with a new alternative that took advantage of Actions so that it felt cleaner and more maintainable.

Read More

Loop a YouTube Video in One Click

Here’s a quick bookmarklet that will quickly send you to www.listenonrepeat.com (I’m not affiliated to that site in any way) from the current YouTube video you’re watching, where your video will loop indefinitely.

Read More

Quickly Set Up a Local Server With One Line of Python

After Google announced that Chrome 25 (currently in beta) supports the Web Speech API, I decided to mess around with it. However, one issue I ran into what that it doesn’t work with local HTML files, you need to have the file run on a server (which can be local or remote). I didn’t want to bother setting up IIS and Apache for this, or use a remote web server, but fortunately one line of Python came to the rescue :)

Read More

F.lux - Free Tool to Soften Your Screen’s Colour

This is an oldie, but a goodie. F.lux changed the colour of your monitor’s display to adapt to the time of day. This means that the sterile blue glow of a monitor at night is softened automatically, resulting in less strain on your eyes.

Read More

Tags: Tip Jar Flux

Using Task List Tokens in Visual Studio to Improve Comments

I’m going to show you how I take advantage of Token Lists in Visual Studio to easily use custom tokens when commenting my code. Whilst this isn’t a new feature by any means, I thought I’d write it up for those who aren’t familiar with this VS feature.

Read More

Unity: “Error building Player: IndexOutOfRangeException: Array index is out of range” Fix

I’ve been messing around with Unity (version 3.5.7) and decided to try and deploy an Android APK to my device. However, every time I tried to build the project, it stopped building and the log displayed the error message

Error building Player: IndexOutOfRangeException: Array index is out of range.

Read More

Auto Scroll a Web Page While You’re Reading

Keeping up to date with the various news from around the world can be quite a task. So to make it that bit easier, I figured I’d create a bookmarklet to autoscroll a webpage so that I can lean back and/or eat whilst still reading :)

Read More

Free Tools to Help See What’s Taking All Your Hard Drive Space

Just found, and used, a great free tool that highlights what files and folders are taking up space on your Windows hard drive. It makes it much easier to hunt down the space hogs (unintentional Duke Nukem reference) and move or delete them.

Read More

Tags: Tip Jar

Some Resources for “One Game a Month” Devs

(Updated 02/01/2013)

I’ve posted some links that people may find useful over in the OneGameAMonth subreddit and on Twitter. However, since I’ll be blogging here regarding any updates about my OGAM entries, I’d figure I’d post a roundup of a few links here. Hope you find them useful :) (Some of the sites may have more articles, but I’ll just link to one so that this list doesn’t fill up!)

Read More