Moving to Visisoft.de

04/01/2014

yalst.de

From now on I’ll be posting articles on software development on our company blog.

You can check out the posts I authored here.

Venus Transit 2012

06/06/2012

Today I was lucky to take a photo of the Venus when it passed the straight line between the sun and the earth. You can clearly see the black disc of the night side of the Venus and some sunspots. The thin cloud adds some atmosphere.

Transit of the Venus on 6/6/2012, location Rostock, Germany.
Focal length = 840mm, F-stop = 13, Exposure time = 1 / 500 sec, APS-C Sensor (22mm x 15mm), Canon EOS 7D, Gain = ISO 100.
Exposure and histogram tweaked with Adobe Lightroom.

Update iPad-App für Gehörlosenzentrale.ch

15/03/2012

Leider kommt es nach Einspielen des Updates iOS 5.1 von Apple zu einem Programmabbruch der iPad-App.

Dieser Fehler wird in Version 1.0.1 der iPad-App beseitigt, die bereits bei Apple eingereicht wurde.

Ich erwarte, dass die neue App um den 20. März 2012 im Schweizer AppStore verfügbar sein wird. Bitte haben Sie bis dahin Geduld.

EuroApp 1.0 free on the App Store

02/08/2011

EuroApp 1.0 is my new iPhone / iPod touch app for cap­turing Euro banknotes on the fly.

It is the mobile front-end for the Euro­bill­tracker.com com­munity website. You can attach your own personal meta-data (location, date, comment) on a unique Euro banknote and follow it when  the money flow lets it  surface again in the purse of another Euro bill tracker. You will then have encountered a hit. In the meantime you can view your collection progress in some statistics charts and leaderboards, or you may compete with your friends for the most Game Center achievements.

There is no previous membership at Eurobilltracker.com needed, you can do that on demand from within the app.

I think it is a really handsome app, but that I let you to decide for yourself – you can load the app for free from the App Store!

You can find the website of the EuroApp at euro-app.com if you wish to learn more about Euro bill tracking or the app!

FAQs: EuroApp for the iPhone – follow your Euros across the world!

02/08/2011

1. Where can I leave feedback?

Post a reply on this blog post or fill out  this simple question­naire.

“Tip of the Day” Reference App for Mac OS X

21/03/2011

I am happy to announce that “Tip of the Day” is my first App published on the Mac App Store!

It is a simple app which presents useful tips how you can make your day work even more successfully with your Mac. It is suitable for occasional users, beginners as well as experienced users. The tips are described in a short sentence presented in a single utility window which can be made to appear every time your computer starts up.

The list of tips includes useful keyboard shortcuts, mouse actions, included apps and add-ons and many more. The list will be constantly expanded and updated.

I priced Tip of the Day € 0.79 ($ 0.99). There are promotional codes available for give-away which I will send out according to the first in first served principle. Please apply here in the comments.

Converting UTF-8 Text to C/ C++ wide char­ac­ter strings

19/01/2011

When browsing the C++ Standard Library for how to convert UTF-8 text to C wide character text wchar_t[] and vice versa one will be surprised to find that for such a common problem there is no built-in solution available. It seems one has to resort to the services of the operating system and write non-portable code; e.g. for the Objective-C runtime:

NSString* intrnl = [NSString stringWithContentsOfFile:path 
                                             encoding:NSUTF8StringEncoding 
                                                error:&e];
std::wstring wideTxt((wchar_t*)[[intrnl dataUsingEncoding:NSUTF32StringEncoding] bytes]
                     , [asData length] / sizeof(wchar_t));

Surprisingly a web search too does not reveal many light-weight and elegant alternatives. Either they require two separate copies of the same text in UTF-8 and Unicode like UtfConverter, they work just in one direction as utf8::ostream does, or like Poco::UnicodeConverter they stop at UTF-16 which is the wide character encoding on Windows.

When using the Boost C++ libraries however, UTF-8 conversion can be performed by just adding a single line of code after creating your input or output streams while relying on a thoroughly tested code-base.

Regrettably the conversion code is not header-only and thus requires at least one Boost library (e.g. serialization) to be built on your platform. If you think that this is an overkill, you can just grab the libs/detail/utf8_codecvt_facet.cpp file and add it to your compilation items of your target. This is what this post is about.

I found that with Boost 1.44 the original Hello World example published by Paul Dixon did not work as advertised: The linker kept complaining about the missing vtable of the utf8_codecvt_facet object which I found is caused by a missing definition of one of its methods. I guess that this on the other hand was the effect of non-matching namespaces in the header and implementation files. Since it got away when I removed all namespace macros in the original files as follows:

main.cpp:

#include <iostream>
#include <fstream>
#include <locale>
#include <string>

#if defined LINK_BOOST_SERIALIZATION_LIB
#include <boost/archive/detail/utf8_codecvt_facet.hpp>
#endif 
#include "utf8_codecvt_facet.hpp"
using namespace std;
int main (int argc, char * const argv[]) 
{
   wifstream inFile("utf8.txt");
#if defined LINK_BOOST_SERIALIZATION_LIB
   inFile.imbue(std::locale(std::locale(), new boost::archive::detail::utf8_codecvt_facet));
#endif
   inFile.imbue(std::locale(std::locale(), new boost::utf8_codecvt_facet));
   wstring wideString;
   inFile >> wideString;
   cout << "widestring.length()" << wideString.length() << endl;
   wstring line;
   while getline(inFile, line)	{
      wcout << line;
   }
   return 0;
}

utf8_codecvt_facet.hpp:

utf8_codecvt_facet.cpp:

Boost C++ Libraries with iOS

18/01/2011

Implementation of frequent programming tasks beyond the Standard C++ Library such as asynchronous I/O, threading, serialization, date and time, smart pointers, delegate functions etc. – while being compatible to the STL – is the power of the Boost C++ Library. In your iOS projects it enables you to write truly platform independent C++ code which relies on a high performance, industry-strenght basis.

Unfortunately no pre-built binaries of the several compilation-needed components of boost exist. Furthermore the build process is abound with complier switches, linker switches and path variables. The threesome of Apple’s iPhone and Simulator SDKs, GNU’s g++ and Boost’s bjam results in a scary hell. E.g. you will have to learn that with Darwin not always the scientist is meant.

To the rescue Pete Goodliffe has created an excellent script to build a framework for use with the iPhone. It works like charm: Within a 1-2 hours you’ll have roughly 47MBytes of arm7, arm6 and i386 libraries and all that remains is to add the framework itself to your project’s direct dependencies in XCode and specify the path to the framework in the “Framework Search Path” settings.

Finally you can concentrate on the things you want: E.g. if you feel the NSArray syntax is too bloated for your algebra, use boost::array instead. It comes with serialization as well:

#include <boost/array.hpp>
#include <boost/serialization/array.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <iostream>
#include <fstream>
#include <boost/foreach.hpp>
boost::array<int, 7> dataArray;
std::ifstream inputFile("data.txt");
boost::archive::text_iarchive inputArchive(inputFile);
inputArchive >> dataArray;
int median = dataArray[3];
BOOST_FOREACH(int value, dataArray)
{
   NSLog(@"%d", value);
}

ISO Country Names and Codes for the Programmer

17/12/2010

While implementing a table with country names in my Euro App, I found a very valuable resource which helps every programmer who faces this problem. Be it ActionScript, HTML, Javascript, (Objective-)C – as in my case – you name it -, the online service opencountrycodes­.appspot.com provides the current list of country names in the right format!

You can fetch the latest list from within your app/website every time by HTTP request or, as I did, grab the file and bundle it with your product! Given, of course, you are complying to the ISO 3166 Standard which Eurobilltracker.com apparently does.

Well, one could download a xml-file from iso.org too, but its country names are set ugly in capitalized letters – and your clients won’t like that!

Beta-Testers Wanted for Euro­bill­tra­cker App

05/11/2010

THE BETA PROGRAM IS NOW CLOSED!

Attention all Euro-banknote collectors, I began building an iPhone / iPod touch App for easy mobile banknote tracking!

Eurobilltracker (EBT) is an international non-profit volunteer team dedicated to tracking Euro notes around the world. Each user enters the serial numbers and location information for each note they obtain into EuroBillTracker.

In order to address the needs of the EBT users I would like to get permanent feedback from the community during the development process. I figured that a Beta program would be a nice way to let everybody (not really everybody, Apple demands that it can not be more than 100) know what it is going to be and account for a lot of the testing which otherwise I would have to do myself.

If you are interested you can simply apply for the Beta Program by either

Please note that the devices will need to have a software (OS) version of 3.0 or higher and may not be iPads.
Update (16th June 2011): Due to lacking time I won’t support iOS version 3 – like on the iPhone 1 – for now. Your iOS device is required to run at least an iOS firmware of version 4.0.

I expect distributing the first Beta end of November, but can not pro­mise since our customers have priority.
Update (16th June 2011): As the second Beta is out now I expect the final version to be ready mid July 2011.

banner for http://www.eurobilltracker.com


Follow

Get every new post delivered to your Inbox.