Thursday, December 23, 2010

Pro Tip: Ask for a 999 Cut

Hello CtJ Nation!

A short post to wish readers a splendid holiday season and a happy New Year. Thanks for staying with me through 2010. It has been a hectic year, and I've been unusually quiet.

As a light-hearted thank you, I'm sharing some links from the Strange Passions sessions at the recent Strange Loop 2010 conference.

I once thought I was an interesting person, but after seeing these talks, one is humbled and entertained at the same time. Wonderful, wonderful stuff.

My favourites are Entering Without Breaking (it inspired the title of this post) by Galen Collins and The Science of Musical Counterpoint and Illusion by Daniel Spiewak. (If it matters, GC's talk is rated-R for occasional language.)

All of the videos are available here.

Be safe, and be joyous.

Tuesday, November 30, 2010

Language Panel

Here is a must-see video from Strange Loop 2010. It features a panel of icons and rock-stars, with another as guest host. The topic is the future of programming languages. It was a true treat to be there.

Some quick thoughts on the video:

Introductions part 1

Notice how the panelists didn't feel the need to list the languages they've worked with. Relative to their achievements, their intros are brief.

There is a calm confidence in brevity. I first noticed this when Dave Thomas introduced himself on the NFJS tour with: "I'm a programmer".

This separates the amateurs from the pros. Pros don't introduce themselves with the number of languages they know (a pet peeve of mine). It is assumed that everyone has worked with a dozen or more. It is true, no matter how impossible, that for every person in the room, there is someone else who has seen more languages.

Introductions part 2

Kudos to Alex Payne for paying respect. It struck me as sincere.

Introductions part 3

Guy Steele is one classy guy. Note his emphasis: he likes all languages. Each one has value and its own charming quirks. We get the sense that Guy is more interested in solving problems than the current fashion of the industry. He has an air that inspires me to take the high road, and stay above the language wars.

Language Wars

Alas, Guy's angelic aura only lasts for so long. The unvarnished truth is that I'm weak, and I can't resist language wars. Though the gang were rough on Perl, Crockford's irreverent non-comment on Parrot, near the 30:00 mark is priceless.

My Non Question

I nearly asked a question about escaping the surly bonds of ASCII in future programming languages. Unfortunately, I became distracted by my inner voice:

  • Is this a dumb question?
  • Am I asking this to impress the panel? To impress the audience?
  • Didn't Guy Steele, in a keynote, have a Unicode symbol in Fortress? Why wasn't I paying closer attention?
  • How could I travel 1800 miles for a conference and not have prepared a few questions?
And so on. In the end, I played it safe and sat on my hands. Though I may have avoided an embarrassing moment, I also passed up a chance at potential insight.

Lesson learned: brevity rocks; reticence sucks.

Friday, November 12, 2010

https download with Internet Explorer

I strive to link to posts that have saved my team's bacon, as a modest payback. It might help search engines, and will certainly help me remember the experience, in the event I encounter it again.

The problem: Internet Explorer won't download a document (e.g. an Excel report) via https.

The cause: probably cache-prevention in the headers, per Eric Law's post.

The bonus: Eric mentions Fiddler. That tool might be very useful in general, though I haven't tried it.

Keynote to 2-up PDF

This post is simply grateful linkage to a useful post by Alex Miller.

For a conference or business presentation, you may be asked for a 2-up B&W PDF. If you are like me, the first question is: "what is 2-up?" That question is answered here.

Easy. The next question is: how do I do that in Keynote? Alex's post gives the steps.

Sunday, November 7, 2010

JavaScript and Expense Reports

This is a loosely-connected collection of thoughts stemming from the recent Strange Loop conference and a book purchase.


For years now, I've known that thoughtful developers:

  • separate the JavaScript language from the DOM and wretched browsers
  • appreciate JavaScript as a lovely language inspired by (surprise!) Lisp
So, I thought I "got it". Aside from the usual web development, I've even written significant production code in ActionScript in 2003-4.

But I didn't truly learn the language.

It fell into the dreaded Multi-Month Void of Cognitive Decay (MMVCD).

Here's what I mean: I only faced JavaScript every 3-6 months or so. When it did show up, the situation was urgent, and I felt as though I had to re-learn the basics. Previous 'lessons learned' were quickly lost in the fog of war. I gradually associated the frustration of re-learning with the topic itself.

In this sense, poor JavaScript joined CSS and expense reporting software, falling into the dreaded MMVCD, a random window of cerebral entropy lasting between 3 and 18 months.

(However, even in its worst hour, JavaScript was certainly better than either expense reports or CSS, both of which occupy the darkest corners of MMVCD)


Many friends have been interested in JavaScript (some in a career-altering way, no less). Many recommend Douglas Crockford's JavaScript: the Good Parts. It is mentioned frequently at conferences and user groups.

The tipping point was this review by Witek Radomski:

I used JavaScript as a garnish for web development... I was afraid of it. I knew I needed to confront the language and learn it properly.
Yow. This person saw into my soul. In fact, that review led to my recognition of the MMVCD.

JavaScript: the Good Parts

This isn't a book review, but: the book is a delight. Minus the appendices, the book is 100 pages in 10 chapters. That is an object lesson for authors and publishers alike! (I would love to know if Crockford faced pressure to add pages.)

What's more, the premise is a winner: a language can contain a beautiful, subset within a complex, (at times) unappealing landscape.

Random Thought #1: Chained Dictionaries

On SE-Radio, someone once joked that Lisp is nothing more than an abstract syntax tree. Funny stuff, and not entirely fair (I believe it is a comic reduction of an earnest point by Paul Graham, though I have no link to support that). Yet there is certainly a grain of truth in it.

My mental model of JavaScript: it has collections of properties. JavaScript does not call them dictionaries; I will. Dictionaries can be chained. A property may be a function. That's it: simple, elegant. Though this is neither fair nor accurate, that idea leaps to mind frequently.

Random Thought #2: Inheritance is an Interface

Scott Bale gave an excellent talk at Strange Loop 2010, based on Crockford's book. During the talk, it struck me: when we learn that a language offers inheritance, it is a fallacy (and audaciously Java-centric) to assume the existence of classes. Classes are merely one implementation of inheritance.

To wit, inheritance is an interface. It is a conceptual contract.

As most will already know, JavaScript offers prototype-based inheritance. This is a different ballgame, but must be understood, if we are to comprehend JavaScript. Crockford banishes the pseudo-class-based inheritance of JavaScript out of the Garden of Good Parts.

(As an aside, Crockford uses the terms 'prototypal' and 'classical'. I think this is a poor choice. To me, 'classical' has connotations of timelessness or an ideal. It took me a long time to realize Crockford doesn't mean to imply that.)

The Upshot

If, like me, you find JavaScript to be in the Multi-Month Void of Cognitive Decay, Crockford's book is a gem. I'll be working through it.

I realize there is now a book on HTML and CSS, but I don't think I have the stomach for it. Ping me when Expense Reports: the Good Parts is available.


Be sure to check out the comments for interesting links on JavaScript material by Lambda Loungers.

Sunday, October 17, 2010

Strange Loop and Campus Memories

I've returned from Strange Loop 2010 in Saint Louis.

For photos, presentation materials, and other reviews, check out the Twitter feed.

This year, I'm not writing a full review or even my usual "random walk" through the conference. This is a quick, lyrical appreciation of the vibe. Future posts may include personal insights, one at a time. This is to serve my readers, who (correctly) point out the declining frequency of posts on here.

First Days on Campus

Recall your first days on a university campus, or imagine them from a Hollywood film.

It is a brilliant autumn afternoon. The crisp bite of the morning chill is gone, and the trees display their fiery leaves in the sun.

Everywhere, there is energy. Outside, people hustle and bustle from one building to another. Along the paths and roads, the chatter is constant. Some are merely coordinating the next stop. Where is it? When is it?

But most are sharing ideas. The ideas initially come from respected professors, who set student minds ablaze. Then new thoughts arrive via inspiration; others are borne through rigorous debate. Somehow, they culminate in a virtuous cycle of intelligence and enthusiasm. Like the morning chill, cynicism and defeat cannot exist in this environment. The energy burns them off.

In a season of change, humanity and nature join in a triumphant, zen sense of here and now.

Strange Loop 2010

The 2-day conference brought me back to my first days on campus at grad school.

That was the vibe. In my mind, there is no higher praise.


For those not on Twitter, a final shout-out to all my tech friends in Saint Louis and beyond. It was terrific to catch up, and I only wish I had more time to chat. See you again soon.


For details, my friends Weiqi Gao and Mario Aquino have posted excellent reviews.

Saturday, September 25, 2010

Moving Details


In case this helps anyone, Here are details about my recent international move. This is definitely a niche topic: no worries on skipping it. I wish I had this info when I started, and want to contribute back to the hive-mind.


This is a journal of my experience, and not advice. I hope this opens eyes to topics of research, but ultimately, you are on your own.

Although the experience was a lot of research, with seemingly unending paperwork, this post is not intended as criticism toward Canada or the USA. Any comments disparaging either country will be deleted.

Executive Summary

I am a Canadian who returned after working for several years in the USA (legally, on TN Visas). I have no dependents and didn't own a house.

I found that there were three areas of concern:

  • stuff
  • finances
  • car
My stuff was straight-forward. My finances were difficult. My car was surprising.

My Stuff

I went with professional movers for my furniture and books. I packed important things (e.g. guitars) into my car and drove separately.

Following instructions from Canada Border Services, I prepared a manifest that enumerated each box / item, with an estimated value for each. Per instructions, it isn't necessary to list "each pair of socks". My approach was to generalize clothes and books per box, but to list electronic equipment and guitars separately.

The list has two sections: stuff in my car and stuff "to follow" (that is, on the moving truck).

I arrived at the border before the truck, and showed the Canadian border guards the list. I paid duty on the vehicle (see below), but IIRC, I was exempt from duty on my belongings, given (a) everything was older than 6 months and (b) I was granted credit for every year that I was away.

Despite having a delivery window of 3 weeks, the movers arrived 6 weeks later. I met them at an airport, which served as a port of entry / customs. I presented my manifest list and also the paperwork I had signed at the border.

The downside of pro movers is the expense and the high likelihood of delayed arrival. I had considered U-Haul but that approach has its own issues, which are obvious.

My Finances

I'm not going into gory details here. My main lesson is that I was wise to check with financial institutions about becoming a non-resident. First, it will be an extremely good test of a brokerage's customer service: it is an exotic question.

From what I can tell, a US resident can certainly have holdings with a financial institution, but upon leaving, there are restrictions on activity. e.g. One cannot make transactions. It was never clear to me if one could simply leave the account open, without doing further trading. Most of my moving research was spent on this question.

Another option is to liquidate. Depending on market conditions, this could be suicidal. For 401K accounts, it is definitely painful and drastic.

A final option, for residents of Canada and the USA, is a cross-border brokerage. They are typically licensed to trade in both countries. However, these brokerages have a niche, affluent market and have the leverage to charge steep fees.

Note that I haven't mentioned taxes. For me, that research lays ahead, due to the timing of my move.

My Car

First, a car is not automatically welcome in another country. e.g. Canada does not accept all US cars. I checked mine against the list at the Registrar of Imported Vehicles (RIV). Thankfully, it is welcome (as most are).

For the Canadian side, I did the following:
  • Before moving, get a letter from your local dealer that any recall work has been performed on the car, or that it is clear of recalls.
  • Estimate the value of your car in the destination of your move. This will be used to calculate duty at the border.
  • After crossing the border, within 30-45 days (check documentation), the car must undergo a federal inspection. The paperwork is faxed to the RIV. The RIV will mail a sticker that affirms the car is formally a Canadian vehicle.
  • The car must also undergo the typical provincial inspection and registration.
That's some work, but wait, there's more!

There is an American aspect to vehicles: one must contact the American border (at the point of departure), 3 days in advance, to alert them that you are leaving the country. They want VIN, title, etc, faxed to their office.

I discovered this about a week before my departure. Be sure to verify that they received the information. Vehicle titles are a challenge for a fax machine. There is no charge on the American side. (This is probably a procedure to curb theft.)


I've already blogged about my personal decision and my admiration for both countries. This post is sheer logistics, without the sentiment.

If I were to do it again, I would consider selling my car before the move, paring down my belongings to an absolute minimum, and choosing U-Haul.

I would also be very careful about investing in a country without a long-term plan (e.g. for retirement).

The ultimate lesson is to do homework, and find professionals that you can trust. Just as you need a doctor and a dentist in life, in this arena, you need a cross-border accountant, an immigration attorney, and a financial planner.

Thursday, August 5, 2010

Strange Loop 2010: a rhapsody

"Dammit, Alex!" Our hero sets down his glass of Crown Royal, and rubs his eyes. The LCD monitors glow, lighting the dark cottage like a cyber fireplace. Outside, a loon's forlorn call pierces the still night, echoing along the moonlit, glassy lake. Soon, it will be daybreak.

With a furrowed brow, our man returns to planning his trip. We know this much: he will visit Saint Louis in the fall. A triumphant reunion with friends and, perhaps, with an unrequited love from Spain (with whom he might have had a torrid fling, if not for an unfortunate Google translation of 'NP-Hard problems', over tapas).

"Focus, man!" The question is: when?

The sentimental choice is mid-November. He could celebrate his birthday with friends. The Saint Louis International Film Festival doubles the allure, providing a perfect book-end to last year, when a wretched Romanian movie gave him startling insight. Late October works too, when cherished non-tech friends will gather to remember a weekend spent, with no electricity and a lone bottle of absinthe, in a Kansas City bus terminal. Nasty stuff, that KC.

And then, there is the rub: Strange Loop on October 14-15. Our hero is torn. It would be great to see his geek compadres again, and Alex Miller has assembled a line-up that is a tech Murderers' Row. But, the timing is tricky. As are the logistics. There are other choices: SLIFF, Halloween, la mujer! There are a dozen reasons why it just won't work!

With drink in hand, he rises to his feet and looks down at 'Coders At Work', laying open on the desk, radiant in the cyber glow. Zounds: the table of contents reveal interviews with Guy Steele and Douglas Crockford.

Both men are keynote speakers at Strange Loop 2010. Early-bird registration ends August 6th.

"Well done, sir.", our hero smiles. "Checkmate."

Monday, June 28, 2010

Settling In and Spooling Up

This post is overdue, but as a shout-out to friends to whom I've not yet emailed, I've made it to eastern Canada, even if my belongings have not -- yet.

It has been a long journey, from a touching series of farewells in Saint Louis, though the ~1800 mile drive that touched 11 states and 2 provinces.

Though not completely 'settled in' just yet, I am definitely spooling up: I've been at the new gig for over a week now.

Because of the job search and subsequent move, there is a fairly large backlog of ideas for blog posts. We'll see how far I get, but I suspect the next post will be a public service to a distinct niche audience: detailing the aspects of an international move. I'll post some of the facts that I wish I had known when I started.

Monday, May 31, 2010

A New Chapter

For most of us here being islanders is a terminal condition.
But those who go away aren't cured.

They simply die of the same ailment on alien soil.

-- Frank Ledwell, The North Shore of Home

After more than a decade in St Louis, and much introspection, I am moving back to my home province, Prince Edward Island.

My friends and family know that I have been torn between (a) terrific friends and an increasingly hot tech scene in St Louis and (b) the distance from family and the tortures of holiday air travel. Thankfully, the burgeoning tech community on PEI has opened doors for me, and I've summoned the courage to recognize priorities outside of my career.

I'm tempted to thank individual people in St Louis, but the list is simply too long and I'll be sure to miss someone. Though there is some overlap, here are some key groups, relating to tech:

I've been attending the St Louis Java User Group for many years, and countless presentations. It is such an enduring fixture in St Louis, and I appreciated the sponsors (and frequent speakers) so much that I applied to work there (see below).

As a big Groovy fan, I've enjoyed the Gateway Groovy Users Group. It terrific to have a dedicated group for Groovy and Grails, and the organizers are first-class.

The biggest splash in the last few years is, undoubtedly, the Lambda Lounge. Some wondered if the St Louis area could support a user group dedicated to eclectic, hardcore nerdiness. The answer is a resounding yes!

A big thanks to everyone at OCI / Advantage. I've grown so much in terms of interesting clients, writing, giving presentations, and from observing my colleagues do the same. I love the college-style culture, and am simultaneously inspired and humbled by your talent.

Most of all, thanks to my friends from the various gigs, user groups, conferences, and pub nights. It has been a great run, with some fun stunts along the way.

I plan to visit regularly, so between this blog, Twitter, and return trips, we'll stay in touch.

To the geeks in the Maritimes: please get in touch! I'll be eager to meet up and talk tech.

ps. The quote is by the late Frank Ledwell, a former English prof at UPEI, and a beloved Island poet. I found the poem both charming and haunting when I first read it, in 1991, and have never forgotten it.

Monday, May 24, 2010

10 Thoughts as an Attendee at NFJS

(Full disclosure: I work for a sponsor of the Gateway Software Symposium and, this year, was also a speaker).


Rather than write about obvious trends (e.g. document databases are hot) or review big name speakers (how can you not know Ted Neward, Neal Ford, and Ken Sipe !), I thought I would write some quick thoughts about GSS 2010 as an attendee. Another post will be about my initial stint as a speaker.

Use Evaluations

Jay Zimmerman made an excellent point: when speaking, take every opportunity to use evaluations at your talks, including your local JUGs. If your JUG doesn't have evals, then make your own!

LiquiBase and My Team

I really enjoyed a talk on LiquiBase and Agile DB Development by Tim Berglund. He described a category of problems / solutions with which I was only barely aware. He highly recommends the book Refactoring Databases, and I'll definitely check it out.

Interestingly, when describing the talk to a close friend and colleague, my friend told me that his team was using LiquiBase. I was stunned. We work on the same floor, and yet I didn't know this. We all know conferences bring people together, but often it is within the same department.

Hawthorne Effect / Psychology

Several talks reminded me of how much psychology (and neuroscience) comes into play in software development. As one example, check out the Hawthorne Effect (as explained to us by Neal Ford). What's more, use it on your team, and in your personal life. e.g. For me, I exercise more often if I track my distance / rate, so that I know where my personal trend is headed.

Visualizing Code

Neal Ford gave a talk that listed a dozen tools for viewing code in weird and wonderful ways. The best part is that I wasn't familiar with any of them. It feels like a violation of intellectual property to enumerate them here in a garish list, but as one example, check out Code City.

Books == Quality

A former mentor of mine said that he has noticed that he can tell the best developers by what they read. Always ask your friends what they are reading. Seek recommendations everywhere. Some favourites from the NoFluffers are Predictably Irrational and the Design of Every Day Things.

Virtualization Imperative

Virtualization is going to be commonplace. I realized the following, during a excellent talk by Pratik Patel: with free options for virtualization software and the OS, we have no excuse not to try this at home. We should experiment so that we are ready for the inevitable in a corporate environment.

Fault Lines

Tim Bergland gave a talk on Decision Making that included team dynamics. He used an analogy of fault lines to represent the divisions that can occur across teams. Wonderful stuff. This is precisely the phenomenon that happens between DBAs and devs, testers and devs, and, of course, managers and everyone else.

I don't have time to explore this idea further, but are there hidden fault lines? Do we intuitively partition our teams across sociological lines that, strictly speaking, do not belong in the workplace? (e.g. age, religious views, political stance). It's something to consider, and the answers may not be pretty.


Brian Gilstrap asked the Expert Panel about specific instances of failure. It was interesting to see how the panelists chose to define failure, and how the scope could range from the individual, team, or organization. Though good stories come from brilliant innovation or clever design, the best tall tales come from failures.

Nate Schutta made a great point: civil engineers around the world will study a report on why a bridge collapses. Though proprietary code is an issue here, why don't software engineers do the same?

Don't Fear Reinforcement

I noticed several friends attended talks on subjects with which they were familiar, as they wanted to pan for a few more gold nuggets from the talk. e.g. James Carr gave a great talk on Mockito. I've been using Mockito for some time now. There is an argument for me to broaden my horizons, but I went to the talk and had some revelations about Mockito's Spy object.

10 Year Arc

I attended NFJS shows in St Louis for nearly a decade, and almost always in the same venue. It's become a fascinating reference point as the years go by.

Technically, if we had an animated graph across that timeline, you would see some technologies appear and disappear (XSLT), while others grow strong (Grails). Some of them are continually berated and yet refuse to die (Swing).

I've seen speakers make a point in a given conference room, where Dave Thomas made the same point, possibly in the same room, years before. I've seen Mark Volkmann ask the expert panel "what is the next big thing?" circa 2004. Today, we would find the answers either quaint or downright prescient (re: languages on the JVM).

There is a piano in the lobby of the Marriott West. Once, I wondered how marvelous it would be to play it. Though barely an intermediate, I now brazenly sit down at it, and gleefully bang out a hamfisted tune.

Over the years, that piano has seen a lot of speakers, attendees, trends, and technologies.

But mostly, it has seen changes. I will remember it fondly.

Wednesday, May 19, 2010

No Fluff, Just Stuff in St Louis

Like James Carr, the upcoming Gateway Software Symposium will be a mix of new and old for me: I've attended many (probably every one of them) over the years; this year, I will be speaking on Gradle.

I've been studying Gradle exclusively in the past months, and look forward to exploring my findings in the session. I'll have gone full circle from a heckler in the back (not really) to being up front and center.

Just as much, though, I look forward to the energy from the speakers and the crowd. I have always been an unabashed fan of NFJS: it was an excellent idea right from the start. Be sure to say hello at the show....

Sunday, May 2, 2010

Just Do Something

Hello from CtJ HQ! It has been a long spell since posting. There are reasons why, but mostly pedestrian excuses.

As many do, I have spells when I break out of my usual rhythm. Usually, this pertains to exercise or practicing a musical instrument.

In these cases, I've learned to "just do something".

For example, if I'm out of my routine for the gym, the experience of being a (former) triathlete makes me feel like my first work-out should be a dandy. This leads to pressure, which causes fear, etc. The "deal" is that it is OK to just run a couple of miles, at any pace I want. The true goal is to start again, with a pleasant experience; the means to the end is: just do something.

This simple idea has helped me tremendously in the past, and now via this post.

Wednesday, January 27, 2010

Rosetta Stone for Java Build Tools

A previous post introduced the idea behind Easter's Eggs: quality examples that I'll use for reference and am sharing with the world.

My latest effort is a modest work in progress. The idea is to build a Rosetta Stone example for Java build tools. In particular: Ant, Ivy, Maven, Gant, and Gradle.

It's called Easter's Eggs for Build Tools and is hosted on GitHub. (You can download without an account.)

My main motivation is that most build tools have solid examples, but when dealing with build issues, chances are, I'm in a hurry. I don't have time to understand some new, contrived example. And for new tools, I don't care about bells and whistles. I just want to see something that works!

Consequently, I decided to develop the same examples across different tools.

Currently, it features only a simple project containing a POJO, a Hibernate mapping, and an integration test. This project is expressed in several forms, and the test should pass in each one. (Consult the respective README.txt)

I don't envision many more projects, but I'd like to develop a multi-project example and probably a war file.

Some of the examples took serious effort, as I'm a newbie to some of these tools. I sincerely hope this helps someone who is looking for a foothold.

Feedback is always welcome.

Monday, January 25, 2010

Syntax Highlighting on Blogger

A big shout-out to your friend and mine, Ken Sipe, for his recent post on adding syntax highlighting to Blogger. (And many thanks to Alex Gorbatchev for the original work.)

Some notes:

My experience matches Ken's, in that it is best to put the links just before the </head> tag.

The highlighting doesn't take effect when writing the post, or in preview mode (presumably because the templating engine isn't emitting the head section). You have to publish it.

One trick for initial testing is to add highlighting to an older post that contains code, and republish.

Finally, don't limit yourself to the list on this excellent post. Chances are, your language has support (e.g. Groovy).

5 Words on Test Organization

Instead of this:

void testCallListReportData() {
controller.programService = programService
def program = Program.findByName(Keys.PROGRAM_ABC)
assertEquals Keys.PROGRAM_ABC,
def student = Student.findByLastName(Keys.STUDENT)
assertEquals Keys.STUDENT, student.lastName =
def reportData = controller.callListReportData()
assertEquals Keys.PROGRAM_ABC, mockParams['PROGRAM_NAME']
assertNotNull reportData
def thisMap = reportData[0]
assertEquals student.fullName(), thisMap['STUDENT_NAME']
assertEquals Keys.CONTACT_EMAIL, thisMap['CONTACT_EMAIL']

Prefer this:

void testCallListReportData() {
controller.programService = programService
def program = Program.findByName(Keys.PROGRAM_ABC)
assertEquals Keys.PROGRAM_ABC,
def student = Student.findByLastName(Keys.STUDENT)
assertEquals Keys.STUDENT, student.lastName =

// test
def reportData = controller.callListReportData()

assertEquals Keys.PROGRAM_ABC, mockParams['PROGRAM_NAME']
assertNotNull reportData
def thisMap = reportData[0]
assertEquals student.fullName(), thisMap['STUDENT_NAME']
assertEquals Keys.CONTACT_EMAIL, thisMap['CONTACT_EMAIL']

Monday, January 11, 2010

Easter's Eggs for Groovy

This blog receives many hits for "Groovy file" and "Groovy IO". To help newbies with Groovy, and for my own reference, I've started a small project over on GitHub called Easter's Eggs for Groovy. (Note: You don't need an account to download the project.)

No, these eggs are not hidden tricks to unlock functionality. Define an "egg" to be a small example to get you started with an idea. This project has some basic eggs for Groovy. It is by no means exhaustive, but does offer the following:

  • eggs for Groovy collection methods, regex's, and IO
  • examples of testing in Groovy. In fact, most of the code is in the tests!
  • a build structure using Gant
Please let me know if there are any examples you'd like to see, or if this is useful for you.

Friday, January 8, 2010

Grails tip for internet connections

I encountered the following issue when configuring Grails, and am posting in case it helps anyone via The Google. Thanks to Matt Taylor for the info.

If you receive this error message for a grails command:

Error reading remote plugin list [Connection timed out: connect], building locally...
Unable to list plugins, please check you have a valid internet connection:
Connection timed out: connect

you may think the plugin site is down. Probably not: it's more likely that you're behind a proxy server. Try this command:

grails set-proxy

To determine the values requested, do the following steps:
  • In FireFox, go to Tools -> Options -> Advanced -> Settings and find the value for 'Automatic proxy configuration URL'
  • View the URL and determine the values used for your IP