Tuesday, December 19, 2006

Patterns Make Things Simple

The other day I was thinking about a conversation I had about the way relationships can (and do) get so complicated. But back in school, life was simple. You go to school, come home, do your hw, and pretty much have fun the rest of the time.

Of course back then it didn't seem simple. It felt really complicated. But that's the way it always is.

Seeing the pattern makes things simple.

That's exactly how it is in programming and it applies to life. When you're writing a big program, you write, you write, it's complicated, complicated. ...But after a while, you start to realize, I've written something just like this before. You go back and find the other code you wrote, and sure enough, it's the same thing except for some details. Details that can be abstracted over — creating a function or a template that can be applied in specific instances, depending on the details of the situation.

That, by the way, is the reason why people who learn (and really get) a functional language like Lisp or ML are so die-hard about it. Languages like that let you abstract over pretty much anything.

But you have to see the pattern first.

Sunday, December 17, 2006

Side-Stepping Obstacles in Space and Time

You can almost always by-pass an obstacle by side-stepping in another dimension.

It's like a lab rat in a maze trying to reach the cheese. The walls of the maze are between it and its goal the cheese. But if the rat were able to move vertically above the maze walls, it would be able to move forward towards the cheese freely.

It's a very simple concept. You're walking. There's something in front of you. You go around it.

But what are you doing? if you abstract away all the details. What you're left with is an amazingly powerful problem-solving method. If movement towards your goal is blocked, move in another dimension. This will allow free movement in the previously blocked dimension.

I originally thought of this when I was thinking about time. If we're moving across time as if it were another dimension of space, you can use this method of side-stepping into another dimension to break barriers in time. (Or more accurately, go around them.)

Oh, I think what triggered it was I was trying to remember a dream I had. So I was thinking about how being in the same place — the same environment and position — makes thoughts come back to you. It's as if the thoughts are emanating there, and your body is an antenna, that if positioned in a certain way, will pick up certain thoughts; reposition the antenna, and you pick up on another channel.

So I thought, maybe it's like that with time too. In other words, what time it is also determines what thoughts are emanating. So if you're closer in time, you're more likely to have the same thoughts. And that makes sense, because you are more likely to think about the same thing temporally close together. (Reminds me of temporal and spatial locality which are exploited for caching.)

One block you often run in to in the time dimension is forgetting. You don't remember something that you intentionally mean to. In this case you can side-step the block into another dimension — a spatial dimension. You create something like a reminder note that persists in space, moving forward in time freely. It makes perfect sense. ...I wonder how else this can be applied.