My 2007 as a developer

Monday, 7. January 2008

I listed up what I did last year as a developer.

  1. Analysis: One of my research areas during graduate years was software analysis in design phases. Last year, I took a deep interest in code-level analysis, even runtime analysys. PMD and FindBugs were my friends. They are open-source projects and I added some rules (Checking is performed based on pre-defined rules) for my project at company. Performance is our main concern; I investigated our products with JProfiler. I compared Java profilers: JProbe, Yourkit Java Profiler, Eclipse TPTP, and JProfiler. Being friendly with these tools takes longer than expected. IMHO, JProfiler is the winner. To fully understand and utilize Profilers, I studied Java memory model and Java concurrency deeply.
  2. Python again : I met python in 2000, but hadn’t used it for several years. Last year, I met it again. I made some simple games using pygame library, and made very convinient tools for testing. It generates simulation input data and extract meaningful output from logs and then export them to MS excel or XML files.
  3. PHP: PHP is the only language I newly learned in 2007. I have to use it because my personal project (at home) is on a hosting service that provides only PHP. The project depends on PHP GD library.
  4. Javascript modules: I like YUI. YUI code is my mentor regarding JavaScript. Prototype is not bad.
  5. GUI unit test: If somebody argues that GUI is not suitable for automatic test, I can say he/she is wrong. I used UISpec4j for Java GUI testing and the result was satisfactory.
  6. Coverage: I compared coverage tools: Clover, JProbe coverage, Emma. Clover is better than others, and I used it. Coverge goal in my project is over 90% of line coverage, I could meet the goal with the help of test harness including UISpec4j.
  7. Continuous integration: I constructed continuous intergation environment at company. Anthill OS is a open-source CI tool. I changed it to add features such as unit testing/coverage/static analysis reporting intergation.
  8. Books: The 3 books I loved most in 2007 are Effective Java, Java concurrency in practice, Ajax in action.
  9. Community: I joined (or started activities) some developer’s communities such as JavaRanch, JavaLobby, and Artima. Especially in JavaRanch, there are many gurus I really appreciated. I posted comments and sometimes helped others resolve problems. I started my own blog.

Is AOP the only way to do it?

Monday, 17. December 2007

Some criticize AOP for its lack of application area. It is difficult to find useful AOP examples except very limited functions such as logging and transaction. Furthermore AOP is a not unique solution for the specific functions and we have done well without AOP.

Surprisingly, I found an assertion saying that “AOP is the only way to do it” from “Debugging and Optimizing Swing Applications” appeared in JavaOne 2007 technical session. If it is true, it is a very good news for AOP evangelists (including me!) who seek really useful AOP applications. Unfortunately, I can say it is not true. The author argues AOP can detect Swing threading violation: Code that affects GUI components should be executed within event-dispatch thread. But A rule SW_SWING_METHODS_INVOKED_IN_SWING_THREAD of Findbugs, static Java code analyzer, also can help check the violation. In fact, static checking is more appropriate than dynamic checking for those violation because the violation stems from location of specific code lines.

I really anticipate the day when someone will find a really useful and unique solution that uses AOP for a specific problem.

Compatibility in API evolution

Thursday, 6. December 2007

Following compatibilities should be considered in evolution of existing API.

  • Contract compatibility
  • Binary compatibility
  • Source compatibility

The contract compatibility is independent of programming languages, but the binary compatibility and source compatility may not. Designing Eclipse APIs appeared in EclipseCon 2006 provides general compatibility issues with Java examples. It also provides 13 questions on Java binary/source compatibility. It was not easy at all for me and I could learn a lot from the material.

Folder names not allowed in Windows

Monday, 12. November 2007

I happened to know folder name “con” is not allowed in Windows.

To test java.util.concurrent, I tried to create “con” package in Eclipse, but it failed.
That makes me suspect Eclipse. After a while, I found the reason from JavaRanch.