How a Rubber Duck Taught Me to Be a Better Programmer

Originally Posted on WSOL.com

It sounds silly, doesn’t it? A rubber duck? It’s a bath toy that your kids play with in the tub. It has no hands, and is made of rubber (actually plastic now-a-days, but that’s just a technicality. It has always been, and always shall be a rubber duck, no matter what it’s made of!). What’s a rubber duck got to do with programming? And how can it teach me anything?

Programming is hard. Don’t let anyone tell you differently. When you write a program, there can be anywhere from one to a gazillion lines of code, and you are going to make mistakes. Sometimes they’re big, sometimes they’re small, but no matter the size, they all take time to find and troubleshoot. Sometimes, you need help. Sometimes, you need…a rubber duck.

Enter the Duck

I first learned about the concept of Rubber Duck Debugging from Deane Barker (@gadgetopia). He mentioned it in his excellent blog post “How to Give a Good Conference Talk”, where he described practicing a presentation out loud, in order to make it better.

The idea of using something, be it a rubber duck, your pet hamster, or the stuffed pink panda bear you won at the county fair, as a sounding board for working through a problem is not new. Almost every business community learns about it eventually. It’s surprisingly simple, but verbally explaining the issue you need to solve or the problem you are trying to overcome can often give you exactly the inspiration you need to figure it out.

But Don’t We Already Do This?

Sure, you can get help from another developer, and I often do (extra bonus points if you can get said developer to dress up like a rubber duck while you are explaining your problem. Keep asking. It’ll happen…), but that takes up their valuable time. If I had a penny for every time I have fought, yelled, and cursed at my program because it didn’t work, only to have someone else take a look at it and say something like “you missed a <comma, semi-colon, variable, reference, etc>,” in under a minute, I would have at least $28.37. Then I feel like an idiot, because I couldn’t see that one little thing.

The great thing about using a rubber duck is that it doesn’t take up someone else’s time. The rubber duck doesn’t judge you, and it is very patient as you work through the issues.

There Is Actual Science at Work Here

There is something magical about explaining your problems out loud, even to something as inanimate as a rubber duck, that can help you see the solution to your issues. Magic aside, there is even some science there as well. (See The Psychology Underlying the Power of Rubber Duck Debugging for a more in-depth explanation.) The act of speaking out loud forces you to slow down and be more precise and thoughtful in your explanations. After all, the rubber duck doesn’t know what you know.

When you go through code line by line, explaining each part to the rubber duck, you pay closer attention to the small details. You don’t gloss over things that you “just know” are there, and instead you pay attention to what is really there. Often times during this process, you see a problem that you missed before. It’s very similar to the idea that you only really start to understand a topic when you try to teach it to someone else.

What My Rubber Duck Has Taught Me

My rubber duck, the “Green Ninja” (Image credit: Tara Mayberry Teaberry Creative)

Here are some of the important lessons I have learned from using Rubber Duck Debugging:

  • I have learned to be more clear and concise when I am describing a problem.
  • I have learned to be more careful while writing code, so that I don’t have to bore him with a lot of extra troubleshooting sessions.
  • I have learned to make a better effort to troubleshoot the issues before bothering my co-workers.
  • And finally, I have learned to be more patient when someone uses me as a sounding board to work through their problems (but I won’t dress up like a rubber duck).

So go out and find your own rubber duck, be it the classic yellow bath toy, or one dressed up like a pirate — pick one that you’re comfortable with and fits your personality. My Green Ninja rubber duck sits in a place of honor, where I can see him at all times. I talk to him, ask questions, explain my problems out loud, and I don’t bother my co-workers as often as I once did. He helps me realize that I know more than I think I do, that I am better than I think I am, and not nearly as clever as I want to be. He just sits there smiling his enigmatic smile, waiting for me to come up with an answer. He is my constant companion when I am writing code, and we work together to make better websites for our clients.

Top Image Credit: Deposit Photos

Confessions of a Non-Super Rockstar Ninja

Does it seem like all of the developer job openings are looking for a superstar in javascript, a back-end code ninja, or a front-end rockstar? Do you read the skill descriptions with more and more dread since while you know some, or even all of, those technologies, you consider yourself to be an expert in all of them. It’s easy to feel discouraged and frustrated.

Hi, My name is Joe and I am NOT a Super Rockstar Ninja

It may seem like a difficult thing to admit, but I rarely fall into the superstar/rockstar/ninja categories. In fact, if this were a Harry Potter book, the Sorting Hat would probably have put me in Hufflepuff, and that’s okay. Hufflepuffs were known for being trustworthy, loyal and hardworking, but maybe not the most clever. So I am not a super rockstar ninja, and I probably won’t ever be, but that doesn’t mean that I am not good at what I do.

I am a self-taught C# developer, specializing in back-end web development using the Ektron CMS platform. I never really learned JavaScript, my CSS is rusty, and the only bootstraps I am familiar with belong on saddles.

Being self-taught, I don’t have the benefits, or the hang-ups, of receiving a formal education in programming. A “Salt of the Earth Programmer”, to coin a new term, more methodical than intuitive. I don’t grasp new concepts quickly or easily, and it often seems like I have to fight them into submission before I eventually understand them. But what I do know, I know very well. And once in a while I surprise even myself and come up with a clever solution to a problem.

Social Media and Your Self-Image

One of the best things about the modern social world is that you can get access to an astoundingly wide variety of people. By reading blogs, listening to podcasts, and interacting with people on Twitter, you can gain insights from some of the most brilliant and innovative minds in the business. I feel a continual sense of awe at some of the incredible ideas that these people come up with, and I am inspired to do more.

The downside to this easy access to such creative and innovative minds, is that it is easy to judge yourself against the high standards that these experts have set on their chosen topics, and come up short. You start to think that because you don’t have the same answers that they have, that you aren’t worthwhile—that if you can’t solve all of the problems, that you are a failure.

You’re not! That’s just your ego talking. And let me tell you, your ego can be an idiot!

Ego (Everyone’s Got One)

Your ego is the thing telling you that you have to have all the answers. That your solutions are the right ones, and the only ones that need to be considered. It’s okay to know that you are good at something, and have confidence in your abilities, but don’t fool yourself into thinking that if you are good in one area, that you are good in all areas. That way lies arrogance, a sure sign of an out of control ego. It’s so easy to go down that path when you have a few successes behind you.

But then you run into an issue that you can’t solve without help, and your ego takes a huge blow. You start to feel like a hack, like a failure. As high as you felt before, you now feel as low. Your confidence is shaken, and and now you’re fragile. But life is full successes and failures. And something is only truly a failure if you don’t learn from it. Plus, failures keep you humble, and willing to learn.

Be a Student and a Teacher

No one is a expert in everything, but everyone is good at something. Every person you meet is going to be better than you are at something, and every person you meet is an opportunity to learn something, if you are willing to be a student.

As Saron Yitbarek (https://twitter.com/codenewbies) said in her interview on http://www.hanselminutes.com/442/being-a-codenewbie-with-saron-yitbarek we need to be students more. We should always be learning, and never be in a hurry to be the “expert” on anything. I know that most days, I feel like more of a http://www.hanselminutes.com/427/what-it-really-means-to-be-junior-developer-with-jonathan-barronville than I do an expert.

But the inverse is also true. You are going to be better at something than everyone else you meet. It might be something simple, or something complicated. Every time you meet someone you have an opportunity to be a teacher, if they are ready to be a student.

I suspect that there are more developers out there like me, than there are the super rockstar ninjas. I also suspect that if you talk to many of those brilliant, innovative people I mentioned earlier, they would probably argue with you about their brilliance, and point out that they have struggles and failures just like we all do. As a general rule, the things people share online are the best that they have come up with, not the first. We don’t see the hard work that it took to get to the point of posting something online.

I build solid, workable code; wrestle with new concepts and ideas; and try to reign in my ego enough to be humble and willing to learn when the opportunity comes my way. I know that I can be successful using my strengths. I am not a superstar, a rockstar, or a ninja, but most days I am satisfied with being good at what I do, and with who I am.

THE WEB IS…

Originally posted on WSOL.Com

A while ago, I ran across a video that really changed the way that I think about the web. It was a presentation on Vimeo, of a talk that Ethan Marcotte gave during the 2012 Build Conference in Belfast, Northern Ireland, titled “The Map Is Not The Territory.

Like many things that Ethan has written and presented, this one was very well organized, informative, and thought provoking. He combined history with map making, with evolution, and the web, to make a profound statement that really gave me pause.

At approximately 19 minutes into the video, Ethan puts up a simple statement saying “THE WEB IS”, and then quickly goes through a number of things that complete that sentence.

  • THE WEB IS mobile
  • THE WEB IS http
  • THE WEB IS documents
  • THE WEB IS css
  • THE WEB IS design
  • THE WEB IS content strategy
  • THE WEB IS social
  • THE WEB IS …

Well, you get the idea. This statement was only up on the screen for a couple of minutes during his talk, but it made me ask:

What is the web?

Over the next several days, I kept coming back to this question. Yes, the web is all of the things that Ethan listed, and much, much more. But is that all that it is? The answer is a resounding No. Those are just some of the things that the web is made with and of, they are not the thing itself. As Ethan says in his talk, they are the map, not the territory. (For more information on the Map-Territory relationship, you can read about Korzybski’s Treatise)

What if the web is something different for everyone? That started to make some sense, because everyone has different interests and needs, and they go to the web for different reasons. So then:

What is the web for me?

The web is my life. As a developer, I spend 95% of my working day interacting with some aspect of the web, whether that is writing code, troubleshooting an issue, researching a technique or process, or communicating with others, it is all done with and on the web. It is the doorway into the world through which I go to earn my living.

I then started looking around, and talking to other people. For my wife, the web is a place where she goes for research about the latest graphics project that she’s working on; it is shopping for clothes and making travel arrangements. It is a place to keep in contact with friends and family who are not close by.

I found that for some people, the web is a mystery that they have no interest in. It simply doesn’t fit into their lives.

So what is the web?

As I continued to ask this question, I realized that it’s not just that the web is different for everyone, but that it changes for everyone all the time, depending on their current needs and interests. During the work day, the web might be a research and development tool. At night, it’s entertainment. When I don’t know something, it’s my teacher; and when I need something, it’s my store. It has become such a constant and pervasive part of our lives, that we don’t even think about using it anymore.

So, if the web is so many things, to so many people, how then, can we be successful with it? The key, really, is not to try to be everything for everyone. The web as a whole, is all of the things that have been mentioned, and while the web is certainly greater than the sum of its parts, it is those parts that make it what it is. The web is made up of millions of individual web sites, with billions of web pages, each one catering to a different group of people.

As a developer, I have seen how having an in-depth discovery process, uncovering information about the people who will be using the site, benefits everyone involved. Knowing that information in the beginning of a project enables the designers and developers to focus on what is important, on what is relevant, instead of on what is pretty. As the designers and developers of the web, understanding the fact that the web is many thing to many people helps us to build a better experience. A better web.

THE WEB IS

When people come to your site, they are more than just traffic, more than just numbers, or conversions, or dollars. They are individuals with a unique view of the world. Individuals with their own needs, their own priorities, their own desires, and they came to your site in search for something. In some cases what your site provides might be the map. For others, it is the territory.

But if your piece of the web can provide them with what they need, when they are ready for it, then you are on the road to success. You are contributing to the greater whole.