Skip navigation.

Posts tagged with "Java"

Comparison of Java equality comparison

, ,

This post will discuss the Java equality comparison, the == operator, and how badly designed they were.

I'm not a Java fan (actually, I hate Java), but please try to ignore this fact about me and read this post with unbiased eyes. This is not just a random mindless Java rant: I try justify my opinion, explaining why I think something is wrong. I'm not asking you to agree with me, but just use common sense for a moment and try thinking before making up your mind.

Read more...

Poor interface design

, , , ...

I'm not (yet) a Java developer. In fact, I hate Java. But I started to learn J2ME, to be able to write programs for cell phones (now I have a phone that has good J2ME support, big memory, somewhat fast processor...). So, I installed NetBeans 5.5 and the NetBeans Mobility kit. Some people prefer Eclipse, some prefer NetBeans. Since I never really used any of them, I tried NetBeans.

Problem 1: I can't type quotes inside any Java application. No joking, under GNU/Linux, the Sun Java virtual machine seems to have problems with deadkeys, and I have US-International keyboard.
Solution 1: Open another program and copy/paste the quote character.
Solution 2: Write a macro inside NetBeans so I can type a combination and it enters a quote.
Solution 3: Press AltGr+quote. This works anywhere inside X.

Being a Vim addicted user, I usually typed Ctrl+N and Ctrl+P inside NetBeans... (If you don't know what those keys do, open Vim and type :help i_^N)

But today I accidentally found two shortcuts that do exactly what Ctrl+N and Ctrl+P do inside Vim! They are Ctrl+L and Ctrl+K. Of course, I wanted to remap these two actions to the same keys as in Vim. Then I found one of the most scaring dialogs:

The NetBeans keymap window

Before showing how it is, let's see how Opera Software designed that dialog in Opera browser for desktop.



Oh, how neatly arranged and organized. It has two columns, one for the keyboard shortcut and another for the action. It also has a quick-find field, an invaluable feature when the program has more than just a few actions and shortcuts. And this dialog is also used for editing mouse gestures. Very neat, well-thought, well-designed and easy-to-use.

Now beware! The NetBeans keymap window is coming! Don't say I haven't warned you!



All actions are available at this dialog, and they are divided into 16 categories:



The keyboard shortcut is just a string between square brackets concatenated to action name. There are no columns. There is no font change, no color change, no bold, no spacing... Nothing that you can easily spot.

Well, I discovered the Ctrl+L shortcut and wanted to change it, but I have no idea on what is the action it calls. I would seach... but there is no search field, and I won't waste my time looking at all actions, one-by-one.


Enough bad design for now. And if someone knows what are the actions of Ctrl+L and Ctrl+K, please tell me.


P.S.: Dear Firefox users, I'm so sorry about you. Your browser does not even have a shortcut editor. I know, you can search until you find an extension that adds that feature. And hope that extension works. Until then, you need to live with backspace not going back to previous page...

Is Java portable?

, ,

What about Java 1.4 for PPC?
Java? This platform independent thing? Well.. Sun doesn't provide any binaries for PPC-Linux :-p

From Slackintosh FAQ: http://workaround.ch/faq.html#java

3ª Semana de Software Livre

, , , ...

Although I've set this blog language to English, there will be some posts in Portuguese. Maybe someday it would be possible to set language per post, instead of entire blog.

No último dia da 3ª Semana de Software Livre, realizada na UniRio, houve uma "mesa de linguagens de programação". Muito divertido ver Shell Script, Perl (defendida pelo "mago" de perl), Java e Python na mesma mesa.

Alguns trechos engraçados:

(cara de Java): Java é portável.
(mago do Perl): Java é portável? Não, Java é insuportável!

(mago de Perl): Na Motorola, onde eu trabalho (ou trabalhei), usavam Perl. Então decidiram adotar Java, mas não gostaram, porque algo que o pessoal de Perl demorava 2 dias para fazer estava demorando 6 meses em Java.
(cara de Java): Então a equipe de programadores de Java não era boa.
(mago de Perl): É, vai ver eram programadores da Sun.
(cara de Java): Vai ver eram mesmo.

(mago de Perl): O código Perl passa por um primeiro parser, seguido de uma primeira otimização, depois por um segundo parser, depois uma segunda otimização...
(cara de Shell Script): A interpretação de Perl tem tantas etapas porque até para a máquina é difícil entender!

Lembrando que, apesar das diversas "alfinetadas" na linguagem do outro, o clima da mesa foi bem amistoso.
December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31