Book Review – Peak: Secrets from the New Science of Expertise

Hiker standing on the peak of a large rock.

Photo by Kalen Emsley

Peak is Co-authored by Anders Ericsson (a heavyweight in the field of physiology) and Robert Pool (an established technical writer). Peak is a summation of close to 40 years of Dr. Ericsson’s research in elite performance and some the surprising discoveries made along the way. A lot of his research has surfaced in other titles such as:

  • Outliers: The Story of Success By Malcolm Gladwell – Which introduced the concept of the 10,000 hour rule, something derived from Dr. Ericsson’s research. Outliers takes a very different position on the meaning of the results and is interesting to see the contrast.
  • Deep Work  By Cal Newport – A recommended book on the application of many of these concepts in the context of programming and the knowledge worker economy.

But Peak is direct from the man himself and revels quite a few insights overlook by other authors.

Deliberate Practice

This book centers around the concept of deliberate practice, what it is and isn’t, and how its different from how we usually learn. So what is deliberate practice? Let review the key concepts:

  1. Has Specific Goals – Deliberate practice must have very clear constraints and focus. You must dive deep to become an elite performer and goals keep us on track. Veering off costs you time and productivity.
  2. Focused Practice – You need to be completely focused for long periods, no distractions. The authors mention that high level violinists practice so intensely that many take mid-day naps to recover. Most people have to build up and practice to reach the required levels.
  3. Always Uncomfortable– Its important to always be working on the area which you are worst. This seems obvious but usually once we get pretty good at something we stick to habit and stop improving.
  4. Feedback Loop – In order to improve areas which we are weak we need to know where we are weak. Its important that our practice gives us as close to real-time results as possible so we know if we are heading in the right direction.
  5. Teachers – If possible you should have a teacher, coach, or mentor to help uncover your weak areas. They can also show you the proper mental representations that will improve your ability to make complex ideas useful.

Mental Representations

One of the concepts discussed is the idea of mental representations. The key idea behind this is that we can generalized concepts once they are intuitive to us and build a hierarchy of knowledge.

For instance, the example of a study participant who worked his way up to memorizing about 80 unique numbers. At first he just tried memorizing the numbers but was limited to around 7-9 numbers. Which is the usual limit of short term memory.

By creating memorized representations like robot is 42 or cat is 68, simply picturing a robot picking up a cat could generate the number 4268.

We humans are better at recalling stories and images (chess-masters sometimes refer to picturing the board as lines of force for example) rather than raw information. Meaning a large part of building knowledge involves finding the best way to represent a complex topic as a simple abstraction.

Things need to be practiced and mulled over till it seems obvious. Concepts made intuitive integrate easy with the rest of your knowledge. This web of knowledge allows you to make new and unique connections that is seen in expert performance.

Final Thoughts

Peak: Secrets from the New Science of Expertise is an excellent book. I would say it’s required reading for anyone in a technical field.

Unfortunately, if you are looking for step by step advice you wont find it.

But it does do a great job giving everything needed to classify deliberate practice, helping to qualify whether you are actually performing it. Figuring out the steps ultimately requires advice from experts as well as experimentation.

If you are a developer you may find it difficult to find truly great teachers. The good news for those starting out, you just need someone who is good at explaining things and better than you. But as you progress, you will continue to need better teachers.

Something Cal Newport brings up quite a bit is that few people know or implement this stuff. That means if you can figure it out you can enjoy a huge advantage over your peers. Its fertile territory for those who want to blaze a path since most knowledge work has yet to reach the structure of sports or music.

If you are interested you can pick up Peak: Secrets from the New Science of Expertise from Amazon fairly cheap, the audio version is also great.

If you enjoyed the read or have any comments be sure to follow me @zen_code and let me know.

Do Vim Plugins Improve Productivity?

View on the long journey

Photo by Aneta Ivanova


I’m usually open to experimentation when it comes to productivity in my development work.  I recently stumbled upon an article advocating Vim bindings for Visual Studios and decided to take the plunge and give it a try for at least a week. I had a little Vim experience so I figured I wasn’t flying completely blind. The idea of being able to work while never moving my fingers away from the home keys was quite appealing to me. I figured that alone would be a workflow improvement, not to mention the other wealth of features.

Sensitive users may want to skip this next statement. I know some of you are thinking, isn’t Vim only for people who still call themselves AMIGA programmers. Why should we be moving backwards. My honest answer, I don’t know. But I have spoken with others and read quite a few post which have given me a good enough argument to at least find out for myself.

Deciding to go full immersion, I rebound all of my IDE’s and dug in. Boy, did I have a rude awaking as to how polished my Vim skills were.

First There was Despair

My first few days were polar opposite of productive. I found myself grasping for my cheat sheet of Vim modes and commands for what felt like every 30 seconds. Struggling and having to look up a command you literally just looked up is a good test of humility. More than a few times I had to turn off plugins to get important work done quickly. Cheating, I know.

But as I persisted I improved. Getting better at basic things leads to exploring the more difficult things. Knowing the light at the end of the tunnel was I would be gaining a useful skill regardless was helpful.

Its also worth briefly discussing why I decided to just use plugins for other IDE’s rather than Vim itself. The truth is I have Visual Studios and Sublime tuned in for the type of projects I’m currently working on. Does that mean I shouldn’t explore using it in my workflows, sure I should and will, but I didn’t want to bite of more than I could chew. This does come at the cost of losing some of the, some would argue, best features.

What was Gained?

So I know I’m going to leave out someone’s favorite feature here. But these just some of the features I found to be useful early on and is in no way meant to represent the full breadth of features these plugins have.

  • The base key bindings are all very close to the home keys. No reaching for the mouse required if you set things up right. Once the keybindings become second nature text just seems to flow like a river. No need to look down to jump to and end of a document or move the cursor with arrow keys.
  • Macros, they are a huge advantage when doing very repetitive tasks. The fact you can record a set of keystrokes quickly and then replay them is handy when working in HTML.
  • Similar to macros but rather than recording keystrokes you can command and execute a pattern of keystrokes such as jump 4 words or down 10 lines. What neat is even those can be stacked.

Final Thoughts

So the big question, was it worth the struggle? Yes, I think so. It was far from easy but I did in fact find that it improved my input speed. While far from being a matrix like neural plug, its kind of weird how it begins to feel like you can almost think it and it happens. Things require such little movement its almost hard to explain. But as its joking called, the Vim learning cliff is not easy to scale and may be worth easing in a bit more slowly than I did. I am still far from smooth and still find myself regularly looking things up. There is so much nuance available it could take years to master, which is kind of exciting for me. But if you interested in following suit here is a list of plugins. You can find one for pretty much any editor.

Other Useful Resources and Links

  • Sublime Six – Surprisingly broad support for Vim, worth checking out if you use sublime.
  • VsVim – Adds support to Visual Studios. A bit limited on features compared to others but has all the important ones.
  • vim-adventures – Learn Vim as a game if that is your learning style, it is paid but you do get the first three levels for free.
  • Cheat sheet – Don’t be surprised if you clutch it like a life preserver at first of course this is the one I used but there are plenty of other good ones that my be better formatted for you.
  • Learning Goodies – A wonderful list of helpful links to help you on your learning adventure.

It you decided to take the journey be sure to let me know @zen_code.

Does it Function?

Thinking about Refactoring Functions

Photo by: Gaby Av

What are the ideal properties of a function and when should you refactor a functions? Or from another angle, when is the best time to refactor a function out, restructure within or just leave it? In the last week or so I’ve noticed an interesting pattern in functions written by some slightly novice developers. I got to thinking about how to best give constructive feedback. But something I found interesting about all of is that the structure of the functions, at least on the surface, seemed to meet all the traditional best practices of a function. They performed a single purpose, were created to avoid repetition, etc. But the code was awkward to work with and functions almost obfuscated rather than simplified. So what attributes made them difficult to work with and kinda smell of code rot? So I thought I would list out some further considerations when breaking a functions out.

Functional Mutation

What the heck is functional mutation? Well I did just make the word up but it seemed appropriate. Usually, this is a sneaky violation of “functions should perform a single purpose”. It happens when a function’s output varies unpredictable from what can been gathered from the function’s name and its inputs. This is usually caused when the code inside the functions varies output wildly due to non-intuitive conditions, at least as seen by the outside observer. It really pays to leave conditional logic which impacts the straightforwardness of a function in a higher level of code. If that just doesn’t seem reasonable then usually that’s an indication that it’s to rethink the structure to match the conditional lines.

Sequential Dependence

When a function can not perform its required task due to its dependence on another function it’s usually bad. There are exceptions to this one, especially when designed something that interface with an external system. But, it’s very important to ask whether the dependence can be removed by either restructuring the input parameters, restructuring functions, or both. The problem with sequential dependence when it comes to maintenance is that it hurts code readability, and locks it any changes to external dependencies. So ask yourself twice if there is a better way if you find a set of function like this.

Sometimes it’s better to not refactor a function out unless it stand on its own. But be sure to remember that the person that comes behind you, which is usually you 6 months from now who has totally forgotten everything, won’t know your ideology while they absorb it purpose. So do yourself, and them a favor by writing code which speaks to them rather than having to be strangle out.

An Argument for the Jack of All Trades

Is it true that a person who has chosen to remain good at everything rather than excellent at one thing has made themselves noncompetitive? Does the old adage “jack of all trades, master of none” still ring true today or has it really ever? This is something I have given quite a bit of thought to and have wondered if my desire to roam and explore topics has in fact put me at some disadvantage. I suspect in some regards it has, but why and should that be the case? Clearly I don’t believe completely believe that are this would be a rather short post.

Once upon a time, in an age which things where hand crafted. It took a great deal of time and effort to create even the simplest objects. A wooden chair would take days, cathedrals could take centuries. Their creators only hopes of making a sustainable living at their trade was to be quick at making repetitive hand shaped items. To learn was to apprentices along side someone who had dedicated there lives to the subject. Little was shared without it being spoken and shown since books where rare. But progress changed that and suddenly one could learn without being shown.

Things have obviously continued to change since then, knowledge has proliferated. Conversely so has the reduction of manual task. Machines perform the repetitive tasks for us leaving us time to think of new ways to improve things. This changes the emphasis on being good at a singular task but rather an ever expanding array of higher level tasks.

The present is driven by the consumption and application of new information and a few key areas of rarely changing knowledge. Once you learn the key areas you can pivot much easier than the past. Though specialization is by no means obsolete and never will be. But perhaps having a wider understanding is as important now as a narrow one. Pulling ideas from a big bucket with many tools will always yield more progress than a small bucket with narrowly focused ones.

Anyways, food for thought in a age where specialization has grown rather than shrunk. But maybe its not so bad being a jack of all trades.

To Engineer: My Design Philosophy

I have a habit of calling myself an engineer. You could say well like an engineer that build my favorite clogged turnpike or that blender that lasted three days? Well yes and no, but rather than argue semantics lets first take a look at the origin of the word.

The word engineers roots go back to the roman word ingeniare(“to contrive, devise”) and ingenium (“cleverness”) per wikipedia. If your Spanish is up to par they should also seem a bit familiar to you. One thing interesting to note is that the English word engineer also shares an origin with the word engenders(“To arise from”). This particular framing of the word gives me particular pause for though as my job as a programmer requires a great deal of attention to that ethos.

Ethos? Yes I believe so. I believe that a more accurate definition of the word engineer, despite the modern context, is the title of someone who’s core mastery / profession is to contrive and create tangible, useful devices that move the world forward. An engineer derives these constructs through cleverness and intellect. Now I use the term devices loosely, this can range from the physical( a phone, turnpike, computer processor) to the metaphysical(Concepts, ideas, thoughts). Now it is important to included thought-space in our definition because physical derivation must first be derived through thought. This is perhaps the biggest departure from the traditional definition.

How its useful

By considering this we can also use the word engineering to define a philosophy. In its simplest form this philosophy is the philosophy of creating things through cleverness and creative use of known / discovered principles. As a software developer I have found that it is important to approach problems by providing myself a label that extends beyond the traditional word software developer of X. This acknowledgement that in fact I’m engineering a solution in a greater sense allows myself to act outside of the normal barriers the we impose on our minds. I instead have now become a problem solver, only limited by my means of my own imagination and astuteness to research and learning.

Further Reading

SQL Voodoo Query: Merging a column in multiple rows into just one

[This is an old but regularly requested  post of mine from BIDN in 2011, updated due to my renowned grammar]

Today I wanted to quickly mention a technique to pivot a one to many data structure into a one column list of items. I know it has been mentioned before a bit differently in previous blogs before on BIDN.

The problem?

We have three tables


In the instructors table we have the instructors name, ID, and yada yada. InstructorClasses is our junction table and links all of the instructors to their list of classes and finally classes is our simple list of classes.  Now assuming we have a web page that needs to show them as below?

Instructor: Jim Bean

Classes: Rowing; Yoga; Bartending;

Now assuming you are unable to format in code or perhaps you are archiving data and needing to convert it during ETL. To get the expected results we can utilize the XML Path command in SQL Server to provide us a pivoted view of classes as demonstrated in the example below.

SELECT Left(Main.Categories,Len(Main.Categories)-1) as Classes, Instructors.FirstName + ' ' + Instructors.LastName as InstructorsName
FROM Instructors
left join (Select distinct ST2.InstructorID ,
(Select distinct Classes.ClassTitle + '; ' AS [text()]
From InstructorsClasses ST1
join dbo.Classes
on ST1.ClassID = Classes.ClassID
Where ST1.InstructorID = ST2.InstructorID
For XML PATH ('')
) [Categories]
From InstructorsClasses ST2) [Main]
on InstructorID = main.InstructorID

Skill Growth: Or how I learned to love the blog

So this being the first formal blog in some time as well as the very first for the site so I figured that my first topic should be on blogging itself. It has occurred to me on numerous occasions, in both recalling technical issues I have faced as well as clarifying my own thoughts, how really useful blogging is. Though it doesn’t help to have poor memory and terrible grammatical skills. But if trial by fire can’t cure early onset Alzheimer’s then I don’t know what can. So let’s get this ramble going.


To blog or not to blog?

If you are here then I’m pretty sure you have a solid handle on the concept of blogging, so I’m going to skip being a Webster dictionary knock off. That said, the Internet has provided an enormous soapbox for us to stand on so why not use it. On top of the fact that there’s a vast number of content hungry users which have been provided to us by the glorious proliferation of the internet. This has thus created a huge churning pool of knowledge consuming, LOL cats viewing (God only knows what else) group of individuals seeking quality content. All of which may find your ideas to be helpful to them. This gives us the unique opportunity to dive in and see what ideas you have that actually stick and refine them accordingly.

That being said blogging’s greatest potentials lay not only in the fact there are others out there that may find your content useful, but that you yourself may find the act of writing useful. The act of writing requires us form ideas which can easily be conveyed to others. A great deal of mental house cleaning is needed to preform this feat and as we solidify our ideas it allows them to become clearer. Ideas are then illuminated to our-self’s as well giving clearer authority and understanding of them.

What is your blogging tool, and what does it do?

Now hopefully you read the section header with an Austrian accent, if not I’m disappointed in you dear reader. But to the relevant conundrum. Although the majority of my previous blogs have been generally technical, I’m going to forgo replicating the majority of the Internet and provide you with one key tip. Though I will list out several useful links towards the end of the blog for expanded reading. Now as a blogger there really is only one tool that you need and its name is WordPress. Now I know a large segment of the Internet will disagree with me and that’s OK. But in reality it’s such an easy tool with many features that unless its your sole source of income and you have excessive spare time why distract yourself from the most important element, content content content.

But I do promise more to come soon! In the meantime I will be working to get the rest of the site ship-shape and bristol fashion.