Lorenz Cuno Klopfenstein

Articles from January 2009

I'm not a big fan of Apple.

But some of their products are simply awesome.

A month ago, Sammy Larbi from CodeOdor.com sponsored the "Learn something new" contest. I decided to submit the DMX Lightshow project I have been working on and... I won!  :D I chose an 8GB iPod touch and received it a couple of days before leaving on holidays.

My iPod touch sitting on the bookshelf.

The iPod is simply a wonderful piece of technology, perfectly put together as only Apple apparently is capable of doing. Its touch interface is very functional and fun to use: scrolling through a list of songs, a list of pictures or a website is always a pleasure.

In the last days I also started loading some TV shows on the iPod in order to watch them on the train or curled up in bed before going to sleep. Very enjoyable.  :)

The only weak point of the whole experience is iTunes: the Windows version is painfully slow. Also, having organized my huge music library with Media Player using almost exclusively WMA files, I now have to slowly convert everything to AAC just to be able to put on the iPod. Video conversion is quite tricky too (iTunes doesn't seem to be able to do any video conversion) and I learnt a couple of things that I will post in the next days.

All in all, I'd totally recommend it. The device is almost perfect and I'm even starting to get tempted by the iPhone. I hope, for my shrinking bank account's sake, to be able to resist temptation... Again, thank you very much Sammy for the wonderful present!

Posted on Saturday, January 03, 2009
Tagged as
621 Views
1 comments posted

Disclaimer: this is a roundup of things I got from the NHibernate documentation, the ufficial forum or some random blog post, they seem to work for me but I'm not completely sure this is the "correct" way of doing things.

NHibernate logo The custom CMS I'm currently working on (and that is managing this website) relies on NHibernate as its O/RM, which currently provides two separate caching mechanisms.

The first one is the first level cache. It's a local cache to each separate NHibernate Session (a single ADO connection to the database, that usually is opened when the server receives an HTTP request and is closed again when the request is completed). NHibernate will keep all objects associated to that particular session in its cache. This cache is lost as soon as the session is disposed.

NHibernate also allows you to select one of the many cache providers you can find on NHForge.org as a second level cache. This type of cache is persistent, lives across multiple request and is used by all sessions concurrently. Roughly speaking, when an object instance is fetched from the database all values of the object are stored in the cache. When the same object is requested again, NHibernate will dehydrate the object using the values found in the cache which are associated to that particular identifier of the object.

This means that no instances are stored in the cache, but only values. As explained in the documentation, this means that if you manipulate objects loaded through NHibernate you won't risk disrupting the cache, while relationships and associations between instances will always be consistent.

More...

Posted on Monday, January 05, 2009
10530 Views
44 comments posted

Since, as you may have read, I'm now a happy iPod Touch owner and this device has such great video capabilities (huge bright screen + support for advanced codecs with high compression rates), I decided to rip parts of my video library, converting them to the MP4 format, and load them on the iPod. (more...)

Posted on Tuesday, January 06, 2009
Tagged as
599 Views
0 comments posted

In the previous post I went through how to rip a DVD and convert it to watch it on the iPod touch. This time I wanted to convert a simple AVI video to an MP4 file with H.264 encoding, while trying to keep the file as small as possible.

Most of free (and open-source) tools you can find online to convert videos from one format to the other are based on FFmpeg, an open-source command line program that can encode lots of video files to a huge set of other formats.

WinFF logo. However, command-line tools are usually not known for their user-friendliness. Therefore I'd suggest you check out WinFF, a very simple GUI interface to FFmpeg that lets you pick some conversion options from a list of presets (or define your own presets) and batch encode a set of files using them.

More...

Posted on Thursday, January 08, 2009
Tagged as
4684 Views
6 comments posted

Gothic Italia header

Yesterday the people at Gothic Italia (the italian community dedicated to the "Gothic" videogame saga) launched their brand new homepage GothicItalia.it, developed by me.

Apart from design and contents (which may or may not interest you... the original "Gothic" can be bought on Good Old Games if you want... and it's a great game!  ;)), the website is powered by the same CMS I worked on for this personal site. It's built on top of ASP.NET MVC, uses NHibernate as O/RM and Lucene.NET for full-text indexing. Having to use the same system for two different websites encouraged me to try making it modular and customizable: as for now, the CMS is still far from being easy to work with and flexible enough, but as soon as I add some more things I will release the code and make it a "real" free CMS product.

The CMS will be called "Babil" (as in Babilonia), because it has been built to support multiple languages from its roots. Every single content item can be published in one or more languages and users can freely switch from one to the other. The target is to build a simple multi-lingual, multi-user and multi-section system with several extension points.

Posted on Monday, January 12, 2009
Tagged as
375 Views
1 comments posted

ASP.NET MVC logo Today I wanted to add server-side caching to Babil. I had already read different opinions and techniques to do it and one in particular was interesting: it was something like "of what use is caching if the only thing the server ever does is concatenating some strings and fetch data right out of the ASP.NET cache" (as is the case using NHibernate's second level cache). Since I have no idea, the only way to find out, as usual, is to measure.  :)

Turns out that generating a complex page takes almost as long as 200ms, while returning the same page stored inside the cache takes at most 10ms (these are the values I get on the ASP.NET server included with Visual Web Developer, I expect Babil to perform much better running on a real server and not with a debug build of course). Anyway, the difference is quite noticeable and convinced me to try and get output caching done.

More...

Posted on Thursday, January 15, 2009
Tagged as
2245 Views
19 comments posted

I recently got an e-mail from an OnTopReplica user (they exist!  :S) asking for a new feature that allows clicking on the window's thumbnail in order to generate corresponding clicks on the window that is being cloned. It's a feature I would find quite useful myself, therefore I'm currently wasting lots of time I should be using to prepare my exams to work on the next version of OnTopReplica: 2.5.

Somehow, it's strange that a seemingly "interesting" things like the generation of fake clicks on an arbitrary window (using the Win32 APIs) appearently isn't talked about at all on the internet. So, instead of blatantly stealing some code from someone else, I had to find the way to do what I wanted by digging around in the Win32 documentation. I'm not completely sure the following code is correct, but it works (mostly).

More...

Posted on Thursday, January 22, 2009
1473 Views
3 comments posted

OnTopReplica 2.5 screenshot

Today I released OnTopReplica 2.5: if you installed it via ClickOnce you should receive the update automatically. The version on CodePlex.com will be updated soon as well.

This new version includes some minor changes: for instance, the opacity of the window can't be changed anymore by using the mouse wheel (I found it extremely annoying, but tell me if you found the feature useful). A new interesting feature, which was suggested by Young Do via mail, is "click forwarding": if enabled, OnTopReplica will send fake mouse clicks on the window that is being cloned when you left click on the thumbnail. I'm starting to use it on Youtube videos and it's definitely very useful.

This new version is fully localized. At the moment, english and italian are the only languages included in the default install, but additional translations can be added in no time. If you'd enjoy making OnTopReplica more useful for other users around the world, send my an e-mail.  ;)

Posted on Tuesday, January 27, 2009
Tagged as
374 Views
1 comments posted
Back to Klopfenstein.net
Clemens Klopfenstein Serena Kiefer Lukas Tiberio Klopfenstein Lorenz Cuno Klopfenstein
English German