Sunday, January 12, 2014

Ninjas, samurai, and artists

Lately I haven't been posting as much on this blog. My professional responsibilities have shifted, and much as I still love the issues of file formats, I don't have as much time to give attention to them. There are still general programming issues that are worth blogging about, though, and I'll occasionally address these issues here, hopefully along with occasional file format posts.



This weekend I borrowed a book from the company library called . It's a better book than I expected from the title.




In an inspired error, the cover shows not a ninja but a samurai, with colorful armor, a banner, and a long sword. A ninja is a hit-and-run assassin; he shows up out of nowhere, attacks, and vanishes. A samurai is a dedicated soldier, the Japanese equivalent of a knight, and he follows a code of honor. The software development world has too many ninjas. The samurai is a better, if not ideal, model.



From the title I was expecting a cookbook, one of the many books that provide formulas to follow but no deep understanding. Instead, Secrets of the JavaScript Ninja is about understanding the language. Such books are even rarer for JavaScript than for most programming languages. I'd always tended to think of JavaScript as a half-baked derivative of Java, one where features such as classes, packages, and inheritance were left out to cut it down to a scripting language. This book, though, shows that it's really quite a different language, a very powerful one in its own right. I still think the language has serious problems, the biggest being lack of standardization, but reading through the book, I'm learning how to think in JavaScript's terms and to make use of features which other languages don't have.



It's not the language I want to talk about here, though; it's the approach to any language or software technology. Too many programmers don't have any deep understanding of their craft; they just have a bag of tools that they expect to solve problems for them. The worst can't do much more than run a Web search for the code they need or beg on Stack Overflow for a solution to their problem. Once I actually had to fix some PHP that consultants from a big-name company had pasted from a website and didn't know how to adapt to the problem at hand -- and I don't even know PHP! Those are your ninjas.



Even the samurai isn't a great metaphor. They were a part of Japan's entrenched feudal culture, and their opposition to capitalism promoted the warlike mindset that culminated in Japan's role in World War II. Our metaphors should be based on creativity, not war and violence. We should think of ourselves as architects, sculptors, artists. We learn a craft and master the tools that go into it. There's a real psychological affinity; I know a lot more software developers who are skilled musicians than are skilled fighters.



When I see a book called Secrets of the JavaScript Artist, then I'll be pleased.



UPDATE: I just noticed that the book itself says: "Ninjas were chosen for their martial arts skills rather than for their social standing or education. Dressed in black and with their faces covered, they were sent on missions alone or in small groups to attack the enemy with subterfuge and stealth, using any tactics to assure success; their only code was one of secrecy." Just what you want in a programmer, right?
Full Post

No comments:

Post a Comment