Friday, December 24, 2010

AMD ganged and unganged memory access

Last year I did a substantial upgrade on my desktop hardware.
Around that time I started noticing an issue with Ubuntu 9.10.
Maybe once a week or every other week the system would lock
up. Whatever was on the monitor would be frozen, keyboard
and mouse unresponsive, computer off the network, only
rebooting would fix it. If I was doing intensive DVD ripping
with dvd::rip it would happen a lot more often, like once a day.
I never observed this in Windows but I rarely have Windows
up for more than a few hours to play games. Upgrading to
Ubuntu 10.04 didn't fix the problem.


Since I've got some time and I'm doing intensive DVD ripping,
I thought I try to troubleshoot this.

(1) The BIOS (GA-MA790FXT-UD5P motherboard) has a 'load
fail-safe defaults' option to load conservative settings, tried that,
system still locks up.

(2) I looked at updating the BIOS. There's one version more
recent than what I've got on this one year old MB. It's a beta
and when I try to install it the flash application says it's got
a checksum error. Scratch that...

(3) Just cruising around in the BIOS menu I found a setting
for memory control mode: ganged or unganged.
Here's some discussion of what this means. Just kind of on
a whim I went ahead and changed this setting to ganged.

So after about 3 days of heavy DVD ripping the computer has
not locked up. Crossing my fingers. I won't really feel sure the
problem is fixed for a couple of weeks since it's so intermittent.

Friday, December 17, 2010

Ubuntu 10.04

It's the holiday season and that means OS upgrades.
I put the Ubuntu 10.10 CD in my home desktop and
tried to boot. It didn't even come up. I wonder if this
is the problem ESR mentioned. I put 10.10 on my two
grandchildren's laptops and didn't have any trouble.

I retreat back to 10.04. OK, boots fine. I'm a little
disappointed it doesn't detect my RAID but I know
how to do that manually.

It detects that I need a proprietary graphics driver
and downloads that... it figures out my USB wireless
device... a simple

mdadm -A /dev/md0

brings the RAID back up.

Wireless networking is unusably slow... there are
brief spikes of activity separated by long stretches with
no traffic flowing. I spent a couple of hours on this googling
and searching the forums. This magical incantation (I
wound up putting it in /etc/rc.local) fixed the problem:

sudo iwconfig wlan0 power off

See this thread.

Problem with hibernate using the 'Shut Down' applet
from the Gnome panel. Hibernation appears to work,
but resume from hibernate doesn't... system comes up
as from a cold reboot, but with networking disabled.
Problem is discussed at great length in bug 499940
and bug 577916, the latter of which appears to be still
open. None of the fixes described other than the
following workaround worked for me.

Workaround: I tried installing the 'hibernate' package
and running /usr/sbin/hibernate from the command line
(as root)... that seems to be working.

Slight bug in evince, see bug 572434. Fixed with

touch $HOME/.gnome2/evince/last_settings

I didn't need to do anything special to get Java and Flash
plugins installed into Mozilla, even running 64 bit. Nice.

It took me about a week to notice this but it seems the
distribution no longer includes the Lightning (calendar)
plugin for Mozilla Thunderbird. Just installing the
plugin from Tools->Add-ons didn't work. There was
some kind of incompatibility with 64-bit Thunderbird.
I was able to get it working by following this thread.

Update: my hibernate 'workaround' isn't really working.
This is keeping me from upgrading on my work box
where I use hibernate constantly switching back and
forth from Linux to Windows and I need this to be
fast and reliable. The last couple of times I tried
hibernate, when I went to resume I just wound up back
at the login screen.

Monday, November 29, 2010

Alternative to the "200 lines kernel patch that does wonders" that you can use right away

I configured this on my laptop a couple of days ago. I can't really
notice any difference so far, but on the other hand it didn't seem
to break anything. Getting ready to try it on my work computer
which is always struggling under the heavy load (VMware,
Eclipse, Weblogic server, SQL Developer, Firefox...)

http://www.webupd8.org/2010/11/alternative-to-200-lines-kernel-patch.html

Monday, November 22, 2010

No Fluff, Just Stuff, day 3

Best presentation of day 3 again goes to Venkat for 'Test Driving
Multithreaded Code'. Concurrent stuff is oddly fascinating.
Venkat: "When I read Goetz' Java Concurrency in Practice, I
realized all my code was broken"

I scored a cool NFJS LEATHER JACKET for attending 5 times.

Sunday, November 21, 2010

No Fluff, Just Stuff, day 2

Cool presentations for day 2 were 'Gaelyk: Lightweight
Groovy on the Google App Engine' by Tim Berglund and
'How to Approach Refactoring' by Venkat Subramanian.

Links:

Try to knockout before you consider mock out
There's an archive of past presentations and code
from Venkat at Agile Developer.
DbUnit
MockRunner
Unitils
Cucumber

Saturday, November 20, 2010

No Fluff, Just Stuff, day 1

I wasn't going to do No Fluff, Just Stuff again so soon after
Uberconf, but I won a free admission from Denver Java
User's Group so here I am. Denver JUG has proven to be a
really amazing resource. I can't recommend it highly enough.

Neal Ford's keystone was great. The best session I went to
was Scott Davis on Grails and CouchDB.

No book sales this time and no laptop bag or knapsack
swag. Feels like they are making some adjustments.

Here are some links from day 1:

CouchDB: The Definitive Guide
Mastering Grails: RESTful Grails
The Vietnam of Computer Science
Walking Skeleton
The Petabyte Age
Post Secret

Monday, November 8, 2010

"Oracle cooks up free and premium JVMs"

This is troubling.

Back in September, Oracle's about-face on opening up the
Java spec suggested they were going to go all Microsoft on us.

I was guardedly optimistic about the recent
announcement of an Oracle-IBM partnership in OpenJDK
.
Would Google, Apache and other big Java players soon join
the team? But this latest news puts that in a new light
and argues against some kind of openness thaw at Oracle.

It is not that different from what BEA was doing with
JRockit, which is a licensed product. Still, you can't help
wondering about Oracle's true intentions towards
free-as-in-beer Java.

Update: Feeling the love from Apache.

More: The Coming War over the Future of Java.

Funny

Apache vs. Oracle: A New Front in the Java War

Flame throwing Apache flees Oracle's Java group

Here's kind of a contrarian perspective from Ted Neward:
Thoughts on an Apple/Java divorce.

Monday, September 27, 2010

-XX:+UseCompressedOops

The September Denver JUG was one of the better ones with two
presentations by Venkat Subramaniam. I went to one of his
presentations at No Fluff Just Stuff maybe in 2007 about OSGi
and he didn't make much of an impression on me, but in this
case I found him to be very energetic and witty, even doing
back to back presentations.

The first one was about Java 7. Java 7 will have a feature to
enhance performance called Compressed Oops, and in fact
this feature is also available in recent Java 6 implementations
through the use of a command line argument,
-XX:+UseCompressedOops. Compressed Oops is intended to
reduce the memory usage of your 64 bit JVM by encoding some
64 bit pointers into 32 bits.

I work on a couple of x86-64 workstations with 64 bit Ubuntu
(Linux) so I thought I'd give this a try.

Well, it seems slightly unstable. After adding
-XX:+UseCompressedOops into the vmargs of Eclipse, I
observed Eclipse intermittently either fail to start or
occasionally crash. This was a really borderline effect that
occurred maybe 3 or 4 times in a week, but when I removed the
-XX:+UseCompressedOops argument the symptoms stopped.

Monday, August 23, 2010

PL/SQL

There hasn't been much cool going on to blog about lately.
At my job they're asking me to work on a PL/SQL
application. My Oracle background is fairly strong but
this is something I've never had much interest in before.
I've worked on a few applications where in my view
the PL/SQL people got out of control and migrated too
much of the functionality of the application into the
database and that is kind of how I feel about this
application.

Anyway I spent the day today getting remote debugging
working in SQL Developer (a cool tool I've been using
for years) and trying to step into the procedure I made
changes to. It's frustrating, though, the procedure
gets called from a package and it seems like the
debugger will step into procedures that are part of the
package but not a procedure that is outside of the
package.

I think I'd like this better if there was an IDE that could
provide all the support for PL/SQL development that
Eclipse provides for Java. I've been using 'search' a lot
because there's nothing to just click on a procedure call
and take you to the procedure definition. The code
isn't even indented consistently.

All the other developers on the team use TOAD which
is a great program but it only runs on Windows.

I don't think either TOAD or SQL Developer has CVS
integration, so there's a common pitfall of the developers
coding directly in the database but neglecting to update
their checked in code. Also, performing a database build
seems to be a bit of a black art... it's not fully automated
and there are only a couple of guys on the team who
know how to do it. Consistent and reproducible builds
do not just happen automatically once you start using
Ant or Maven or whatever but my sense is that Java
is way ahead when it comes to this.

Thursday, July 15, 2010

Denver JUG

So-so Denver Java User's Group meeting last night. The HTML5
presentation was good, but the Ehcache guy deviated
considerably from the advertised agenda and turned it
into a thinly veiled sales pitch for Terracotta. In the plus column,
I managed to beat the odds and bag another door prize book:
HTML & CSS: The Good Parts.

Thursday, June 17, 2010

UberConf

Yesterday's highlights were Emergent Design by Neal Ford and A
Crash Course in Modern Hardware by Cliff Click. Evidently
today's CPUs spend most of their time waiting for memory.

They've been doing the fun runs every morning. I went again
today. There was only one other guy but he said a lot of
people have been doing the 10K at 6:00 AM rather than the 5K
at 7:00.

Good last day. Stuart Halloway's Clojure presentation was the
best thing I went to in the whole show. Really cool technology,
plus I liked the way the presenter took a lot of pains to make
sure everyone got the 'lab' environment for the workshop
installed and working correctly. I haven't thought about Lisp
much lately but it really is a great technology and it would be
nice to see it make a comeback in the context of concurrent
programming on the JVM.

A few random impressions
  • This wasn't super-surprising given the iPad workshop, but I saw lots of iPads
  • The MacBook Pro is still a popular laptop choice
  • Linux finally seems to be catching on. Weirdly, in the past at NFJS I didn't see a lot of Linux but there was a strong Linux presence at Uber. When I got a close look, it was always Ubuntu.

Tuesday, June 15, 2010

UberConf

Best session today was Paul King's Groovy Power Features.
Unfortunately he spent a lot of time on DSLs which I wasn't
that interested in, and he didn't have time to cover a lot of
the material in his long slide deck.

Ted Neward's Busy Java Developer's Guide to Advanced
Collections was also really good. Cool concept of using
Iterators for other things besides just collections.

I went to a couple of Spring presentations that were pretty poor and
left me feeling discouraged about Spring in general.

The Fun Run was a nice change of pace. I brought our dog and she
had a blast. A speeding cyclist startled her and she ran between
my legs and knocked me arse over teakettles.

Monday, June 14, 2010

UberConf

Getting ready for 3 days of UberConf. It's kind of torture because
there are so many good sessions. There are 8 presentations per 90
minute session and in many cases I'd like to see 4 or 5 of them.

Saturday, June 12, 2010

Denver JUG

I finally made it to a Denver JUG meeting this week.
That was cool. I'm going to try to make that a regular
thing.

Friday, June 11, 2010

LOST More unanswered questions

More questions...

What happened to Sayid? How was he brought back to life
after being dead for hours? Why was he like a zombie
afterwards?

What happened to the resurrection pool at the temple?
Why did the waters turn dark?

In retrospect, it seems Ben was laboring under serious
misconceptions during his tenure as leader of the
Others. Why didn't Richard offer him some guidance?
Why didn't Ben ever meet Jacob? Was Ben somehow tainted
by his experience of being healed as a child?

What was going on with the cabin? The show seems to
imply that the MIB was imprisoned there by a ring of
dust or ashes. We saw Bram use the same technique
(ineffectively) in the statue base moments before he was
killed by the MIB, and we also saw this technique being
used to protect the temple. The Smoke Monster is seen
numerous times during the time the ring around the cabin
is presumably intact. Ilana seemed to expect to find
Jacob there; so did Ben. Did Jacob ever live there? In
'The Incident' (flashback to unknown time as well as
2007) and even earlier (Ab Aeterno) Jacob is shown as
dwelling in the statue.

Was there something special about John Locke's dead body
that allowed the Smoke Monster to take on his appearance
for an extended period? In other cases when the Smoke
Monster takes on someone else's appearance, it is only
for a few minutes. The Smoke Monster seems to mostly
assume the appearance of people whose dead bodies he has
recently come into contact with (Christian Shepherd,
Alex) but he also seems able to assume other forms
(Eko's brother, the horse Kate saw).

How did Anthony Cooper come to the Island? Via the time
travel apparatus at the Orchid? Was the 'Magic Box'
real?

What are the powers of the guardian of the Island?
Jacob was immortal, had the power to bestow immortality
on others, and could leave the island and travel about
in time and space. Jacob's adoptive mother was able to
wipe out a whole village and destroy the well they dug.
Was she a Smoke Monster? Did Jack and, later, Hurley,
gain any of these special abilities?

Why did Kate start season 6 up in a tree with her ears
ringing? Was there some kind of detonation? Juliet was
right at ground zero and she survived, for a few
minutes, anyway.

What was going on in the Swan with the 108 minute
countdown, the button and the failsafe?

Why was a submarine the preferred form of transportation
to and from the Island?

For a heroic effort at resolving many unanswered questions
of LOST, see Bigmouth's Big List of LOST Answers.

Wednesday, May 26, 2010

LOST Season Finale 'The End' (2)


____ ____ ___ ___ _ _____ ____ ____
/ ___|| _ \ / _ \_ _| | | ____| _ \/ ___|
\___ \| |_) | | | | || | | _| | |_) \___ \
___) | __/| |_| | || |___| |___| _ < ___) |
|____/|_| \___/___|_____|_____|_| \_\____/


I really didn't want to accept this, but all the
evidence seems to favor it... the Mirror world is
purgatory. Not in a strict Catholic sense or anything
of course, but when Christian tells Jack, "You created
this place" he's referring to the whole Mirror world
going all the way back to LAX, and it's a place
outside of time where the deceased can work through
unresolved issues in their lives before 'moving on'.

There are no troubling issues with people living side
by side in the Island and Mirror worlds, sharing
memories. They are not side by side at all. Everyone
in the Mirror world who is 'real' has died in the
Island world, from Libby and Charlie through Hurley
who may have endured for thouands of years as the
guardian of the island before finally dying.

Charles Widmore's contraption fully activated
Desmond's power to travel in time and allowed him to
even penetrate the barrier of death. He was not
afraid of the Man in Black because he knew how the
whole story was going to play out.

Eloise' weird behavior makes perfect sense. Wracked
with guilt in her life over her abusive treatment and
eventual murder of her son Daniel, in the afterlife
she clings to him.

Jack has no son... David is just an illusory prop to
help him work through his father issues. Probably the
same is true for Helen, who doesn't put in an
appearance at all in the final episode, even when her
fiance is undergoing spinal surgery.

Differences like Hurley being lucky, Locke's father
being a vegetable from a plane crash, Nadia marrying
Sayid's brother, that would seem unrelated to the
detonation of Jughead in 1977, make sense if
everything in the Mirror world is set up to be like
therapy to prepare everyone to 'move on'.

I'm not happy about this at all, but it explains
almost everything.

What does this imply for Mirror-world Aaron and Ji
Yeon? Are they dead-and-reborn real-world Aaron and
Ji Yeon, or just comforting illusions like David?

I'm still baffled by Locke's approaching the church in
a wheelchair and Jack's memory loss and recovery when
he touches the coffin.

ICEFaces

Last year I used a tool called ICEFaces to create an AJAX web application.
It was pretty cool. Here are some of the features and advantages that led us
to choose ICEFaces:

  • Component-based AJAX/RIA/Web 2.0 framework.
  • JSF-compatible.
  • All Javascript is behind the scenes.
  • Client footprint is lighter than other AJAX frameworks because most processing is handled on the server. All the client does is process updates.
  • Security: no application specific Javascript is published to the client.
  • Free/Open Source Software.
  • Good online documentation.
  • Active and helpful forum.
Several developers who had used JSF before but with no knowledge of
Javascript or AJAX were able to quickly come up to speed using ICEFaces,
because it functions as a JSF component library. Once you get the
ICEFaces configuration set up you can just drop in components.

Tuesday, May 25, 2010

LOST Season Finale 'The End'


____ ____ ___ ___ _ _____ ____ ____
/ ___|| _ \ / _ \_ _| | | ____| _ \/ ___|
\___ \| |_) | | | | || | | _| | |_) \___ \
___) | __/| |_| | || |___| |___| _ < ___) |
|____/|_| \___/___|_____|_____|_| \_\____/


There was a mawkish sentimentality about this episode that started
with the weepy violin music and climaxed in the final
scene in the church. Everyone is reunited and gets to go
to heaven together, groan.

'The End' was so full of loose ends, ambiguities and just
holes in the plot I'm having serious difficulty
determining what the writers intended to say. I can't
figure out if they were just incredibly sloppy and
careless or if they're doing this on purpose trying to be
artistic or something.

Many viewers believe that the whole six seasons were a
dream or vision in Jack's mind as he lay dying in the
bamboo grove shortly after the crash. The juxtaposition
of Jack's death in the bamboo grove (where he originally
regained consciousness in the pilot) with the credits
rolling over scenes of the wreckage of Oceanic 815 on the
beach seems calculated to suggest this. Once you start
thinking about this possibility, all the loose ends and
lapses in continuity take on a troubling new significance.
Is this intentional? Are the writers playing games with
us, trying to suggest a number of different possibilities
without committing to anything?

How does Ben get out from under the log?

Jack is seriously wounded and seconds from death (or from
becoming a new smoke monster) in the glowing cave, then
the next time we see him he's at a safe distance outside.

What happened to Desmond? Did he just get up and wander
off?

The glowing cave is the most isolated spot in the world.
Fewer than 10 people that we know of have ever been there.
Who dropped the water bottle litter?

Jack seems to go through recovering his memories twice,
once when he meets Kate after the concert, and again when
he touches the coffin in the church. What's up with that?
Why does Locke arrive at the church in his wheelchair?

For some time I have believed that the detonation of
Jughead created an instability in time and space which
lead to two alternate universes temporarily being equally
"real", and that the instability would eventually be
resolved with the destruction of the Island universe. The
Mirror universe would then fully become the 'real' world.
We saw the people in the Mirror world awakening and
remembering their lives in the Island world. Effectively
the souls of the Island protagonists were transmigrating
into the Mirror world.

In 'The End' there is nothing to indicate the destruction
of the Island world. In fact there are numerous
indications to the contrary. Desmond believes that the
events on the Island are of no consequence but Jack
contradicts him, saying "It matters". A good chunk of the
episode is devoted to the ultimately successful escape of
Lapidus, Miles, Sawyer, Kate, Claire and Richard, as
though we are supposed to care, implying this is all real.

Apparently the intention of the writers is that both
worlds go on existing side by side indefinitely.

People who were 'awakened' in the Mirror world but also
survived in the Island world include Hurley, Ben, Sawyer,
Kate and Claire. Did they all become like Desmond who
seemed to carry on a simultaneous existence in both
worlds? When we saw the dead people in the church
welcoming Jack into the afterlife should there have been
two Kates, two Hurleys etc? (Were there two Kates? Kate
drops Jack off in her car, then we see her again inside,
in a different outfit.)

Bummer for Aaron and Ji Yeon in the Island world, though
at least their parents get to enjoy facsimiles of their
children in the Mirror world.

When Christian says to Jack "This is a place you created
for yourselves", I initally took this to mean just the
church. But a lot of viewers are taking 'this' to refer
to the whole Mirror universe. I would find this
profoundly unsatisfying, but it would explain a few
things. There were continuity problems in the Mirror
world, like Sun and Locke arriving at the hospital at the
same time, Desmond's disappearing wedding ring and the
improbable level of coincidental meetings and subsequent
involvement among the Oceanic 815 passengers. In this
view, the Mirror world is a sort of Purgatory. If so, it
seems problematic that people still among the living are
present there.

Pairing Sayid up with Shannon like that was just lame.
Nadia was Sayid's soul-mate. Shannon was just a fling.
It's as though they abruptly paired Sun up with her
English teacher in the end with all the blurry-lensed
fanfare of true love.

The episode had some good moments, but overall this was a
disappointment. I feel like this was an end of the season
cliffhanger, not a series finale.

A few critiques of the series as a whole, now that it is
over.

Why, after the failed(?) detonation of Jughead, did the
time-traveling Oceanic 815 survivors return from 1977 to
2007? This has never made sense to me other than in the
context of being necessary to take the story where the
producers wanted to go with it.

What do the Others call themselves? It strains
credibility that this was never once mentioned.

Why did it become impossible to have children on the
island?

What happened to all those children that were kidnapped by
the Others? What did they want them for? (To replenish
their numbers because they couldn't have children?) I
realize the producers just changed their minds about where
the show was going and dropped this plot thread but it was
fairly major at the time and it would have been nice to
see this acknowledged with some sort of explanation.

What was Widmore up to? Did Jacob really invite him back
to the Island? Why after taking so many precautions did
Widmore come over to the Island and set himself up to be
caught by the Man In Black? The way they set Widmore up,
he seemed pretty important to the story. It felt abrupt
the way they just dropped him all of a sudden.

Thursday, May 20, 2010

Links

The Nature of Lisp Pretty good article for developers who
have a mental block when it comes to Lisp.

Springing Ahead Toward the Open PaaS New VMware/Google
collaboration. Integration of Spring with GWT. Deploy Spring
apps to the Google App Engine.

Thursday, May 6, 2010

Ubuntu 10.04 LTS

My first experience was with a very old system. It's an old
Dell server with two 400 MHz Pentium II CPUs, 1.5 GB RAM
and SCSI hard drives. I used the Upgrade button in the
Update Manager dialog. It ran more or less all day on this
slow hardware. The download got interrupted once but
it was able to resume without any trouble.
  • System wouldn't reboot. It got the error "Gave up waiting for root device" and came up in the BusyBox shell. There's some discussion of this error here. If I exited out of BusyBox it would then come up. Fixed by adding 'rootdelay = 60' to the boot lines in /boot/grub/menu.lst.
  • Window manager apparently not working. No bar above the windows with Menu, Maximize, Minimize, Close. Can't move windows. Can't change to a different virtual desktop. See this. Workaround: I tried switching my visual effects setting from 'none' to 'normal' and that fixed it.
  • No virtual terminals. CTRL-[ALT-]-FN buttons take me to screens with video confetti or sometimes a flashing cursor. No fix/workaround for this yet.
I tried the upgrade on my laptop. This is about a 2 year old Compaq
6715b with dual core Athlon 64, 4 GB RAM, 320 GB 7200 RPM
SATA drive, wireless. Just downloading the over 3400 packages
took about 12 hours, then it took another about 12 hours to finish
the upgrade. With certain packages it stops to ask you questions
and I wasn't sitting right there looking at it the whole time so it's
likely for a few hours of that second 12 it was just sitting there
waiting at a prompt. At one point wireless was down but it needed
the network and I had to cable up ethernet. When it finally rebooted
I saw issues with Gnome similar to the first system only worse. I
couldn't work around by changing the visual effects. Also after a
few tries most of my panel disappeared. Wireless did
come back up. I didn't really have a lot of time to mess around
and wound up recovering 9.10 from backups.

So far, this is pretty disappointing... 9.10 was a lot smoother.

Lots of people are having this problem. For some switching
window managers (metacity to compiz or vice versa) seems to
fix it:
On my old clunker, I tried creating a new user and everything
worked fine with the new user. So I guess the way to recover
from this is to create a new user, then carefully move everything
but the config files from the old user to the new user.

Second try on the laptop. I tried the procedure described above,
still couldn't get things working with Metacity. Resigning myself
to Compiz for now.

Performance on my laptop OpenGL graphics is terrible.
(It's an ATI Radeon 1200). Also I get artifacts in some
OpenGL applications like Google Earth and SecondLife
(though frankly the Linux SecondLife client has not been
usable for me on any distro for a long time).
System->Administration->Hardware Drivers does not
offer any proprietary graphics driver. Envy does not
support Lucid. According to the AMD web site, my
graphics hardware has been moved to legacy support and
there will be no updates to the driver software after 2/2009.
This didn't work... when I tried running aticonf it said
something like 'no supported device was found'. This
messed up my desktop and even after uninstalling the
fglrx packages the window manager was not working
right. For a second time I bailed on Ubuntu 10.04 and
restored 9.10. It kind of looks like you can't get the
proprietary driver for 'legacy' ATI graphics devices and
the freeware drivers aren't so hot.

Friday, March 19, 2010

groovyConsole

Lately I've taken to using the Groovy Console for all
kinds of little interactive debugging and prototyping
tasks, like working out the syntax of a regular expression
or the sequence of calls to do something with a
Calendar object. How did I ever live without this?
It's incredibly fast compared to writing a test program,
compiling it, running it, repeat...

Thursday, March 11, 2010

JMockit

Using JMockit and this technique, for the first time since I
got interested in unit testing and TDD, I feel confident of
being able to write a unit test for absolutely anything.
Most frameworks don't support mocking final classes
and methods, static methods, constructors... but
JMockit seems to do it all. Unfortunately, so far I haven't
been able to get JMockit working in Groovy. JMockit
uses anonymous inner classes. Groovy uses closures
instead. In most ways closures are better but the lack
of anonymous inner classes does seem to create a
compatibility issue with JMockit.

Friday, March 5, 2010

Spring Roo

Article about Spring Roo at JavaLobby

I think I understand better now what Spring Roo is for. My first reaction
was 'Huh? What do we need this for? Grails does the same thing.'
Roo deals with all the configuration that is one of the biggest costs of
working in Spring, without requiring you to commit to a whole different
framework (Groovy/Grails).

Monday, March 1, 2010

Groovy

I used Groovy at work today. Bwahahahaha. I used it to write
a JUnit test for a private method. I'd have started doing this a
long time ago if I'd realized how easy it would be. It took maybe
half an hour to set everything up.