Using Regular Expressions

November 10th, 2012 No comments

In my opinion, regular expressions are one of the most useful things in general programming and are one of my secret weapons. I use them very often for parsing data from web pages, parsing out language strings from game code (for internationalizing the game), modifying and processing text files, processing output of various utilities like the “svn” terminal client. I mostly use Ruby or Perl for these as they offer various other cool features for text processing (and Perl is super-fast as well).

Read more…

Categories: Programming Tags: , , , ,

GameCenter error “The requested operation has been cancelled.” explanation

October 26th, 2012 No comments

This post is dedicated to iOS developers.

When using the following method:
[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:…]

You may get “The requested operation has been cancelled.” error while trying to authenticate the user to the GameCenter.

Don’t worry. This happens after you cancel GameCenter log in request three times and click to “Disable GameCenter” button. You may have done that during testing.

To make it working again, just open GameCenter app and sign in there.


Head Tracking Home Project

September 22nd, 2012 No comments

I am a big fan of X-Plane simulator so I am trying to improve it over time for better experience. I added orthophotomaps to it which increased realism and detail.

After some time, I got an idea to control pilot’s head by using iPhone gyro. Head movement is useful mainly for navigation training. You would put the iPhone on your head and it would read gyro changes, send it via wifi to running X-Plane instance and move pilot’s head as you move yours. I tried to build the first prototype but then realized how bad iPhone gyro is. When I run the app for the first time without moving the device, the system started reporting error gyro data immediately. I did several corrections and filtering but still it was not usable for head tracking purposes.

I finally classified this as “bad” and was thinking about an optical solution. Then I came across TrackIR but I did not want to wait for it to be imported to my country so I decided to make something similar on my own (hardware, x-plane plugin and software). And after 3 days I had the first working prototype. :) Photos soon.

Categories: Uncategorized Tags:

SQLite3 iOS compilation error

September 22nd, 2012 No comments

For those having the following error trying to compile sqlite3 big source file

sqlite3.c: In function returnSingleInt:
sqlite3.c:88236: internal compiler error: in find_src_set_src, at var-tracking.c:1922

Please submit a full bug report, with preprocessed source if appropriate.
See <URL:> for instructions.

The solution is easy. Just use llvm-gcc compiler for compilation instead of Apple gcc.
Changing Apple compilers helps sometimes…

Categories: Uncategorized Tags:

InApp Purchase Troubles on Jailbroken iOS

September 22nd, 2012 No comments

If you happen to have a jailbroken iPhone/iPod or iPad and you are a developer, you might have run into a problem with InApp purchase testing (it simply won’t work). For me the jailbreak is a must-have so that I had to figure out the reason for these problems.

The problem is AppSync but there are two versions of it.

Read more…

Categories: Uncategorized Tags:

About This Blog

August 29th, 2012 No comments

A few weeks ago, you would have found an old personal webpage at this place. I wrote previous webpage code myself when I was learning Ruby but I decided to switch to WordPress which is easier for maintenance and has some cool features.

In this blog, I will write about my current work, ideas, opinions and hobbies. Most posts will be IT-related and I will also try to write some educational posts for beginners as well as experienced developers (for example most common mistakes in C++ or where and how to find useful information on various topics).

Most topics probably won’t be too long, something like extended tweets because I find Twitter too restrictive for most of topics I want to write about. Here I can also more easily include pictures and photos, links and other stuff.

I will try to make as little mistakes as possible, but I am not a native speaker (my mother language is Czech, a really weird language). This blog should also help me to improve English so I am looking forward to writing it.

I hope you will find this blog interesting as well.

Categories: Uncategorized Tags: