Tuesday, July 29, 2008

Replace jconsole with command line based jmxterm

JMXTERM is a command line based interactive JMX client software. It opens a command line console and user can open connection to an MBean server, then operation against it with interactive commands. The user experience of JMXTERM is like a combination of jconsole and ftp. With JMXTERM, JMX operation doesn't have to be done in graphical environment anymore.

JMXTERM project has recently release the second version 0.2, which is much more reliable and better documented than the previous version 0.1. Several serious bugs including white space in MBean name and user/password based authentication were resolved in version 0.2. Besides, version 0.2 adds the feature of listing local running Java process even if they aren't launched with jmxremote argument.

Links:

Monday, July 21, 2008

Dark Knight, the #1 movie in IMDB


This movie tells that,
  1. A comic super hero move, a box office blockbuster movie can be appreciated in the same way God Father or The Shawshank Redemption is
  2. It doesn't take comedy to be a profitable super hero movie
  3. To be a good movie, it doesn't matter how many predecessors there are.
Dark Knight is unique and unconventional. The #1 position in IMDB may turns out to be too overwhelming in the future, but it's definitely easily the best movie of year, best superhero movie and a movie should be appreciated by Oscar academy.

Click to see bigger picture

Thursday, July 17, 2008

Reflection is expensive? Illusion!

Reflection invocation is a little bit more expensive comparing to the direct call, but it wasn't very slow and it's not slow at all now in JDK 6. It is looking up by name that takes long time.

Operation2000/11 (probably jdk 1.3.1)2003/1 (probably jdk 1.3.1)2004/10 (jdk1.4.2_03)2007/2 (jdk1.6.0_b105)
100,000 regular calls2664ms281ms203ms78ms
100,000 reflection calls without lookup4216ms297ms250ms78ms
100,000 reflection calls with lookup45505ms938ms562ms203ms
1,000,000 regular calls27840ms2578ms1828ms594ms
1,000,000 reflection calls without lookup43863ms2782ms2485ms641ms
1,000,000 reflection calls with lookup47097ms5453ms9343ms1984ms
10,000,000 regular calls-25906ms17766ms5063ms
10,000,000 reflection calls without lookup-27891ms24813ms6141ms
10,000,000 reflection calls with lookup-54843ms93611ms20093ms


Link: What are the performance costs involved in Java reflection? E.g., looking up a method by name and then invoking it.

Neutual density filter and long exposure

Pictures in this album were all taken from Pier66 in Seattle, between dawn and pitch black night. Most of them were under long exposure (5~60 seconds). Some were taken with neutral density filter. For examples:

  • P7137679 is taken in early dawn with 5s exposure, with .9 neutral density filter plus a .6 graduated neutral density filter.
  • P7137705 is taken in late dawn with 40s exposure, with .6 neutral density filter and a polarizing filter. It was already dark at that time, lights in building is on.
  • P7137712 and P7137721 are both 50s exposure with only a polarizing filter, they were taken in dark.