Wheat is softly swaying in a gentle breeze. Trying to read his enemies intentions, a low ranking samurai grips his hilt and draws his sword. He knows what has to be done but is unsure what path to take to get there. His opponent, a high ranking samurai, stands calmly with his arms tucked into his kimono. The wind slowly comes to a halt and the only sound that can be heard is that of a cicada in the distance. It is at this moment the low ranking samurai makes his move. Thinking his enemy is foolish for not drawing his sword, the low ranking samurai lets out a vicious battle cry and rushes in with a huge cut. He lets a small smile crack through his menacing demeanor as he knows victory is his... his final thought as he falls to the ground. The high ranking samurai sheaths his sword, brushes off his sleeves, and walks away calmly as if the duel never took place.
Before you think I am insane, I actually have a point. Many programmers take the path of the low ranking samurai instead of opting for the harder, less traveled path of the high ranking samurai. Like the low ranking samurai in the story, these programmers write code thinking only about the task at hand. They will use their resources in a "brute force" style to solve a problem and not think twice about how others who have view their code. Every programmer will eventually run into someone using these tactics. The following characteristics are almost always tell-tell signs of "low ranking samurai" style programming:
- little or no comments
- variable names that make no sense for the data they contain
- functionality duplication
- little use of functions and no use of classes
- little to no organization structure
In the story, low ranking samurai had no idea what the high ranking samurai was up too, while the high ranking samurai could tell just by looking the skill level of the low ranking samurai. This applies directly to all programmers. Every line you write will slowly start to build a reflection of yourself and this reflection will instantly be deciphered by others looking at your code. Think carefully about this fact.
No one can become a programmer like the "high ranking samurai" overnight. It takes years of practical application build on a solid foundation of logic. The samurai of feudal Japan were trained for combat in such a way that if their weapon broke on the battle field, they could pick up their enemies weapon and wield it as if it were their own. Similarly, programmers should train them selves in such a way that the programming syntax is not the primary concern, but rather the semantics behind the syntax. You can always learn new syntax, but it will be a fruitless effort without semantics. This should be thought upon thoroughly.
Below are some simple steps to follow if you are interested in going down the road less traveled. They should be studied with great attention.
- never over think the problem
- code with the intention that someone else will be making future changes to it
- comment to aid with complex logic and readability
- use variables names that describe the data they are holding
- use object oriented methodology
- try not to close any doors that would impede future development
- be consistent
If you follow these steps in your future projects, not only will you notice a difference, but so will anyone having to look at your code. Overtime you will see your programming habits change from the single tracked "low ranking samurai" and progress towards the open, clam, ready for anything "high ranking samurai".

