A stick figure types at a keyboard as the sun goes up (or down) in the window behind.
This is me sitting at my computer and waiting for that next reader email.

A reader wrote me an email recently. That’s always a good feeling! He had a question about Mastering Software Technique and general code learning that I’ll bet a lot of you share: it’s easy to go off the rails doing useful things rather than what I recommend. But why? Is it a problem? How can it be fixed?

More on that in a moment.

Tyler wrote (lightly edited):

Hey Noah,

I hope responses to your mailing list get routed back to you!

I heard you on the Rails with Jason podcast recently. The way you spoke really resonated with me. I appreciate your multidisciplinary perspective. After I finished the episode, I immediately bought Rebuilding Rails, and I watched your Rubyconf talk about Conscious Coding Practice. You really drilled into a feeling I have of wanting to “get better”. So for the past day or two I’ve been trying this idea of “playing” with the code.

I’ve run into a problem with my practice. If you have time, I’d appreciate some guidance. Here’s what I’ve experienced the past couple of days:

Picking my tool feels natural. I want to be a better Ruby, Rails, and JavaScript developer. So I pick Ruby by itself, Rails as a framework, or I write a Node.js program.

Picking a task is harder. There are a lot of tasks to choose from. But I find when I can easily pick a task, I struggle picking a purpose.

I think the problem is when I think of a task, it’s usually related to solving a problem I have: building scripts to hit specific APIs, writing sample Stripe payment integrations, doing some work sketching out app ideas I have. But when it comes to these tasks, I really only land on the following purposes:

  1. Solve the problem
  2. Get “better” in the generic sense.

And at the end of my exercise, since I’ve worked on a day-to-day problem, I’m inclined to save the work, host it on GitHub, etc. You said we ought to avoid that inclination. So I feel like I may have missed the mark here.

When I pick a purpose, I struggle picking a task.

When I choose a purpose, something like: write more idiomatic code, learn how to create modular classes, get better at OOP, etc. - I struggle to envision what task will serve that purpose. I think the core problem here is that I don’t really know what I don’t know, and I’m choosing purposes that aim to teach me the things I don’t know. So defining the task is difficult.

What next?

Do I need to just struggle through this some more? Is that part of the process? Or am I missing something that might help bring it all together?

A chalk figure sits at a keyboard, confused.
Argh! I wrote useful software! How does this keep happening to me?

This is a great question and I’m thrilled that he asked it. He also agreed that I could share it with all of you. I’ll tell you all what I told him.

First off, yes, responses to my email list come back to me! That GMail address is my personal one that I use day-to-day.

What I’m hearing from that description is that Tyler is trying to pick a useful task. He wants to save the work to use it or build on it later. And he’s not quite sure what he wants to get good at.

All of that means that he’s not quite sure what he eventually wants. That’s a hard problem, and it’s one we all struggle with sometimes.

I assume, as I read between the lines that Tyler wants to pick a useful task and save the result because he’s afraid of wasting his time. There’s nothing wrong with being afraid of wasting your time. I certainly am! But it’s easy to over-optimise too early, to try to do useful stuff instead of what you need to do to learn, and to wind up limiting your learning that way.

To commit to learning, you first have to have a pretty clear goal. And so it sounds like that problem comes from another problem behind it - choosing and committing to a goal (Avdi would say a direction, not a goal). Which is, again, quite difficult for everybody.

So it sounds like Tyler’s big problem is in picking a purpose, and it’s rippling into problems with tasks. That’s common. I do the same thing.

In my RubyConf talk I mention three ways of picking a purpose. You can pick a person or skill to ‘hero-worship’ - to want the same thing for yourself, and to work toward. That’s one method. Or you can pick an obstacle to overcome. Or you can pick a weird direction to learn weird stuff. I suspect the first method is the method for Tyler. He wants to ‘get better’ (good!) but he’s not quite sure what that looks like.

Various possibly-heroes showing off silly but impressive tricks.
Which one do you want to be?

But when you think about getting better, there’s probably some reason. Maybe you want to be rich (no judgement!). Or maybe you want other developers to admire you in a group (also no judgement - I share this one!). Or maybe you just want that little internal light-bulb moment in a difficult task, and to see the final domino fall, years after you pushed over that first one. One way or another, there’s a reason you got into this whole ‘coding’ thing. Some part of it appealed to you. You should think about what that is for you, and what the next step of it looks like. What did you want to do that hasn’t happened yet? Who has a skill or a kind of respect you want? What good feeling were you hoping for that you haven’t fully gotten yet, or that you’d like more of?

Building toward that should be your purpose (and Tyler’s.)

And once you’ve put your finger on that, you’ll start to see shadows and echoes of it everywhere. Want to get rich? You’ll see who gets promotions more clearly. Want to be respected? You’ll listen to what other developers talk about in admiring tones. Want to see early work pay off? It’ll be easier for you to sit down and return to step four of a process where you started step one a few years back. The hard part is to be able to stand up and say (even just to yourself) “I really want to…” and then finish that sentence.

And it is hard. But once you can do it, everything else falls into place.

Should he just struggle through it some more? Well, that will eventually get him what he wants. I’ve been struggling through this for over twenty years — maybe thirty, depending when you start counting. And even though I sometimes do very ineffective things, I do make progress. Struggling beats not struggling, no question.

But knowing why you’re struggling may cut years off your journey. Knowing whether you’re succeeding or failing gives you a sense of direction, a sense of “I’m heading toward that” which can easily be lost.

After Tyler picks his goal, I suspect his next problem will be “but there are all these OTHER things I wanted!” That’s fair. Keep in mind that if you refuse to pick a task and stick with it then you’ll lose all of them. But if you can struggle for awhile with one at a time, you’ll eventually achieve most of them.

Which is easy for me to say — I’m on the far side of a lot of that struggle. I’m not saying it’s easy. I’m just saying that I haven’t seen any other way to do it.

Tyler seemed to think this was all a helpful reply. It’s what I say to myself, often enough. I hope you’ll get something out of it too.