The $1000,000 question: "Why are the two icons different?"

A small social experiment. Take a look at this screenshot:

Look at the packages. The package "cz.word.service.api" has a small icon stuck on the top left of the package icon. The package "cz.word.service.backward" also has a small icon stuck on the top left of the package icon.

Clearly, the small icon top left of the first package icon is different to the small icon top left of the second package icon. Both are locks, but the first is open, while the second is closed.

The $1000,000 question: "Why are the two icons different?"

A: The second package is compiled, while the first isn't.

B: The first package is exported/published to the whole application, while the second isn't.

C: The first package has content that can be edited, while the content in the second is locked.

D: The first package has not yet been put into a version control system, while the second has been put into Mercurial/Subversion/Git/CVS.

E: The first package contains an interface or abstract class, while the second contains an extension class or an implementation class.

F: The second contains a processor or filter, while the first contains a general definition of a processor or filter.

G: There will definitely be javadoc for the first package and definitely none for the second package.

H: All of the above.

I: Some of the above.

J: None of the above.

What do you think the answer is? Only one of the above can be (most) true. [And I am aware of (and have intentionally undermined) the general principle that "in a multiple choice, if you don't know the answer, pick the answer that is longest, since that's the most likely to be correct, because the world is a complex place".] Interested to know your answers, leave them here in the comments to this blog!


Hint: after making your guess, check the tooltip on the node.

Posted by Jesse Glick on August 10, 2011 at 03:45 AM PDT #

Everybody that picks "I." wins but the useful stuff for a developer is "B."

Posted by Emilian Bold on August 10, 2011 at 04:00 AM PDT #

Yes, B is the answer and Jesse's hint was how I originally discovered this. But I'm most intrigued as to how this is a social experiment and will you share your results?

Posted by Jonathan Spooner on August 10, 2011 at 05:16 AM PDT #

The answer is B.

Posted by Cyrille on August 10, 2011 at 06:05 AM PDT #

Nice, never noticed the difference. Nevertheless thanks for enlightenment ;-)

Posted by Martin Scharm on August 10, 2011 at 07:17 AM PDT #

I thought it was B, but to make sure I opened up our netbeans based project to make sure :-)

Posted by Andy on August 10, 2011 at 01:00 PM PDT #

To make things even more interesting, there surely were some reasons for exporting this package in the first place - and these reasons also contribute to the icon being as it is. Luckily, they can be found on your list as well :-)

So yes, if you decide to define an interface for a processor of filter service your module provides, then you will want to put in a dedicated package and export it (E and F). This also means that you are ready to write JavaDoc for your interface so that other people know what it is and how to use it (G). Finally, you accepted that it will be difficult for you to modify your service provider interface from now on, since many other modules can depend on it, whereas you can freely modify your own implementation of it (the opposite of C).

Posted by Andrzej on August 10, 2011 at 05:22 PM PDT #

Definitely B

Posted by Michal on August 10, 2011 at 05:35 PM PDT #

that was a hard one:-)
but i guess its B

Posted by Lukas Kirchhart on August 10, 2011 at 07:34 PM PDT #

Obviously B. Right?

Posted by initialzero on August 11, 2011 at 01:00 AM PDT #

"B" as well

Posted by jmborer on August 11, 2011 at 01:57 AM PDT #

Although most answers point to "B" the first thing I thought when I saw the icons was the lock caused by a "Version control System". So, I would try "C": the first package has content that is unlocked (can be changed by current user) and the second package is completed locked (can't be changed unless you take some content for you).

Best regards

Posted by Giuliano on August 11, 2011 at 09:14 PM PDT #

The package "cz.word.service.api" have class public and other module can call it.

Posted by Cường on August 12, 2011 at 04:24 AM PDT #

Answer is B, but why not make the whole question even more interesting? :)
Let's have a module whose packages have no Java classes at all, but files, as a common point for all I18N.
These bundles should be accessed from any other module, including Matisse builder.
How would we unlock those packages? :)

I'm sorry, but I'm not as a rich man as Geertjan :D so I offer no money!

Posted by guest on August 13, 2011 at 12:39 AM PDT #

Thanks all for the responses. Indeed, the answer is "B".

Posted by Geertjan on August 14, 2011 at 02:20 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« August 2016