Kinesis Freestyle keyboard + Magic trackpad

I wore down two Microsoft Natural keyboards already, and I still believe it is simply the best keyboard on the market thanks to big control/middle keys and curved key placement. I was early adopter of Logitech MX Revolution Mouse, and I still did not hold in hands any mice that would be at least comparable to the Revolution model. However, in never ending search for excellence I got to retire both devices recently.

The Natural Keyboard was so comfortable, that constantly moving right hand about 45 degrees clockwise to reach the mouse turned to annoying exercise over time. Thanks to excellent design of the mouse I did not come even close to any injures, but at the end of a day the discomfort was obvious. So, one day I asked myself – why can’t I have a keyboard with multitouch trackpad, to work the way I do while traveling with MacBook Pro?

No need to be a genius to come up with an idea of pairing Kinesis Freestyle keyboard with Apple Magic Trackpad. Couple of online orders, and voila: split keyboard with trackpad are sitting on my desk:

Kinesis Freestyle with Magic Trackpad

Please note the alignment of trackpad – unlike laptops or keyboard/trackpad combos it is rotated 45 degrees counter clockwise to be aligned with my right hand.

Also, after typing a couple paragraphs I felt pain in my wrists – keeping palms in horisontal position and without support was too unusual to me. So, I had to order VIP kit for the keyboard. The kit consists of palm rest pads and keyboard risers.

Kinesis Freestyle with Magic Trackpad

Some observations after 3 weeks of using the split keys with trackpad.

  • The Microsoft Natural keyboard is still the best. I miss big Control/Option/Command keys, I miss curved key rows (especially when typing square brackets and -/+/=) and I miss … Esc key, as it is unexpectedly placed far far away on Kinesis keyboard.
  • I enjoy additional free space on my desk, because Kinesis keyboard has smaller footprint.
  • I quit using mouse. It is still here, and I happened to grab it infrequently during first days, but now I consider retiring it completely.
  • Apple made good decision to support only a few trackpad gestures. You may find both free and commercial software (such as BetterTouchTool) that recognizes a whole lot of additional gestures, but unfortunately you must be very careful when touching the pad to make sure the system will not treat your “three finger tap” as “single finger tap right side middle”. Your mileage may vary, but in my experience even being a piano player does not help much, so I had to uninstall the enhancements.
Posted in Uncategorized | Tagged , | 11 Comments

JPA 2.0 with Hibernate in NetBeans 6.9

NetBeans 6.9 does not allow to configure Hibernate as JPA 2.0 persistence provider out of the box. Only Hibernate(JPA 1.0) is in the list of providers when setting up a persistence unit. You must create a custom persistence library (Hibernate 3.5+) for JPA 2.0, see Bug 183327 for further info. Unfortunately bundled repositories do not always have recent version of Hibernate available – at the moment of writing the Central Repository has only 3.5.3, while the latest is 3.5.4, thus more tweaking needed. Here is the walkthrough:

1) Add jBoss Releases repository to the NetBeans Maven repository list. Use Window/Other/Maven Repository Browser to open repositories window. When adding new repository use the following URLs:

Repository URL: https://repository.jboss.org/nexus/content/repositories/releases/

Index URL: https://repository.jboss.org/nexus/content/repositories/releases/.index/

2) Add hibernate-entitymanager dependency to your project libraries (right-click on Libraries in Project window to activate context menu). Use

GroupId: org.hibernate
ArtifactId: hibernate-entitymanager
Version: you decide, I use latest, which is 3.5.4 now

The first two steps allows to setup dependencies and to download latest versions of Hibernate libraries. Now you may proceed with custom persistence library setup.

3) Either open existing persistence.xml (if you want to change provider) or create new one (right-click on your project, New/Persistence Unit) and select New Persistence Library from Persistence Provider drop down list. You must add the following libraries:

hibernate-entitymanager/3.5.4-Final/hibernate-entitymanager-3.5.4-Final.jar
hibernate-annotations/3.5.4-Final/hibernate-annotations-3.5.4-Final.jar
hibernate-commons-annotations/3.2.0.Final/hibernate-commons-annotations-3.2.0.Final.jar
hibernate-core/3.5.4-Final/hibernate-core-3.5.4-Final.jar
hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar

All paths are relative to local repository (usually ~/.m2) and I assume that Hibernate version is 3.5.4. Submit the New Persistence Library form and now you may select Hibernate(JPA 2.0) from the provider list.

4) (optional) Now you have all dependencies in pom.xml and the libraries are available through your local Maven repository. However the pom.xml will not work on another computer, because it does not provide any info on jBoss repository. You may add the following code to your pom.xml to fix this issue:


<repositories>
...
 <repository>
    <id>jboss-public-repository-group</id>
    <name>JBoss Public Repository Group</name>
    <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    <layout>default</layout>
    <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
    </releases>
    <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
    </snapshots>
 </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>http://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
</pluginRepositories>

Posted in Java | Tagged , , | 3 Comments

Hello world!

int main()
{
   printf("hello, world");
}
Brian Kernighan, Programming in C: A Tutorial,
1974, Bell Laboratories, Murray Hill, N. J.

Actually, my first “Hello, World” program was in PL/1 and the code was punched into a small deck of IBM 5081 cards. It happened back in 1982. Since then I was repeating this phrase many times in Assembler, FORTRAN, Basic, Pascal, C, C++, C#, Perl, Javascript, PHP and Java. First time I was paid for programming in 1985. But it was year 1988 when I finally saw my software installed on a somebody else’s computer.

Watching a complete stranger using my program was thrilling experience. It is like meeting somebody carrying a book you wrote or finding a poster made from your photo mounted on the wall in a hotel lobby. This spectacular feeling was probably the most important reason I still did not quit programming (and I tried, believe me). This feeling was also the most important reason for starting this blog. As time passes by, saying “Hello, World” using all possible means – software code, plain English, photo camera, whatever, is getting an irresistible habit. Because it’s a wonderful world.

So, I got WordPress installed on a Linux box, spent about an hour browsing available themes – just to find out that the default one is the most compelling to me, replaced the stock photo with the one I made near Córdoba, Spain in 2007, and here you are, welcome to Web Coder Diary!

Posted in Uncategorized | Leave a comment