12-14-2007, 02:23 PM 
		
	
	
		http://www.zedshaw.com/essays/master_and_expert.html
The Master, The Expert,
The Programmer
I spent most of my high school years living on Guam trying to stay alive long enough to leave and start a new life. It wasnt a good time for me, and about the only good thing that came out of it was I started studying martial arts. These days Im a lazy bastard, but back in the day I studied everything I could get my hands on. It was rough, but I came out of it fine and Ive since used my knowledge of martial arts in just about everything Ive done. Each one I studied taught me something different. Capoeira taught me that being balanced is more about being able to adapt and flex than root your stance. Aikido taught me that attacking a problem directly is rarely the solution. Muay Thai taught me that destroying the base will destroy the building. I studied Muay Thai, Ninjitsu, Wing Tsung, Judo, various weapons, and even spent a year getting the crap beat out of me by some rough sword fighters in the SCA. Unfortunately I never studied anything long enough to be considered very good at it. I just took what I found and moved on to the next interesting thing. What does this have to do with programming?
The Master
When I started studying Aikido I read The Book of Five Rings by Miyamoto Musashi about 20 times. I had a badly stained copy from walking to and from class every night in the rain. It was folded and written on as I tried to figure out what the hell he meant. I never really figured it out. I guess you had to be a Japanese Samurai from the 1700s to figure it out. I did figure out though that Musashi was able to defeat his enemies by using unusual and revolutionary tactics. From what I understand of the history of Japanese martial arts, nobody used both swords at the same time until Musashi started doing it. They had two, they just never used them both simultaneously. Musashi was the first known man to break out both swords and defeat a very large number of people with them. He did things differently and it worked.
In Musashis case it wasnt something he came up with and then developed later, but rather an accident that came out of necessity. He was apparently being attacked by a large near army of men, and in order to keep alive he took out his wakizashi to defend himself (thats the small sword). He later developed it into a complete system, but originally it was self preservation. He also did this after spending his whole adult life studying combat, the sword, and strategy in general. Even though it came from necessity, he had the tools and training necessary to make this radical leap possible. Without this training, he probably would have been killed trying to wield two swords at once.
Later in life Musashi retired and pretty much just disappeared from the world. He taught a couple of people, but mostly his art would have died with him if he hadnt written one very little book, The Book of Five Rings. In this book Musashi lays out what he knows about strategy in probably one of the most concise and best written treatise on the subject. Every other person who wrote about strategy wrote huge tomes. If you think The Art of War is small, keep in mind that the Chinese had a huge number of official texts on strategy, of which The Art of War was only a minor part focusing on how war fits with Chinese politics of the era. The Book of Five Rings was different though, it wasnt specific to any era, it was small, it was austere, and it was like nothing before it. It was the final culmination of one mans mastery.
After reading books on martial arts history for years, and studying everything I can, I started to see a commonly understood pattern. Almost all people considered masters of their art finally come to such a deep knowledge that they can do more with less. Rather than a flurry of complicated leaping and jumping, the master will simply step to the side and make one calculated strike. Every story about old masters is the same in that, even though they were frail and near death, their knowledge and abilities were so deep and clear that their simplest motions had the greatest power. For a master, the pompous and flowery motions were just wastes of energy.
Apparently though, these are all just stories Id heard. Nothing more than myths and legends that I was passed from my teachers and friends. But its these stories that make up what we perceived as a masterful person.
A similar story comes from a completely different side of the world and a different era. I read a story about Mestre Bimbathe originator of modern Capoeira from Brazilwhere he fought a challenger in his 20s. Mestre Bimba was in his 80s had limited mobility, but he still took the young buck on. The young guy started the fight by flying into the air doing this impressive flipping motion, ready to kick some ass. Mestre Bimba just rolled out in a slow cartwheel, and stuck his foot out. The hot-head, still flipping, comes out of the maneuver and right into Mestre Bimbas steady foot, smashing himself unconscious. When he woke up he said, What..what was that?
That was my foot my son, is all Mestre Bimba said.
This kind of story is so common in the lore of the martial arts that its impossible to study a martial art and not hear at least one. Every teacher Ive learned from had similar stories about their senseis, sifus, and mestres. Each one is about how some frail old man (or woman) could do amazing things with just the simplest of motions. These lessons all taught me the same thing, A master wastes no energy. Every motion is precious. A master makes everything look effortless. Nothing is frustrating or difficult for them because they do nothing that isnt necessary. The masters actions are pure and elegant.
The Expert
In all my martial arts studies Id always consider myself a novice. I never studied long enough to be an expert, but when I was younger I thought that I was. I studied so much that I couldnt help being some kind of expert. I found that I could get very good at something rather quickly, but mastering something took far longer. I dont think Ive ever mastered anything Ive studied. Im just an expert, probably even less now that I dont study regularly.
I have met quite a few false masters though. These are people who may be very good, and much better than myself. I usually took classes from them, but not because I thought they were grand masters, or masters or anything. These guys (they were always guys, women are hard to find) were flashy. They could do neat things, could teach really complex techniques, and could tell you every single thing about their martial art possible. Charging you for lesson after lesson was how they made their money after all. Teaching you movie stunt man moves was how they attracted and kept students.
Yet, none of these gentlemen were what Id consider masters. They were great teachers, and I dont want to insult them in any way, but none of them were masters of their art. None of them could clearly and simply explain their martial arts concepts. When Id ask a complicated question, they would give me a complicated answer. Sometimes their answers were just wrong. Like one guy who tried to show everyone how to break out of an arm lock by punching. He asked me to do the arm lock since I studied Judo, so I did it right and made sure that I rotated with him as he tried to punch. He kept trying to punch me, and I just kept rotating. I really wasnt paying attention until he suddenly burst out, Dammit stand still so I can demonstrate. I said sorry but thought, Yeah, like Im gonna stand still. He could have kicked my ass two ways from Sunday, but a simple arm lock frustrated him?
The main thing I noticed about the experts Ive encountered is they are into impressing you with their abilities. They are usually incredibly good, but their need for recognition gets in the way of mastery. Everything they do is an attempt to prove themselves and in order to do this they must perform like an actor on stage. Theres nothing wrong with this, and I dont think the expert can become a master without going through this stage in life. At some point though, the expert becomes comfortable with themselves or fed up with impressing everyone and starts to look inward to the core of their art.
The Programmer
Im going to come out looking like an obnoxious pompous asshole here, but Im not trying to be one. Im simply trying to explain something Ive noticed about the difference between code written by myself and that which frustrated experts write. Im in no way saying that Im some kind of grand master coder. I consider myself an advanced expert at best.
What I notice is that my peers are progressing to more and more complicated and convoluted designs. They are impressed with the flashiest APIs, the biggest buzzwords, and the most intricate of useless features. They are more than happy to write endless unit tests to test their endless refactoring all the while claiming that they follow XPs the simplest thing that works mantra. Ive actually seen a guy take a single class that did nothing more than encapsulate the addition of two strings, and somehow refactor it to be four classes and two interfaces. How is this improving things? How can more somehow equal simpler? This should never be the case.
These are the actions of an expert. These experts are very smart, capable, and skilled, but they are too busy impressing everyone to realize that their actions are only making things worse for themselves. In the end all of their impressive designs are doing nothing but making more work for themselves and everyone around them. Its as if their work is only designed for getting them their next job, rather than keeping them in their current one.
I used to be this way. I used to love complicated designs and read everything I could about complicated technologies. But as I get more experienced and older as a programmer I find complex things just annoying. They arent a mental challenge to understand anymore, they are just irritating. Ill pick apart the flashy crap, boil down the technology to its essence and then come up with a much simpler design for the task at hand almost every time.
What worries me though is how the experts react to my simplified designs. Typically theyll say that what Ive written is not following best practices or isnt well designed. Theyll propose these endlessly complex designs with endlessly imagined failure scenarios, and not realize that what they are doing will be a nightmare to maintain. The experts will then saunter off to implement their Flaming Tower of Babel without any comments, horribly complex mock enabled tests, making sure EVERY SINGLE CLASS HAS AN INTERFACE, and ending every class with Impl because, well, thats the best practice. After implementing it theyll continue to complicate the design even further with endless seemingly aimless refactorings for no other reason than to refactor. And when theyre done, Ill go in and read through their code and cry.
This is the actions of an expert. They love complexity because the art is still new to them, something which should be explored. A list is not just a container, its a linked list, or red-black tree, or doubly linked list. To me, its just a container. I realize now that theyre missing my need for simple beautiful things. They dont love quiet elegance, and would rather shout their superiority from the top of the mountain. Meanwhile, Im just a lazy old man who wants to get his job done and write something without any wasted energy. I want to climb the mountain with the least amount of effort and their shouting is causing an avalanche of bad code.
The Coming Professional Master
Programming is a very new discipline, so theres not too many master programmers out there. Whats worse is that the few people I would consider masters arent very exemplary of the software profession and art. They are typically professors who never write anything under a deadline and are given complete artistic freedom to develop whatever they want. Take Donald Knuth, who was able to take three years off from teaching in order to complete TeX. Theres no way I could get away with telling my employer that itll take me three years to finish their product. Knuth is basically a master amateur. A guy who worked in a complete utopia and was able to hone his skills without interference. I would compare him with a man who became a master by studying at a monastery for for his entire life.
In contrast there are masters in the martial arts who learned their art as a means of survival and became masters in a realistic and hostile environment. We dont have anyone like this in the programming profession, or at least I havent met any. I believe that my generation of developers will produce the kind of masters forged in the real professional world. (Yes, sorry professors, if you cant get fired for missing a deadline then you arent a real programmer working in the real world.) Hopefully software development will continue as a profession and well see a crop of master programmers emerge from industry to challenge the existing amateur masters. But, if the current experts continue to push for ever more complicated, convoluted, involved, and impressive designs and ideas then were in for a world of hurt.
So my final plea for all my fellow experts out there: Can we please start pushing the art and science of software development toward the austere? Id love someday to hear a young coder tell a story about someone they idolized like, There was this guy I worked with who once optimized a complicated red- black tree getting 300% performance boost. I was baffled and ask, Howd you do that? Thats impossible. To which he responded 
Thats my linked list my son.
	
	
	
	
	
	
The Master, The Expert,
The Programmer
I spent most of my high school years living on Guam trying to stay alive long enough to leave and start a new life. It wasnt a good time for me, and about the only good thing that came out of it was I started studying martial arts. These days Im a lazy bastard, but back in the day I studied everything I could get my hands on. It was rough, but I came out of it fine and Ive since used my knowledge of martial arts in just about everything Ive done. Each one I studied taught me something different. Capoeira taught me that being balanced is more about being able to adapt and flex than root your stance. Aikido taught me that attacking a problem directly is rarely the solution. Muay Thai taught me that destroying the base will destroy the building. I studied Muay Thai, Ninjitsu, Wing Tsung, Judo, various weapons, and even spent a year getting the crap beat out of me by some rough sword fighters in the SCA. Unfortunately I never studied anything long enough to be considered very good at it. I just took what I found and moved on to the next interesting thing. What does this have to do with programming?
The Master
When I started studying Aikido I read The Book of Five Rings by Miyamoto Musashi about 20 times. I had a badly stained copy from walking to and from class every night in the rain. It was folded and written on as I tried to figure out what the hell he meant. I never really figured it out. I guess you had to be a Japanese Samurai from the 1700s to figure it out. I did figure out though that Musashi was able to defeat his enemies by using unusual and revolutionary tactics. From what I understand of the history of Japanese martial arts, nobody used both swords at the same time until Musashi started doing it. They had two, they just never used them both simultaneously. Musashi was the first known man to break out both swords and defeat a very large number of people with them. He did things differently and it worked.
In Musashis case it wasnt something he came up with and then developed later, but rather an accident that came out of necessity. He was apparently being attacked by a large near army of men, and in order to keep alive he took out his wakizashi to defend himself (thats the small sword). He later developed it into a complete system, but originally it was self preservation. He also did this after spending his whole adult life studying combat, the sword, and strategy in general. Even though it came from necessity, he had the tools and training necessary to make this radical leap possible. Without this training, he probably would have been killed trying to wield two swords at once.
Later in life Musashi retired and pretty much just disappeared from the world. He taught a couple of people, but mostly his art would have died with him if he hadnt written one very little book, The Book of Five Rings. In this book Musashi lays out what he knows about strategy in probably one of the most concise and best written treatise on the subject. Every other person who wrote about strategy wrote huge tomes. If you think The Art of War is small, keep in mind that the Chinese had a huge number of official texts on strategy, of which The Art of War was only a minor part focusing on how war fits with Chinese politics of the era. The Book of Five Rings was different though, it wasnt specific to any era, it was small, it was austere, and it was like nothing before it. It was the final culmination of one mans mastery.
After reading books on martial arts history for years, and studying everything I can, I started to see a commonly understood pattern. Almost all people considered masters of their art finally come to such a deep knowledge that they can do more with less. Rather than a flurry of complicated leaping and jumping, the master will simply step to the side and make one calculated strike. Every story about old masters is the same in that, even though they were frail and near death, their knowledge and abilities were so deep and clear that their simplest motions had the greatest power. For a master, the pompous and flowery motions were just wastes of energy.
Apparently though, these are all just stories Id heard. Nothing more than myths and legends that I was passed from my teachers and friends. But its these stories that make up what we perceived as a masterful person.
A similar story comes from a completely different side of the world and a different era. I read a story about Mestre Bimbathe originator of modern Capoeira from Brazilwhere he fought a challenger in his 20s. Mestre Bimba was in his 80s had limited mobility, but he still took the young buck on. The young guy started the fight by flying into the air doing this impressive flipping motion, ready to kick some ass. Mestre Bimba just rolled out in a slow cartwheel, and stuck his foot out. The hot-head, still flipping, comes out of the maneuver and right into Mestre Bimbas steady foot, smashing himself unconscious. When he woke up he said, What..what was that?
That was my foot my son, is all Mestre Bimba said.
This kind of story is so common in the lore of the martial arts that its impossible to study a martial art and not hear at least one. Every teacher Ive learned from had similar stories about their senseis, sifus, and mestres. Each one is about how some frail old man (or woman) could do amazing things with just the simplest of motions. These lessons all taught me the same thing, A master wastes no energy. Every motion is precious. A master makes everything look effortless. Nothing is frustrating or difficult for them because they do nothing that isnt necessary. The masters actions are pure and elegant.
The Expert
In all my martial arts studies Id always consider myself a novice. I never studied long enough to be an expert, but when I was younger I thought that I was. I studied so much that I couldnt help being some kind of expert. I found that I could get very good at something rather quickly, but mastering something took far longer. I dont think Ive ever mastered anything Ive studied. Im just an expert, probably even less now that I dont study regularly.
I have met quite a few false masters though. These are people who may be very good, and much better than myself. I usually took classes from them, but not because I thought they were grand masters, or masters or anything. These guys (they were always guys, women are hard to find) were flashy. They could do neat things, could teach really complex techniques, and could tell you every single thing about their martial art possible. Charging you for lesson after lesson was how they made their money after all. Teaching you movie stunt man moves was how they attracted and kept students.
Yet, none of these gentlemen were what Id consider masters. They were great teachers, and I dont want to insult them in any way, but none of them were masters of their art. None of them could clearly and simply explain their martial arts concepts. When Id ask a complicated question, they would give me a complicated answer. Sometimes their answers were just wrong. Like one guy who tried to show everyone how to break out of an arm lock by punching. He asked me to do the arm lock since I studied Judo, so I did it right and made sure that I rotated with him as he tried to punch. He kept trying to punch me, and I just kept rotating. I really wasnt paying attention until he suddenly burst out, Dammit stand still so I can demonstrate. I said sorry but thought, Yeah, like Im gonna stand still. He could have kicked my ass two ways from Sunday, but a simple arm lock frustrated him?
The main thing I noticed about the experts Ive encountered is they are into impressing you with their abilities. They are usually incredibly good, but their need for recognition gets in the way of mastery. Everything they do is an attempt to prove themselves and in order to do this they must perform like an actor on stage. Theres nothing wrong with this, and I dont think the expert can become a master without going through this stage in life. At some point though, the expert becomes comfortable with themselves or fed up with impressing everyone and starts to look inward to the core of their art.
The Programmer
Im going to come out looking like an obnoxious pompous asshole here, but Im not trying to be one. Im simply trying to explain something Ive noticed about the difference between code written by myself and that which frustrated experts write. Im in no way saying that Im some kind of grand master coder. I consider myself an advanced expert at best.
What I notice is that my peers are progressing to more and more complicated and convoluted designs. They are impressed with the flashiest APIs, the biggest buzzwords, and the most intricate of useless features. They are more than happy to write endless unit tests to test their endless refactoring all the while claiming that they follow XPs the simplest thing that works mantra. Ive actually seen a guy take a single class that did nothing more than encapsulate the addition of two strings, and somehow refactor it to be four classes and two interfaces. How is this improving things? How can more somehow equal simpler? This should never be the case.
These are the actions of an expert. These experts are very smart, capable, and skilled, but they are too busy impressing everyone to realize that their actions are only making things worse for themselves. In the end all of their impressive designs are doing nothing but making more work for themselves and everyone around them. Its as if their work is only designed for getting them their next job, rather than keeping them in their current one.
I used to be this way. I used to love complicated designs and read everything I could about complicated technologies. But as I get more experienced and older as a programmer I find complex things just annoying. They arent a mental challenge to understand anymore, they are just irritating. Ill pick apart the flashy crap, boil down the technology to its essence and then come up with a much simpler design for the task at hand almost every time.
What worries me though is how the experts react to my simplified designs. Typically theyll say that what Ive written is not following best practices or isnt well designed. Theyll propose these endlessly complex designs with endlessly imagined failure scenarios, and not realize that what they are doing will be a nightmare to maintain. The experts will then saunter off to implement their Flaming Tower of Babel without any comments, horribly complex mock enabled tests, making sure EVERY SINGLE CLASS HAS AN INTERFACE, and ending every class with Impl because, well, thats the best practice. After implementing it theyll continue to complicate the design even further with endless seemingly aimless refactorings for no other reason than to refactor. And when theyre done, Ill go in and read through their code and cry.
This is the actions of an expert. They love complexity because the art is still new to them, something which should be explored. A list is not just a container, its a linked list, or red-black tree, or doubly linked list. To me, its just a container. I realize now that theyre missing my need for simple beautiful things. They dont love quiet elegance, and would rather shout their superiority from the top of the mountain. Meanwhile, Im just a lazy old man who wants to get his job done and write something without any wasted energy. I want to climb the mountain with the least amount of effort and their shouting is causing an avalanche of bad code.
The Coming Professional Master
Programming is a very new discipline, so theres not too many master programmers out there. Whats worse is that the few people I would consider masters arent very exemplary of the software profession and art. They are typically professors who never write anything under a deadline and are given complete artistic freedom to develop whatever they want. Take Donald Knuth, who was able to take three years off from teaching in order to complete TeX. Theres no way I could get away with telling my employer that itll take me three years to finish their product. Knuth is basically a master amateur. A guy who worked in a complete utopia and was able to hone his skills without interference. I would compare him with a man who became a master by studying at a monastery for for his entire life.
In contrast there are masters in the martial arts who learned their art as a means of survival and became masters in a realistic and hostile environment. We dont have anyone like this in the programming profession, or at least I havent met any. I believe that my generation of developers will produce the kind of masters forged in the real professional world. (Yes, sorry professors, if you cant get fired for missing a deadline then you arent a real programmer working in the real world.) Hopefully software development will continue as a profession and well see a crop of master programmers emerge from industry to challenge the existing amateur masters. But, if the current experts continue to push for ever more complicated, convoluted, involved, and impressive designs and ideas then were in for a world of hurt.
So my final plea for all my fellow experts out there: Can we please start pushing the art and science of software development toward the austere? Id love someday to hear a young coder tell a story about someone they idolized like, There was this guy I worked with who once optimized a complicated red- black tree getting 300% performance boost. I was baffled and ask, Howd you do that? Thats impossible. To which he responded 
Thats my linked list my son.

     