Deprecated: Assigning the return value of new by reference is deprecated in /home/httpd/vhosts/zgraggen.name/subdomains/blog/httpdocs/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/httpd/vhosts/zgraggen.name/subdomains/blog/httpdocs/wp-includes/query.php on line 15

Deprecated: Assigning the return value of new by reference is deprecated in /home/httpd/vhosts/zgraggen.name/subdomains/blog/httpdocs/wp-includes/theme.php on line 505
blog.zgraggen.name » 2008 » July

Archive for July, 2008

Noch mehr SPAM

Saturday, July 26th, 2008

Für einmal auf Deutsch… aber gewöhnt euch nicht daran! ;-)

Nachdem ich nachfolgenden Text an alle meine Mailkontakte und auch div. Facebook-Freunde verschickt habe poste ich das schreiben hier trotzdem nochmals. Eventuell ist mir ja doch noch jemand entgangen ;-)

Betref: Neuer Lebensabschnitt
Nun ist es schon bald soweit, am nächsten Donnerstag (31. Juli) nehme ich den Flieger in die USA, um dort mein Master Studium an der Carnegie Mellon University in Pittsburgh zu beginnen. Was bis jetzt noch in ferner Zukunft lag und zuvor nur ein (Wunsch)Traum war, wird nun Realität. Die Vorfreude ist nun wieder etwas gedämpft wegen den vielen Sachen die noch zu organisieren sind und ich mir zudem auch bewusst werde, das ich die Schweiz (mit all meinen Kollegen, der schönen Natur und der Vertrautheit) zurücklasse, um einen neuen Lebensabschnitt zu beginnen. Falls Ihr interessiert seid, wie es mir in den nächsten 1.5 Jahren so geht, schaut doch mal auf meinem Blog (http://blog.zgraggen.name) rein. Neben all den technischen Berichten und den Bücher-Reviews gibt es sicher ab und zu mal einen persönlichen Bericht. Wer mehr an Fakten in Form von Fotos interessiert ist, hat die Möglichkeit den Wissensdurst auf meinem Webalbum (http://picasaweb.google.com/zgraggen) zu stillen.
Falls ihr zukünftig mit mir Kontakt aufnehmen wollt, geht das am besten per Mail. guido@zgraggen.name

Ich wünsche euch alles Gute!
Tschüss, ciao en schöne…Guido =)

Picasa Webalbum

Tuesday, July 22nd, 2008

Some of you might have noticed that I published the last pictures on the web gallery of Picasa:
http://picasaweb.google.com/zgraggen/

This will also be the place where you will find my future pictures from America. Of course I will announce a new album with some additional information on this blog.

Please do not hesitate to leave a comment on any picture you want! :D

Farewell party

Monday, July 21st, 2008

Yesterday, I had a little farewell party at the pampelonne. It was a comfortable, lovely and funny afternoon.
Thanks to all the attendees for showing up and the good time we had :-D

Some impressions can be found here.

Visiting the US Embassy in Bern

Friday, July 18th, 2008

Today I went to the US embassy in Bern to apply for visa.
My appointment was scheduled for 09:00 and I arrived as in good Swiss manner a little early at 0830. :-)
After waiting for 1.5 outside of the embassy I finally was allowed to enter the (security-check) building. First they did a detailed security check. Whereas I had to walk three times through the metal detector (without a beep) and then the woman scanned me additionally with the hand detector. After this check I took my documents and a book to read (thanks to David for the tip) and left the first building to walk to the second building. Even this pathway is behind fences they did another security check when I entered the main building.
Then I went to the allotted desk (#7) and deposed my documents and took place in the waiting area. After only one minute they called me to desk #6. There I had to make finger prints off all my fingers (electronically… nothing with ink and dirty fingers :-D). It took about 1 minute. Then I had to wait for a few more minutes till a voice announced that I should go to the desk #8.
There a very friendly man asked me (after finger print check) how long I would stay in America. I answered for about one and a half year. Then he told me a few things about Pittsburgh with all the Universities and that it is a great city. He told me that my visa will arrive at the beginning of the next week and wished me good luck and fun for my study.

After waiting for 1.5h hour which I assume is normal I had a brief, friendly, and pleasant visit at the US Embassy to get my visa. So now I really looking forward to meet more Americans. ;-)

What I did not mention till now was that I certainly was well prepared and had filled out every document clean and truthful including all the confirmation they needed.

I Sold My Baby

Friday, July 11th, 2008
Today was a sad day.

I sold my Bike… my little precious!

SD

Last Workday at the IFS

Thursday, July 10th, 2008

Today is my last day at the Institute for Software (IFS). I am a little sad and at the same time also happy…

I am sad because I have made many good friends at work. I also will miss the outstanding location near the lake wherein I often went swimming around lunch time. I look back with satisfaction on two and a half years I spent at this Institute of the Hochschule für Technik Rapperswil HSR.

I am happy because finally I have the spare time to prepare everything to leave Switzerland for my Master Program in the USA. To which I am really looking forward… :-)

So thanks to everyone at the HSR for their help, friendship, and the good time we had. :-D

How to Learn Any Language

Thursday, July 10th, 2008

I read about this book on Robin’s blog. Inspired by his post I ordered the book.

The book mainly consists of four parts. It starts with a little autobiography of the author and how he learned to communicate in 25 languages. In the next part he explains the learning system he developed and adapted over time. The third part is a introduction to the grammar where he explains all the important stuff. Finally, he gives an overview of the most spoken languages around the world and compares them in difficulty and popularity. How to Learn Any Language

In his book he mentions how bad and old fashioned the American school teaches languages. Then he starts explaining his new ideas of teaching languages. For me as a Swiss pupil not everything was new. I learned already a few of this techniques in school. Maybe not so sophisticated as he explains it in the book, but at least they try to improve the way to teach in Switzerland. Nevertheless I also read many new and smart ideas how to learn a new language with more motivation and effectiveness.

I am sure that I will read this book (or at least the part of the learning system) again before picking up a new language.

Magic Pen

Monday, July 7th, 2008

Yeah! Another cool flash game! :-D

When I first started this game I thought this is a game for children, but beware it look just like it! After a few levels the game is getting difficult. Your task is to move an object (circle or quad) to the red flags. MagicPen

To solve this task you have to draw objects with the magic pen which move the object forward. First you will feel like in a painting class but soon your engineering skills are in demand.

Thanks to Pascal for sending me this link! ;-)

Trac over XML-RPC with JAVA

Tuesday, July 1st, 2008

For our work on the C++ Refactoring in Eclipse CDT we created some helper classes. We thought it would be nice to document this helper classes in a way that it is browsable and searchable. The best would be to generate a wiki entry in our trac using the javadoc. Because then the documentation is directly in the source and not in a separate file and the advantage with the wiki should be obvious.
To extract the needed information out of the Java source code I wrote my own Doclet. This was not a big problem in contrary to editing the trac wiki.
Here are a few things you should pay attention to if you want use the Trac XML-RPC with Java:

Before starting you need to install the Trac XML-RPC Plugin. We had already done this to use Mylyn. After installing the plugin you should check if it works and make sure that you use the accurate url. You can do this by navigating to http://your.domain/xmlrpc or with authentication to http://your.domain/login/xmlrpc. You should see the “XML-RPC exported functions” site. Now you are ready to start!

I started with fetching all the needed libraries.
There are different vendors which provide libraries for XML-RPC. I use the own from apache.
To use the Trac XML-RPC Plugin the easiest way is to use the provided java library.

The next thing you should do is to create a user explicitly for this purpose and give him the needed privileges. Additionally you have to set the XML_RPC privilege. For a detailed view which privileges are needed look on your XML-RPC exported functions site.

After that let us have a look at the code. (Hint: I removed the exception handling)

XML-RPC Java code

This Code consists mainly of two parts. The first part where the connection is established over XML-RPC and the second part where the interaction with the Trac happens. I think that the first part is self explanatory. Therefore let us move on to the second part.


TrackerDynamicProxy tdp = new TrackerDynamicProxy(client);
Wiki wiki = (Wiki)tdp.newInstance(Wiki.class);

To add or change something in the wiki you need the correspondent object. This can be fetched over the TrackerDynamicProxy.


Hashtable h = new Hashtable();
wiki.putPage("MyWikiSite", "Hello World!", h);

From there it is quite easy. Just use the wiki object for all the modifications.
The Hashtable h can be used to set PageInformations which can be fetched again with wiki.getPageInfo(). But because we only need to write the page we won’t store any additional information with it.

Problems?
Following I will give you two hints which might help you.

  1. An exception will occur if you try to write the same page content into the wiki which already exists. This exception will look somewhat like:
    Caused by: org.apache.xmlrpc.XmlRpcException: 'Page not modified' while executing 'wiki.putPage()'
  2. Another really strange problem I experienced was with the authenticated access. My first approach was to put the user and password into the url (username:password@url) as common on the internet .
    conf.setServerURL(new URL("http://username:password@your.domain/login/xmlrpc"));
    But that did not work and I do not have a clue why?

    The only way it work was as shown above. By setting the user and password separately from the url.
    conf.setBasicUserName("username");
    conf.setBasicPassword("password");
    conf.setServerURL(new URL("http://your.domain/login/xmlrpc"));