Geertjan's Blog

  • August 10, 2011

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

Geertjan Wielenga
Product Manager

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!

Join the discussion

Comments ( 15 )
  • Jesse Glick Wednesday, August 10, 2011

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

  • Emilian Bold Wednesday, August 10, 2011

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

  • Jonathan Spooner Wednesday, August 10, 2011

    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?

  • Cyrille Wednesday, August 10, 2011

    The answer is B.

  • Martin Scharm Wednesday, August 10, 2011

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

  • Andy Wednesday, August 10, 2011

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

  • Andrzej Thursday, August 11, 2011

    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).

  • Michal Thursday, August 11, 2011

    Definitely B

  • Lukas Kirchhart Thursday, August 11, 2011

    that was a hard one:-)

    but i guess its B

  • initialzero Thursday, August 11, 2011

    Obviously B. Right?

  • jmborer Thursday, August 11, 2011

    "B" as well

  • Giuliano Friday, August 12, 2011

    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

  • Cường Friday, August 12, 2011

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


  • guest Saturday, August 13, 2011

    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 bundle.properties 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!

  • Geertjan Sunday, August 14, 2011

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

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.