Using Google Charts

April 4, 2009

This year I started my personal health program. I want to get fit and I want to reduce my weight. Since January I go running. After each run I take my weight and fat and blog these stats. Lately, my pal Maze presented me a excel-chart. My next thought was: Wait, I once read s.th. about a Google chart service? Yes. Here it is: chart.apis.google.com. I start playing around. Not that meaningful with all that ch: chs, cht, chtt, chds, chd,chco, .. Brians Blog helped me a lot. If you don’t want to scale everything into percent, take a look at chds. This flag allows you to specify your own scale.
Other people struggle with date issues. For me the following works well: I scale from 1 to 365. Next I use a Day Number Of Year Calculator and I’m done. A sample data set looks like chd=t:38,45|95,94.3|38,45|27.7,26.6. 38 is the 7th Februar.

Cool. Thanks Google.

Here are my stats. The left axis is the scale of weight, the right is the scale of fat.

Strug Stats


Quick Switch Scheme with IDEA

March 27, 2009

Today a peer has presented some code at the projector. The font size was to small for most of us.

screenshot1

Luckily at our company we have Intellij IDEA.

A great feature: Just press Ctrl and turn your mouse wheel towards you and… yes the font of the current file increases.

Then he switched to another file. Mmh, there was the small font again.

A rocking feature to address this issue: Ctrl + Backquote or View > Quick Switch Scheme.

Beforehand, define a second color scheme presentation (Settings > Editor > Colors & Fonts). Set a font size of e.g. 24 points.

If you held a presentation at a projector just do a Quick Switch Scheme. Press 1 (Switch Color Scheme). Next, select presentation and here we go:

screenshot2


Install Subversion For Local Usage

March 22, 2009

My IDE has a build-in history. Nevertheless I often use a “real” version control system for my sample projects. Today I setup a local subversion repository:

Install it: sudo apt-get install subversion

Create the repo: svnadmin create ~/svn

Tell your IDE where to find the repo: file:///home/struggy/svn

Connect your project and you are done.


More than one Desktop on Windows

February 26, 2009

At work I have to use a Windows system:( While I was looking for a defragmentation tools I stumbled over the Microsoft PowerToys. One of the tools is called Virtual Desktop Manager. A feature I missed a lot.

Hope it will work.


Installing Java 7 Snapshot on Ubuntu

February 22, 2009

On my Ubuntu I’m facing this JVM Bug which suddenly freezes the keyboard of IDEA. Now I’m trying Anils suggestion. Therefore I need to install a Java 7 snapshot:

  1. download self-extracting binary file of java 7 snapshot
  2. run chmod +x jdk-7-ea-bin-b48-linux-i586-19_feb_2009.bin to make it executable
  3. run ./jdk-7-ea-bin-b48-linux-i586-19_feb_2009.bin to extract the archive
  4. run sudo mv ./jdk1.7.0 /usr/lib/jvm to move it to the other JVMs
  5. run update-alternatives --config java to check how many JVMs you already installed
  6. run sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java 3
    I got 2 installations, so I need to specify a 3
  7. run sudo update-alternatives --config java to chance your java version.
  8. run java -version to validate everything is fine

To tell IDEA 8.1 to run with Java 7 you need to add -Didea.no.jdk.check=true in idea.vmoptions.

Keep your fingers crossed for me that this will fix that problem;)


TDD with IDEA – Test List

February 22, 2009

Hi there!

One aspect of TDD is go step by step and keep the focus. If you follow the Boy Scout Rule and have a common project it is easy to lost that focus. Like Kent Beck teaches us in Test Driven Development it is good to use a Test List. Normally a pen and a paper is enough. I like to have it integrated into my IDE. Fortunately Sergiy have had that same wish and wrote the Tasks-Plugin for IDEA. Great.


I can use [code lang="java"]..[/code]

February 19, 2009

My peer Oli showed me that code samples can look quiet nice within wordpress.com.

I thought that the button /code is all that wordpress got. The result looks boring:


public String doIt(String aParameter) {
String message = "My Message";
..
}

Oli told me that he uses wordpress.com as well. So quickly I found out that wordpress has included the codesnippet-plugin so I got linenumber, syntax-highlight, .. :

public String doIt(String aParameter) {
  String message = "My Message";
  ..
}

Cool. Thx Oli, Thx WordPress