From time to time I have the opportunity to look over the latest developments on a friends website and pass comment. The comments usually take the form of “Add more whitespace” and “Remove more clutter”. One of the major cause of clutter are the settings, which have slowly built up over many user feature requests [...]
For the Computer Graphics and Visualisation module of my course we have to be able to use C and OpenGL to render and animate scenes. As part of the animation a timer is required to be able to scale the animation based on the time elapsed since the last update. Without this animation would be [...]
Disclaimer: I am not an expert on software architecture , MVC or designing components. The following is what I have picked up from my research. I have tried to be as accurate and helpful as I can, but some information may be incorrect or sub-par. If it is, my apologies. A discussion came up on [...]
I have been working on a project in C recently. It is a small engine written on top of OpenGL for rendering 3D scenes and handling animation, particles and other simple 3D effects. It’s actually been quite refreshing working in such a comparatively small language (though not Scheme small). I have missed several features though. [...]
Recently I’ve had need of a stream data structure – a queue of a certain size that you can keep adding items too and, if the queue gets full, it removes the oldest item. It took me far too long to work it out, so I decided to post the code in case I ever [...]
Recently I’ve been thinking more about a toy language I have created called rose. It’s largely an exercise to teach myself about some of the difficulties of language design, giving me a greater understanding and apreciation of the languages I work in. Some of the guiding features of rose are immutable-by-default fields and as few [...]
In a misguided attempt to solve a StackOverflow question I came up with the following code that checks whether the key combination represented by a KeyEventArgs would produce a given character on the current keyboard layout. The actual solution was a lot simpler, but I thought I’d post the code here for prosperity: public static [...]
There have been a lot of UI innovations since HTML forms, some of them big and some of them small. One of the smaller innovations is the addition of hints to text fields. These are basically placeholder text in the fields that describe the sort of input that should go in them that disappear when [...]
Over on StackOverflow someone posted a comment with a micro-benchmark on the speed of fields vs. properties. One would expect because the getters and setters of the properties are very small (3-4 IL instructions) that they would be inlined by the JITer and it would make no difference. However, running the following test (modified from [...]
If you ever read any of my code you’re probably likely to come across something like this, and equally likely to find it a little bizarre. for (int i = 0; i < length; i += 1) { // Some code } I have issues with the standard increment and decrement operators in C style [...]