jump to navigation

Review: Java Cookbook, 3rd ed., by Ian F. Darwin (O’Reilly) September 7, 2014

Posted by claudio in Uncategorized.
Tags: , , , , ,
add a comment

Java Cookbook

I am not really a fan of Cookbook style books. However, by looking at the table of contents of the Java Cookbook, it’s clear that the chapters on this book run parallel to chapters in more classical technical books, e.g. the excellent Core Java books by Horstman and Cornell. While the more classical books try hard to provide a logical structure within the chapter with the needed context (a story) to master the content, cookbooks give you independent ready-to-use recipes (yeah for metaphors!). So it’s really about getting a proven solution fast than (deep) understanding. But you should get that from the title, so no surprises there.

My specific use case is simple. I want to do some Java coding soon, and needed a quick refresh on the language. While not so long ago I used Java 7 features for a private project, most of my Java coding in the past was based on Java 6. Java 8 seems to have nice improvements, so a fresh-from-the-press Java Cookbook (3rd edition, July 2014) seemed a fast way to get up to date. With 900+ pages, “fast” is of course relative. By this standard, the books delivered.

The content is *very* varied. Some chapters needed careful reading (or even re-reading), while others could be skimmed or even skipped. Recipes include (citing the product page):

  • Methods for compiling, running, and debugging
  • Manipulating, comparing, and rearranging text
  • Regular expressions for string- and pattern-matching
  • Handling numbers, dates, and times
  • Structuring data with collections, arrays, and other types
  • Object-oriented and functional programming techniques
  • Directory and filesystem operations
  • Working with graphics, audio, and video
  • GUI development, including JavaFX and handlers
  • Network programming on both client and server
  • Database access, using JPA, Hibernate, and JDBC
  • Processing JSON and XML for data storage
  • Multithreading and concurrency

As you can see, it’s a mixture of very basic and advanced stuff and that kind of thechnical width has its risks. Some recipes are too obvious and not more useful than the javadoc showing the classic usage of a standard method of a standard class (e.g. substr from String). As such, I don’t think it can replace a good book from a “Learning/Starting” series if you’re new to Java. A similar phenomenon happened on the other side of the spectrum. For more complicated subjects (like the new functional aspects in Java (lambdas), GUI development or threading) a cooking recipe just doesn’t provide enough context to really grasp the concepts. I hope the following screenshot from the book illustrates my point (and also shows what I don’t like about java):


Try to put this in a recipe!


Despite this warning, I can say that most of the recipes are useful. By example, even the first chapter (“Getting Started: Compiling, Running, and Debugging”) was surprisingly useful because it included things like ant, maven and gradle. There is lots of content to skim (it’s OK, it’s a cookbook!), lots of interesting stuff to read, lots to use with a mental note “need to dig deeper here” and even some annoyances from time to time (I wish the author would stop pushing his own classes for trivial stuff, like removing tabs (!)).

As a conclusion we can say that if you like cookbooks, this could be a good one. If you don’t, it depends on your expectations. Mine were met, no more, no less. 3 out of 5.


Title: Java Cookbook, 3rd Edition
By: Ian F. Darwin
Publisher: O’Reilly Media
Print: July 2014
Ebook: June 2014
Print ISBN: 978-1-4493-3704-9
| ISBN 10: 1-4493-3704-X
Ebook ISBN: 978-1-4493-3703-2
| ISBN 10:1-4493-3703-1

Review: “Software Architecture Fundamentals Part 2. Taking a Deeper Dive” by Neal Ford and Mark Richards August 14, 2014

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

Taking a Deeper DiveWell if the first video got a 5/5 rating, you can be sure that the second part deserves that as well. Although more advanced than the first part, it’s pretty obvious both videos must be considered to be one workshop. Looking a the clothing of the instructors and audience in the studio (2 people), tt’s pretty clear they were recorded on the same day:).

While the first video was more about common sense and obvious rights and wrongs (patterns and anti-patters), the second part seems to boil down to ‘it depends’. TIMTOWTDI (There is more than one way to do it) will Perl people say. By example, it was clear the instructors had a very different opinion about SOA and Continous Delivery.

Like in the first part, the chapters titles are well chosen and give a correct overview of the subjects that make up the course. The video starts with Architecture Tradeoffs (see above), followed by Continous Delivery, Abstraction and Choosing and Comparing Architecture. More applied are the chapters about Web Services and Messaging, SOA, Integrations Hubs and the continuation of Continous Delivery. More abstract where the Approaches to Enterprise Architecture, Strategies, Evolutionary Architecture and Emergent Desing.

Again,  this video delivers what it promises. Neal Ford and Mark Richards are still enthusiastic about their teaching and seem even more involved in the second part.

Again, great series. Kudos to Neal and Mark.

Software Architecture Fundamentals Part 2
Taking a Deeper Dive
By Neal Ford, Mark Richards
Publisher: O’Reilly Media
Final Release Date: April 2014
Run time: 5 hours 57 minutes


Review: “Software Architecture Fundamentals Part 1. Understanding the Basics” by Neal Ford and Mark Richards May 5, 2014

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

Concerning learning, I don’t consider myself a “visual” guy. I am pretty happy with a good book. Although I often read O’Reilly books, this is the first “full feature” video (7 hours) from the publisher watched. While I am very interested in the topic of I.T. Architecture, the idea was to give this “new” format a chance.

bktThe chapters titles are well chosen and give a correct overview of the subjects that make up the course. Starting with an introduction defining the role of architect, it goes through the more social (Architecture Soft Skills) and infrastructure role (Continuous Delivery) of the job. Some chapters are very close to the developer level (Understanding Large Codebases, Design Patterns), while others are very specific for the architect role (Architecting for Change, Architecture Patterns, Architecture Anti-Patterns). Some chapters are more geared toward Enterprise Architecture (e.g. Enterprise Architecture Concepts and Fundamentals).

I must say, this video delivers what it promises. Neal Ford and Mark Richards are good and enthusiastic speakers making it a very pleasant experience. Also the concept of a limited studio audience helps to make the format more active. Going back and forth between Soft Skills (leadership, technical depth/breadth, multi-platform skill, business domains, etc.),

Architectural Techniques (adaptability, integration, Architectural and Design Patterns, etc.). The course gradually present the basic knowledge to understand more complex enterprise architecture approaches, strategies *and* implementations. I liked it.

Software Architecture Fundamentals Part 1
Understanding the Basics
By Neal Ford, Mark Richards
Publisher: O’Reilly Media
Released: March 2014
Run time: 6 hours 57 minutes

JavaFX compiler for Linux very soon? May 11, 2009

Posted by claudio in Uncategorized.
Tags: , , ,
1 comment so far

javafxGood news. It seems that Linux and Solaris are getting the JavaFX development kit. Finally. In the fight against Silverlight and AIR every developer counts. Still some questions remain open:

  • Will SUN open JavaFX completely now (don’t make the JDK error twice!)?
  • When will -at least- Netbeans get a JavaFX graphical editor in the same level as the Netbeans’ Matisse Swing editor?
  • And last but not least, what will Oracle do with JavaFX when it owns SUN?

Anyway, if the apparently well-informed rumour is true, it is indeed good news.

I don’t like monkeys in the house April 24, 2009

Posted by claudio in Uncategorized.
Tags: , ,

monkeygunThere have been some controversy about the .Net clone on Gnu/Linux: Mono.

I have been running Linux before Mono appeared and I remember the discussions. To be short: most reasons to introduce .Net on Linux are clearly bogus today. If you really want to use a high-level language with a VM, well … use Java (there are java-gtk2 bindings if you prefer a more native look than swing-gtk or swt-gtk). If you want to make it perfect, spend a fraction of the time and money of copying/rewriting a full stack (including a VM) and fix what need to be fixed on Java (specially now that’s GPL2). Besides, there are pretty decent IDEs that make you productive . If Java isn’t your cup of coffee tea (It should be as C# looks pretty similar to me), there are tons of other languages with gtk-bindings (I use gtk2-perl).

Anyway, being a user of a minority OS, there was one argument that stuck then: “we will enable thousands of windows programmers to run their programs unchanged on Linux”. I remember the apocalyptic warnings of “jumping on the .Net boat or drown and disappear”. Guess what, it didn’t happen. And it won’t happen. Windows developers prefer to write for the full and up-to-date .Net stack instead of an outdated Linux-clone. Nothing earth-shocking here. As long as the complete stack is not open (libraries), you will always play -incompatible- catchup.

What did we get instead? Beside a few proprietary applications (that can be counted on one hand), we’ve got some tools and applications that mainly run on Linux. Some of them are very nice, but nothing revolutionary that can not be written in an other language.

Do we need to live in fear of Microsofts lawyers for a few applications that can be written in a risk-free language or stack (e.g. Tomboy => Gnote)? To be honest, as long as the OS and my DE (Gnome) don’t depend on Mono, I don’t really care. If Microsoft sends its lawyers, there is always “apt-get purge libmono0 mono-common”. The problem I see is that Novell is pushing really hard to make Gnome dependant on Mono.

Removing Mono in that situation will mean holding the broken pieces of the Desktop in your hands.

Still no javafx for Linux? March 3, 2009

Posted by claudio in Uncategorized.
Tags: , , ,

javafxI use a lot of Sun software: java, mysql, virtualbox, solaris, solaris cluster, etc.

Today, while having a look at webservices as an alternative to Swing clients, I decided to have a look at Sun’s attempt at the RIA market: Java FX.

Sadly, the javafx sdk has only be released for windows and macos. I guess Sun doesn’t get it that it needs as many developers as possible as its alternative is a few years late compared to the competitors. And a lot of linux users are developers/admins…

I know they are workarounds to get the sdk running on linux, but why bother?

Java 6 update 10 on Ubuntu 8.10 && Firefox November 5, 2008

Posted by claudio in Uncategorized.
Tags: , ,


EDIT: Then new Ubuntu release (9.04) fixes this problem, and installing the plugin can be done by typing this in a console: sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts

When I wanted to test some new features of the latest java 6 re update, I noticed that firefox wasn’t showing any applets at all. Reviving applets from the death is probably voodoo business, but anyway, there is an easy solution:

Install the sun jre (openjdk6 is installed by default):

$ sudo apt-get install sun-java6-jre sun-java6-plugin

Enable the firefox plugin:

$ sudo ln -s /usr/lib/jvm/java-6-sun- /usr/lib/firefox/plugins/

That’s it.

You can test your java-firefox installation here.

Object Oriented Perl? July 12, 2008

Posted by claudio in Uncategorized.
Tags: , ,

I love perl. Really. This is not a post inspired by “5 things I hate about Perl“, but rather a question for the wider perl community out there (hi perlshere!). How do you write your OO perl code?

I have some code out there that follows the inside-out objects methodology of Perl Best Practices. Lately I have been writing java code, and inside-out objects feel like a lot of extra – not very intuitive – work to create your classes. I have been looking at Moose, but again it looks pretty cumbersome to create classes (constructors, named parameters for methods, returns, etc.). I am just probably missing a good howto (besides the cookbooks on cpan) or even a printed book on Moose. Any tips out there to get into Moose fast or a nice complete and intuitive alternative (extra points if it’s similar to java’s OO framework)? Thanks.

EDIT (Feb. 16th 2009): it seems I have a direct line with The Perl Foundation: a grant was approved for Dave Rolsky to work on the Moose documentation. Yannick greated a nice pdf output of the manual (see this as well).

Netbeans tip & tricks: Swing dialogs with the wrong size (same as previous dialog) June 13, 2008

Posted by claudio in Uncategorized.
Tags: , ,
1 comment so far

Netbeans has a killer feature: it’s graphical Swing builder (aka Matisse). It’s fast, flexible and it works. GUI application in no time. Great.

However, when not creating the GUI by hand, it can be difficult to track some bugs. I found out that when using different JDialogs in the same application, resulting in the dialogs having the same size as the first dialog opened. Pretty annoying. This is how to solve it. (more…)

OpenJDK Swing in Gtk clothing: getting there? June 2, 2008

Posted by claudio in Uncategorized.
Tags: , , , ,
1 comment so far

Sun has a golden opportunity to make the dream of Desktop java reality. Although java is predominant for enterprise applications and on the server room, java on the Deskop – whatever Sun claims – is not a reality.

Things have changed since the days of over-hyped applets. Java SE 6 is nice and getting better and swing – and java in general – have made huge speed improvement (hotspot and co.). More important, java is now free.



Get every new post delivered to your Inbox.

Join 197 other followers