Thoughts about java, ruby, agile and other every developer stuff.

Friday, April 27, 2007

Fast News (maybe not so fast)

Sun is purchasing the intellectual property of CDC spec phone maker SavaJe. It may be very interesting phone war, we have a couple new big players such as apple and now sun. I think this year may be very interesting for mobile devices. Another point in this war is that Apple don’t support java on his Mac OS X. That means that we all have java 5 update 11 but Mac OS X has java 5 update 7. Now I must review My dreams about MacBook.

News in JDBC 4.0

A new JSR-221 specifies JDBC version 4. A list of changes is not so huge, there’s some minor changes. One of the major changes was addition XML data type support which is mapped to SQLXML java type. Another added data type is RowId interface, SQL ROWID is the fastest way to access data. Another nice enchantment is that you don’t have to call Class.forName and register driver to driver manager. Everything you must do is put JDBC driver into classpath.

There are many minor changes such as adding DatabaseMetaData, adding more methods such as createClob in Connection, free in Array and others, pleas refers to JDBC specification for details, but in my opinion the most change is introduction more implementation of ResultSet and better Exception Handling.

Wednesday, April 25, 2007

Continuous Integration

Today we started choosing Continuous Integration server. I become a leader of this project, so we'll see.

From brainstorming we choose for a month evaluation :

Which one wins, who knows. Personally I'm responsible for the Bamboo evaluation and what can i say today is that it's made good impression for me. Nice interface (same as in JIRA), easy installation and configuration. Evaluation in progress....

Sunday, April 22, 2007


Lastly I have found programmer personality test and made it for fun, here is my result. You can try here

Your programmer personality type is: DHTB

You're a Doer.
You are very quick at getting tasks done. You believe the outcome is the most important part of a task and the faster you can reach that outcome the better. After all, time is money.

You like coding at a High level.
The world is made up of objects and components, you should create your programs in the same way.

You work best in a Team.
A good group is better than the sum of it's parts. The only thing better than a genius programmer is a cohesive group of genius programmers.

You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as freely as possible to help simplify the task. We're not writing on paper anymore so we can take up as much room as we need.

Friday, April 20, 2007


Our last seminar was abort scala language. I met with this language in December 2006 when I was prepared own seminary about java kingdom of languages. Martin Odersky makes experiment to create functional and object programming language. He chose java virtual machine as a compilation platform so scala has great library support.

One of very interesting feature from java perspective is patter matching (known from other functional languages SML, Heskell).

abstract class Tree
case class Sum(l: Tree, r: Tree) extends Tree
case class Var(n: String) extends Tree
case class Const(v: int) extends Tree

This snapshot is from scala tutorial. The case modifier makes from normal class a class with standard definition of getters for parameters, equals, hashCode, toString. Now through patter matching scala can evaluate Tree expression depends on the match to class Sum, Car, Const.

Scala has mixins, methods can have names like =, +, - etc., and true genericity , another interesting thin is xml included (maybe in jdk7) so we can define variable such as:

xml_data = <phonebook><name>Imie</name></phonebook>

Last interesting fact is that scala allows you to use Actors to simple send and receive messages (Erlang style).

It’s very interesting language and of course we have even now web framework for it. It’s name is lift

Tuesday, April 17, 2007

Hibernate Shard, Serach and Validate

We have three new Hibernate Projects, this projects add great possibility.

Hibernate Shards

This is a framework that is designed for horizontal partitioning. It’s key features are that Shards allows you still use Hibernate API, You can add your own shredding strategies and of course it’s open source.

Hibernate Search

This helps you achieve full text search. It’s use in background Apache Lucene. And make dirty work for us (sync, manage indexes etc.

Hibernate Validator

This allows to keep in one place our constraint about model. With annotation we can specify constraint, and hibernate will build and apply validation rules for us in many places (database schema, inserts/updates etc.)

Wednesday, April 04, 2007

Cocoon 2.2 - the empire strikes back ?

Yesterday I was on wjug meeting. The topic of the meeting was about cocoon 2.2. Our speaker Grzegorz Kossakowski is Apache Cocoon PMC, and he shows us cocoon 2.2. which still hasn’t been released.

Here is the list of main improvements.

  • Documentation : most of developer work now is documenting code, new documentation design, comparing to 2.1 version it heroic work done.
  • Blocks – because of sitemaps complication, now application should be divided to block, which should be single focused part. Now block are simple servlet so you can integrate your servlet into cocoon or use cocoon blocks as a servlet
  • Modularity – at last cocoon based application may be smaller than 60M. There is no one cocoon.jar now but you have opportunity to choose which modules you need and include only this few modules.
  • Daisy – CMS system based on cocoon so you can learn from the bests.
  • Springframework Avalon (closed project) was change to springframework, it’s simpler now, and there are many spring beans you can access thought context
  • Maven2 – maven archetypes, builds mechanism and of course repository with cocoon models.
  • AJAX – now every project needs be ajax integrated, and cocoon is not different here. So you may use ajax transformer based on dojotoolkit 0.4
  • Versioning – From now every module will be versioning from 1.0, and cocoon core will be 2.2. every module will be released separately

I will wait for public release, so we’ll se.

Monday, April 02, 2007

Maven 2.0.6 and what next

So maven team is on the road now. They realized that waiting for 2.1 as long as for next debian stable release makes that potential user goes away. The 2.0.5 version was released on February 13, and 2.0.6 was released on last day of March. Now 2.0.7 is highly developed and you can download it and build for yourself. By the way the 2.0.4 version was released nearly one year ago (10 April 2006).

In my opinion : marvelous decision.

When you want to migrate to newer version you must consider if your dependency has proper version, because main improvement to 2.0.6 is that it’s now prefer dependencyManagment version over Resolved version. You can check if you should consider this issue.

In your project run

mvn dependency:analyze

important note : it must be 2.0.5 version.

You can have two possible answers one is that’s no differences report. This is good option because you can migrate to 2.0.6 without any problems, Second option is that dependency analysis say something similar

[INFO]  Dependency: group_id:artifact:type
[INFO]          DepMgt  : dependency management version
[INFO]          Resolved: resolved version

It means that after you switch into 2.0.6 your build file will be downgraded from resolved version to dependency management version

There are some bug fixes and improvements. You can read about it here

One last word, there are two option which help you switching from different maven setting

-Dorg.apache.maven.user-settings=/path/to/user/settings.xml : this one switches local setting : this one switches global setting

I think 2.0.7 will be deliver in next one and half month.

Good luck maven team.