Order Direction Icons

in
#

There's something that's bugged me for the entire time I've been using a PC. It concerns a fairly standard UI component that I'm sure you'll be familiar with: the orderable table.

As you're probably aware, a table like this usually holds rows of data which can be sorted by any of the table's columns. Clicking on a column header will order the data by that column. Clicking this column again will toggle the order direction between ascending order and descending order. It's a great idea. However, my issue has always been with the icon indicating the order direction...

Read more...

RageML - XML Markup for Rage Comics

in and
#

Oh dear - I've been procrastinating. NSFW warning for some rude words in this post. Around a month ago Fiona and I stumbled across this blog post about an issue with Django. The post was very helpful and saved Fi a lot of headaches, so thanks to Harshad Sharma for that.

What caught my attention, though, was that fact that the post consists entirely of a rage comic. A rage comic, for the uninitiated, is an internet meme wherein a hilarious anecdote is retold in the form a crudely-drawn comic strip, usually full of cartoon facial expressions which are themselves internet memes. I joked that such a blog post, due to its entirely rasterised nature, would be difficult for a search engine to index. Difficult, that is, unless the comic's semantics could be encoded as text-based data. Sometimes, a joke gets out of hand...

Read more...

A Declaration: I Will Make This Game

in and
#

Making videogames has been a hobby of mine since since my mid teens. In fact, even before I learned to program I used to write choose-your-own-adventure stories based on games I had played. Yet, despite a long trail of unfinished projects, abandoned due to over-ambition, boredom or distraction, I've never released anything I would call a finished game. I've finished the occasional thrown-together competition entry for Ludum Dare, and now and again I've had the motivation to round off some small experiment into something functionally complete but too small in scope to be noteworthy.

You see, it turns out that making games is hard...

Read more...

Correcting Photo Dates on the Xperia X10 Mini

in
#

I have the catchily-named Sony Ericsson Xperia X10 Mini Pro smartphone. The device runs a customised version of Android that Sony Ericsson developed to make better use of the unusually small screen size. Among the customised apps is a photo album which displays all the pictures taken with the device's camera, ordered by date and grouped into months.

One annoyance I've found with this app, however, is the way the photo ordering is achieved...

Read more...

Hrbrt - Human Readable Branching Text Format

in
#

This is a project that I decided to undertake one day and which is only semi-serious. It exists mostly due to both my recent curiosity with Parsing Expression Grammars, and a stubborn refusal to give up on a blatantly terrible idea. Oh, and a love for John Gruber's Markdown and the principles behind its design.

Motivation

Sometimes, a simple message is not a sufficiently productive way of communicating with someone. After a small number of back and forth emails, someone will decide to pick up the phone or meet in person to have a face-to-face conversation. This way, the feedback loop is shorter and each question can be devised based on the previous answer received in order to exchange the necessary information between participants...

Read more...

Screenshot Saturday RSS - Scratching an Itch

in and
#

#ScreenshotSaturday

Over the years, Twitter has become increasingly popular with indie game developers. At some point, the hashtag #ScreenshotSaturday was invented to tag screenshots of game developers' work in progress each week. The hashtag is a great way to get a sneak peek at what people are cooking up, and a great way to discover creators and their games that you might otherwise have not heard of.

As the tag gained popularity, a couple of websites were created by the indie community to parse the twitter feed and showcase the images being posted to twitter. The first, screenshotsaturday.com created by Pekuja, and the second, screenshotsaturday.frogames.com created by Mathieu of Frogames. There may even be more, I'm not sure...

Read more...

Some Features You May Not Know Nano Has

in and
#

Nano?

When it comes to text editors in Linux, there are two major players which have famously been causing holy wars for at least a couple of hundred years now: Vi and Emacs. They are both extremely powerful, lightweight editors whose ages are a testament to how useful they have been and continue to be.

If you are already a Vi or Emacs user, then great! If you're not, and you do a lot of code editing under Linux, you should probably consider learning one of them. So, with that in mind, here's another text editor that you may or may not have heard about: GNU Nano.

GNU Nano is a basic command-line text editor which is installed by default with many Linux distributions. Nano is not intended to be anywhere near as feature-rich as Vi or Emacs. It is a very simple tool, but this means it requires little to no time investment to start using for basic file editing tasks. Nano's core commands are easy to learn because they're written out at the bottom of the screen, and files can be navigated intuitively with the cursor keys.

I find nano extremely handy, and it has some neat features that you may not have known about. In this post, I'd like to share some of nano's more hidden capabilities.

Read more...

Code States

in
#

When programming, there are 4 states that I take my code through. These states and the steps taken to get between them can be summarised in this diagram:

   ( Start )
       |
       |  implement
       V                    
   ( Works )
       |
       |  refactor
       V
    ( Nice )
       |
       |  optimise
       V
 ( Fast Enough )
Read more...

Python Integer Division

in
#

While working on a little game in Python with PyGame, I stumbled upon a feature of the language which caught me by surprise.

In other languages, like C for example, when you divide an integer the result is truncated to give an integer result. That is, the part after the decimal point is chopped off. For example, 10 / 3 is 3.333333... An integer division will chop the decimal part off the end and give the result as 3. Similarly -10 / 3 is -3.333333... and in C, dividing the int -10 by the int -3 will give the answer -3. Divide it, chop off the decimal places, easy.

Python's integer division works in a subtly different way, however.

Read more...

Postfix Regex Fail

in and
#

So I was diagnosing a problem at work. Automated emails were failing to send, but only in some cases. My investigation quickly revealed that the mail server was refusing to deliver them, instead giving back an error code and the following curious message:

Chinese encoding not accepted by this server

Chinese encoding? I checked the data being sent - there shouldn't have ever been any kind of non-latin character data going into the emails. Maybe the application was using the wrong encoding for some reason? But I couldn't find any evidence for this either.

Read more...
<<< Older
Newer >>>