Jun 26 2007

Java Testing at SGV-JUG

The San Gabriel Valley JUG got off to a great start in Pasadena last night, taking the next steps from its beginnings as a study group. It was a good sized group, with excellent participation.

Here are the slides from my presentation, hosted by SlideShare:

Testing in Java

Here’s a version with notes at the end, and a PDF download, hosted by Scribd:

Testing in Java, with notes

I’ll put the example project code and configuration files somewhere in the next day or so.

Meanwhile, testing guru Brian Marick just posted some resources for test-driven development:

Workbook for Practicing Test-Driven Design

And Will Sargent recently posted example code using EasyMock to verify that a service makes the correct method calls to another object during some tests:

EasyMock Examples

Thanks to everyone who showed up!

UPDATE:

You can browse the code here:
https://sgvjug.dev.java.net/source/browse/sgvjug/UnitTestDemo/

If you have a java.net account, you can get it from CVS here:

cvs -d :pserver:username@cvs.dev.java.net:/cvs checkout sgvjug

Jun 26 2005

Multiple Identities

What’s JavaOne without somebody talking about Mars? This year it’s my turn, and I’ll be talking about “Files from Mars” on Monday at 4:45pm in Gateway 104. Lots of people have seen the cool science planning tool (SAP aka Maestro, which is now running in Eclipse by the way). But it’s a little-known fact that all of the downlink telemetry was processed on the ground by Java. For example, the images were stored on the rovers in FLASH memory, then sent down through an interplanetary data protocol and assembled by software written in Java. Anyway, stop by if you want to hear about how the development of that software might be similar and different from your own project.

In other news, I’ve just joined Seagull Software as their BPM architect. Actually, all of Oak Grove Systems has been acquired by Seagull Software. It’s going to be an exciting year for BPM in general, and I think this puts us in a great position to be part of the moving and shaking. When I’m not attending sessions on SOA, JBI, BPEL, and heckling Tom Baeyens (just kidding, Tom!), I’ll be manning the Oak Grove / Seagull booth.

Because I was signed up to both present a talk and be a booth babe, through separate organizations, JavaOne had me in their system twice. Sadly, they only gave me one badge :-( Oh well, it’s about time I settled down to just one identity!

UPDATE

Here are the slides:
http://www.slideshare.net/dnoble/files-from-mars


Nov 23 2004

Software Classification

Ted Leung referred to Malcolm Gladwell’s ketchup essay in a recent post. It mixed well with other stuff that’s been on my mind. Why are so many categories of software crowded with half-baked implementations of rehashed ideas? Even among the good stuff, which is appropriate and when?

There are differing tastes, different contexts that demand different design and implementation tradeoffs, valid reasons for having packages with identical functionality but different licenses. There are several application spaces that are ridiculously crowded, like web application frameworks, CMS frameworks, and workflow/BPM systems. I think they could all use some clarification about which products are filling what niches. I like what Matt Raible has done
comparing Java web application frameworks. I especially like what Jack Herrington has done with classifying code generation software on codegeneration.net. There’s a section in the original camel book (Programming Perl) that describes different ways to optimize development: for time, space, programmer, maintainer, porter (wave a handsome tip under his nose), and user.

Maybe we can agree on some common language and classifications to organize the crowded application spaces.

The licensing dimension seems pretty well defined, perhaps because of its legal nature. The market leaders here seem to be GPL/LGPL, BSD/Apache, and proprietary commercial, in no particular order. Size of user base can range from individual to small workgroup to large enterprise. Some software is experimental, while other systems are mission critical. Issues of taste might be harder to articulate. The SEI has software taxonomies for quality measures and how software is used. Gartner has its magic quadrant with “completeness of vision” and
“ability to execute” for vendors.

I think it would be fun to use analogies from the food industry. Who wants to be the extra-chunky CMS software? The spicy gourmet process engine? The 64-ounce container of low-budget web app framework? Nevermind, that’s a cheesy idea…


Nov 20 2004

ApacheCon US 2004

Went to the Apache conference, even though we hadn’t put all the finishing touches on the Reactor 6.0 release. Lousy timing! At least they had good wireless connectivity, so I could get some work done during the talks. I wrote up most of my notes on the drive back from Las Vegas, and just got around to finishing them today. (Don’t worry, my wife was driving, not me!) It was good to put some faces to names and hear “from the horse’s mouth” what people are up to. Also got to hang out with a couple guys from the good ol’ days of the CitySearch “technocage”.

Keynote: Wil Wheaton
I wasn’t sure what Wil Wheaton was going to talk about in his keynote. Himself, as it turns out. And the internet. His talk turned out to be pretty entertaining, and had a good point to it. What did I take away? A reminder that the internet has the potential to do good in people’s lives. He’s found a second career because of his writing through and about the internet. He talked about some creative folks who wouldn’t have had a shot except for the internet, and are managing to make a living at it now. Also a story about a friend with cancer whose lifeline of encouragement and support came through Wil’s blog, and how the Penny Arcade folks raised millions of dollars for children’s charities. Plus, he made us laugh at his misfortune.

State of Geronimo
The main reason given for developing Geronimo was that there was no comparable application server with the Apache license. Given the backstory of the folks who left JBoss to form the Core Developers Network and later joined Gluecode, I’m sure there were some personal/political reasons also. But it’s interesting that there was no compelling technical need to develop a new app server. It’s in stark contrast to the Perl folks, who seem to be able to get along with each other much better. There may be some duplication of effort and interesting personalities in the Perl community, but generally everybody releases their stuff to CPAN and doesn’t worry about what modules can be mixed together without violating license conditions. I’d like to think it’s just the commercial interests that mess up the Java culture, but I think it’s more than that. There’s signicant difference in mindset between the Perl and Java cultures that I can’t quite put my finger on. The closest I can do is say that the Perl folks seem to be more focused on just getting the job done. Anyway, back to Geronimo. Their main priority is to get J2EE 1.4 certified, and they’re not allowed to talk about how close they are. Since clustering isn’t in the spec, it’s not a priority for them. Bummer, since lots of things in the spec are much less useful. Geronimo has “last starter” advantages, like avoiding mistakes made by some projects, and reusing pieces from other projects. For example, HOWL sounds very cool.

Comparing Web Frameworks
Matt had released the slides already, and the talk followed them pretty closely. It seemed like Tapestry was shown in a better light than before. I can’t tell if that’s because Matt likes it better now, or because Howard was sitting in the front row. I had hoped to catch Matt at the end of the talk, since I’ve been working with him on a project for Oak Grove Systems. Unfortunately, that didn’t work out. Never did track him down. Regarding the talk itself, I think it underscored the sad fact that the Java community feels the need to keep writing more web application frameworks. There were lots of folks at ApacheCon that were badmouthing Java as bloated and slow. This is an old complaint, and the JVM itself is no longer slow. There’s no more excuse for server-side Java being slow, but it often is. C’mon people, let’s get our act together!

Lunch
Ran into Chris Fry and Perrin Harkins, along with two of Perrin’s current co-workers at PlusThree. Grabbed the last five bag lunches, caught up on things, and had some good discussions.

Logging and Configuration
This was basically just an introduction to commons-logging and commons-config. I was hoping to hear some more advanced uses and wrinkles, but that didn’t happen. Oh well. At least I was able to confirm that commons-logging won’t let you change the configuration after it is initialized. You can change the logging level, but can’t be any more selective than that. Too bad, since I actually want to do that in some applications.

Beehive
It’s cool I guess, but yet another Java web application framework. Good grief. I probably should have gone to the Clustered JDBC talk.

HiveMind
I’ve read a lot about Inversion of Control containers, so I was looking forward to this. Also wanted to hear Howard talk, since he’s done some interesting work. For the Martin Fowler fans who might be wondering why I don’t use the term “Dependency Injection”… well, it just sounds too painful. Anyway, HiveMind does look pretty cool. It’s got some good features to enable reuse and separation of concerns. I was glad to hear that Howard actually had some technical reasons for writing yet another IoC container. Also, he’s practical enough to realize the benefits of being able to incorporate components from Spring, which I would consider the IoC “market leader”. While I’m getting sick of XML configuration files, I think it’s cool that HiveMind lets you generate documentation about your components and dependencies. The biggest drawback from my perspective is a lack of hot deployment. I can see how that would be tricky to handle with a complicated set of dependencies, but there’s a pretty large class of users that can’t live with his suggestion to just bounce the server when you need to swap out components. I’d like to think that the name “lightweight containers” implies “fast and streamlined” rather than ”not as good as heavyweight”. Hopefully it’s just a matter of time until HiveMind is ready for users that need high availability even during upgrades. Meanwhile, I’m sure there are lots of organizations that can tolerate momentary downtime during planned maintenance. For them, HiveMind is now on my list for consideration along with Spring.

Mod_auth_ldap
This talk had more than I really needed to know about mod_auth_ldap, but at least it was good to hear that it’s no longer labeled “experimental” for Apache 2.0. Meanwhile, I was able to find a power outlet to bail out my laptop’s drained batteries so I could get some work done. Despite the fresh power, I was still pretty unsuccesful in my battles with JWSDP and the JBoss classloader.

Intro to Derby
This could be a candidate for replacing HSQL as the embedded database in the evaluation download for Reactor. I know the MercyShips folks have been real happy with Cloudscape for their applications, but I think a big part of that has been the ability to pull the client off the network for a while and sync up with the server again later. It sounds like this feature isn’t really a priority for Derby right now. Oh well, the rest of it sounds cool.

Building Scalable Websites with Perl
This was my favorite talk of the conference. I’m not doing anything with Perl on large websites right now, so it didn’t have immediate practical benefit to me. But he’s a bright and funny guy, so I knew it would be interesting. The subject of query caching brought back memories from doing that 7 or 8 years ago. Wow, I guess the “Internet for the Masses” isn’t so new anymore. No wonder there’s not much buzz around cool sexy technologies for programming huge websites. The stuff that most companies need is pretty mature now. Perl, Mason, pregeneration, caching. It does sound like there are some choices for how you do caching, but Perrin is writing a wrapper that provides a common interface around different implementations. Kinda like the Apache Jakarta commons-logging around log4j and JDK 1.4 logging. Anyway, I jotted down some tips and tricks in case I need them sometime. Pretty straightforward stuff, though Perrin said “you can call them design patterns if it will raise your salary.”

Keynote: Miguel de Icaza
This turned out to be all about Mono, which I’m not really interested in. I was initially disappointed, since the program said Miguel would be speculating about the future. But he’s an engaging speaker, so it turned out ok. I agree with him that there’s plenty of room for tools/technology/etc to make programmers more productive. My favorite part was toward the end when he said “I’m tired, so let’s get to Q&A.” He still had some prepared slides left, so he just flipped through them, saying “read quickly… read quickly… crap crap crap… ok, make your questions interesting.” The first question was something like “Are you confident that Microsoft won’t come after you for patents in Mono?” He had a great reply, “Are you confident that Microsoft won’t come after you for anything you do? Next question.” He did elaborate a little, saying that any patents could probably be shown to be bogus because of prior art. This is all stuff that’s been done before.

WSRP
This is a spec being developed by a committee, and you can tell. Even the presenter seemed a little tired of it. I am glad to see that there are caching semantics with invalidation, though.

Searching with Lucene
This talk reinforced my impression that Lucene looks pretty darn cool. The speaker joked that it might be a short talk, because the library is so simple to use. I’m looking forward to having an excuse to use it someday. The library has been ported to other languages, but word on the street is that the Java implementation is still the best. Ran into one guy who handled searching with Lucene, then uses CORBA to bridge to the rest of the system that was written in Perl. Sounds weird, but he was glad he did it.


Oct 24 2004

Favorite Java 1.5 feature

I haven’t been impressed with most of the new features in Java 1.5 (ok, Java 5, whatever). Much of it is syntactic sugar, which doesn’t strike me as having much leverage. Generic are very cool, but I haven’t decided if I like how Java 5 does them. I can’t believe somebody actually spent time implementing a better for loop. Annotations are powerful, but I’d actually prefer using xdoclet with javadoc tags. But here’s something that I like…

The Synth look and feel lets you define a skin in XML. Pretty nifty, eh?