Online Mind Mapping

Posted by F 05/09/2007 at 22h06

A couple of smart friends of mine are strong advocates of mind maps, so much in fact that they had nothing better to do than develop http://wisemapping.com. It’s a pretty impressive online mind-mapping tool with everything you’d expect these days from a web two-oh application: rich UI, collaboration, tagging, sharing.

Here’s my first try, presenting the basic ideas behind DITA:

It’s still a private beta, with many more features coming.

Moving back to Argentina 2

Posted by F 13/05/2007 at 23h13

In March, I accepted a new position within BEA, to work for BEA Argentina.

After more than six years in the U.S., my wife and I were thinking about moving back to Argentina. We were talking about doing so in 2008. Then, this opportunity within BEA came across. It was sooner than what we planned, but it was interesting for me professionally, and BEA was helping with all the relocation needs. So I accepted.

It all happened (is happening I’d say) pretty quickly. Me and my family arrived at Argentina a couple of weeks ago, and I started on this new role immediately.

April was a good exercise on getting things done, both in and out of work. Here’s just a summary:

Violating Java's privacy 3

Posted by F 19/02/2007 at 22h49

I found myself in the need to invoke a private method of a Java class that was out of my control. I really needed it.

So, I went ahead and violated the method’s privacy declaration via reflection. You can (under certain circumstances) invoke methods which are declared as private using the Reflection APIs (java.lang.reflect).

But before using reflection, I created two classes:

class A {
  public String method1() {
    return "Hello World!";
  }
}

class B {
  public static void main(String[] args) {
    A a = new A();
    System.out.println(a.method1());
  }
}

They compiled, and java B said “Hello World!” as expected.

Then, I made A’s method private and recompiled A. And I run java B again. Nothing changed. It just worked again.

That cannot be right. This would mean you can handcraft a class with the same name and methods as the original one but making everything public. Then you could use this class only at compilation time, allowing your code to call any method. (Or, one could modify the Java compiler to ignore access declarations altogether).

I'm sold to Beryl

Posted by F 31/01/2007 at 19h27

I’ve been trying Beryl (a 3D Window Manager for X) and I’m pretty impressed.

True, it’s full of useless graphical effects and pure eye-candy. But it also provides practical features and is very configurable.

Among the actually useful things: fast and practical ways to change windows, desktops, to expose the desktop area, scale and pick a window (ala Mac OS X’s “exposé”), visual notifications, desktop zoom, screen annotations.

Unfortunately, most demo videos concentrate on the graphical effects instead of the useful features, but they still give you an idea of what it can do.

I really like the idea of using a “water-ripple” effect as an unobtrusive -but impossible to miss- way of receiving notifications.

It integrates nicely with KDE, Gnome and pretty much any desktop environment. And you can easily switch back to your previous window manager at any time on-the-fly.

I have it running on my work laptop, with Fedora 6, KDE and AIGLX.

Very nice.

History and auto-completion with rlwrap 4

Posted by F 18/01/2007 at 23h06

If you ever used Oracle’s sqlplus you’d agree that it provides an arcane command-line interface.

Being a textmode command-line tool is not what makes it arcane though. It’s that it doesn’t offer auto-completion or a command history. If you made a small mistake when typing a long statement, you would have to re-enter it all over again.

Most modern command-line tools (including MySQL and PostgreSQL’s equivalent to Oracle’s sqlplus) provide much more powerful interfaces, just like the bash shell does. They include auto-completion of the text you are typing (by pressing TAB), access to a history of commands (up/down arrows, or C-p/C-n), incremental search on the history (C-r), they remember the history in between invocations and more. Virtually all these tools use the GNU readline library to provide these capabilities.

Unfortunately, not all command-line tools use GNU readline (splplus being one). Fortunately, there’s rlwrap. I just came to know this nice little tool.

rlwrap “wraps” any other command-line tool and gives you a readline interface to it. So, you can invoke rlwrap sqlplus and you get sqlplus with the history capabilities of the readline library.

You may also pass to rlwrap a list of potential words to use for completion. For example, I also use rlwrap with groovysh (the Groovy language shell), so I created a file “~/.groovysh_completions” containing the list of commands groovysh accepts. Now, when I launch groovysh I get command history and specialized auto-completion.

Now, rlwrap cannot do magic. Being so generic, it cannot do intelligent context-dependent auto-completion. For instance, PostgreSQL’s command-line interface automatically pulls the list of potential table names after doing SELECT * FROM <TAB>. rlwrap cannot give this intelligence to sqlplus, but it’s still much better than nothing.