20 Jul

First week at Google

This week was the first week of my Software Engineering internship at Google Kirkland. I arrived in Kirkland on Friday last week, taking a plane from Vienna to Frankfurt, and then another one from Frankfurt to Seattle. Saturday and Sunday were dedicated to dealing with the jetlag and to exploring Kirkland and Seattle, while arranging some basic things like a U.S. SIM card for my phone and a bank account. After settling down, on Monday, I officially started at Google as an Intern. I also got a fancy Noogler cap, see below!

Other than being at the office every day, I was also able to find a decent used bike via craigslist. I am really happy to have a bike here for commuting and exploring the area, it makes transportation a lot easier. Plus, buying the bike in Bellevue and riding it all the way up to Kirkland gave me a lot of new impressions from the area.

Looking at this first week in hindsight, I am really stunned by all the things that I have learned in this one week, and I just cannot wait to discover even more. Google really is an awesome place to be!

jakobk-noogler

18 Jun

Received BSc degree in Software and Information Engineering

I am very happy to announce that I received my Bachelor of Science (BSc) degree in Software and Information Engineering from the Faculty of Informatics of the Vienna University of Technology today. I passed my bachelor exam with distinction, having an average GPA of 1.2 over all exams taken in the bachelor program.

I am now able to officially enroll in the Master’s program at Vienna University of Technology. I have taken many courses of the Master’s program already anyway (while I was enrolled in the Bachelor’s program), however, now I can finally make it official.

16 Jun

ThoughtWorks on JSF

On their technology radar, ThoughtWorks describes JSF as a framework with which many people have problems. Moreover, they actually recommend to avoid this technology.

Although I cannot completely agree with ThoughtWorks, their summary is true to some extend. The JSF EG really must address this, or else JSF will cease to exist.

07 Jun

JDK 6 vs JDK 7 benchmark on Mac OS X 10.9

I recently switched my Maven JDK on my Mac from version 6 to 7 for a project at university. Later, when I built a fairly big Java 6 project with Maven for work, I noticed that it took considerably longer than in the last days. That is why I performed a little benchmark on this big project, and the results are striking.

Maven Build using JDK 6
Java version: 1.6.0_65, vendor: Apple Inc.
Total time: 1:25.398s
Final Memory: 66M/123M

Maven Build using JDK 7
Java version: 1.7.0_45, vendor: Oracle Corporation
Total time: 2:59.364s
Final Memory: 198M/673M

The build took more than double the time when using JDK 7, compared to using JDK 6. In addition, it consumed much more memory. Needless to say, I switched back to JDK 6 for building Java 6 projects on my Mac.

06 Jun

Bachelor thesis finalized at last: introducing Clean REST URLs

I am really very, very happy to announce that my bachelor thesis about the relative-resource-handler is now finally completed. In the end, I must admit that it took me quite a while to get the thesis to an official end, however, I am now even more excited about it.

Here is the final version of my thesis: Evaluation of State-of-the-Art resource handling in JavaServer Faces based web applications and development of an enhanced resource handler for JSF 2.

The thesis describes general problems in resource management of JSF based web applications, it presents common solutions and frameworks for resource handling (like Weblets), and finally, it introduces the relative-resource-handler. In addition, the thesis introduces the term “Clean REST URLs“, describing URLs, which are purely structural, which do not contain a query string, which instead contain only the path of the resource, and which are used to identify a resource the REST way. Clean REST URLs are used by the relative-resource-handler to deal with many problems that arise in the context of resource handling. More details about it can be found in the thesis PDF.

Some personal notes: I first started to work on my thesis in November, 2011, as announced in this blog post. After an initial burst of enthusiasm, I soon reduced my efforts, because of various other commitments (mostly my job at IRIAN, and other courses at university). Eventually, I continued work on the thesis in the fall of 2013, and now, after many hours of work, and many discussions with my scientific advisors (mostly Marcus Büttner), the thesis finally got accepted and graded (receiving the best possible grade, yay!). I can now officially end my bachelor studies at Vienna University of Technology, and enroll in the master programme. By the end of June, 2012, I was actually finished with my bachelor studies, however, I needed to complete my bachelor thesis to formally switch to the master programme. I therefore took the courses needed for my master programme in the context of yet another bachelor programme, which, fortunately, is possible at the Vienna University of Technology. This way I was able to complete most of my master courses, without being formally enrolled in the masters programme. Actually, as of today I am already very close to finishing my master studies, I have almost finished all required courses. I still need to write my master thesis though, which will most likely take another year.

04 Apr

Sequence Streams for Java 8

Since Java 8 was introduced last week, I started playing around with the new features it provides, e.g. lambda expressions, streams, …

After taking a closer look at the streaming API, I noticed that there was no out-of-the-box support for generating number sequences. Thus, I created this little project on GitHub: https://github.com/jakobk/sequence-streams.

Using the class Sequence, you can improve classic for-loops by making use of the new streaming API of Java 8. Consider the following example:

List<Person> persons = new ArrayList<Person>(100);
for (int i = 0; i < 100; i++) {
    persons.add(new Person(i));
}
// use persons ...

The same can be accomplished using Sequence in combination with the new streaming API:

List<Person> persons = Sequence.stream(0, 100)
    .mapToObj(Person::new).collect(Collectors.toList());
// use persons ...

The class Sequence provides various methods for generating all kinds of integer sequence streams, e.g. sequential or parallel streams, using different step sizes, counting up or counting down, etc.

After some further research, I found out that Tomasz Nurkiewicz created something similar to my Sequence class, however, much more powerful. His project LazySeq is also hosted on GitHub: https://github.com/nurkiewicz/LazySeq. Using LazySeq you can easily create various number sequences, including infinite ones. This is very similar to what already exists in clojure: lazy-seq.

10 Mrz

Google Software Engineering Internship in Kirkland, Seattle, WA

I am thrilled to announce that I will be joining Google this summer for a Software Engineering internship in Google’s Kirkland office in Seattle, WA. At Google, I will be part of the DevTools team, working on various development tools for all kinds of Google products.

My internship will start in July, and will end in October 2014. I am unbelievably happy and excited about my internship, and I am really looking forward to facing new challenges this summer at Google.

10 Mrz

Generate DDL script of JPA persistence unit in Maven using hbm2ddl

Recently, I was facing the task of generating the DDL script of a JPA domain model in a Maven build. Of course, there is Hibernate’s hbm2ddl to actually perform the DDL generation, however, I did not know any Maven plugin capable of invoking hbm2ddl. After some research, I found out that this is achievable via an Ant task (i.e. use the Ant plugin for Maven), or via the hibernate3-maven-plugin. I decided to go with the hibernate3-maven-plugin, although all it does is to create a respective Ant task and invoke Ant on this task. Here is my Maven configuration for generating the DDL of my persistence unit during the Maven build:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>hibernate3-maven-plugin</artifactId>
    <version>3.0</version>
    <executions>
        <execution>
            <id>generate-ddl</id>
            <goals>
                <goal>hbm2ddl</goal>
            </goals>
            <phase>process-classes</phase>
        </execution>
    </executions>
    <configuration>
        <hibernatetool>
            <jpaconfiguration persistenceunit="my-persistence-unit"/>
            <classpath>
                <path location="${project.build.directory}/classes" />
            </classpath>
            <hbm2ddl
                    export="false"
                    update="false"
                    drop="false"
                    create="true"
                    outputfilename="my-persistence-unit.ddl"
                    delimiter=";"
                    format="true"
                    haltonerror="true" />
        </hibernatetool>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate.version}</version>
        </dependency>
    </dependencies>
</plugin>

This configuration invokes hbm2ddl with the correct classpath and parameters during Maven’s process-classes phase, and creates the file target/sql/hibernate3/my-persistence-unit.ddl containing all DDL scripts of the configured JPA persistence unit.

24 Mai

TinyOS syntax highlighting in BBedit

If you are working with TextWrangler (or BBedit) on TinyOS files (*.nc), you can use the following file to get correct syntax highlighting: TinyOS.plist

To install it for TextWrangler, copy the .plist file to the following directory:

Username/Library/Application Support/TextWrangler/Language Modules

Then restart TextWrangler and you should have a language module called “TinyOS”, which will be automatically applied to *.nc files.