The Ultimate Code Kata

Good post. I like the idea of practice/training to improve skills. Even little things like learning some keyboard shortcuts in your software tools or learning some new language construct that you haven’t used before.

However as someone who has been involved in martial arts in an ameuter capacity for a few years and who is living in Japan I’m starting to find all these references to “Eastern” martial arts/zen/tao etc from developer pundits pretty tiresome. It seems particularly common from the agile community - Cockburn, Dave Thomas etc seem to like sprinkling snippets of eastern wisdom through their writing just to add a touch of “exoticness”. Enough already. Code dojo, code kata, coding fu - when will it stop. Ironically - some of these pundits could clearly benefit a bit from some real physical kata training which builds balance, coordination and improves focus and concentration - not to mention helping lose a few pounds.

“…From those humble beginnings it has turned into the most significant thing I’ve ever done in my professional life”

…by blatantly quoting already written articles by other prominent bloggers who post actually original texts, in order to increase my pageviews.

http://www.codeplex.com/site/users/view/jatwood

Recent Activity
(last 60 days)
No activity in the last 60 days.

Hi Jeff,

I’ve been reading and enjoying your blog for years.

Not sure if this is related to your post, though, but since you’ve turned pro blogger, your entries for me have somehow lost an element of their appeal. I suspect it’s just a perceptual thing on my part, yet I can’t help but feel that blogging part-time along with your day job made me feel that you were somehow more involved in this very ethos yourself.

No offence intended - just a personal vibe I’m getting.

Joe

You know, I used to have to WORST time reading other peoples code; I think most of it was the preliminary shock of greping through fifty source code files to find what I was looking for, then opening the file and seeing all that code that I’d never seen before.

Once I just delved in and did it several times, I started to get better at it. Now it doesn’t seem to take me near as long as it used to. I think that would be something I’d want to practice on, though. I think maybe I’ll take some time to come up with examples of things I have no idea how to do, then learn how by reading someone else’s open source code that already does it.

I’m still just a n00b programmer by far, and I really appreciate all your advice, Jeff. Thanks!

Why all the focus on the resume and the interview (in the first list)? I assume that being good at dealing with interviews can get you hired, but does that make you a better programmer?

But I very much agree that looking at others’ code and ideas can make you learn new ideas and learn very quickly.

For good foundation, there is no replacement for studying books.

Practicing coding in your spare time, eh? Nope, sorry. Look, I understand that some people eat, breathe and sleep coding. And I do put in time to try to keep up with things (I read Jeff’s blog every day, for one.) But, when I get off work I’m totally burned out. I need to watch a little tv, talk to the wife, get my thoughts together for a bit before I have to go to bed and start the cycle all over again.

Does that mean I’m not a professional even though I’m getting paid to program? Does that mean I don’t deserve to be called a professional programmer? Just because I’ve decided not to sell my heart and soul to the computer gods does that exclude me from the cool kids club? Maybe. And if so, then so be it, and I shall remain the kind of/almost professional programmer.

@kenneth

I recommend chess. Relaxing and relieves the burn-out feeling, yet helps you to think more clearly and makes you a more effective programmer, all at once!

It’s not for everyone, but it’s definitely worth checking out.

But I agree that time with the wife (and kids, where applicable) is more important. :slight_smile:

“You can gain experience, if you are careful to avoid empty redundancy. Do not fall into the error of the artisan who boasts of twenty years experience in his craft while in fact he has had only one year of experience—twenty times.” – Trevanian, in Shibumi

Does that mean I’m not a professional even though I’m getting paid to program? Does that mean I don’t deserve to be called a professional programmer? Just because I’ve decided not to sell my heart and soul to the computer gods does that exclude me from the cool kids club? Maybe. And if so, then so be it, and I shall remain the kind of/almost professional programmer.

It means you won’t be as good as those who do. You may not like it, but that’s the choice you make. Just don’t pretend that you’re as good as someone who does enjoy working on projects outside of work.

In case you’re interested, the kata in your illustration is a kata called Enpi (if you’re Japanese stylist) or Wanshu (if you’re Okinawan stylist). :slight_smile:

Good post, Jeff.

If you want the ultimate code kata then do the exercises in SICP … all of them. 'nuff said.

Jeff, you seem to have an uncanny knack for putting out a post that’s totally relevant to the current ‘big thought’ that i’m toying about with in my mind. I’m seriously starting to consider wearing a tin foil hat to keep you out of my head.

Although I don’t always agree with you, you often at least provoke a good amount of inner discussion for me to get on start getting on with.

Many thanks and keep it up.

I was actually just in the middle of pre-writing (writing on a legal pad) my next blog post on this EXACT thing, about how I’m not a professional, and most professionals are sub-par compared to the kids that hack on their parent’s computers.

@Kenneth
"professional" just means you are being paid for it. It doesn’t mean you’re any good.

@jeff
I believe practicing means experimenting with different ways of doing things. By taking the time to learn the good and bad parts of different approaches first hand, you are able to make better decisions. Too many people follow the crowd without understanding how the choices they make impacts the projects they are working on.

Well, I’m certainly not trying to start an argument, mostly I was responding to earlier comments, but just as a response.

Obviously, not all banking sites are failures so to try and cluster them all together as such doesn’t make much sense. My point is that there is no doubt a lot of software/sites written by people not versed in languages like C, but it’s still quality software.

So my whole question from the start was what makes someone a “good programmer”? Knowing C? Doing “katas” like in this discussion? Devoting long hours out of work to write code and routines that have been long established?

I don’t really know, it was just that my opinion was that a “good programmer” is a good problem solver who cares about the quality of his work.

I certainly agree with you that knowing more helps someone have more alternatives, I just don’t know that going deeper into low level code, or off to unrelated tangents (or at least OCR and 3D is unrelated to me) is always the best way to improve yourself.

Anyhow, good response. I think you and I are both saying all levels of development co-exist, or that none is “better” as you put it, but so much as relies on each other.

I agree with some of the other comments here, I don’t see how all the interviewing makes you all that better. I think a list that might be more relevent would be

  1. Code
  2. Code
  3. Code

Again though, as you stated, you need to be pushing the edges of where your abilities. If you’re just coding the same thing over and over at it, you might be really efficient at doing that one task, but it doesn’t make you a good programmer.

I get burnt out a lot of days after work too, 8 hours straight will do that. But many days, i will also put in several hours worth of coding (ussually involving me staying up way too late and then struggling to make it through the next day). I just get in moods, sometimes i don’t want anything to do with coding after work and other days, when I’ve got a cool idea in my head, I might kick out another 4-5 hours without a second thought.

This may seem like a silly idea, but having recently gone through a round of job applications, tests, etc (found a job thanks!) I feel that the process was actually educational. Programming tests mostly test the basic stuff, but if you’ve been working for 10+ years, there’s nothing like a little refresher.

Let me clarify a bit. My point is just because you don’t code outside of work DOES NOT mean you are not a good, competent programmer. I put out good, productive code and I strive to be better all the time. I just don’t think I need to sacrifice my personal time to do that. And there are many like me who know they are not superstars and don’t want to be. They want to be good at what they do and go home at the end of a long day. It may seem strange to admit that, especially in a field where egos run wild and people don’t want to admit mistakes - but I’m being honest. You certainly don’t want to be known as the worst programmer where you work. But, look, not everyone can be the best.

Sure, from time to time I sit down with a book/magazine and learn about the groovy new tools/trends. I’ve converted code from some old apps using a new language, learning along the way. But I’m not spending my weekends thinking about coding. You have to pick what’s important for you. I just thought I’d give my point of view.

@Sergio:

So pulling ideas together from several sources and synthesizing a discussion isn’t worthwhile? Where’s your blog, and why aren’t I reading it?