Category Archives: microISV How-To’s

Learning from Existing Code

Another question from a software developer:

What kind of things can you learn from a guy who only hacks existing code?
At my previous job I was the lead programmer and I worked with this guy who was a self-admitted hacker. We respected each other and had a great relationship. The company was much better off because we blended our talents.

I would tend to look for an elegant, graceful solution that we could add to our code library. He would tend to find, tweak, and fit some strange piece of code into a solution. One of the most valuable lessons I learned from him was you don’t always have to build the solution from scratch, there’s a ton of code out there you can borrow from.

What kind of things have you learned from a hacker?

Definition: By hacker I mean someone who for the most part, cannot create something from scratch. However they are very good at morphing code that others have written.

Well, I learned a lot of programming by hacking, in the old definition, as in someone who takes stuff apart and tries to make it do more stuff. In my case, I reverse-engineered file formats for program code for a programming language that no longer exists–that was Texas Instruments Extended BASIC for the TI/994a Home Computer, back in the 1980’s. Pulling that information apart and understanding the proprietary format allowed me to write programs that modified programs, mostly to make them easier to edit; there are still online copies of that around, if you search online for ‘MICROpendium Magazine’ and the program called ‘SubIndex’. It was great training.

Now, most companies specifically prohibit reverse-engineering of their products, so when it’s done, it doesn’t get published. What’s evolved since then has been more along the lines of code sample collections on the various crowd-sourced programming language how-to sites. There are work-arounds of just about any problem you can think of, and many, many of these cover topics that the official sites for the products involved won’t cover at all because they don’t want to endorse a solution that they haven’t tested in-house.

As a programming approach, I’ve always saved every chunk of code as a function or a subprogram. And then reuse code, over and over. And I pull code out of my web sites to use on my other sites just about every month. It saves time.

Yes, I’ve gone your way, and written elegant recursive code that did the impossible in one page. But that’s too much like work for most quick tasks. A quick assembly of saved parts and my prior projects is the preferred approach for me.

Jerry Stern
Chief Technology Officer, PC410.com

Definition: Hacker

Another software developer question:

I’m wondering if the term Hacker means different things to different people. When most people hear the word hacker what are the first things that come to mind?

Hacker, back in the early days of PCs, originally meant someone who climbed into the internals of technology to make it do more stuff. In hardware, we would take an IBM diskette drive, test what happened with every jumper setting, maybe add a DIPP switch to make testing easier, and then hook up the result to a Texas Instruments 99/4a computer, where it was never designed to go. Or read program files from diskettes in pure binary format and match up numbered commands with programming symbols to make programs that could modify programs, usually to add formatting and fix line numbering. Then, it was all positive, and “no reverse engineering allowed” statements hadn’t evolved yet.

NOW, hacker is used more in the negative sense, like cracker, which generally includes creation of cheat codes, bypassing sections of code for various reasons, and so on.

The way technology words enter the mainstream vocabulary is mostly through television and movies, and Hollywood is nearly as sloppy with tech words as the evening news, so ‘hacker’ is mostly used in the negative sense by most of the mainstream media. But a hacker isn’t inherently evil.

Jerry Stern
Chief Technology Officer, PC410.com