I’m sitting here watching the Argentine and Mexican U20 teams play in the Quarter Finals of the U20 World Cup and I’m noticing the language of the announcer more than I normally would during a sporting telecast. What I’m taking notice of is the richness of the language used to describe the game as it is being played. Where the announcers in North America struggle to state more than the obvious and statistics while the game is being played, this British gent (I’ll try to catch his name as the second half starts – Nigel (last name neglected)) is almost waxing poetic.
I’ve watched enough of every sport native to Canada and the US to know that hockey, baseball, basketball and football (grid iron, not the beautiful game) announcers would hardly make be able to pass a high school English equivalency exam. That’s the announcers. The “colour commentators” are nothing more than a group of talking heads that bring nothing more to the broadcast than an ability to fill dead air.
So what is it that makes this announcer different? It’s not that he is poetic in the meter of his speech. It’s not that he is enlightening in the knowledge or information he provides. It’s the style in which he does it. It’s not a flamboyant style, but rather a descriptive and amazingly rich verse that he sings. Where a hockey announcer would suggest that the team needs to work harder to create chances, this guy aptly states that the offensive team must become much more problematic for the defenders if they are going to see success.
Other examples include:
- “They conceded a goal” (When was the last time you heard a football (grid iron) announcer use that many syllables in one word?)
- “Gave the ball away rather sloppily”
- “Highly fancied opponents”
- “The back heel is a little ambitious”
The thing that he is doing is allowing me to know exactly what is going on in the game even if I’m distracted by something else (like writing this).
How does this pertain to programming? When we are writing our code we need to ensure it’s readability for the other developers on our current team, plus the developers that will follow us. Writing syntax like
does not do any justice to the underlying code. Why wouldn’t we state something more poetic? Perhaps we should have our code speak to us and say
What we need to do is have our code read more like sentences where the the dots and the parentheses are treated like spaces. If you do this, plus write the words between to form grammatically correct sentence, you will find that new comers to your code will have an easier time picking it up.
One of the things that I struggle with both when writing fluent interfaces in my code and while writing papers (or blog posts as the case may be), is that I feel as though I’m running out of words to use to properly form a sentence without sounding repetitious and still conveying the pertinent message. Having and using slightly different terms in your code will allow you to enhance your code by making it more descriptive. Think of a situation where you have a service layer for retrieving Customers. If you use the breadth of the English language you can come up with the following possibilities
Each of those can have a slightly different meaning in your code if you use them consistently. Get() could be your terminology for a straight query from the database. Acquire() could represent something where more than a database call is performed and Gather() could speak to a situation where more than one source is required to build the result.
Building expressive verbiage into your codebase is not an easy thing to do. Most likely you will need a thesaurus. Definitely you will need to adjust to this style. The developers coming after you will thank you though.