Friday 16 November 2018

The Zen Of Hacking

Originally term hacker meant someone who did the impossible with very
little resources and much skill. The basic definition is “someone who makes fine
furniture with an axe”. Hackers were the people who knew the computer inside
and out and who could perform cool, clever, and impossible feats with their
computers. Now days the term has been corrupted to mean someone who
breaks into computers, but in this book we use hacker in its original honorable
form.
My first introduction to true hackers was when I joined the Midnight
Computer Club when I went to college. This wasn't an official club, just a group
of people who hung out in the PDP-8 lab after midnight to program and discuss
computers.
I remember one fellow who had taken $10 of parts from Radio Shack and
created a little black box which he could use with an oscilloscope to align
DEC Tape drives. DEC at the time needed a $35,000 custom built machine to do
the same thing.
There were also some people there who enjoyed programming the PDP-8 to
play music. This was kind of
hard to do since the machine didn't have a sound
card. But someone discovered that if you put a radio near the machine the
interference could be heard on the speaker. After playing around with the
system for a while people discovered how to generate tones using the
interference and thus MUSIC-8 programming system was born. So that the
system didn't have a sound card didn't stop hackers from getting sound out of it.
This illustrates one of the attributes of great hacks, doing the “impossible” with
totally inadequate resources.
My first real hack occurred when some friends of mine were taking
assembly language. Their job was to write a function to do a matrix multiply. I
showed them how to use the PDP-10's ability to do double indirect indexed
addressing 1 which cut down the amount of work needed to access an element of
the matrix from one multiply per element to one multiply per matrix.
The professor who taught the assembly class felt that the only reason you'd
ever want to program in assembly is for speed, so he timed the homework and
compared the results against his “optimal” solution. Every once in a while he'd
find a program that was slightly faster, but he was a good programmer so people
rarely beat him.
Except when it came to my friends' matrix multiply assignment. The
slowest came in at ten times faster than his “optimal” solution. The fastest was
so fast that it broke the timing tools he was using. He had to admit it was a neat
hack. (After seeing this very strange code, he did something very unusual for a
professor: he called my friends to the front of the class, gave them the chalk and
had them teach him.)
What makes a good hack? It involves go over, around, or through the
limitations imposed by the machine, the compiler, management, security 2 or any
thing else.
True hackers develop tricks and techniques designed to overcome the
obstacles in front of them and to improve the quality of the systems they work
with. These are the true hacks....In the true hacker
tradition, this is the result of observing what works and how it works, improving
the system, and then passing the information on.


Adapted From:
C++ Hacker's Guide by Steve Oualline
Copyright 2008, Steve Oualline
Used by permission of Steve Oualline(http://www.oualline.com) under the the Creative Commons License.



If the Zen Of Python has inspired me to write more code in python, then definitely, Steve Oualline's preface on his book well encompasses the Zen Of Hacking, a great inspiration on true hacking for true hackers.

No comments:

Post a Comment

Let's Talk Anonymity: A Short Treatise On Anonymity

The internet takes a very serious position in our everyday lives. We do a lot of activities over the web, some of which we would like our ...