in reply to Please 'hack' nicely...
I hack, and I program. I hack when I want it done now, the one-off script, when I'm not quite sure what I'm doing but not letting that hinder me, and when seeing what can be done. I program when I want stuff I'm going to reuse, stuff others may need to maintain, and when I have that tremendous inner calm that makes me program when I've set out to hack.
Some of my programs have ended up with hacks in them, this is regretable and I've clearly marked them with comments like 'This is the largest kludge I've seen since the last one'. I then go back and fix them, some may call it refactoring but when it's so ugly I don't think it deserves such pretentious description.
Equally, some of my best hacks have become programs. Quite often when I'm beginning a program there'll be two or three areas which I'm not experienced in which are needed, and so I'll start off writing a small script to try out each area. Sometimes I'll then think 'But how will this X script interface with feature Y?' and build that on there too, and before I know it the script has organically grown to become a full program.
I think my last three large projects here all germinated from a hack. The first being a hack to test something regarding it's data structures, the second a hack concerning connection Perl to Java via the command line in a nice way, and the third controlling the number of processes running doing a certain thing- irregardless of which user was running them.
I consider this to be an okay thing, assuming I don't mind going back and tidying up any bits that even marginally resemble hacks. Sweep ugly hacks under the carpet of good code. When I read about the 'write a bit, test a bit, rinse and repeat' of XP I ended up realising that was pretty much what I did.
Oh, I also prefer the definition of hack from the Jargon file. It's a nicer definition, and may eventually make you happy to say 'Yes, I'm a hacker'. Then again, people who go by the 'Beautiful hack' kind of definition may want to meet me in a dark alley whilst they're carrying a selection of sporting equipment beginning with a reasonably sturdy baseball bat for what I just said.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Please 'hack' nicely...
by dsheroh (Monsignor) on May 23, 2002 at 22:45 UTC |