American vs. European style of Software Development

There are two different cultures in the US and Europe. The US is more about freedom and power, one can get to the top alone, gun slinger mentatlity. Europe is more about security and safety, about making it as a group. This can be seen in foreign policy, gun laws, social security and health care (as always this is a generalization. If you want to know more about that, read "The European Dream" from Jeremy Rifkin.) I'm not saying one is better than the other, just that they are different.

These two styles can also be found in software development. [I don't talk about American vs. European developers - just about development styles] One group of developers favor security and safety, another group favors power and freedom. The security group tends to static languages like Java, to conservative architectures and technologies. The other groups tends to meta-programming, dynamic languages and try every new technology which flows down the river - merb, mongrel and everything that is hip. Both come from a different background and different experiences.

I think this view explains a lot different cultures and their goals and views.

Thanks for listening.

Short Book Review on “The Definitive Guide to Terracotta” by Apress

Some small notes: The book was kindly supplied by Apress. The review was lost, tried to be rescued, not found and finally written again from my notes, all because my MacBook crashed 😉

A short review of the Apress Book "The Definitive Guide to Terracotta" by Terracotta Inc.

I didn't do reviews before so this is my first review here. As I'm reading lots and lots of books (currently "Practical API Design" and "Clean Code") I thought it would be good to combine my blogging with the book reading and write some reviews. But I don't know how, so let's try 🙂 Most of the time I do two things with book reviews. First I read the conclusion and the rating, second I have a look at the table of contents. You can do the second here. And the first one in short: Good book.

Slightly longer: If you need or want to know about Terracotta (TC), it's the book to buy. It's written by the Terracotta guys, you can't get better and more accurate information.

For those who are more interested in some details: The book is about a software solution called Terracotta to distribute -transparently- the Java Virtual Machine memory over several JVMs. This leads to some very interesting use cases and new approaches to scalability. Terracotta calls itself virtual heap.

The book starts with a good introduction and motivation to virtual heaps, big heaps spread over several JVMs - not to be confused with distributed caching or clustering POJOs. Both can be done with TC but much more. So the main part of "The Definitive Guide to Terracotta" focuses on use cases. Those are quite good motivated, explained and described with many examples and working code.

Use cases which are covered include:

  • Caching for (web) applications
    • Writing a cache layer yourself with TC
    • Using TC together with ehCache
  • Speeding up Hibernate with distributed caching
    • TC for the second level cache
    • TC for detached instances
  • Distributing sessions over several servers
  • Grid computing
  • Clustering Spring out of the box

All examples are relevant to building todays web applications and easy to follow - more like a cookbook. The authors finish the book with chapters on TC integration modules (TIM) which are drop in replacements into your application for some of the described use cases and scenarios (and more). That part includes using and creating TIMs. At last there is a - rather small chapter on performance optimizations. A good start but I've missed something there.

After some praise now some things I didn't like:

  • Split brain problem which you may run into is not solved, you need to do it yourself over WAN for high availability (with a message bus for example)
  • Chapter about optimizations but not extensive enough and not enough information about deployments and deployment scenarios
  • Minor point: Roadmap on back looks stupid

My conclusion: A rating on 0 to 10 doesn't make sense to me. Either it's a should-buy or not. For Definitive Guide to Terracotta, buy it if you want to evaluate or use Terracotta. Be aware that it's missing some industry stories on deployments and usage.

Higher Order Objects

With all this talk about higher order functions: Nearly all OO programming languages support higher order objects!

(Which are objects that take other objects to perform a task)

Higher order functions might be a big "Ah" moment in FP, but the concept is really very simple and basic in OO.

Update: Dear Dzone readers, there is not much content here, because there is not much to say. OO languages support higher order objects. Thanks.

Update 2: Functions take values as parameters. Functions which take functions as parameters are called higher order functions. Objects take values as parameters. Objects which take objects as paramaters are higher order objects. As the concept is very basic in OO, people don't talk about it.

Update 3: As commented, a function is also higher order when it returns a function. "A function that takes a function as an argument, or returns a function as a result". Same goes for higher order objects (those returning an object in a method)