Fast News (maybe not so fast)

Friday, April 27th, 2007

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.

Scala

Friday, April 20th, 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 =

Imie

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

Flex2 on the board

Sunday, February 18th, 2007

Today my family went to kids-play. The children has unimaginable power. My wife is sleeping now, and I’m nearly sleeping too.

Introduction to Flex

Flex is based on adobe flash technology. Flex applications consist of MXML and ActionScript source files. For easy development you can try for 30 days Flex Builder. Flex Builder is built on Eclipse so everyone who use eclipse is familiar with. There are also Flex Data Service (integration with EJB, Hibernte, JMS and other data sources) and Flex Charting (charts).

The one hour ride on Flex.

Creating application is easy part. You have graphical designer where you layout components. It’s very similar to Swing application building. There is also event-listener mechanism. All properties You can set by properties editor, it’s very comfortable.

The heart of every application is MXML file. This is a normal XML file, which flex can convert on the fly to swf. The flex builder has very good mxml editor, it provides hints and auto-completes your code. Builder has a very good debuger, so you can easy debug your code to find out what’s going on.

You can create customer components and reuse it whenever you need. I think that you can find useful components on the web.

And finally flex has many WebService/XML integration. It’s very easy to create application connection to WS. For example, this code is a flex blogger reader from tutorial. This application connect to flex blog, read last post and shows them in table view.

The code:

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”absolute” creationComplete=”feeder.send()”>
<mx:HTTPService
id=”feeder”
url=”http://weblogs.macromedia.com/mchotin/index.xml”
useProxy=”false”/>
<mx:Panel title=”{feeder.lastResult.rss.channel.title}” x=”10″ y=”10″ width=”475″ height=”400″ layout=”absolute” >
<mx:DataGrid x=”20″ y=”20″ id=”posts” width=”400″
dataProvider=”{feeder.lastResult.rss.channel.item}“>
<mx:columns>
<mx:DataGridColumn headerText=”Posts” dataField=”title”/>
<mx:DataGridColumn headerText=”Date” dataField=”pubDate” width=”150″/>
</mx:columns>
</mx:DataGrid>
<mx:TextArea x=”20″ y=”175″ width=”400″ htmlText=”{posts.selectedItem.description}”/>
<mx:LinkButton x=”20″ y=”225″ label=”Read Full Post”
click=”navigateToURL(new URLRequest(posts.selectedItem.link));”/>
</mx:Panel>
</mx:Application>

The HTTPService object is responsible for getting posts. It simple get HTML page. Next we can access DOM objects. In our example rss.channel.title and channel.item (this one is a collection). It’s very easy.

Summary of Flex

+ Rich user interface
+ Eliminate page loads
- Depends on Adobe Flash 9
- Flex Builder is not free, building without builder is not easy than.

Search is everywhere

Tuesday, January 30th, 2007

I’ve just finished reading a book: The Search: How Google and Its Rivals Rewrote the Rules of Business and Transformed Our Culture. It’s amazing. I read from desk to desk. I after that I’ve got so many ideas, I nearly exploded. John Battelle has great experience, and I must say it’s a good narrator. I’ve bookmarked his blog, it’s worth (John Battelle’s Searchbook).

It’s all about searching, and when I read this book I realized that’s true, all tasks we makes in World Wide Web begins in searching.

And now I know that searching is a future. My colleague makes him own business, very risky, because he has nice position in my new job. But I feel that he makes it and I hope he do so.

Pedro

about me

My name is Sebastian Pietrowski. I've finished Warsaw University as Master degree. During my studies I started work for merlin.pl. The primary language I use is Java but I have also programmed in Python, Ruby and Scala. I worked as a technical solution architect at merlin.pl. infrastructure when we were moving from PL/SQL to J2EE. I engineering a great performance optimized solution that made the application 10 times faster than requirements and 85 times faster as original solution.

Currently, I am working as a Senior Expert at F.Hoffmann-La Roche to help define future roadmap in design and development of Enterprise software at Roche and Genentech and build adoption for new technologies. I'm continuously mentoring new developers, helping them understand how important test driven development is and empowering them to get better at their daily job. I'm involved in many activities which brings new technologies for better and faster development. You can find more details on my LinkedIn profile.

But don’t get me wrong, I am not your typical nerd. I'm a pleasant guy that you can drink a glass of wine with me and talk about a range of topics with. My leisure activities include playing basketball, soccer and listening to music. I try to be pragmatic while staying focused on application performance and tuning with success in my daily work.

My favorite quote from Yoda's and my life’s motto is: Do, or do not. There is no try.