Archive for April, 2006

Roasting your own Coffee

Friday, April 28th, 2006 at 10:26 pm
* WPG2 Plugin Not Validated *
* WPG2 Plugin Not Validated *

Have you every thought about roasting your own Coffee ? Why not ? You can blend and roast your coffee according to your own taste from single high quality estate beans (use blended green beans for the beginning) yourself. You lean about the roasting process, about the different beans, how to make the best roast for a special blend and how to optimize the taste according to your taste (rather than the taste of an external roaster!). I thought it might be a good idea, especially as I was so tired of the available roasted coffee beans, especially here in Cambridge it seems to be even a bit harder to find fresh roasted good beans.

My first roast was great, although it’s hard to hear the 1st and 2nd crack, probably I am simply not used to it. But the good thing about my coffee roaster (Gene Cafe CBR101) is that you can observe the whole process throughout the glas cylinder. BTW: I do like the roaster. Rock solid and perfect simple but functional design. It is worth the money and it will amortise anyway, as green beans are about half the price of roasted ones.

Now, I simply can’t wait to taste the beans!

Some links you might be interested:
The best home roasting resource around: http://www.sweetmarias.com
The best green beans shop in Europe: http://www.hasbean.co.uk

Amendment statement after 5 roasts (30.5.2006):
The best decision I’ve done on my way to espresso nirvana *hehe*. The pressure thing of Silvia was absolutely inevitable, the PID is helpful and the home roaster just supplies you with good fresh roasted coffee. The difference I experienced in taste between fresh roasted beans and some you buy e.g. from an Internet roaster is immense! In terms of taste I think it is much more worth than e.g. an upgrade to a dual boiler machine or other things you might consider. Try and get a roaster, or ask a friend of yours to roast the coffee and taste the difference!

Posted in Espresso
by Markus

Mac OS X: finder and terminal annoyances – solved

Wednesday, April 26th, 2006 at 9:02 pm

If you are looking for global shortcuts in OS X – good luck :) There aren’t any.

How do you open a new/second/third Finder or Terminal Window without mouse and without an active or focused Finder/Terminal Window ? Not that easy :)

Solution: You have to write a small AppleScript and install a small smart tool enabling you to use global shortcuts. Amazing …

(you have to have “Enable access for assistive devices” activated in the Universal Access Preferences)

Open a new Terminal window:

[code lang="AppleScript"]
tell application "Terminal" to activate
tell application "System Events"
	click menu item "New Shell" 
                       of menu "File" 
                       of menu bar item "File" 
                       of menu bar 1 of process "Terminal"
end tell
[/code]

Open a new Finder window

[code lang="AppleScript"]
tell application "Finder" to activate
tell application "System Events"
	click menu item "New Finder Window" 
                       of menu "File" 
                       of menu bar item "File" 
                       of menu bar 1 of process "Finder"
end tell
[/code]

Now you “only” need a global shortcut to activate these scripts. There is a nice tool called pearScriptKeys which can directly map shortcuts to scripts. Enjoy!

by Markus

Mac OS X: annoyances

Wednesday, April 26th, 2006 at 8:36 pm

I use OS X since a couple of month, besides my beloved Debian Linux on my IBM machine. Overall I have to say, it’s a “worry free” system with a proper Unix underneath – so you have all the power of Unix, a Terminal, 10000 of programs, etc …

Everything works out of the box, whether you plug in a projector for a presentation or you want to have a nice dual screen setup out of the box or simply setting up a wireless network with proxies, PPPoE, VPN, … all this works fine. Overall a great reliable Unix system :)

Small issues disturb me:

1. There are too many “option” keys – simply confusing: Shift, Fn, Ctrl, Alt, Option, Apple, Cmd) but _NO_ DEL key on my Powerbook.

2. Window behaviour is dependent on the application, therefore the resizing and closing icon behave different between various applications. I get confused :)

3. NO default window manager! What is that ? OK – there are alternatives :) Currently I evaluate CodeTec Virtual Desktop, but the OpenSource Virtue Desktop is maturing lately as well (moving windows between desktop is still missing).

4. Apple is hiding information concerning the updates. This is a very bad idea.

5. I found no real use of the Dashboard.

6. Finder column view is great, but Finder lacks some important features (e.g. a simply image gallery preview).

7. Finder and Terminal: Opening a new Finder or Terminal window without mouse control or without an existing and focused Finder/Terminal window is impossible, but there is a workaround I post shortly!

Sounds all very negative, but I have to say that these issues are the only ones – so not too bad actually :)

by Markus

MiniPauker update 0.1.3

Wednesday, April 26th, 2006 at 12:03 am
  • Feature: User Preferences for timing the learning sessions work now.
  • Feature: Using a shrinker/obfuscater, the file size is 4-5 times smaller now (now ~70kB !!!)
  • Bugfix: loading multiple sessions from one MiniPauker instance resulted in an accumulate of cards – fixed.
  • Bugfix: thread issue of import process gauge (hopefully) fixed. (It seems to work on some phones, on others not – but it could be due to a firmware problem concerning the JSR-75 support – I’ll check that!)
  • Outlook: hopefully I have time next weekend to add the export functionality for Pauker, then it would be more or less feature complete, but massive internal work has to be done :)

Download the latest version here.

Posted in (Mini)Pauker
by Markus

Java Generics limitations

Thursday, April 20th, 2006 at 6:06 pm

OK – I have just started using Generics more often and run into small issues as everyone does I guess. Generics are not the same as C++ templates, that’s one of the first things you one has to learn. Generics are a compile time thing, so runtime critical stuff makes one mad … and is sometimes anoying.

Generics are processed at compile time:

[code lang="java"]
public class Generics1 {

private final String name;

public Generics1() {
name = T.class.getName();
}
}
[/code]

So, what happens here ? Any clue? Sure, it doesn’t work and the compiler complains: “cannot select from a type variable: name = T.class.getName();”. The compiler doesn’t know anything about “T” – OK (Information about generic types is ignored at runtime).

As we’ve seen, the compiler won’t be able to tell what “T” is all about, unless the programmer is forced to tell the compiler about it (a workaround):
[code lang="java"]
public class Generics2 {

private final String name;

public Generics2(Class clazz) {
name = clazz.getName();
}
}
[/code]

2nd Problem:
The next thing I ran into was the problem that generic types and static stuff doesn’t really fit together, well, sort of obvious. I was looking for a way to write a generic Cache class which simply holds some data of a specific type T in one instance of a Map (This shouldn’t be a discussion about Singletons and whether they are a good or bad thing).

So, ever tried something like this:
[code lang="java"]
public class Cache {

private static Map> instances = new HashMap>();

private Cache() { }

public static Cache getInstance() { ...
[/code]
It’s not the getInstance method – the static member is something the compiler dislikes: “non-static class T cannot be referenced from a static context”.

So I was a bit pale here, but found a solution, which seems a bit hacky and dirty to me, but I guess there is no better or cleaner way. Please let me know if you are aware of one :) Here we go:
[code lang="java"]
public class Cache {

private static Map, Object> cacheInstances =
new HashMap, Object>();

private Map cachePerInstance = new HashMap();

private Cache() { }

public static synchronized Cache getInstance(Class clazz) {
Cache instance = (Cache)cacheInstances.get(clazz);

if (instance != null) {
return instance;
}

instance = new Cache();
cacheInstances.put(clazz, instance);
return instance;
}

public void put(final String key, final T value) {
cachePerInstance.put(key, value);
}

public T getValue(String key) {
return cachePerInstance.get(key);
}
[/code]

Posted in Languages mix
by Markus

London: Bramahs Tea/Coffee museum & the Earth Galleries

Saturday, April 15th, 2006 at 11:43 am
* WPG2 Plugin Not Validated *

A long easter weekend, 4 days off, so we said we take at least one day off to escape the computers, science and books ;) So we decided to travel to London to visit the Bramah Tea & Coffee shop/museum and to see the Earth Galleries (Natural History Museum).

Sadly it was not allowed to take pictures at Bramahs museum (How about Open Content to make the museum even more popular?). Anyway, I have learnt a lot new stuff about tea, real tea (not rubbish teabags!) and a little bit about coffee. We also enjoyed an afternoon tea and some sandwiches …

Afterwards we visited the Natural History Museum – highly recommended! Topics are nicely “wrapped” so that it is accessible to the public. Quite nice, I guess they try hard to attract many people. We managed to see the Earth Galleries only, but we haven’t seen the wildlife photo gallery *sniff*, another reason to come back!

Enjoy browsing the gallery!

Posted in Everyday life
by Markus

MiniPauker update

Thursday, April 13th, 2006 at 11:43 pm

This week two bugfix releases (0.1.1 and 0.1.2) are checked in. Hopefully I will have an hour or so the next couple of days for more intense testing. The binary downloads now also include a Palm .prc file, so MiniPauker can be used on almost any mobile platform now (IF JSR-75 for file i/o is supported, which is given for the Palm Tungsten C for example).

Main features still missing: Pauker export (import works!), user preferences, internal session backup, cosmetic with J2ME Polish.
Download now!

Please DO report back your experiences & errors :) Bye for now!

Posted in (Mini)Pauker
by Markus

Thanks Mutlu :)

Thursday, April 13th, 2006 at 5:12 pm

Hehe – Mutlu send me this image today about our informatics research group :) I like it!

* WPG2 Plugin Not Validated *
by Markus