Tigraine

Daniel Hoelbling-Inzko talks about programming

Make me wait

1 hour ago I noticed that I need the Castle.Facilities.Logging assembly, so I fired up SVN to checkout the newest trunk and run a build.

image

It took 53(!!!) minutes to checkout. Something is seriously wrong with SVN at times, there is no other way to explain the differences in speed I was seeing during checkout: Some files came with 50 kb/s, some with 2 kb/s and others with 100. That said: I’m sitting ontop of a 12 mbit ADSL-2 connection that peaks at about 1.6 mb/sec.

I hate waiting, and waiting an hour for a trivial operation that should not take any longer than 10 seconds is really the end. I only hope most projects get away from svn as soon as possible, the benefit in speed is just massive.

Oh and btw: I know that there are SVN mirrors of the castle project on GitHub, I already did a fork of one of those to pull it down. Only that it was 6 commits behind the current svn trunk and I couldn’t build the solution at that revision so I decided to re-pull the most current svn (big mistake).

Filed under personal

Using a Mac Keyboard on Windows

I decided to do something really stupid: Spend 50€ on a Apple Keyboard.

image

Why? I was in the market for a keyboard that mirrors my laptop’s key press experience. The Apple Keyboard seemed like the perfect choice at first, and so I bought it at my local Apple retailer.

One thing I didn’t consider at the store was that on the Apple Keyboard ALT and Command have traded places, and the default mapping on Windows is Command = Winkey.

So, I found some handy guides on the internet on how to use the nice little program AutoHotkey to remap keys on the keyboard. So I could flip positions on Winkey and Alt.

Doing so with AutoHotkey is very easy and there are numerous scripts out there to do all sorts of crazy things. Here is the script I came up with after some time:

LWin::LAlt
LAlt::LWin
RWin::RAlt
RAlt::AppsKey
+F8::Send {Media_Play_Pause}
+F7::Send {Media_Prev}
+F9::Send {Media_Next}
+F10::Send {Volume_Mute}
+F11::Send {Volume_Down 2}
+F12::Send {Volume_Up 2}
F13::Insert
F14::PrintScreen

Also I have found it important to run AutoHotKey as admin, otherwise all these key mappings are lost whenever you enter a UAC protected area.

Now that the Key mappings are all set up I have to say that I am really happy with the keyboard so far. The typing experience takes some time getting used to, but it’s really solid and well manufactured and I am not really all that sure if I’ll go back to my Natural Keyboard 4000 anytime soon. (I might if the Apple one proves to be discomforting after prolonged use, but that remains to be seen).

PS: Windows Live Writer on my main machine decided to break. As of now I can’t write blog posts on my computer any more and I have on explanation for that (besides some Exception text stating that Courier New has no regular cut). And I get really pissed off by that (and by the fact that WLW is saving my drafts in some obscure binary format I can’t read).

Filed under personal

I’m in love with Android

Last year I bought myself a iPhone 2G through friend from the US and was very fond of it, mainly because I didn’t have a Smartphone before. But as time goes by, the limitations of the iPhone platform became more and more obvious.

I made the decision not to buy a newer generation iPhone when I was at the office one evening and needed to carry a large db dump file with me home. Imagine my feelings when carrying a 16GB iPhone that has about 13GB of free space available and not being able to use it as a thumb drive due to it’s lack of a mass storage mode. Luckily I had my DSLR with me so I formatted my 8GB SD card and used that instead. But not being able to place files on a phone is just plain stupid.

Also I’m just tired of iTunes and it’s totally retarded syncing model.
I’m a totally connected person, all my data is in the cloud, be it code (BitBucket, GitHub), email (Gmail), calendar (Google calendar), Google reader or contacts (Gmail). So having to plug my phone into the computer at regular intervals to update information on it is just not the way I wanted it to be. (Especially considering what a headache it is getting data synced between Outlook and Google’s services).

So going to a Android phone was a pretty logical decision for me. I can take all of my current data with me, use the wireless syncing capabilities that come with using Google’s Gmail and Calendar services, and be up and running in less than 5 minutes.

Actually, it only took about 3 minutes for Google to load all of my contact list into the phone and present me with a fully working environment of Contacts, Email and Calendar. And that’s really impressive.

And lastly, I’m a developer! Being able to develop for my own device is very important to me, and not owning a Mac and hating the idea of programming in objective C (believe me I tried) severely limited my ability to do that on the iPhone platform.
Android on the other hand is using Java (not perfect, but still way better than C) and is not constrained to a particular platform with their SDK.

Although the platform choice was easy, the phone one was hard. As of speaking there are only 3 serious Android handsets in the market: HTC Magic, HTC Hero and Samsung Galaxy.
And to be honest: None of the three is perfect. The Magic has no headphone jack, the Hero is very bulky and due to sense UI not always as Snappy as I’d like it to be and the Galaxy didn’t bring any interesting features besides the AMOLED display. 
Since none of the current devices is really perfect, I figured buying the cheapest one and letting the platform mature for another year would be the best course of action. So I bought the HTC Magic.

So far, I’ve been using my Magic for about two weeks and love it. It’s fast, having multi-tasking paired with push notification for almost everything from Google makes this phone simply a joy to use. I get email notifications faster on my phone than I get them through the GMail notifier on my PC. I can use Google Talk to chat with friends who use Android instead of writing SMS or look up their position through Latitude.
Also the battery life on my Magic is way better than it was on my iPhone. While I was lucky to get my iPhone through one day without plugging it in, my Magic can easily live through 2 with push services and background tasks enabled.

The Android Market is also filled with lots and lots of apps, so there is no real disadvantage from the iPhone here. I even came to appreciate the ability to scan barcodes on the phone while shopping!

Now, from my limited testing so far I found the following apps really nice and handy:

  1. twidroid (Twitter .. )
  2. Places Dictionary (Gives you POI near you)
  3. My Tracks (Running track recorder)
  4. NewsRob (Very good Google Reader app)
  5. Astrid Task/Todo List
  6. Wikitude World Browser (cool augmented reality from Austria)
  7. Google Maps (make sure to get the newest version manually from the Market)
  8. Battery Widget (from mipping.com)
  9. Barcode Scanner (also scans QR codes)
  10. Quickpedia (Wikipedia app)
  11. Google Sky Map (oh this is so awesome!)

But what I love most about the phone is simply it’s syncing! I edit all my contacts online through GMail and without even thinking about it they all get updated on my phone too. No hassle with plugging it in or anything, totally zero friction. It just works!

My only gripe with the thing so far: You can have only one input language for the keyboard selected at a time. Since I frequently use the phone to look through twitter or emails, I sometimes need to switch from German to English. The iPhone had that handy little button to switch, while the Android would require me to go through the phone’s settings.

Verdict: I’d never go back to my iPhone. Although the platform is still young and there are some rough edges to be worked out, I feel like Android will be a serious player during the next years.

Filed under personal

Howto get rid of *.onetoc2 files using Powershell

Today I did one small mistake when trying to open a command-line window on my source folder: Instead of hitting “Open command window here” I accidentally clicked “Open as OneNote notebook”.

Quite innocently, OneNote opened, I closed it. Everything was fine. Until I did a hg status:

? lib\OneNote Inhaltsverzeichnis.onetoc2
? lib\castle\OneNote Inhaltsverzeichnis.onetoc2
? lib\elmah\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\extensions\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\extensions\common\2.0\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\extensions\common\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\common\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\common\neutral\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\mono\1.0\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\mono\2.0\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\mono\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\net\1.0\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\net\1.1\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\net\2.0\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\lib\net\OneNote Inhaltsverzeichnis.onetoc2
? lib\nant\schema\OneNote Inhaltsverzeichnis.onetoc2
? lib\sqllite\OneNote Inhaltsverzeichnis.onetoc2
? lib\xunit\OneNote Inhaltsverzeichnis.onetoc2

Oh snap! OneNote just placed a table of contents file in every subdirectory of my lib folder! And, best of all, despite the setting “show all hidden” I couldn’t see those files through my explorer.
Also, a del /s *.onetoc2 did not remove the files.

Google to the rescue, I’m not the first to make that mistake, and Richard Siddaway also posted a way how to remove those using Powershell:

Get-ChildItem -Filter "*.onetoc2" -Force -Recurse | Remove-Item –Force

I’m quite shocked. I’ve been using the regular windows command line for quite some time now, and I have to say: Microsoft really has something going here with Powershell. It works really nice, and once you get a hang of the syntax it is really cool to work with.

Filed under personal

Win7 shortcoming: Notetaking widget

image

Oh, I love Win7. I said so after installing the first beta for the first time and I’ve been running my new favorite OS ever since.

But I have one problem with the way Microsoft used their built-in applications to showcase new functionality like jump-lists etc: They broke the Notes widget from the Windows sidebar.

You know, that little widget thingy that allowed you to write down 4 short lines somewhere on your screen.

In Windows Vista it was visible whenever your sidebar was visible (not a perfect solution either), but at least it was visible occasionally.

Windows7 changed this, Notes is now it’s own little application that has to run and that takes away space from my task-bar. And: When I use Aero-Peek to look at my desktop widgets, the Notes app turns transparent too.

So, it became nearly useless, since I want my notes to be a gentle, sometimes visible reminder for things I need to keep track of. Nothing I’d start a program to look at, no – something that is just there sometimes. And the new Win7 implementation of that falls seriously short of that goal. (And I very rarely see my desktop except for Win+D or Aero-Peek – both witch also remove the notes from the screen.)

In fact: I wonder why anyone would sacrifice some valuable taskbar real-estate for such a useless application.

Filed under personal

Translation taken too far

I’ve said in the past that I believe you have to know English to be a programmer, and sometimes I get a painful reminder about how right I was.

After installing git on my laptop today I found out that GitGui has been set to German instead of English. Look at this wonderful commit dialog:

image Isn’t that awesome? I speak German and can’t tell you what they could possible mean with words like Abzeichnen (to sign sth.) and Eintragen (to chart sth?) since they don’t even remotely translate to words like commit. They don’t use the words all the others use, thus alienating everyone and separating German GitGui users from the rest of the world.

Desaster, I think I’ll have to point this out to the GitGui mailing list. It just doesn’t make sense this way.

Filed under personal

I’m in on the Castle blog aggregator

Well, I already told you about the Castle blog aggregator as a source for keeping up to date with the Castle project. Turns out the idea was taken even further and the feed has now been integrated into the www.castleproject.org under Community/Blogs.

What I never anticipated was that I’d one day get this email by Mauricio Scheffer:

Hi Daniel, would you be interested in being included in the Castle blog aggregator?
Your posts tagged as "Castle" would be automatically included.

Cheers,
Mauricio

My immediate answer was Yes! I’m very happy to be able to contribute to castle in any way possible, and seeing people consider my posts interesting is very rewarding to me. Thanks Mauricio!

Filed under personal, site-news

I need time-scheduled energy-plans in Windows

I run my main PC almost 24/7 because I use it to host all sorts of data on it (TV Shows, Music etc) that I then stream to my Laptop, TV or XBox to consume somewhere in the house. So the PC is constantly running and I don’t like wasting energy.

I’ve configured my PC to go to hibernation after 45 minutes of idle time, and Windows is smart enough to detect when files are open over the network and will not hibernate while the data is actively in use.
Where it gets problematic is when I am doing something else (like eating) and then want to watch something off my PC. While I was eating the PC went to hibernation and I need to go up one floor just to hit a spacebar and head back down to the TV.

Obvious solution would be to simply shut off hibernation and let the PC run the whole day. But that then is bad since I like watching stuff on my laptop in bed. So when I turn off the laptop I want confidence that the PC will hibernate shortly after without me having to get out of bad at that time.

So, what I want is a setting that allows me to tell Windows to run energy profile 1 during the day where hibernation is completely off, while running energy profile 2 after 10pm so I don’t need to worry about shutting down the PC.

I guess I could write a service to do exactly that, but I believe it would be a great feature to see out of the box in Windows 8 (if they decide to follow some sane naming rules this time)

The much better solution anyway would be to get some NAS to store my stuff in my server closet so my PC can sleep through 70% of the day while I can still access all my media. Unfortunately most consumer-level NAS solutions are still too expensive or just not performing well enough.

Ps: One nice thing on the green-computing side of things that comes with Win7 is that they hide the “Maximum Power, minimum saving” option by default from the menu. You have to click “More energy-plans” to see that.
I guess it doesn’t matter at all, since most users savvy enough to use that dialog probably know what they want anyway, but it sends the right message.

Filed under personal

SSL Errors can indicate wrong system time

Imagine my face when I got the following screen while logging into Gmail in the morning:

image

Chrome really suggested that www.google.com has no valid SSL certificate and may be dangerous.
Also services like Windows Live Messenger and Windows Update refused to work due to broken SSL certificates.

Turns out, I accidentally set the system clock after a bios reset to 28. July 2008 instead of 2009. I guess I looked at the system time about 3 times before noticing the error :(.

Funny: The wrong year also prevented me from syncing the time with time.windows.com to get to the right one.

Filed under personal

IT-Camp 2009 at Klagenfurt University

© Georg Holzer

Ever tried mixing 9 high school students, XNA Game Studio 3.1 and one week of mentorship together? The result is nondeterministic, but experience showed that the projects turn out to be really awesome and fun to build.

After last year’s IT-Camp the University of Klagenfurt decided to continue the project where 15-17 year old teenagers are brought to Klagenfurt to experience university life firsthand. Like last year I was instructing a course about computer game development using Microsoft XNA Game Studio together with Christoph Kofler.

The first day started with a short introduction to computer games in terms of genres, target audience and distinctions. Turns out most of our students were avid players, so we couldn’t keep them away from our Guitar Hero setup for long. After Christoph and I got our asses kicked at Guitar Hero we then went on to analyze what made games great or not and how to judge games in different genres.

On Tuesday Mathias came in to deliver a little lecture about game design (thank again!) before we gave them a little tutorial on XNA and the most important things in 2D space like collision detection and state management. After that, they started development of their own games.

Game projects where pretty diverse this year since we explicitly allowed them to experiment with their own ideas rather than everyone doing the same 2D space shooter. This led to these really awesome projects:

Fisch-Game:

The little fish Kiku has to save the mermaid. He has to avoid the sharks for more than 40 seconds to finish the game. Complete with Arielle the mermaid sounds.

Adventure

A

This Zelda-like adventure features a scrolling map and animated characters. A per pixel collision detection was also implemented. Goal is to solve one simple quest, but the whole thing could easily be extended to something much bigger.

Mario-Clone

A Supermario clone that features basic collision detection and shooting of a projectile. The projectile will only hit one enemy and different enemies do more or less damage. Also it uses a small state machine to allow Mario to jump and fall.

Maxrace

A fairly simple but funny game. Goal is to reach the princess by alternating the left and right arrow button on the keyboard. Time is recorded and entered into the highscore. Really cool about this game is it’s simplicity in state – only one variable is incremented by 1 every valid keystroke.

Asteroidsx

A Asteroid clone that features a physics engine. Asteroids get drawn into the planet in the middle by gravity, player has to avoid asteroids and "poke" them if they are too far away from the planet's gravity to keep them going. Very challenging math-wise and well implemented. Unfortunately features were cut because of delays on the physics part.

Presentation

This was the first chance I had to try out a more “amateurish” style of PowerPoint slides that led to me buying a graphic tablet. The presentation was quite successful I think, so we used the same one for the final presentation before media and parents:

Finally

I’d really like to thank the University of Klagenfurt and Mathias Lux for this opportunity and also say a little thanks to our students. The week was (as last year) a very rewarding and fun experience for me and I hope to continue this next year.

After 2 years of doing this with XNA game studio I’d also like to point out that XNA has proven itself to be a really perfect tool for starting game development. We get students with a quite diverse skill set and they all picked up the tool very easily and all managed to deliver something truly awesome, whether it was object-oriented or just a long procedural piece. The framework won’t stand in your way while still giving you some of the most important stuff for free.

Sourcecode

The Sources of the games will be hosted at the IT-Camp’s website and I’ll add a link to it as soon as we manage to upload it.

Ps: Thanks Georg Holzer for allowing me to use his photograph of our end presentation!

Filed under programmierung, personal

My Photography business

Projects

dynamic css for .NET

Archives

more