Saturday, February 28, 2009

The Pomodoro Technique

Again, thanks to Henrik Kniberg's blog I've got a brief introduction to Pomodoro Technique, which is essentially a way to improve one's productivity. The PDF describing it is quite a simple one and is fun to read (for those lazy enough there exists a 5-minute guide too).

The sole idea of this technique is to split the work into fixed short time frames separated by breaks, plan it and protect it against interruptions. A set of simple yet efficient rules promises to make it work.

I was completely carried away by this paragraph, because it seems to be the thing I'm lacking most of all in my everyday work:
We can stimulate this ability to feel time in a different way by means of a series of exercises which serve to enhance consciousness of passing time among Pomodoro users. This different awareness of the passage of time seems to lead Pomodoro users to a higher level of concentration in performing the activity at hand.
BTW, the concept is thoroughly developed and there exist various tools dedicated to help using it, so it should be a fun thing to advance this technique, but I'm going to use it's simplest, hardware form. Yes, gonna try this on Monday! :)

Friday, February 27, 2009

Scrum and XP from the Trenches

Just finished reading a book by Henrik Kniberg. I found it really exciting and fun to read (at least, in Russian translation). Thank you, Henrik, looking forward to read more of your books :)

Short extract follows:

Wednesday, February 25, 2009

XQuery for mashups?

Consider this basic XQuery sample:
for $statement in document(https://www.sample.com/sample.xml)//post
let $comment := $statement/comment
where $statement/postedby = 'userBob'
return <quotebob>{$comment}</quotebob>
Nice, isn't it?

False language

I guess it's the most obfuscated programming language ever invented (and it's more-or-less useful, compared to Brainfuck for example). Meet False Language!
99 9[1-$][\$@$@$@$@\/*=[1-$$[%\1-$@]?0=[\$.' ,\]?]?]#
It's a program which prints all primes up to 100. It's so impressively smart, that inspired creation of K, F and Y programming languages, which in turn are... somewhat similar to J and Q.

Tuesday, February 24, 2009

Nice diagrams

Take a look at Treemap diagrams:



It's like a... well, upskirts view of the tree. Really cool Javascript for automated generation of these diagrams could be found here (it's a demo).

Wednesday, February 18, 2009

Grid Computing made easy with GridGain

I've just watched a 20 minute demo of GridGain usage for parallel computations. Looks quite impressive, at least easy due to Map-Reduce-like approach employed in a very simple form. Also it has a nice feature of transparent propagation of code changes between nodes, still it's not actually clear for me how they gonna manage changes in classpath, libraries, etc.

It seems that GridGain is not very popular (yet), at least I was unable to find a wiki article about it :) though I really sympathize its simplicity and wish them good luck.

Monday, February 16, 2009

Sun Web 2.0 tech is easy

Two following links describe how to achieve famous Ruby on Rails rapid development on Java platform using Sun tools - Netbeans and GlassFish. Among pros there are really fast setup, high performance (due to clustering) and flexibility (mix Java and Ruby):

Friday, February 13, 2009

Pushing data to browser

What will happen if a server don't close the TCP/IP connection after web page has finished loading? Right, it will wait until timeout, which could be quite a long period of time. That means we can use it to establish long-live connections (keeping them alive via some kind of polling) to provide server-to-client data push, events, bidirectional data streams, etc.

With AJAX such things became simpler, because no IFrames nor page reloads nor applets of any kind are necessary anymore. Instead nowadays we have Comet, which is an umbrella term for all such technologies, for example:
  • Bayeux protocol providing publish/subscribe model
  • BOSH for establishing bi-directional connections between client and server
Usually these things are combined with some kind of non-blocking IO on the server side in order to save resources there. For example, there exists integration with Grizzly.

The shortest way to read a text file

Check this out (in fact it retrieves complete web page):
new java.util.Scanner(url.openConnection().getInputStream()).useDelimiter("\\Z").next();
Thanks to CT Arrington's Weblog and Core Java Technologies Tech Tips magazine.

Update: one more short way, using Apache Commons IO:
FileUtils.readFileToString(file);

Some open-source Java tech for scalability

Some articles I've read briefly and don't want to forget:

Thursday, February 12, 2009

Nice IBM advertisement from 1975


That's not about James Bond. The rest of slides here.

Software transactional memory

I've never heard about such thing as STM, which is quite an interesting concurrency control concept, an alternative to more commonly used lock-based synchronization. It's usage could be found in Clojure programming language running under JVM, which I think makes both of these worth trying.

Though, it can't replace locking completely, well... because in fact it provides no locking :) So, some inconsistent states are still possible, therefore transaction locking should be used, which returns us back to Earth.

Wednesday, February 11, 2009

Tools for XSD-LDM-DDL roundrip development

There are some articles suggesting to use Rational Data Architect for XSD-DDL-LDM roundtrip development. It doesn't work. None of four RDA 7.0.0.5 installations I found in my department is able to import XSD into LDM, as this article suggests. It shows all the necessary dialog boxes, but in the end it does nothing. Just sielently does nothing.

Ok, maybe my schema is all wrong (maybe because it was not created by Business Modeler), still it's very simple and I see no reason why it shouldn't work. Also, it doesn't permit to transform LDM to Physical Data Model, so no DDL generation too... Ok, I guess it should work, but only after reading some Redbook about it.

I decided to give a short try to other ER modeling tools. PowerDesigner allowed me to easily create an LDM (it's called "Conceptual Data Model" there) and transform it to Physical Data Model AKA DDL in few clicks. Altova XML Spy was able to move between XML Schema and DDL seamlessly...

Both tools also provide a lot of useful additional functionality, which I'm going to explore and describe a bit later.

Friday, February 6, 2009

Trends

I asked Google Trends for the following stuff, and it gives some rather interesting results:
  • grid computing, soa, cloud computing
  • mainframe
  • java, c#
  • c++, c#, java
  • j2ee, microsoft .net
  • ruby, groovy
  • ruby on rails, grails
  • google
  • amazon
  • netbook, notebook
  • yahoo
  • scala, groovy
  • neural networks, artificial intelligence
  • wiki, blog
  • crisis, sex
  • hardware, software
  • netweaver, websphere
  • abap, sap
  • abap, netweaver
  • websphere, weblogic
  • ibm, oracle, microsoft
  • open source
Try yourself! :)

IBM Rational products I didn't know about

Finally I managed to find some time and go through the complete list of IBM Rational products. Here is a list of tools I found interesting and new to me:
  • Rational Host Integration Solution. It looks like an advanced screen-scrambler for existing [ugly] mainframe user interfaces, powered by Rational Host Access Transformation Services. They say it's done "without changing the existing applications". Kinda telnet2ws.
  • Rational Software Analyzer. This static software analyzer looks promising, it supports C++, Java and something else. What I'm interested in is 500+ code review rules for Java. I tried to run it against one of our projects, and it produces some quite impressive results. I mean, something I wouldn't notice in an everyday life. The major drawback is that the installation is >600 Mb, which is just too much for such a simple thing (I would prefer to have it just as a downloadable plugin for my RSA). Furthermore, Rational Software Architect which I use as a main tool already have limited support for such analysis (providing just 200+ rules).
  • Rational Business Developer. After reading this: "EGL (Enterprise Generation Language) compliments the breadth and depth of Java and COBOL technology with a simplified, more abstract development paradigm", I imagined an EGL editor with a radiobutton allowing to choose one of these: "Generate COBOL code", "Generate Java code". No COBOL please. Also they compare it with .NET for a task of retreiving data from IBM mainframe (!). In the end they claim something like "yep, we knew it would happen. Dotnet sucks, it doesn't work with mainframes". In fact, that PDF is the most exciting thing about RBD, and reading it somehow resembles watching Belarussian political news on government TV channel (that's exaclty the situation when one look is worth a hundered words).
Wheeew! To be continued.

JSF in RAD links

Here are just few good links found about how to easily implement JSF in Rational Application Developer. Haven't managed to read it yet, so posting it here just in order not to lose it:

Thursday, February 5, 2009

Habits and motivation

Recently I've read a short post by Chad Fowler about development of good habits in 20 days. In short, he says that it's easy to make yourself do something just for 20 days and at the same time that's usually enough for this activity to become a habit. I like his idea (it's so simple!) and already started gathering some good habits, mostly in the household area. Let's see and wait until March :)

Also I've looked through a Paul Gram's blog, which I frankly speaking dislike because of it's well, straightforwardness. He's an over-positive, super-optimistic, completely American businessman saying some quite obvious things trying to find some deep sense inside. Anyway, I found an interesting idea there too. Let me quote it:

If you start a new year off with massive success in the first month, it’s amazing how fast it can snowball and help propel you to your best year EVER.

I think that's a fresh idea and it's not too late to start something like that in mid-February :)

Wednesday, February 4, 2009

Tricky

I'm really intrigued by OSGi stuff. No, really, I can't understand what does it mean. They call it "technology" and "framework", but these words are so generic that it doesn't mean anything to me... I gave up and searched in Russian, and it didn't help either! It's very, very interesting.

UPD: Finally found an easy tutorial on it. They could have told "it's a megasophisticated way of using pluging" instead of "framework" :)

Tuesday, February 3, 2009

Simplifying JDBC in DSL fashion

I like these libs, which are way simpler to understand and learn (at least, for simple queries) and much more lightweight than full-blown ORM tools like Hibernate:
  • JaQu, though I can't figure out if it could be downloaded without H2
  • LIQUidFORM, which does its best to look like LINQ
  • And some other LINQ-inspired implementations for Java
To understand what I'm talking about, consider this simple example replacing all that verbose JDBC stuff:
Product p = new Product();
List soldOutProducts =
db.from(p).where(p.unitsInStock).is(0).select();
And yes, I wish you good luck, because I'm afraid, some cool features (closures, etc) which can improve DSL implementation in Java won't be included in JSE 7. That's why I'm looking at Groovy with increasing interest and can't wait to see good IDE support for it.

Update: they actually will include closures in JSE 7! Not looking at Groovy anymore :)

Monday, February 2, 2009

Functional Programming in Architecture

While reading an article about Functional Programming (it's in Russian), I've caught myself that RESTful web service is a kind of Pure Function, so REST is kinda FP approach :)

BDD is too repetitive?

I've got acquainted with Behavior-driven testing, though it still looks too verbose for me. The aforementioned article doesn't give the JBehave annotation "syntax" examples, which I don't like so much.

UPD: Thinking of our poor testers who were unable to document their functional tests, start suspecting that this is what they might have needed instead of using IBM Rational Functional Tester...