If not already done, every software developer must try GIT – the fast, distributed version control system. It’s such a nice and useful tool. Once every week I find a new little nice feature.

The last month I used the git-client together with a svn-remote repository and I will never use the svn client again. It is so handy to have the full history of the repository on my notebook.  I can commit my changes every time to my local repository and merging/branching is just fun.  I’m so much faster …

Here my path to git

Here my favorite git client in action (the command line client ;) :

git command line

There are plugins for eclise, idea, windows, mac… So give it a try and have fun!

And if you want to have the little nice prompt add the following lines to your .bashrc:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
...
#-----------------------------------
# git in prompt
#-----------------------------------
        RED="\[\033[0;31m\]"
     YELLOW="\[\033[0;33m\]"
      GREEN="\[\033[0;32m\]"
       BLUE="\[\033[0;34m\]"
  LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
      WHITE="\[\033[1;37m\]"
 LIGHT_GRAY="\[\033[0;37m\]"
 COLOR_NONE="\[\e[0m\]"
 
function parse_git_branch {
        git rev-parse --git-dir &> /dev/null
        git_status="$(git status 2> /dev/null)"
        branch_pattern="^# On branch ([^${IFS}]*)"
        remote_pattern="# Your branch is (.*) of"
        diverge_pattern="# Your branch and (.*) have diverged"
 
        if [[ ! ${git_status} =~ "working directory clean" ]]; then
                state="${RED}?"
        else
                state="${GREEN}?"
        fi
 
        # add an else if or two here if you want to get more specific
        if [[ ${git_status} =~ ${remote_pattern} ]]; then
                if [[ ${BASH_REMATCH[1]} == "ahead" ]]; then
                        remote="${YELLOW}?"
                else
                        remote="${YELLOW}?"
                fi
        fi
 
        if [[ ${git_status} =~ ${diverge_pattern} ]]; then
                remote="${YELLOW}?"
        fi
 
        if [[ ${git_status} =~ ${branch_pattern} ]]; then
                branch=${BASH_REMATCH[1]}
                echo " (${branch})${remote}${state}"
        fi
}
function prompt_func() {
        previous_return_value=$?;
        prompt="${GREEN}${USER:-$(type whoami >/dev/null && whoami)}@$(type uname >/dev/null && uname -n) ${BLUE}[\w${GREEN}$(parse_git_branch)${BLUE}]${COLOR_NONE} "
        if test $previous_return_value -eq 0
        then
                # PS1="${prompt}? "
                PS1="${prompt} \\$ "
        else
                #PS1="${prompt}${RED}?${COLOR_NONE}"
                PS1="${prompt}${RED}\\$ ${COLOR_NONE}"
        fi
}
 
PROMPT_COMMAND=prompt_func

I found this script at github and changed it a little bit. Thx to trapni.

 

In meiner Jugend habe ich sehr intensiv Rodelsport betrieben. Vor zwei Wochen nun habe ich ein Bild geschenkt bekommen, auf dem ich beim Rodeln zu sehen bin. Leider habe ich nur dieses eine Bild. Wenn jemand noch mehr Bilder hat, dann meldet Euch doch bitte bei mir… würde mich sehr freuen!

Ich glaube es wurde 1987 bei der DDR Spartakiade in Oberwiesenthal aufgenommen.

1987 - Oberwiesenthal

 

 

 

Habe gestern Abend “The Clean Coder” von Robert C. Martin (Uncle Bob) fertig gelesen. Ich wäre so froh gewesen, wenn ich dieses Buch als Berufseinsteiger gelesen hätte. Es hätte mich so manche Fettnäpfchen vermeiden lassen.

Spannend zu lesen war seine Meinung über den “Flow”. Dieser Zustand beim Programmieren, oder Arbeiten allgemein, wo man die Zeit vergisst und einem schier alles gelingt. Uncle Bob findet diesen Zustand eher hinderlich, weil man den Blick für das Grosse verliert. Ich denke es hängt ein wenig vom Arbeitsstil ab. Ich habe immer zu Beginn mein Notizbuch vor mir liegen, wo ich den grossen Kontext aufzeichne. Manchmal komme ich dann schon in Flow während ich beim dem Design bin – also einem relativ hohen Abstraktionsniveau. Trotzdem hat mich das Buch etwas kritischer gegenüber dem Flow werden lassen.

Einen völlig anderen Blickwinkel auf den Flow hat z.B.  Joel Spolsky (bekannt von dem Blog “Joel on Software“).  Er erzählt in einem Interview, wie wichtig er den Flow findet und das er die Büros sogar so gestaltet, das man sich richtig gut in die Arbeit vertiefen kann.

Es gibt aber in dem Buch noch sehr viele andere Perlen und Denkanstösse zu finden. Lesen!

 

 

In early September I was walking. From the village of “Bauen” I wanted to run up the mountain “Oberbauenstock“. But I started too late. So I had to turn back on the Fulberg.

Bauen

Continue reading »

 

sunset

 

 

I’ve just updated NetBeans. The following dialog appeared:

License Agreement Dialog

How many people read those 85 263 lines of text carefully?

 

Ferien… Schwimmen. Joggen. Lesen. Schlafen. Essen. Freunde treffen. Compi ist auch dabei.

Sonnenuntergang über Dalmatien

Continue reading »

 

I’m using the amazon bookstore again. The bookstore has no real rivals and I like and need books. In the last few months I used:

  • books.ch
  • exlibris.ch
  • buch.de
  • buch.ch
  • buecher.de
  • buchhaus.ch

But I still don’t use the Amazon Web Services…

 

Okay, it is only a version bump. But the stringtemplate 3.2.1 ebuild is my first contribution to gentoo. The guys on IRC chanel #gentoo-java  were very nice and helpful. For antlr 3.3 I’ve built the script already. Unfortunately jython not work correctly with antlr 3.3.

 

I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting

 

I’m using KDE every day. I like Konqueror, Kate, KMail, … so I decided to  join the game.

 

To enable more informations about “java.io.NotSerializableException” just add the “-Dsun.io.serialization.extendedDebugInfo=true” VM argument to your run configuration.

Example: java -Dsun.io.serialization.extendedDebugInfo=true -jar your.jar

Without extendedDebugInfo:

Exception in thread "main" java.io.NotSerializableException: net.nautsch.addressbook.Country
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at net.nautsch.addressbook.App.main(App.java:33)

and with:

Exception in thread "main" java.io.NotSerializableException: net.nautsch.addressbook.Country
        - field (class "net.nautsch.addressbook.Address", name: "country", type: "class net.nautsch.addressbook.Country")
        - object (class "net.nautsch.addressbook.Address", net.nautsch.addressbook.Address@13caecd)
        - field (class "net.nautsch.addressbook.Person", name: "address", type: "class net.nautsch.addressbook.Address")
        - root object (class "net.nautsch.addressbook.Person", net.nautsch.addressbook.Person@158b649)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1161)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
        at net.nautsch.addressbook.App.main(App.java:33)

 

If  you change the bashcomp at gentoo, e.g.:

eselect bashcomp enable 47

don’t forget to make:
source /etc/profile.d/bash-completion.sh

 

I closed my Paypal account.

 

Wikileaks is too loud and too flashy. But censorship – no. I have canceled my Amazon account:

 

Addendum 2: France – Bretange – one week trip October 2010

Mont Saint-Michel:

Continue reading »

 

Since yesterday, I have a Twitter account.  I still have no idea how much I’m going to use it. We’ll see.

 

For a while it was quiet here on my blog.

Addendum 1: Hiking near Braunwald on 2010-09-03.

I started in Braunwald.

Continue reading »

 

:)

I hope I did not land on the black list.

Tagged with:
 

Two weeks ago we were in the Czech Republic.

Prague Castle

Continue reading »