Tuesday, December 31, 2013

Jewel's Audio Memory Game


An old friend of mine, Vic Douse, has a daughter, Jewel. She loves Disney, balloons, and some video games/apps. She has autism.

Vic is an Oracle DBA during the day, but at night, he has been very active in the autism community on PEI, serving as president of the Autism Society for years. (He won a Queen's Diamond Jubilee medal for his contributions).

Last winter, he started tinkering around with an Android app, despite not coding for years. The result is a simple memory/match game. The UX is... basic. But that's not the point: the point is that Jewel likes to play it. It helps her with her vocabulary.

So, check out Jewel's Audio Memory Game on the Play Store. It's free with no ads. Vic is delighted with each download, so give it a go. It's actually fun in a nostalgic way. My personal best for the 4x4 grid is 36 seconds, no doubt based on lucky strikes.

Wednesday, December 18, 2013

I Just Want A Foothold Example In.... Ruby


I've participated in a few paired coding sessions this year (such as Legacy Code Retreat and Global Day of Coderetreat), and I've experienced the pain of setting up an environment for a new language. It's not necessarily rocket surgery, but for a newbie, it's brutal.

Recently, I've been interested in trying out Ruby (I've always reached for either Groovy or Python first, but after meeting many, many sharp peeps who use it, it's time). To get started, I looked around on the web, but examples seem to jump from code snippets to full frameworks with little in between.

What I really want (for all languages) is a foothold: a simple project that has the usual aspects (code organization, unit-tests, automated build) laid out in an idiomatic way.

In case it helps anyone, I've posted my attempt at a foothold: War-O in Ruby, as a contribution to PEI Devs. It's a work-in-progress, and I'm still a newbie, so feedback is welcome.

Saturday, October 5, 2013

Legacy Code Retreat


Having been home now for 3+ years, away from an urban center, I've been considering a post on what I've learned (good and bad) over that time, as it pertains to crafting software.

This is not that post. However, the following event certainly falls in the good column.

Summerside, Prince Edward Island, punches well above its weight-class when it comes to software. Both Steven R. Baker and J.B. (Joe) Rainsberger hang their hats there, and along with the PEI Developers group, are transforming the tech vibe here on the Island.

As one example, Joe recently facilitated a Legacy Code Retreat (LCR) at the spiffy Holman Centre (no doubt arranged via srbaker). Opportunities like this don't happen often on PEI (though, actually, they are becoming more frequent).

In brief, we paired in five 45-minute sessions with a code base that is brilliantly, wonderfully awful. We practiced specific "rescue and improvement" techniques in a variety of languages.

Here are some quick thoughts on my experience.

What is Legacy Code?

We didn't spend a lot of time on this, but my favourite definition is attributed to Michael Feathers: legacy code is code without tests. I love it.

If you're in a gig that doesn't embrace testing (and with slack-jawed amazement, I've discovered how prevalent that is), adopt this definition. If it doesn't have tests, start referring to the code you wrote yesterday as legacy. It will get attention.

Art imitates Production

The LCR code base appears to be a turn-based trivia game. However, it is replete with dice-rolls, a penalty box, and a board that may or may not be in a Euclidean geometry.

It's a parody, and it's both funny and horrifying. Scary, because it feels so familiar to ghastly production code. That is, code maintained over time by many people, each of them blind and touching an elephant.

Even better, there are bugs! Just when you think you understand the rules of the game, you realize that it is impossible to distinguish between a quirky rule and an outright bug. The code really is magnificently bad, as though crafted by Kafka. (Ed's note: in fact, it was written by Chet Hendrickson).

Pairing

I paired with several people and learned from them all. We might pair at our day gigs, but the variety is fixed in that setting, and ultimately predictable; at an event like this, the environments are truly diverse and fresh.

For junior and intermediate developers, I can't stress this enough. At a retreat, you'll see new languages, editors, virtual machines, techniques, but most importantly, workflow. I paired with jbrains for a session. It was rewarding... and humbling. I thought I was fast but I've rarely seen such speed: mouseless navigation through several tools, all at the speed of thought.

Pairing can be intimidating. That's normal. We often hear empty phrases such as "get out of your comfort zone", but this is precisely that case. It's a fabulous way to learn and grow as a developer.

Tests

A predominant theme for each session was the importance of setting up some kind of test harness before making changes to the code. The harness is almost like a critical utility, such as getting electricity to a disaster site.

No surprise, but this transcended all language implementations, and manifested itself in many ways. For example, one C++ team simply set a fixed seed on a random-number generator and used the Golden Master technique on an output log.

Upshot

True, I haven't written much about specific techniques here. (To find out more, attend a Legacy Code Retreat! Or start with this site or the Feathers book.) But they are useful and interesting, along the themes above. The upshot is: this stuff is important, and fun. It's practice with others who care about the craft. It's hard to imagine a better bang-for-buck for your development as a software practitioner.


Sunday, July 21, 2013

PEI Hacks


This post is intended for keen, junior developers who reside in a community that does not afford many opportunities such as user-groups, conferences, etc. (I'm thinking of small towns in Atlantic Canada, but the main theme applies elsewhere.)

Hey nerds: discover PEI Hacks, and sign up for the day-long hackathon on August 24.

No, really: sign up. It's free.

"Why?". I'm glad you inquired (see intro)...

TL;DR :

It'll be fun and rewarding. You'll meet neat people.

^(TL;DR) :

It will help shape your professional world-view, your sense of reality.

Since I've returned to the Maritimes, I've discovered a small segment of developers who are bright and ambitious, but don't have a lot of experience. Despite all the online resources, books, etc, at their disposal, their world-view ends at the boundaries of the current daytime, 40-hour gig.

That's professional suffocation. A word to the wise: break out of that rut. Never bound yourself as being an employee for Acme Corporation. Work for You Inc. (in spirit, not legally), and honour an agreement with Acme: 40+ hours work for salary, benefits, whatever.

To break the rut, engage with real people, at real events: conferences, user-groups, meet-ups, hackathons - anything. You'll learn a ton of material outside of your daytime focus. You'll be profoundly humbled by talent, and challenged to improve. Generally, you'll be a participating in a broader community, a citizen of the tech world.

Will any of this assist your daytime work? Maybe, but it doesn't matter: this is for You Inc.

Upshot :

Find a mentor and ask him/her about favourite conferences, user-groups, and real-life events. Oh, btw, you'll find some fabulous potential mentors at PEI Hacks. So, come on out and play!

Monday, February 11, 2013

A Simple Code Kata

Hello CtJ nation!

Yes, it's been a long time, but we're still here at CtJ HQ, reading, if not exactly writing. Hopefully, more to come on that front in the coming weeks.

For now, this post is in support of an upcoming session at the PEI Developers Meetup. We'll be implementing a simple Code Kata and possibly extending it in interesting ways.

The Kata

The idea is a simple card game. Ignoring the rules of Rack-O, check out its deck of cards: numbers, but no suits.

The game is described as follows:

Begin with the deck of cards numbered 1 to N.

Shuffle and deal cards evenly to P players and a "kitty". That is: partition N cards (face-down) into (P + 1) sets.

Gameplay for a round:

  • Show a card, face-up, from the kitty.
  • Players all submit a hidden card as a bid.
  • Once all bids are made, the cards are revealed.
  • Highest bid wins the card from the kitty, and its value is awarded as points to the player. 
The winner is decided by most points at the end of the game.  

Notes

I like this kata for many reasons. First, it scales nicely: we could write code for a single round, and eventually ramp up to a game server with concurrent players.

Also, it combines simplicity and variation: it is easy to write an algorithm that satisfies the rules; yet a winning strategy can be dynamic and surprisingly complex. (Thanks to Alex Stangl for an email conversation on this, some years back.)

Finally, we can imagine a "robot wars" scenario where solutions compete against one another. Neat-o.

Upshot

For PEI Devs, think about this problem for the upcoming meeting.

For all, I'm looking for name suggestions (since it is not the game Rack-O). The best I have is Frak-O...

Sunday, February 26, 2012

Funcito: wrap Java methods for FP libraries

On and off, I've been collaborating with my friend, Kevin Welker, on an open-source project: Funcito. This is really his baby, but it has been great fun to be involved (more to come in another post).

Executive Summary

From the FAQ, Funcito is a Java library that simplifies access to functional programming APIs by wrapping Java methods as the function-type objects defined in those libraries. It reduces boilerplate now, without waiting for changes in Java 8.

The syntax (and internals) is influenced by Mockito, the popular mocking framework. However, Funcito is not aimed at testing.

It supports specific interfaces in Google Guava, Functional Java, and Jedi-core. See the project page for details.

Example in straight Google Guava

Here is example code for using Google Guava, using a List of Song objects.

The setup is simply populating the list:


public void init() {
// List<Song> songs is a member
songs.add( new Song("Help!", "The Beatles", new BigDecimal(1.29) ) );
songs.add( new Song("You Had Time", "Ani DiFranco", new BigDecimal(0.99) ) );
songs.add( new Song("Shoot to Thrill", "AC/DC", new BigDecimal(0.89) ) );
songs.add( new Song("Back in Black", "AC/DC", new BigDecimal(0.89) ) );
songs.add( new Song("Indie Song", "Obscure Band", BigDecimal.ZERO ) );
songs.add( new Song("Demo Track", "College Jam", BigDecimal.ZERO ) );
}

Here is an example test, using a predicate method on Song, isFree(), to filter for free songs:

public Collection<Song> filterFreeSongs() {
// boilerplate alert!
Predicate<Song> isFreePredicate = new Predicate<Song>() {
public boolean apply(Song s) { return s.isFree(); }
};

Collection<Song> freeSongs = Collections2.filter(songs, isFreePredicate);

// size == 2 in example
return freeSongs;
}


Note the typical pattern to build a Predicate, even though the object is simply calling a boolean method. Funcito addresses precisely this issue.

Example with Funcito

Using the same setup, here is the same test using Funcito. Note the proxy object, CALLS_TO_SONG:

// member of class
// using static import of Funcito's callsTo
private Song CALLS_TO_SONG = callsTo(Song.class);

public Collection<Song> filterFreeSongs() {
// using static import of Funcito's predicateFor
Predicate<Song> isFreePredicate = predicateFor(CALLS_TO_SONG.isFree());

Collection<Song> freeSongs = Collections2.filter(songs, isFreePredicate);

// size == 2
return freeSongs;
}


Less boilerplate, with improved readability and a fluid syntax!

The Upshot

If you are using straight-up FP libraries in Java, and want to reduce some of the boilerplate, check out Funcito. It's lightweight with minimal dependencies (either CGLib or Javassist), and can help you wrap up simple Java methods.

Monday, November 14, 2011

Groovy Talk

I recently gave an "Intro to Groovy" talk for a local CIPS chapter.

It was a special evening: I returned to my alma mater, re-united with old friends, and met enthusiastic students.

I assumed the audience wasn't familiar with Java, and so the narrative was a high-level report of the blossoming ecosystem on the JVM over the past few years, with examples in Groovy. The material is available here.

My thanks to those who attended!

Saturday, November 12, 2011

Strange Loop Videos

This won't be news to most readers, but if, like me, you were not able to attend Strange Loop 2011: take heart. The videos are being released online at InfoQ. Here is the schedule.

The lineup is truly outstanding. For more about the conference, check out Weiqi Gao's review.

Tuesday, September 20, 2011

Blogger, OpenID, and Stack Exchange

I'm a big fan of Stack Exchange and have invested a fair amount of time on various accounts on there (mostly Stack Overflow, less on English and Music).

However, I have to admit that I do not keep up with their various escapades with OpenID. I hear about it on the podcast/blog, but I haven't paid much attention.

However, every now and then, it seems as though I can't get into my accounts via my Blogger URL. Not good.

Strictly speaking, I should research OpenID, Blogger's implementation thereof, and then study the trials and tribulations of Stack Exchange. Then, I could summarize it for you, dear reader, and we could reflect, philosophically, on the sharp corner-cases of the web while enjoying a beverage in a local pub.

This isn't one of those posts. This one is simply intended as a modest link-post of gratitude (aka "this worked for me!").

The Problem

When I visited a Stack Exchange site recently, I couldn't login via my Blogger URL, and may not have even been presented with the familiar login icon that I had been using.

One Solution

Follow the steps in this post on JMPinline, including creating a Google Profile and updating with the new links.

Presumably, Stack Exchange uses OpenID 2.0 now and this will upgrade your Blogger OpenID to that version.

Either way, I was immediately able to login to Stack Exchange. My sincere thanks to the original author!

HTH

Monday, September 5, 2011

Your Blog... Sucks

Hello CodeToJoy Nation!

Yes, yes, it has been too long since the last post. The internet has weighed in, and we have noticed.

Your friend and mine, Weiqi Gao, notes that "Nobody I know posts much any more".

The inimitable Nate Neff wrote to me with a succinct critique of my writings in the last year:

Your blog... sucks.

Well. On the evidence, assuming small, frequent updates are important (which is fair): guilty as charged.

However, I don't consider this blog defunct at all; in fact, I often talk about "the glory days" from a few years back.

I've been grappling with writing an annual retrospective, now that I have been pursuing a new chapter for over a year. The trick here is that challenges and triumphs have been much more on the soft side of software: team dynamics instead of technical innovation. I wrote an article along these lines for the NFJS magazine back in April. The article drew on years of experience, but the inspiration originated in my new world.

As I write this, I realize that I'll have to shelve that post and simply post smaller chunks. Stay tuned! I'm still here.

Sunday, June 19, 2011

Maritime DevCon 2011

I'm back from a jaunt to Fredericton, New Brunswick, for Maritime DevCon. Here's a post that lies between a 'random walk' and a review.

Background

From PEI originally, I've spent most of my career in St Louis/USA. I've been an active member of the user group/conference scene there. When I moved to the Maritimes in 2010, I wondered if I could find 'my people' who can/read write in the original Geek.

The upshot is: these are my people. This one-day event was a gem. The organization was first-class (good food, killer door-prizes). The topics were interesting and straddled the fence between pragmatic and esoteric-but-neat (reminiscent of Strange Loop). Most importantly: the 'spark' was there; that palpable energy that naturally spins out of conversation between interesting techies.

Venue

Maritime DevCon was held at the Wu Centre at the University of New Brunswick. About 70 people attended, notably giving up a Saturday to spend time talking tech.

Talks

Here is the schedule. I attended these talks:

OpenStack 101 (by Sandy Walsh)

I'm not especially familiar with cloud computing, or virtualization, so I was surprised to learn that Open Stack is a huge initiative among big players (e.g. Intel, Cisco, and... NASA!?). The architecture involved here is mind-blowing: will the real platform please stand-up?

Random thoughts:

  • I often wonder if programming language X will be the Next Big Thing. Though it is in a different scope, virtualization is Right Now. Every time I think I have an appreciation for its influence, I see another talk where the landscape has changed ever further.
  • Pythonistas unite! Though thinking at this level often reduces the programming language to an implementation detail, I was delighted to hear that the underlying system is written in Python.
Redis (by Peter Doan)

At other conferences, I've missed talks on Redis, the key-value store. On the way to NB, I listened to a changelog interview with the author, Salvatore Sanfilippo. Consequently, I expected a simple, near-minimalist API, and Peter confirmed that with his code examples. Works for me.

Natural Language Processing with Java (by Chris Nicholls)

Interesting piece on the state-of-the-art in NLP, especially sentiment analysis. The two main libraries are LingPipe (not free) and Apache's OpenNLP. I hadn't thought about NLP in a long time, and certainly not with respect to Twitter: (a) Twitter could be a gold-mine (b) '#' is a legit, vital punctuation mark.

Git (by Chris Dail)

This was a thoughtful, solid intro to Git. I've been away from Git for awhile, so this was useful refresher, and pulled together a couple of tectonic plates floating in my consciousness.

I especially enjoyed a section described branching in terms of highway lanes rather than trees. I appreciated anecdotes about using the Git client for Subversion as a rebel effort to 'subvert Subversion'. Note that Chris has a detailed blog post about migrating from Subversion to Git.

Node.js (by Justin Vaillcourt)

Node is another topic that I haven't seen yet. For this talk, as my friend Weiqi Gao would say: you had to be there. This was pure, unadulterated hackage, executed by a pack of young, feral dogs with unbridled enthusiasm for technology.

Justin grinned though an abbreviated talk that ranged wildly. Just when frat-house interactions with his posse threatened to steal the show, out came jaw-dropping illustrations of Node.js.

A key example used the socket.io package:
  • a visitor hits a website and scrolls around
  • an admin console shows a thumbnail of page the visitor is viewing
  • as the visitor scrolls, navigates in his/her browser, the thumbnail scrolls in the admin console
This was done about 150-200 lines of Javascript. I don't know if this is a strong Node example. I'm still trying to wrap my mind around it.

MongoDB (by Derek Hatchard)

As with Redis and Node, I'm familiar with the buzz of MongoDB but hadn't looked into it. From the perspective of presentation techniques, this was a strong talk. A good arc from the motivation through to code examples, with images instead of bullet-lists.

Like Redis, the MongoDB API is deceptively simple. It's hard to appreciate the power. I was happy to see explanation of sharding with MongoDB, and very happy for an introductory theme on "no silver bullet", applied to relational DBs and NoSQL tools.

Suggestions

My main suggestion is that the sessions should have written evaluations. This benefits the speakers, the organizers, and ultimately the attendees. Also, there should be an overall conference evaluation.

Bottom-line

It is non-trivial to travel from PEI to Fredericton, but DevCon was worth it. The material and the energy felt like events in larger urban centers, and that's saying something.

A shout-out to Derek Hatchard, other organizers, and sponsors: thanks! I'll be back next year, as an attendee (or possibly as a speaker?): after all, these are my people.

Sunday, June 12, 2011

Random Walk Down NFJS (2011)

Long-time readers know that I am a big fan of No Fluff, Just Stuff. There are many posts on this blog regarding reviews, keynotes, pianos, and so on.

Often, I start writing a "random walk" post, intending it to be quick and whimsical, but I end up writing a full review. This one will be quick, otherwise it won't be written, alas. Here we go...

I returned to St. Louis (again!) in May to attend the Gateway Software Symposium. As you can imagine, it was fantastic to catch up with old friends in a familiar environment. Just like old times.

Code As Proof

I attended Venkat Subramaniam's talk on concurrency without pain in Java. The talk was all-code with no slides. A few small examples began with "synchronized and suffer" (his phrase) model and scaled through various techniques, including locks, STM, and actors.

All interesting stuff, but I was especially taken with the elegance of the examples. If you've studied math, you may know the minimalist charm of a proof: there is no excess fat; everything is a direct line from A to B. As a presentation style, Venkat's talk recalled that spirit. Every example added one element to get to the next point.

HTML5

HTML5 officially has my attention. I saw a few talks, and was taken especially with Nathaniel Schutta's session on mobile jQuery. As someone who is notoriously divided on choosing Android versus iOS as a development platform, this blew my mind. A unified UI experience for mobile! I'm still trying to get my mind around the idea (and how to monetize it in the various app stores).

Sonar

The headline: Apache applies Sonar to its projects, as shown here. Matthew McCullough's talk convinced me that this isn't merely a collection of code metrics. With experience, I think a Sonar guru can transcend the raw data and see interesting patterns over time, such as the impact of summer weather on code quality (!). This is a Freakonomics-like enabler.

Crafting Software

Two paraphrased thoughts that really stuck (I hope I've captured the essence).

One from Peter Bell, along the lines of: on initial estimates for a project, give enough time to do the minimum spec, and include time to polish based on feedback from the first cut.

From your friend and mine, Ken Sipe: two major problems with software teams are (1) poorly defined acceptance tests and (2) dysfunction in the daily stand-up. When someone with Ken's experience distills things down to two items, that's powerful stuff.

And The Gradle Will Rock

Ken also spoke on Gradle. I'm a fan, and gave an intro talk back at GSS May 2010. The interesting story here is the growth. There is a lot of industry momentum here, and the training/book offerings are ramping up big-time.

Where's The Groovy!?

I caught Venkat's talk on Spock, and liked it very much. I didn't catch any Groovy or Grails talks, only because I'm very familiar with them. It was interesting to reflect on the history of these technologies. Grails has been 1.0 since Feb 2008! They grow up so fast.... *sniff*

Anapestic Tetrameter!

Nothing stresses me out like poetic meter (pun intended). It is one of a handful of high-school subjects that I just Could Not Understand. When I saw Tim Berglund's tweet that he was working in anapestic tetrameter, I shivered out of reflex. Gah!

Then, at NFJS, Jay Z showed the video. All is forgiven. Tim crafted an ode to Kent Beck's Implementation Patterns. Vote for Tim's vid on DZone. Vote it up on YouTube. It is wonderful.

Thanks

This may sound like trite, blanket statement, but I can't mention everyone. The weekend truly was chock-full of heartfelt re-unions and conversations, on many levels. See you again soon!

Wednesday, May 4, 2011

Meet Me In St. Louis

Hello, Code to Joy Nation (esp. those in Saint Louis)!

Next week, I'll be returning to Saint Louis to attend the NFJS Gateway Software Symposium. I can't wait to be back in town and see everyone!

Long-time readers know I'm a fan of the tour, and think the speakers are top-shelf. Many keen insights and fond memories over the years.

A fond highlight was speaking at the Saint Louis show in 2010. This spring, I wrote an article for the NFJS magazine. Both were true growth experiences for me.

Last year, knowing I would be leaving, I wrote a personal 10 year retrospective, highlighting a certain piano at the Marriott West. Well, tune 'er up! I've missed it.

If you're at the conference, be sure to say hello...

Tuesday, March 29, 2011

Local Website as Tool Belt

Quick, answer this: on your dev machine, how many keystrokes does it take for you to find the documentation for the String class in your current language?

As I've paired with developers over the years, I've noticed a few patterns:

Just Google It

Gah! Consider working on a roof-top, say, at replacing shingles. Imagine needing a tool, and having to go down the ladder to get it. Now, imagine going down the same ladder every time you need the tool. For a professional, that strikes me as painful.

Bookmarks

Much better. If organized well, bookmarks are undoubtedly terrific. A minor downside is that navigating a bookmark hierarchy still takes time. I can't criticize someone who chooses this style, but I can't do it. It's as though we have a toolbox up on the roof, but that it's 10 feet away from where I'm working.

Local Website

I worked with a developer circa 2003 who ran a local copy of Tomcat. He curated his own web pages according to his needs. I thought it was pretty crazy at first, but I adopted the idea.

True, this ain't "rocket surgery", but I just love it. It strikes me as a tool belt, where everything is within reach. Here's why:

Use the home page for your bookmarks

Rather than organizing my bookmarks in a given browser, I simply put my favourite sites on my home page. (As you might guess, the Javadoc for Java, Groovy, etc are front and center.)

The advantages are:

  • You can see a lot more information immediately, just by hitting that big, inviting Home button. I have a geek column, an intranet column, and so on. Rather than navigate a hierarchy, I let my brain pattern-match on the shapes of the categories.
  • You may end up collecting more links that you would normally bookmark. e.g. I would never bookmark the 2011 calendar, and yet this way, I have a link for it.
  • You can add various text, such as the phone extensions of teammates.
Portability

When pairing with someone, often you are at their workstation. How will you find your bookmarks from there? With a local website, you can point them to your page (while you're at, have them bookmark it).

Beyond Web Pages

By having Tomcat on your machine, you are opening a world far larger than mere web pages and links. You can start to share Groovlets with your team. This can be a big productivity boost, and a subtle way to introduce the concept to others. (I've been working on a writing assignment that explores this further. Stay tuned.)

Another bonus: if you need to work up a sanity check with CSS or jQuery, you already have Tomcat installed and running.

The Point

As developers, we love shortcuts in our IDE because we strive for "typing at the speed of thought". If you google something more than twice a week, consider putting it on a local web page. Over the years, I've found it to be very useful.

As always, I'm interested in your tips for productivity gains. Share 'em!

Monday, January 31, 2011

Software Archeology And Video Time Capsules

I was recently listening to Episode 338 of the Java Posse podcast, which is a recording of a session at the Roundup 2010. Near the 19:30 mark, a chap draws an analogy between software maintenance and archeology. Assuming the original team leads are no longer available, he asks (paraphrased):

  • What was the culture of the team?
  • What were the designs/philosophies of the original architect?
  • How can we make those thoughts more explicit?
Software Archeology

I found the moment to be eloquent, and reminiscent of an episode of SE Radio, where Dave Thomas uses a similar metaphor: code maintenance ultimately requires us to understand a culture by analyzing artifacts. Call it software archeology.

Artifacts

We can all name the usual artifacts: an architecture document, UML diagrams, sequence diagrams, and so on. If we are lucky, perhaps there are tests.

Unfortunately, all too often, documentation is formal and poorly written. Reading it for culture is like trying to understand a society by reading its laws: useful, but abstract and without soul. Worse, the documentation may be out of date and only vaguely relevant.

A Potential Solution?

As consumers, we spend untold amounts of money on video equipment, which is both powerful and easy to use. We think nothing of uploading staggering amounts of video to the cloud, documenting our lives, and yet in the corporate environment, nothing. This strikes me as absurd.

In addition to striving for new wikis, language constructions, and formal diagrams, why don't we use video?

Consider this: what if the team lead gave a 1-hour architecture overview, once per release, and it was recorded and checked-in to source control? What if s/he took an afternoon to make a screencast of a random walk through the IDE? That is, what if we treated video time capsules as project artifacts?

For future software archeologists, they would be worth their disk space in gold. Imagine the simple nuances and gems that are so difficult to express otherwise (e.g. "yes, we are bending the usual use of aspects here, but there was a trade show deadline. We hope to address this technical debt").

Note that in my vision, the production quality would be low: these could be one-take, banzai attempts. Naturally, no one can possibly explain all of the corners of a code-base, but this isn't about corners: this is about culture.

Counterpoint

This strikes me as so obvious, that I must be missing something. Perhaps I am simply naive. Arguing against this idea, the main deterrents that I can see:
  • Companies may not be prepared to buy and manage video equipment. In terms of acquisitions and stewardship, it just isn't part of their DNA.
  • Managers may fear that video is somehow less secure than source-code.
  • For highly regulated industries, what happens if a team-lead describes a design flaw or technical debt? Could this be a legal liability? (This could be a major deal-breaker, but certainly not for all companies?)
  • There is no incentive for a team to prepare others for future maintenance. Even if video time capsules are effective, the status quo is good enough, and between leads, developers, and managers, no one will demand better.
What do you think? Does your team use video?

Monday, January 3, 2011

Koans

First, note that my former employer has a new look to its monthly newsletter, Software Engineering Tech Trends. I've always appreciated the articles (and wrote two), but now that I live in an area without many local user groups, I count on SETT when planning my study path.

January's article is a fantastic example. Your friend and mine, Mario Aquino, introduces us to koans, covering exercise packages in Ruby, Javascript, and Clojure (see comments for Groovy resources, Editor).

The Javascript example is especially easy to start and work with. A browser and a text-editor: it could scarcely be easier!

This is neat stuff. Read Mario's article for the full scoop on about martial arts training and Eastern philosophies. I'm definitely a newbie, but so far, I've noticed:

Testing as a contract

The koan style appears to embrace the view that testing is a useful prism for viewing an object. In normal software testing, the object is software, but here the focus is understanding. Despite a different focus, the tests as a concrete contract.

Not that we needed more evidence of being in a post documentation-centric era (post to follow?!), yet here it is.

Zork

Both the interactivity and the sense of Zen paradox reminds me of early text-based adventure games, such as Zork. It would take serious work and creativity, but I envision a learning app that combines the spirit of the koans with a sense of an adventure game. Potentially a great way to introduce kids into programming (or to their 2nd language etc).

Fun

Most of all, this stuff is outright fun. It's a potent combination of learning along with the electrochemical reward for passing tests. That's some mojo right there. What's not to love?

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.