Company Changes

March 3, 2012 Leave a comment

It’s been a long time since the last post, because lots of things was going on in last months and I didn’t have much spare time.

Moving from Sabre to Ganymede was one on my best decisions in my current job career. I’ve learnt a lot in area of iPad and game programming. I was working with great people that were always willing to help. I was helping with final touches on Saloon Poker,

Saloon Poker (iPad)

Read more…

Categories: other Tags: , , ,

iOS 5 Tech Talk – What it was about?

November 13, 2011 Leave a comment

I had opportunity to be at iOS 5 Tech Talk in Berlin (November 2nd). Ride to Berlin with my car took about 5 hours. After a night in hostel I took a subway to city center where Maritim ProArte Hotel is located (2011 iOS 5 Tech Talk location in Berlin).

Throughout the whole day (this conference took only one day) waiters served food and drinks. Nice, but lets focus on presentations. Here is the whole agenda with marked presentations that I choose (during most of the day there were 3 parallel presentations).

Read more…

Categories: events Tags: , , , ,

Nice formatted git log

September 30, 2011 Leave a comment

I’m working with git in termial only. Git command line client is fast, reliable and have all the features in comparison with any gui git client.

On the other hand, it’s nice to have some colors to quick distinguish between different type of information, i.e. when looking at git log. Following git log command nicely outputs history of commits with most important informations together with branch information:

git log --pretty=format:'%C(yellow)%h%Cred%d%Creset - %C(cyan)%an %Creset: %s %Cgreen(%cr)'

Following one prints commit history as colored graph:

git log --pretty=oneline --decorate --graph

You can either alias these commands in bash or any other shell you use or alias as git commands in .gitconfig file in [alias] section.

Categories: source control Tags: , ,

GIT Merge and Diff with p4merge on Mac

September 27, 2011 6 comments

Git is my favorite SCV system up to now and most probably will be in the future. Besides of many great features is has pretty good automatic merge tool, that is able to solve conflicts, but not all of them. I found p4merge tool much better in case of automatic merging and manual solving the most hard conflicts. Is is very simple to mix together those two things to have the best from both of them and now I will show you how to do that.

First of all, you have to install p4merge tool. Go to p4merge tool download page, choose “Browse by platform” tab, pick your platform (in my case it was Macintosh) and download P4V: Visual Client. After downloading, open dmg file and copy p4merge tool to Applications folder in your Dock.

Second step is to create two simple bash scripts: p4merge and p4diff,  that will be executed when git needs merge or diff tool. Create these scripts in directory that is in your’s system PATH (i.e. /usr/local/bin/).


/Applications/ $*


[ $# -eq 7 ] && /usr/local/bin/p4merge "$2" "$PWD/$5"

Don’t forget to add executable mode/flag to these scripts.

After p4merge and scripts are ready it’s time to configure global git settings. Edit ~/.gitconfig file and put following configuration there for merging:

    tool = p4merge
    keepBackup = false
[mergetool "p4merge"]
    cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
    keepTemporaries = false
    trustExitCode = false
    keepBackup = false
    external = p4diff

If you don’t want to use p4merge as diff tool, just comment (using # character) [diff] section. Sometimes it’s faster for me to use command line diff instead of visual one.

Now, when you type “git diff” or “git mergetool” in your’s project directory, p4merge tool will be started.

Categories: mac, source control Tags: , , , , ,

Code Smells After Reading “Clean Code”

July 27, 2011 Leave a comment

I created projects that I don’t want to look at any more, because of complexity and total mess. You probably heard about “Clean Code” by Robert C. Martin, if not I encourage you to buy this book and read it.

I thought that having technical knowledge is enough to create great applications. It’s not true. Source code is written by developers for developers. Having clean code is one of the most important things in software development. It’s very wide idea but I will write the most important (for me) code smells that I will try to use in my all projects. Read more…

My New Avatar at Gravatar

July 26, 2011 Leave a comment

At last I created my own avatar image! Maybe not from the scratch (I took my old picture) but still it’s real pleasure to present something done with my own hands. It took me a while, but I’m not a graphic designer though.

As you can see, it’s very simple one. All I used is Gimp. It is based on IT Crowd serial (introduction scenes). You can see it on my github account or any other page/application that uses

Categories: other Tags:

Print TODO/FIXME Comment as Warning in XCode

July 12, 2011 Leave a comment

When I’m implementing new functionality I start with the general design and then I’m implementing newly created classes and methods. Sometimes I leave a method or two for later implementation (i.e. after creating unit test for this method) and almost always putting comment:

// TODO: nice comment here

It already happened to me, that I left this comment unnecessary or (the worst case scenario) I forgot to implement this TODO part 😦 To get rid of these mistakes you can add Run Script phase in Build Phases of your project’s target with some nice shell command. To do this, click on your target, move to Build Phases tab and in right-bottom corner click Add Build Phase and choose Add Run Script. Leave shell as it is and in the content of the script paste following two lines:

find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.mm" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
At the end of second line you can add i.e.:
| grep -v ExternalSources
This will prevent from printing warnings for TODO/FIXME comments in file paths containing “ExternalSources”. It’s in case you use third party source code that still needs some work to be done 🙂
The latest revision of this script can be found at my github repository: todo xcode gist
Categories: mac, programming Tags: , ,