Category Archives: Programming

Virtual Conducting with the Microsoft Kinect

Abstract

Mouse and keyboard are being used as general purpose device despite the fact that for e.g., gaming or 3D modeling different input options are considered better. Therefore an alternative approach of human computer interaction is described and analyzed with the help of the Microsoft Kinects natural user interface tools. As an example of a gesture based application, a conducting software is developed. This implementation is analyzed from a practical perspective to show real world usage. As a result this application shows that semi professional conducting may be possible. However, conducting requires very precise motions to be detected. This solution does not meet professional standards, but may be extended with some effort for that purpose. Regardless of the limited usage for applications which require precise input natural user interface featured applications show benefits in various areas and will presumably be used more often in new applications.

This is my master thesis’ abstract which describes somehow what I have done the last couple of months. I build a small application to show the natural user interface capabilities of the Microsoft Kinect for WIndows SDK with conducting a musical notation. The prototype of the developed applications is very rough and hardly useless for professionals. However, you may watch the following video to get the idea.

Was Unis falsch machen und FHs (vielleicht) weniger falsch

Der Herr Köhntopp hat wieder einmal einen Blogpost geschrieben, der mir direkt aus der Seele spricht. Ich kann das ganze mehr oder weniger Voll und Ganz unterschreiben, möchte vielleicht lediglich etwas ergänzen.

Ich habe ja das Gefühl, viele Universitäten – also die Theorie-Institutionen und Nachwuchs-Produzierer – haben einen gravierenden Fehler (zumindest in meinem Fachbereich der Informatik). Es wird zu oft von zu schlechten Unis zu viel für vermeintliche Wissenschaft gemacht sowie Theorie erlernt die in der Realität weit daneben ist.

Was mir fehlt ist der Blick auf die tägliche “Drecksarbeit” die man als Software-Entwickler nunmal zu tun hat. Die Welt ist Schmutzig und so ist deren Modell. Schön Java entwickeln und dabei alles “from scratch” programmieren ist zum Erlernen des Handwerks dienlich. Nur hilft mir das Ganze nichts ohne entsprechende Refactoring-Kenntnisse.

Fachhochschulen haben hier aus meiner Sicht einen kleinen Vorteil. Aus eigener Erfahrung arbeite ich seit dem ersten Semester (und eigentlich bereits davor) in der Branche und lerne sozusagen, dass jegliche Theorie in der Praxis oft anders aussieht und man die schönsten Entwurfsmuster oftmals nicht anwenden kann. Eine ausgiebige Verknüpfung von Praxis an der FH mit dem Beruf nebenher führt zu einem bereits nach Ende des Studiums mit vielen Wassern gewaschenen Absolventen. Ich persönlich habe durch Auslandssemester, Praktikum, Selbständigkeit sowie Nebenjob sehr vieles bereits während meines Studiums an der FH erlebt und habe für diese kurze Zeit auch einiges aus der realen Welt kennengelernt. Ich glaube nicht, dass ich an einer Uni ähnlich viel Erfahrung sammeln hätte können.

Den Code den ich täglich sehe ist grausam. Das meiste davon ist von mir aus früheren Tagen. Da hatte man a) das technische Know-How nicht, b) fehlten Anfangs die “richtigen” Requirements und c) war vielleicht das Umfeld (zB Programmiersprache) noch nicht so weit entwickelt wie heute. Einzig und allein der Wille, diesen Code bei jedem drüberstolpern kontinuierlich zu verbessern ist mehr oder weniger mein Job. Die Probleme der Product-Owner sind meist bereits gelöst. Nur nicht in unserer Codebase. Das Zusammenführen von bestehenden Lösungen mit bereits besehenden Code ist mehr oder minder mein Job. Und ich mache es dennoch gerne.

Start an Android Intent without pushing on the history stack

I was wondering how to create an Intent with the Android SDK which will not be pushed on top of the history stack. Which means, if another Intent will be started, the back button pressed event will not move back to the specific Intent. Actually this is done pretty easy with setting a FLAG_ACTIVITY_NO_HISTORY. An example the is given with the following code snipped.
Continue reading Start an Android Intent without pushing on the history stack

Annotations with Symfony2

With Symfony2 much configuration can be added directly to actions with annotations. With Symfony1 there have been cache.yml, route.yml, security.yml and many more configuration files for a single controller. This has not changed with Symfony2. You still are able to configure your (bundle) controller with single files. However, there is a new way which offers more flexibility and adds the configuration right to the place where it is used: to the specific action as meta-info with some sort of annotations.

First, your route.yml has to be edited and your bundle has to be added.

# app/config/route.yml
your_bundle:
    resource "@YourBundle/Controller/YourController.php"
    type: annotation

This is needed in every setup, but as you see, you can specify the route type as annotation. This means, Symfony2 will parse the doc block on any action of your controller file, and import this to route.yml. But don’t worry, Symfony2 does this just once and stores the information on the cached route.yml file.

Now you have to add the routing information on each action which should be imported as route, as shown below. You can also insert params to your route. Additionally to the route you can add various other settings direct to the action as also shown below.

class YourController
{
  /**
   * @extra:Route("/action/{id}", name"route_name", requirements = {"id" = "\d+"})
   * @extra:Template("YourBundle:Controller:action", vars={"your"})
   * @extra:Secure(roles="ROLE_MEMBER")
   * @extra:Cache(expires="+7 days")
   */
  public function yourAction($id)
  {
    $your = 'code ' . does('something with', $id);
  }
}

There is much more to come and everything is still under development. So expect changes and additions to these existing annotations.

Update 24.05.11
Yesterday, Fabien Potencier announced a change in the Annotation System of Symfony2. There is a official blog post explaining the changes.

My computers

So there are a couple of computers idling around here. I all of them gave names of planets and have come to the point where I have to use names of stars because I ran out of planets. Here I have a list of all the devices that I am using on a more or less regular basis. I left out smartphones, server in data centers or not anymore working computers at home.

Earth
My old, but still working home file server which runs Ubuntu. It has three internal HDDs and offers a total of approx. 1,5TB of storage space. I don’t like the really loud fan but I live with it.

Mars
An old Sony Vaio notebook which is not really in use anymore but still works. It runs Windows XP and is often used by others in the living room for just browsing the web. However, I don’t use it anymore.

Pluto
A 15″ MacBook Pro (first generation unibody) which is used by my dad on a daily basis. I just use a remote ssh connection occasionally to fix things or install new software. Yes Pluto is actually not a planet anymore (since 2006), however. I had a Netbook (Saturn) at this time and no other planet name was left.

Jupiter
My main notebook. This is a 15″ MacBook Pro (late 2009) with 8GB of RAM but still a really slow 320GB HDD. I am probably replacing the HDD with a SDD quite soon. I use this MBP every day at university or at home. I am doing my photo editing, programming and daily office work with this computer.

Venus
Not my computer, but my girlfriends. It is a Fujitsu Siemens Windows 7 notebook which I personally do not use at all.

Merkur
My HTPC just beside my TV. It is a Zotac Mag Mini system which runs with Ubuntu with MythTV. It records TV series and movies. I use it also as a small web server for developing small applications.

Uranus
A 23″ iMac actually used by my mum and not quite often by myself. I however often ssh in and install stuff.

Neptun
A 15″ ASUS notebook from 2006. It is running Windows XP, standing around somewhere and not used anymore. It was my main computer for quite a long time before I switched to my MBP (jupiter).

Genua
A 27″ iMac at work I already had to name after an astroid and not a planet, since there are no names left and this is actually not my personal computer.

Should my next project use Symfony2?

In a couple of hours, the Symfony Live event in Paris is going to start. You can expect Fabien Potencier to release Symfony 2.0 at the keynote he is holding on March 3rd at 17:30.

This is actually not a big deal since Symfony2 has been around for a couple of months. The big question is, should you already start developing your next project with Symfony2? There is no definite answer to that but what you can expect is a “not so much” changing API and already robust Framework right from the start. If you are planing a big project with longer time to develop, Symfony2 is a must. If you have already started and use Symfony1.4, stick with it.

Ein Monat Nexus S

Vor genau einem Monat habe ich mein Google Nexus S bekommen. Besorgt hat es mir ein Freund in London und es mir nach Österreich geschickt. Bin ich soweit zufrieden? Absolut! Es gibt dennoch ein paar kleine Dinge die mich stören.

Continue reading Ein Monat Nexus S

Automatic Anti-Pattern Corrections for PHP

During my computer science studies at the Vorarlberg University of Applied Sciences I wrote my bachelor thesis about “Automatic Anti-Pattern Corrections for PHP”. As a fan of the open source philosophy, I want to share my work with others. I invite everyone to contribute to the great lex-pass project and this approach to better PHP software. Please share your thought and ideas on this with me and others by leaving a comment or sending me a message. Continue reading Automatic Anti-Pattern Corrections for PHP

Symfony 2.0 Preview

Here we go. Fabien Potencier last week released the preview website for symfony 2.0 (symfony reloaded). Me, as a long time PHP and symfony user this preview shows a lot of new interesting stuff comming to web development with symfony. A Quick-Tour of Fabiens newest baby is also available and points out major changes to the framework. First thing to notice is the completly changed directory structure. Another major step is the use of >= PHP 5.3.2 which adds support for namespaces and gives a great performance boost. As release date for symfony 2.0 “late 2010” is scheduled.
[ad#Google Adsense 468×60 Singlepost Mystique]

Symfony Support in NetBeans 6.8 Announced

The NetBeans Team has announced to support not just PHP 5.3 which was released earlier last week but also Symfony in the next release (6.8)!

Because I am not very pleased with the PHP support within Eclipse PDT, I am currently using VIM for PHP, and specially, Symfony development.

Since Pierre told me recently that the PHP support for NetBeans is getting better and better, I am really looking forward to the next NetBeans release.

More information on Symfony integration in Netbeans