Inserting German characters in Windows (Umlauts and eszett)

I’m learning German at the moment, and so I sometimes type things in German. I don’t have a German keyboard, so it can be awkward to insert character which aren’t using in English, like the eszett (ß) or umlauts (ä, ö and ü). On a Mac it is actually very easily – press Command+U and then dots appear in the edit box, and the next button you pretty will have the desired diaeresis.

In fact, it isn’t true that the diaeresis is not used in English. Some people will use them on the second vowel when there are two vowels together, to indicate they are said as two separate sounds. For instance, one might write ‘coöperate’, to show that it is said ‘co-operate’, rather than ‘coop-erate’. ‘Naïve’ is another one.

So, I solved this problem by writing a program called Umalut. It sits in your system tray and when you either click the icon, or press a shortcut (hard coded to Windows Key + S at the moment), it will insert an umlauted character if a vowel or ‘y’ is pressed, or an eszett if ‘s’ is pressed.

It can generate the character in two ways – either by generated a WM_CHAR message directly to the window that it stole the keypress from, or by simulating input and typing out the Alt-code for the character. It is written in C++ and consists of two projects – a GUI and the hook DLL.

The problem is, I’ve broken it at the moment somehow, and I’ve just realised that when you are using Microsoft Word, it is massively easy to insert characters. The default shortcut to insert an umlaut is to press Control+Shift+; and then press the required vowel. For the eszett, it is Control+&, and then ‘s’ (on my keyboard, this is the same as Control+Shift+7 and then ‘s’).

By going into the Symbol shortcut dialog (Insert tab, Symbol, More symbols…, select the eszett and then click ‘Shortcut’) you can change this shortcut. I’ve set it to Control+Shift+; and then ‘s’, so it is the same to access any of the characters I am interested in.

What is more, you can set up auto-correct text. I’ve made it so that ‘..a’ (for instance) is translated into ‘ä’, which is very convenient. I reccomend these to everybody else, too!

For now, I’m not going to bother with releasing the Umlaut program. However I might in the future if there is any demand for it.

“The Rocking Gallery of Jax” is back

“The Rocking Gallery of Jax” is a gallery of over 600 pictures. Each of them are 96×96 pixels, has a black border and contains a stick man in various situations. The site couldn’t be hosted for a long time, as it required Perl. However, now it is back! Thanks to hosting from Jamie, you can visit it here.

An Education In Computer Games

I’ve never really been too much into computer games. I’d played and liked Sonic The Hedgehog, Theme Hospital, Rollercoaster Tycoon, Football Manager, Tomb Raider and Deus Ex in the past, but I’ve made some sort of attempt to start playing games again. The first few games were Half-Life 2 (and its parts) and Portal.

So here are the games I’ve been playing recently. They aren’t reviews, but you can find them anywhere on the Internet…

Amnesia: The Dark Descent

This indie game is supposed to very scary. I’d argue it isn’t really very scary at all, but it is fairly fun. It has good puzzles and a nice feel to it. The story comes to the player via a series of flashbacks, and it makes you want to play on because it feels like there is this hidden vain to the story which, when revealed, will cause everything to make brilliant sense. The let down is that this never happens and the story transpires just to be obvious, unsatisfying connections of the plot details you find.

Braid

A platform puzzle game where you can travel through time. It has a brilliant feel to it, and it feels artistic. Much like Portal, you feel you are playing something special when you are playing it. The storyline makes no sense to me though, it seemed just like a collection of ideas. The last level has a brilliant twist to it, but it doesn’t really explain much. Ultimately that doesn’t really matter. The puzzles are interesting and it is a good feeling when you beat them, but they aren’t actually that hard. Except for one at the start where you are supposed to make a platform out of a puzzle piece. That just felt unfair to me.

Peggle

It should be rubbish, but it is somehow fun. It is a game which really knows how to make you feel good. It rewards your talentless luck.

Super Meat Boy

This game is brilliant! I haven’t completed it, I am stuck on the last level and have kind of lost interest in it. But it is great. It is so addictive. The only problem is, the addiction to it means you end up playing it long after you’ve stopped deriving any fun from it.

Cities in Motion

I loved Traffic Giant. This is a Jo Wood game where, given a city, you build the public transport infrastructural. The problems with this game were that you couldn’t do underground railways, and overground railways were rubbish. Another problem is it was very buggy. Cities in Motion is basically the game idea, but you can do underground railways, and it isn’t very buggy (at least, after patches). I’m pretty keen on this game, but the user interface is far inferior to Traffic Giant’s. For instance, although buses have a box over them saying the number of people on it, it doesn’t mention what line it is on until you click it. Similarly, bus stops don’t tell you the break down according to line until you mouse over it. Finally, you can’t have bus stops which are also tram stops. That doesn’t really matter but it kind of annoys me. Other bad things: No easy way to see the profit of a line; It is unclear to see where people want to get to and where they went from (which was brilliantly done in Traffic Giant). I’ll keep playing it for a while, but I am hoping a Cities in Motion II would sort these things out.

Old Posts Updated

Some older posts have been updated.

The introduction to Ramsey Theory and the explanation of Shors Algorithm for factorising integers are now hosted on Scribd and are embedded into the blog.

A broken image has been fixed in the solution of a problem to do with cutting circles up using chords.

The embedded LaTeX has been updated on a host of articles:

  1. A simple evaluation of the Guassian integral
  2. Cauchy’s proof of the Arithmetic-Geometric mean inequality
  3. Representing primitive recursive functions in Peano
  4. Typical Examples are Atypical
  5. How to check if an integer is a power of two
  6. Numbers coprime only to prime numbers
  7. Continuous bank interest
  8. Sums of squares and sums of cubes
  9. A somewhat elegant solution to a trivial problem and a verification of an XKCD comic

Whilst I am here, a slight update on the Chart Object/Ini++ Object updates: I am waiting on Chris Carson of Clickteam to build them. He is very busy at the moment, so we will have to be patient. I have found another bug in the Ini++ object to do with Sub-groups. When I have my other computer set up I will look at fixing that.

(Also: Damn it Arsenal.)

Sonic the Hedgehog 4 (from the point of view of a Sonic Fan)

I haven’t had time to post anything recently, but I have had the chance to play Sonic the Hedgehog 4. This is a short game available on the Playstation, X-Box and Wii online stores, and it is in the same style as the original Mega Drive (Genesis) Sonic the Hedgehog games. Sonic the Hedgehog 3 (& Knuckles) is my favourite game ever (along with Deus Ex) so I thought I would give my thought on this new game as a big Sonic fan and let you know how similar it is to the previous games and what the levels are inspired from.

I’ve always thought it’d be pretty cool to make a Sonic game, but the physics engine would probably be a pain to write. Just making sure Sonic moves smoothly and appears on the right layer (for example on a loop-the-loop). The Sonic games got this just right, but Sonic 4 does not. The movement is slightly buggy and doesn’t react as you’d expect, a problem the old games didn’t have. This makes the game feel less perfect, and at times when there is careful jumping to be done (which was rare in the older games) it can be irritating, but it doesn’t make it unplayable. A new move, the homing attack, is actually makes the game better too. This means that a target appears on various things and double tapping the action button directs Sonic towards the entity. It does work fairly well.

The music in the Sonic games were always awesome, but this is definitely an exception. It is bloody annoying. I wish they’d got the OC Remix guys to do it instead. Then it would’ve rocked. The graphics are also 3D rendered rather than being hand drawn. I probably prefer hand drawn, especially for the actual characters, but I must admit the backgrounds did look very good.

The first level is basically Emerald Hill from Sonic 2, although there are elements of Sonic 1′s Green Hill (for instance, the pipes in the hills and the walls you can spin through to break, and the boss) as well as Sonic 3′s Angel Island (principally the rope zip-wires, although it is extended to have rope swings too). It is fairly standard though, and there isn’t much that is exciting in it.

The second is a Casino level. The first act is very much like Casino Night from Sonic 2, but as it goes on it has more gimmicks like the cannons from Sonic 3′s Carnival Night and the rolling block things which appeared in that level a lot too. Act 2 features lots of cards which are quite cool – some you sort of run on and it takes you around the level (which is kinda odd) and there are others which when you run through can win you prizes.

The third zone, Labyrinth, is actually less like Sonic 1′s Labyrinth as you’d imagine from its name. It has elements of Aquatic Ruins from Sonic 1 and Lava Reef from Sonic and Knuckles. This zone is by far the best in the game in my opinion. Act 2 of the level is in the dark except for a flame torch that Sonic holds, similar to the idea of Sandpollis act 2 in Sonic and Knuckles (albeit without the ghosts and the light switches). It also includes a little switch puzzle in it which would seem more in place in Tomb Raider, but I think it does work quite well. Your flame can also be used to set things on fire, like dynamite to explode things. The third act has a wall moving in to crush you, like Hydrocity Act 2 on Sonic 3. It feels a little bit more like the Hydrocity zone without actually having many elements from it. It also has minecarts, which when you jump on you ride – this has been seen before on Sonic 2 on the Master System in the Underground Zone, and I guess also in Sonic Spinball, though that one doesn’t really count. All acts include big stones that you either have to avoid when they drop from holes in the ceiling, or that you can run across. That is pretty fun. The end of Act 3 also contains the infinitely recurring waterfalls that appeared in Sonic 1′s Labyrinth zone.

Mad Gear is the final zone and it looks just like Metropolis City from Sonic 2. Despite having the familiar cogs and gears from that game (the interactive screws from the Sonic 2 version replaced with cogs that you can move), it actually plays a lot more like Chemical Plant from Sonic 2. In fact, I didn’t think much of this zone. In Act 3 you are chased by a big… thing… for much of the level (which reminded me of the Bridge level from Sonic 1 on the Master System), and I’m not convinced it works too well. Still, the levels do move quite fast, unlike (say) Scrap Brain from Sonic 1.

The final boss level has you beat all the previous bosses and then fight Death Egg from Sonic 2. It then goes weird and it takes a few times through to know what it does at every stage. Actually, it is just pretty annoying design rather than fun and challenging.

Overall, I got to say I liked it. I even liked it more than Sonic 2. But it is absolutely no where near as good as Sonic 3, especially when Sonic & Knuckles is plugged in to it. But that isn’t so surprising, no game is.

(And, yes, I have gone the whole review without including a single screenshot ;) You can find those elsewhere.)

Is the Wii Fit Actually Good For You?

So Wii Fit is pretty fun, and I do quite enjoy using it. However, does it actually make you any fitter? Is it any good for weight loss? Do all the new balance games actually make you better at balancing?

A study from the University of Queensland by Nitz, Kuys, Isles and Fu starts to look at the question. It clearly labels itself as just a starting point, and not anything to draw conclusions from, but it is the best we seem have for now.

I'm awesome at this game.

So, in fact the study used staff their friends from the physiotherapy department of Queensland university. They choose ten of them, all female and between 30 and 60 years old. (The journal it is published in is interested in the menopause.) They then got them to play Wii Fit for two 3-minute sessions per week, for ten weeks.  They were required to use activities in all four areas (Balance, Yoga, Aerobic and Strength), although the difficult level and intensity was up to them to choose and improve as they progressed.

They reported the balance improved, but remarked upon the similarity of the tests that the Wii made you do, and that they used. I suppose you could take this further and ask “Are they just getting good at a single test, or are they really getting better?”. I found whilst using Wii Fit that I got very, very good at particular balance games, but this didn’t seem to transfer well.

Strength was improved, although I must remark that Wii Fit doesn’t do anything too interesting for strength tests. A book would do just as well. It’s not even fun!

Flexibility and reaction time did not improve. The women in the study did lose weight (although looking at the results, I don’t think very significantly although they do not explicitly say this), although they all also ended up exercising more in other ways. Perhaps this means that it is good at motivating you? It’s not really possible to say things like that, I suppose. However, none of the subjects reported actually feeling more healthy.

So it seems like the Wii Fit can be good for your balance, but is less likely to be helpful in actual weight loss. It might help motivate people, too.

It is probably worth noting that another experiment looked at Wii Sport games (as oppose to those that actually use the balance board and are made for fitness purposes). Graves, Stratton and Ridgers et al. looked at if young people can claim that using the Wii is part of their exercise routine. The answer is: No. Especially if you are a girl.

And if it is interests you, it looks like Wii Tennis is about 2 MET units.

Interest in Your Bank Account

Suppose you have £100 and you wish to put it into a savings account for a year, and the interest rate is 5% per annum. What does this mean?

Well, it could mean a few things.

First, it could be that the interest rate is applied at the end of the year. So at the end of the year you get:

\mbox{\textsterling}100 \times 105\% = \mbox{\textsterling}105

However, it could also mean that there is a 2.5% interest rate applied twice in a year:

\mbox{\textsterling}100 \times 102.5\% \times 102.5\% = \mbox{\textsterling}105.06

Earning you a little bit more! Suppose instead that the interest was applied every day:

\mbox{\textsterling}100 \times \left(100\% + \frac{5\%}{365}\right)^{365} = \mbox{\textsterling}105.13

In general, if it is updated h times in a year, with an annual interest rate p, then it is equivalent to the interest being calculated once at a rate of:

\left(1 + \frac{p}{h}\right)^h

So what if it was updated all the time? It is well known that the above expression tends to \exp(p) as h \rightarrow \infty.

The point is just that these things can come up naturally!  This is actually widely used when trading derivatives.

X10 Remote Control Config (“X10 UR86E PC Remote Control”)

A while ago I bought a remote control for my media PC. It is OK – it came with a code which made it work for my TV too, but the ‘ShowShifter’ software it came with for the PC was terrible. Not only that, it really wanted me to upgrade. I tried the version it wanted me to upgrade to, and it was just as awful. However, it turned out that software let you change registry keys to change the behaviour.

Of course, this is boring to do by yourself so here is some software, written in Multimedia Fusion, that actually makes this task not annoyingly boring.

Download

I made the play/pause buttons and so forth correspond to the Windows Media Player shortcut keys. By called rundll32.exe you can also make the power button make the computer sleep. Note that to use this you do need the software installed. Overwrite every function which calls ShowShifter and then delete it (don’t uninstall it, for it takes the things you want with it).

ShowShifter really is bad.

Programs for Windows Mobile

I have a Sony Ericsson X1 mobile phone, which is made by HTC and runs Windows Mobile. Windows Mobile is actually pretty good. For one thing, it supports .Net so it is great for writing programs. However, out of the box it isn’t that great. Sony have tried, and failed, to make it more user-friendly and useful. Here are some actual programs to improve it…

Sony X1

Finger Keyboard provides a much better keyboard on-screen interface. Although the phone has a slide out keyboard you can’t always be bothered to use it, and the default on-screen keyboard is horrific. You can also use a program called SIPChange to make this the default keyboard type.

SPB Mobile Shell provides a much better user interface to your handset. The picture from their website shows an example of it, but it can look better than that. It isn’t free, but it makes a massive difference.

acbToggleBT lets you play audio through your Bluetooth headset, if you have one. This is really useful. Watch out though: If you are listening to comedy, you will look like you are laughing to yourself.

OggSync lets you sync Google Calendars with your phone calendars. I have the registered version and it is really worth the money.

Reflection is my favourite of a collection of freeware puzzle games from Jean-Francois Mainguet. In this you must figure out where the mirrors are, given the length of the paths of the lasers.

amAze is some free GPS software which speaks to you. I found it quite helpful, and along with Google Maps can help you out quite a bit.

gAlarm is a much much nicer alarm clock system. It is only £5 to buy and the usual alarm system on Windows Mobile is terrible.

Anti-performance related pay

The following Dilbert cartoon was recently pointed out to me:

Dilbert Cartoon, 15 Nov 1995

Dilbert Cartoon, 15 Nov 1995

But when I did my Millennium Volunteers award, this was basically the structure. A friend and I created a programming language and environment to teach 3D game programming to Year 7 students (11 years old). I created the development environment, Pond, which was based on Scintilla. The language worked by converting to C++ and using Irrlicht. It ended up looking something like this:

Pond with a simple programming in the Duck programming language

Millennium Volunteers allowed you to get a ‘gold’ award by volunteering 100 hours. The teaching and lesson planning was something like 2 hours per week, and writing the reference book took a while. However, most of our time was spent actually coding the environment or the language. Every time we found a bug in our code we actually got rewarded. It was rather silly. Of course, we didn’t purposely program in any bugs – there was no need.

Duck is available to download from my website

Follow

Get every new post delivered to your Inbox.