Full Text Search: The Key to Better Natural Language Queries for NoSQL in Node.js
I wonder at what age you become crotchety. Granted I am not that old in calendar years, but some things just bug me: acronyms, non-standard abbreviations, arbitrarily absent vowels, the spastic use of capitalization, prefixes, and underscores in code. On the other hand, my inner child is alive and well because I still believe in Santa Claus. I still believe that if I make a Christmas wish and have been a good boy, my Christmas wish may be granted.
Well Santa, all I want for Christmas are words, glorious words.
The Code of Christmas Past
In 1978, I wrote my first code on a TSR80 with 48 Kb of memory. It was a revision of a ROMBasic game. The first time I got paid for coding was in 1987, when Don Gardener and Mike Groher at Underwriters, Safety, and Claims grudgingly agreed to pay me for writing code—in Databus. During the past 15 years, things have changed a lot.
Mike, Don, and I—and everybody else—had to deal with file system and memory limitations. As programmers, these limitations manifested themselves as smaller disk drives, limited lengths for file names, and languages that supported a finite limitation on tokens, symbols, or names in general. We were forced to use a limited number of alphanumeric characters to express our intents.
The result was that we were forced to write gibberish code with variables named things like X1 or WfmmBfmh. In those days, computers accepted anything technically correct and human readers were just happy to be liberated from punch cards. In a Pavlovian way, we were conditioned to permit the computer-language equivalent of baby talk.
The Code of Christmas Present
Almost twenty years later, we are still writing gibberish.
Computers require technical precision, but they read voltages that represent bits and bytes. A computer is immune to the charm of carefully worded prose. People are not.
This begs the question: Who is your audience? Syntactically, the computer is your audience, but ultimately the master is the person. This means that your primary audience is a human being. A living, breathing soul who reads and understands English (begging your pardon if English is not your mother language). This also means wyfbybal, x1, ClcCrppty, and all other non-words are gibberish. Real people don't know what you mean. You may know what you mean when you write code using abbreviations, underscores, and prefix notations but no one else will, and chances are even you'll forget when you come back to the code a month later.
A secondary—but perhaps more important—concept is one of aesthetic beauty. People crave beauty as much as they do oxygen. People love Yo-Yo-Ma, Pavrotti, or Kid Rock because the music speaks to them; it makes them feel. People listen to Kitaro because they hear the rhythm of nature itself in his music. Julia Child appealed to a desire to create elegant meals. Shaq's slam. Michael's leap. Emeril's "Bam!" Sinatra or Martin's Italian cool. What makes us feel is considered valuable. Programmers value aesthetically beautiful code. Beautiful code conveys more meaning, loyalty, and understanding than technically accurate gibberish ever will. Oddly enough, our left-brained group is still authoring gibberish, though.
Computer programmers in the early 21st century are still using all capitalization for database table and column names. We are still using all capitalization for constants. We still use prefix notations and special characters for variable names. We still drop vowels in class, method, and variable names, and we still make up nonsensical words when no practical limitations require we do so.
The Code of Christmas Future
All I want for Christmas are whole words, a sane use of capitalization, and the abolition of funny prefix characters and prefix notations.
The code of Christmas future will employ whole words: nouns and verbs that convey meaning clearly. Special characters will be abandoned, and capitalization will be used sparingly to distinguish words within a name. ALL CAPS LOOKS LIKE SHOUTING, and shouting is almost always inappropriate.
Well Santa, are you listening?
Paul Kimmel is the founder and chief architect of Software Conceptions, Inc, founded in 1990. He is the VB Today columnist and author of several books on object-oriented programming, software architecture, and .NET. He is a co-founder and president of the Greater Lansing .NET area Users Group. You may contact him at email@example.com.
Copyright © 2004 by Paul Kimmel. All Rights Reserved.