S'identifier - S'inscrire - Contact

CommunityWiki
Jam session in wikilandia

Tinkering with Code

Source :

My employer, Luis, reminded me of something, that I’ve long, unconsciously, neglected: Probing code.

I was saying that I needed to understand a particular block of complex sample code, (true,) and that I was going to read and study the code.

Luis said, “Why don’t you just change the code, and see if (such-and-such) is true?”

Good point.

While I started probing the code- changing, executing, changing, executing, in the back of my mind, I started to think to myself: “What am I doing differently, and, why didn’t that occur to me?”

I realized that I was probing, not just reading. And I remembered that this used to be my primary method for reading and understanding code. I was typing in games from Family Computing, after all. And that was how I learned to program: By tweaking those BASICA games from the back of family computing.

Somewhere, over the years, I switched to more just “reading” the code, without changing it. At some point, software code became
holy writ.
Does Reading Code: The Open Source Perspective recommend changing code, to see what the changes do? It’d be interesting to see.

One big difference is: I’m working with some VB code. Most of the languages I’ve been working with are compiled, which can make change-and-run costly. And if there’s a lot of setup & shutdown, and you don’t have a way to jump to a situation, that can make it harder too.

Score another +1 advantage for virtual systems..! (This is, in addition to the idea of being able to play executions forward and in rewind.)

Lion le 10.01.06 à 23:21 dans News / Actualités - Version imprimable
Article précédent - Commenter - Article suivant -