6 Steps to Becoming a Better Programmer

in WordPress Tutorials

Whether you’re just starting out with computer programming, have 20 years experience or your programming career’s somewhere in the middle—Here’s six steps for changing the way you think about programming and improving your programming skills in the process.

Bill Gates once famously stated, “I think after the first three or four years, it’s pretty cast in concrete whether you’re a good programmer or not.”

Many programming visionaries seem to agree with him and the idea that good programmers are born, not made. As someone who looks at LOTs of resumes and code samples for computer programmer jobs, I do believe there are traits that make it easier or harder for someone to become a successful programmer. But I tend to think the bigger problem that prevents good programmers from becoming great programmers is lack of smart professional development.

In looking at professional development programs for our programmers at Gravity Switch, most of the programs we found focused on syntax, shortcuts or theory. Sure, these are all necessary for programmers to know, but knowing them alone won’t make you a better programmer. To become a better programmer, you have to be an active learner.

We realized the challenge isn’t getting our programmers to learn new skills. The challenge is teaching them how to be active learners and showing them smart ways to practice their trade. So we created a 6 step process that helps retrain the mind, open it up to different types of learning and teaches the programmer to think differently about programming.

We call this program a “Reset” and it will make you a more active learner.

The Reset Challenge: 6 Steps to become a better programmer

The Reset has 6 steps:

  1. Pick a Platform
  2. Find a Mentor
  3. Identify Leaky Abstractions
  4. Present a Leaky Abstraction to a Non-Techie
  5. Recognize Good and Bad Code
  6. Write Great Code

Step 1 – Pick a Platform

In this first step, pick whatever you’re most excited about and go for it. Don’t overthink this one. You can learn just as much doing this for a language that you have 15 years experience in as a new language you’ve never used.

Because your mentor will need to review your code and compare it to theirs I suggest picking a platform where code is written out, as opposed to some sort of point-and-click interface.

For example: WordPress Themes or Plugins would be an easier topic than “WordPress setup and configuration” because you can’t just hand THE file to your mentor for “setup and configuration”.

Mentor Requirements for this step: No action needed. They just have to be proficient in the platform that’s chosen.

Step 2 – Find a Mentor

In theory, this is the easiest step. You just need to find someone who knows more than you about code and ask them if they’d be willing to help mentor you for a total of a couple of hours over the next few weeks. It may be uncomfortable to ask, but once you get over that, it often goes quite well. I usually recommend that people find the most amazing developer they know and either call them or send an email like this:

Subject: Easy Favor
Hello (name),

I’m working on improving my coding skills, and I have an exercise I’d like to do which requires a mentor. I’ve always thought I could learn a lot from you, and I wonder if you’d be willing to help me out with this.

I know you’re probably super busy so I’m following a streamlined process which puts the burden on me to make sure that I won’t take over a couple of hours of your time over email start to finish (including this email). Obviously, if you’d be willing to spend more time to help me I’d love to sit down with you to get more advice and feedback, but for now I’ll work hard to keep it to under two hours of your time.

I’m planning on focusing on , which I believe is an environment that I know you’re familiar with.

If you think this is something you would have the time to help me with please just let me know and I’ll send you an email with a link to the exercise so you know what I’m doing. If not I completely understand and appreciate your taking the time to read this email.

They might not have time, but even if they have to turn you down, they’re bound to respect you for trying to improve. And I think you’d be surprised how easy it is to get a “yes”.

Mentor Requirements for this step: Agree. Read this Article. <15mins

Step 3 – Identify Leaky Abstractions

The goal of this exercise is to show you the importance of understanding the basics.

The term Leaky Abstraction was first coined by Joel Spolsky in 2002.

Joel pointed out that the goal of a development environment is to simplify development. When you want to create tags for your post, you don’t have to use machine language, you can use the WordPress abstraction to enter a little data in a form and hit “submit”.

Usually this abstraction is a good thing, but sometimes the underlying complexity bubbles to the top, hence the term “leaky abstraction”.

Some examples of leaky abstractions in WordPress are:

  • Tags vs Categories – It’s important to understand the differences in order to make smart choices.
  • That’s Core – Understanding how core code works is critical. Many junior programmers have completely destroyed WordPress installs by editing core code. If you don’t understand what’s core and what’s not, it can be very dangerous.

For this part of the assignment you need to identify 5 leaky abstractions for your chosen platform and deliver them to your mentor:

Dear (name),

I’ve completed my first assignment for my code improvement project.

My job was to identify 5 instances of leaky abstractions (places where the underlying complexity shows through, and which developers have to be aware of in order to be successful).

Can you please spend no more than 5 minutes to read this list and then reply to me and either say “Pass” or “Fail” and let me know which numbers failed.

1. Leak 1
2. Leak 2
3. Leak 3
4. Leak 4
5. Leak 5

Thanks again for taking the time to help me with these. I greatly appreciate it.

Make sure you take your time to do your best so you’re not wasting your mentor’s time. It shouldn’t go back to your mentor more than once.

Mentor Requirements for this step: Pass/Fail. May go back and forth once. <15mins

Step 4 – Present a Leaky Abstraction to a Non-Techie

This step tests if you truly understand the complexity of the technology you’re looking at.

Take one of your leaky abstractions and present it to 3 non-techies in a way they can understand in 10 minutes. You can do this any where, any time. It doesn’t matter who the people are. The less computer savvy they are the harder your job will be.

It might help to print out the paragraphs above about a leaky abstraction is ahead of time. At the end you should ask them to articulate it back to you. If they can, without any prompts from you, you pass. Remember, if it takes you more than 10 minutes to explain it to them, you failed. Go back and try again.

You can do this exercise as many times as you’d like.

Mentor Requirements for this step: Pass/Fail. May go back and forth once. 10mins

Step 5 – Recognize Good and Bad Code

Here we’re testing your ability to recognize crappy code.

Find 5 examples of GREAT code and 5 examples of BAD code, and explain why it’s good and bad. Some places to look for good and bad code are open source themes and plug-ins.

Dear (name),

I shared my leaky abstractions with some non-techies and they got it, so I’ve moved on to the next step of my learning, and I’ve identified 5 samples of GREAT code and 5 samples of BAD code.

Can you please spend up to 25 minutes to read this list and then reply to me and either say “Pass” or “Fail”.

Good Code
www.whatever.com/codesample – Great use ______ and ______.
www.whatever.com/codesample – Great use ______ and ______.
www.whatever.com/codesample – Great use ______ and ______.
www.whatever.com/codesample – Great use ______ and ______.
www.whatever.com/codesample – Great use ______ and ______.

Bad Code
www.whatever.com/codesample – Should have ______ and ______.
www.whatever.com/codesample – Should have ______ and ______.
www.whatever.com/codesample – Should have ______ and ______.
www.whatever.com/codesample – Should have ______ and ______.
www.whatever.com/codesample – Should have ______ and ______.

If I pass and you have any corrections you want to make please let me know. I’m sure you see some things that I haven’t seen or oversimplified and your perspective will be really helpful for me.

Mentor Requirements for this step: Review samples, and make sure you agree with assessment of good code and that some of the most glaring items in the bad code are recognized. If all the code samples are VERY similar (with the same problems or the same solutions) send them back with a note asking for more diversity in code samples. <25mins

Step 6 – Write Great Code

This is the part that most people want to skip to. The goal of this step is to look VERY CRITICALLY at your own code. Is it as good at the best samples you found? Are you making any rookie mistakes? Are you just guessing and hoping it will work?

You’ll have to work a little more closely with your mentor on this one.

Dear (name),

I’m at the point where I need to write good code. This step is a little more work for you.

The first thing I’ll need is a code assignment.

I’ll need you to identify some code that you wrote which took you between 3-5 hours to complete. Then you need to give me enough information so I can program it. This might be a couple of screenshots, or a short spec. Please let me know what browsers it needs to work on and any special notes (i.e. responsive)

I’m not trying to test my design or usability skills, just my programming chops right now.

I’m hopeful you can come up with something fairly quickly. Just pick something you worked on in the past week that’s pretty good, it doesn’t have to be perfect code, just something I can use as a benchmark.

Please feel free to call or email with questions or thoughts.

Once you have the assignment you should spend between 10 and 20 hours on this. In my experience the people who turn in this assignment before spending 10 hours on it fail their first pass and piss off the mentor because they don’t seem to take it seriously, so take the time to do it right.

Once you’re done, please send it over to your mentor with the following notes:

Dear (name),

I’m in the home stretch and I’m excited to have you review my code sample. I’ve spent quite a bit of time on this (over 10 hours), and I’m feeling really good about what I’m sending you.

You’ll be looking for overall elegance and rookie mistakes. You should also review the total number of lines of code. In order to achieve a passing grade I can’t have overbuilt code so can’t have more than 15% more lines of code than your solution.

If after 5-10 minutes you’re not impressed let me know that you’re failing me, and let me know which of the following problems you’re seeing:

  • Not understanding one or more important Leaky Abstractions
  • General Sloppiness
  • Overbuilt

Don’t tell me *what* is wrong, I’m trying to learn to look at code more critically, and your telling me what’s wrong won’t help me get better.

On the other hand if you like what you see, let me know I pass and please share any thoughts you have on general improvements or other places I should go to learn more.

I’m excited to hear what you think!

Mentor Requirements for this step: Code review and compare. <1h

Repeat as Necessary

Because of the nature of this exercise, it’s something that can be repeated a few different times to refocus you on the things that matter in programming. I usually recommend that a developer do this exercise every 6 months as a way to “Reset” their thinking a few times and develop good habits to be constantly learning and growing. It’s a deceptively hard assignment, but I GUARANTEE it will improve your programming skills if you take the time to do it.

Take the “Reset Challenge”

Tweet @JasonNMark and let me know you’re taking the RESET challenge”. I’ll follow-up in two weeks and embarrass you publicly on Twitter if you don’t follow through.