Repitition is Good for the Soul

Posted by Berin Loritsch Wed, 03 Oct 2007 11:56:00 GMT

In martial arts, we perform kata (also known as Hyung or just simply forms). Contained in the kata are a selection of techniques, stances, transitions, etc. to help train your body to move properly. There’s usually a general focus of the kata, and as you progress each kata builds on the lessons from before. According to the rules of progressing through the belt ranks in Tae Kwan Do, they explicitly say you should have performed the kata 300 times that are prerequisites for the next belt. That’s a lot of repetition. Essentially, you really have to know the kata inside and out before you can progress.

If you do it right, you learn the areas you have problems with and you work on fixing those issues. Each repetition of the kata shouldn’t be a mindless action because you will never have reached perfection. There’s always something to improve. You learn subtle nuances as you slow down and visualize your opponent attacking. You learn that minor changes in your stance, shifting of your weight, etc. will have a profound impact on the power you can deliver and the ease of moving into the next technique. You’re constantly learning and improving.

As software writers, we tend to have to solve the same solutions over and over again. Each time through, we learn from our past experience and seek to improve on what we’ve done in the past. It’s one of the reasons why I think pattern chasers have missed the boat. If all you do is mindlessly slap together some patterns you learned from a book or an online resource, you never learn. You never can appreciate what the technique buys you, and how much (or little) of it you have to do for the application at hand. Some parts of the problem are so ingrained you really don’t have to think about it. That’s OK, and that’s expected. However, the corner cases, the challenging parts are where you have to focus a little extra mental effort. Following a recipe book isn’t going to get you over the hump.

In martial arts, physics is our friend. When we apply force to one part of the problem (the body), it will move in predictable ways—even if that problem is resisting. When we’ve gone through the repetition of performing the forms, one-steps, etc. we can instinctively apply the right force to get the problem to move in a way that we want. If we do our job right, that problem will be in subjection in short order.

In software, logic is our friend. When we apply control to one part of the problem (the software), it will move in predictable ways—even if system events try to throw a monkey-wrench in it. Each time we deal with the issues that a machine can throw at us, we can instinctively know which system events we can ignore and which we need to control. If we do our job right, the application will be finished in short order.

Unit tests are the best way we have to understand how the code works in an application. The goal of a good unit test is to express in as few lines as possible how the code should behave under specific circumstances. If you put too much in your unit tests, you never know just quite what might be going wrong. With unit tests, you can ensure a certain amount of predictability in the system.

Integration tests are the best way we have to understand how the application works in its environment. The goal of a good integration test is to express in as few lines as possible how the system should behave as a whole under specific circumstances. The integration tests should simulate or force certain system events to ensure the application handles it robustly.

The best way to describe it with a good mental picture is again with the forms. As we are performing our forms, we can focus on each technique one at a time. Some techniques are going to be particularly troublesome for you (one I’m learning right now is kicking my but with some jumping techniques). However, you can isolate parts of the whole kata and focus on just that technique (or two if you are having problem with a transition from one technique to the other). These are like unit tests. However, your training is incomplete if you never put it all together and perform the kata as a whole. Your sensei may have people attacking you as the kata is designed, but it doesn’t change the form itself. The practice of performing the whole kata is like the integration tests.

Repetition provides you with several advantages over cookie cutter approaches: deeper understanding of the problem, better understanding of your weaknesses, and more confidence in the solution you chose. Another, more subtle, advantage is that for the parts you know well your brain does disengage allowing you to move “in the flow” for longer stints.

Do RSS Feeds Hurt the Web?

Posted by Berin Loritsch Thu, 09 Aug 2007 12:03:00 GMT

First, I will be the first to say that RSS feeds are great (and if you like Atom or other feed flavors, they’re included). I mean how else would it be easy for me to see what’s new on someone else’s site? And if you are anything like me, you prefer feeds that give you the whole article, and not this “summary” crap. The feeds are terribly useful, and if I’m in a rush I’ll just read the feed from whatever reader I use. Sometimes the only way to print an article is to do it from the reader. The theme for a blog can get in the way of a clean print, cutting off important text.

So why then do I ask the question of whether RSS feeds hurt the web? I mean if they are so useful and all, what harm can it do? Now that I have to tools to analyze my traffic a bit better, I’ve noticed that a good portion of my traffic is either from personal readers or private online readers. There is very little in the way of link traffic. Sure this incarnation of the blog is relatively new, and most of my readers have followed me here. But the spirit of the World Wide Web is to have links among pages so that you can find information and spend all kinds of time following these links to good information. Unless you have your blog also syndicated at an aggregation site like Planet Apache you are reliant on your friends posting links to your blog on their site. That’s happening less and less.

Exacerbating the Issue

Most of my Apache folks whom I used to work with closely (and now less so) used to have a “blog roll” which listed other blogs that were of interest to them. We had mutual links on our sites. Now the blog roll is passé and almost no one has one of these any more. I’m not speaking from the angle of a popularity whore, I’m speaking from the angle of trying to find out what’s going on in the industry. Any one person is only going to know a fraction of what’s out there, but every once in a while you’ll run across a link to someone who is multi-disciplined and learn a whole lot more. The blog roll was a convenient way of stumbling across someone like that.

We have search, right? After all, if Google exists we will be able to find it…. Remember that Google uses links to rank the search results. The more links to a resource the higher it’s rank in the results. You may have a good article, but it’s buried under 30 pages of crap. Someone else may have a better article, but its buried under 50 pages of crap. Without the links to say, “Wow, I found this article and it was great!” or building on someone else’s article and adding your own take on things the search results will continue to stink. Even the more esteemed folk like Bruce Eckel and Paul Graham get fewer links.

So what do we do?

I like the power that syndicated feeds give the user, and they can be a useful tool to stay abreast of important information. They are particularly useful when you already know who you want to pay attention to. However, for our own blogs, we need to make sure we provide links to sources of information. It should be a common courtesy, but I’m just as guilty as the next guy. You don’t have a lot of time, you remember the content of something you read, but you can’t remember where it came from, etc. I’m trying to get better about this myself, but it does take some work.

Of course, people won’t link if there is no reason for them to do it. If all you do is spit out garbage, folks might get a few laughs out of it, but no desire to spread the news. In short, give folks a reason to link. If you’ve found a way around a big issue that caused you some heartburn, share the news and how you got out of it. At the very least, you may need it again—but more than likely you are not alone.

The last option is to make your site much more than just a blog. This takes a lot more effort, but if people have a reason to keep coming back besides listening to your words it really helps.