Sunday, December 14, 2008

Devoxx 2008: Conference Day 1

[Originally posted on the JavaBlackBelt blog]

One of the best things about conferences (if you're a consultant, at least), is catching up with a lot of former colleagues at once, even if it means missing the JavaFX/IBM keynote (the IBM part is widely deemed to have sucked). I also got the chance to talk to the guys at the Kaazing stand, following up on Nicolas's hype of a few weeks back. To complement his post, here's an impromptu, Scoble-style interview with John Fallows, Kaazing's CTO.



Of course, I was there for the sessions and saw a couple particularly good ones.

Brian Goetz outlined the evolution from concurrency to parallelism, reminding us that the free lunch is over. He took us on a tour of the fork-join API, discussed work stealing and the higher-level abstraction (in terms of parallelism) introduced by ParallelArray. He also stated that closures could have made the API a lot nicer, to which audience-member Joshua Bloch could not help but respond that they introduced a lot of overhead for relatively little gain.

Bill Venners gave an awesome talk entitled The Feel of Scala. Most Scala tutorials and examples I've read make the language seem really hard and concentrate on its functional aspects. Venners took a different approach, focusing on the wonderful DSL-ish syntax he relatively easily created for ScalaTest and augmentations to the type system such as type inferencing, structural types and traits.

Pete Muir's Introduction to Web Beans reassured me that Java web frameworks really are moving towards full-stack environments (UI, persistence and integration), but wasn't too exciting in itself. I wonder if we'll ever get to something like a Java version of Google App Engine.

How to Hack and Secure your Java Web Application is a great title, but things got off on the wrong foot when the presenter spent five minutes explaining the benefits of the wiki ("Everyone has the latest copy of the information!" - you don't say) and it kind of went downhill from there. The only benefit here was learning about the extensive security resources and tools OWASP has created.

I'm looking forward to the videos coming up on Parleys so I can catch up with some of the talks I missed. Were you at Devoxx? Let us know in the comments!

Some other Devoxx postings:
The Java Posse's live podcast
Jasha of Hippo CMS
Guido Kollerie
The Java Blog has an extensive report, starting with University Day 1.

Tuesday, November 4, 2008

intrepid ibex, hp, wi-fi learn to make nice


Ubuntu upgrades usually represent several steps fowards, but they can also take one or two back, at least temporarily.

The process of upgrading to Intrepid Ibex started flawlessly, as expected. I was even happily surprised to see that my AZERTY keyboard no longer switched to QWERTY on the login screen (which it had started doing ever since I'd attempted to hook up a projector. Talk about bizarre side-effects!). But after that high, came a low: I couldn't connect to my wi-fi. In fact, the network card wasn't even being recognised.

Some searching brought me the answer:
Add folowing [sic] lines to /etc/modprobe.d/blacklist

blacklist ssb

blacklist b43
Since I have a HP nw9440 and he or she has a 6515b, I guess the advice applies to many models. What does it mean? I have no idea, but it works!

I'll just add that you'll need to open the file with administrative privileges, for example with:

sudo gedit /etc/modprobe.d/blacklist

Saturday, November 1, 2008

active-pattern


One way to learn about programming is to actually, well, program.

I've been thinking about the Active Record pattern for a while, and how different it is from the three-tier architectures I'm used to. Both the traditional Entity/DAO layering pattern and the API (since you're calling persistence methods outside DAO's) are quite different. Views seem to vary on what Active Record actually is, as Martin Fowler's original description has it bundling data and behaviour, while Bob Martin limits it to pure data structures.

Brief looks at Ruby on Rails piqued my interest. Then, a tiny (semi-finished) utility webapp I wrote on Google App Engine for my girlfriend gave me a first practical taste of Active Record (and of what an environment with out-of-the-box full-stack integration feels like). Currently, I'm writing a small in-house web framework on top of Struts 1 for a client, and I get the feeling that Active Record could be a good way of turning it into a full-stack environment.

I'm aiming, first, for a very simple usecase to get a feel for the pattern: how it affects the overall design, the ORM challenges and integration with existing frameworks, effect on amount of boilerplate, etc. Later, maybe it could grow into something usable by a real-world, basic CRUDing app.

Some of my initial assumptions:
  • ActiveRecords are actually delegating to a DAO-like Repository. This Repository is injected into ActiveRecord instances (dependency injection is handled by Guice)
  • ActiveRecords mirror DB records exactly, except that foreign keys become object references
  • This whole thing is pointless if it doesn't remove a lot of tedious DAO-related boilerplate
  • It must be kept simple
With that, I give you the barely-born active-pattern.

Wednesday, October 8, 2008

purpose

I'm a professional programmer at JavaBlackBelt. I read a lot of blogs, a good amount of articles and a fair amount of books. I watch a lot of videos. And I realised that I was forgetting a lot of what I consumed.

The other day, I was watching Fostering Software Craftsmanship in a Corporate Setting and the speaker stated that writing a book review, for example, was a way of better absorbing its information. Seemed logical to me, so I've decided to do pretty much exactly that, except for every kind of programming tidbit I come across. Well, only the ones that strike me as interesting enough to remember.

This blog's title is of course a more indeterminate variation on Peter Norvig's Teach Yourself Programming In Ten Years.