Posted by emil on December 31st, 2006
I have recently been working on a project where the target operating system is Windows XP. Since I do not have a Windows XP installation, I started writing code on Linux and since it worked fine in the beginning, I continued doing so throughout the development phase of the project. At a later stage when it was time to start testing and integrating on Windows I discovered one or two platform specific errors in the code, that I easily fixed.
The major benefit was that I could use free tools for validating the software, like Valgrind (with CallGrind enabled for profiling data), KCacheGrind and GProf that would have been hard, or even impossible in some situation if I had developed only on Windows XP.
Just for the fun of it, I tried to build it on Mac OS X 10.4 just to see if it worked - and it did! Right out of the box. That is another major benefit of multi platform development. The chances that it works right out of the box on a new platform is significantly higher than if only one target platform is used.
Since I now could build the code on three platforms without breaking a sweat, I added multiple targets to our automatic build system. That was simply to prevent that new code that would prevent the multi platform build qualities should be introduced into the system.
KCacheGrind in action
Posted by emil on December 31st, 2006
I have now completed a web based syntax highlighter that can prettify any code that is already available on the net (like via WebCVS/SVN, or just plain uploaded files). It has support for Java, Python, C++ and Ruby among others. To use it, simply enter a URL to some code you want to be highlighted and decide if you want line numbers or not. You can also chose to only retrieve a link that you can use on your own homepage/blog/forum/whatever.
You can find the tool in the sidebar, or simply by clicking here.
Posted by emil on December 30th, 2006
Something I have wanted for a long time is an efficient way of highlighting syntax for an arbitrary file. Like uploading a file to some server and then execute a query like this:
http://myserver.com/scripts/highlight?
url=http://www.someserver.com/MyClass.java&
language=java&
showlines=false
And it would generate a clean HTML-output with the code highlighted and pretty.
Since I have not found any site that allows me to do that (even if this one is close) I’m going to write my own service based on SilverCity. My plan was first to use GNU Enscript as many other similar services do and marry that together with Django and a database of code (i.e. each code snippet/file should be cached). Those ideas where just to wild, and after a little searching I found SilverCity which is a Python module for doing the same thing as Enscript, but not using external processes.
So the new design will make the code stay on different servers (where it belongs) and just colorize code upon request.
Posted by emil on December 29th, 2006
I recently started playing World Of Warcraft more seriously (my last attempt ended at level 2
). Now I’m considering leaving it because the time to log in increases for each day. Between 17:00 - 23:00 it is almost always 30 - 40 min of waiting before one can select character. I’d better code some Django/Python so I do something valuable with my time.
World Of Waiting - It never takes 1 minute. More like 30.
Posted by emil on December 28th, 2006
Before I ordered Aperture I was researching about how it handled hot/dead/stuck pixels. My DSLR has developed a few nasty ones during the last year. During my research I came across this article “Apple Aperture Hot Pixel Hell” that states that Aperture will be useless to most photographers until this issue is resolved.
I agree that the best thing would be if Apple fixed this problem (i.e. acting more like Adobe Lightroom), but there is a workaround that is pretty easy to use. As the author of the article above describes, the solution is to spot and patch each spot, but it does not have to be all that time consuming. Simply take a picture with the lens cap on (use long enough shutter to expose all your dirty pixels) and keep it as a reference. Use the spot and patch tool on this image without changing anything else (this is important). Then, all you have to do for each batch is:
- go to the reference image
- use SHIFT+COMMAND+C to copy the settings (the spot and patches)
- select all images in the batch you want to have the hot pixels removed from
- press SHIFT+COMMAND+V to add the spot and patches to all images
- done!
Hot-Pixel-Free-Images
I think this is a pretty straightforward workaround that requires minimum of effort. I still strongly hope that Apple makes this transparent as it is in Adobe Lightroom (apparently it should work if “Auto Noise Correction” is enabled - but sadly not).
Posted by emil on December 28th, 2006
This is just a test of the software MarsEdit. I have searched for a blog posting app for Mac OS X for a while now and this one seems to be a keeper …