From: Ken Tilton
Subject: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <47ea4366$0$5631$607ed4bc@cv.net>
Ever reinvent your own wheel cuz ya did it then used it so rarely you 
forgot it? Or similarly ended up poking around your utils code and 
discovered functions written in the heat of a "this will be useful" 
moment but then got forgotten?

Hell, I won't even use my own code, no wonder I won't use anyone elses.

kenny

ps. Yes, this just happened. k

-- 
http://smuglispweeny.blogspot.com/
http://www.theoryyalgebra.com/

"In the morning, hear the Way;
  in the evening, die content!"
                     -- Confucius

From: Aatu Koskensilta
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <SCrGj.315890$%S1.289156@reader1.news.saunalahti.fi>
On 2008-03-26, in comp.lang.lisp, Ken Tilton wrote:
> Ever reinvent your own wheel cuz ya did it then used it so rarely you 
> forgot it?

Very often. In mathematics it is not at all uncommon for me to read a
proof, studying its machinations in detail, only to forget all about
it, later cursing myself when I find my notes are utterly
unintelligible and of no help in making anything of the proof. The
same happens with programming; it is not at all uncommon for me to
solve some problem again and again, over and over, only later
realising I had done it already. It is a powerful testament to human
frailty.

-- 
Aatu Koskensilta (················@xortec.fi)

"Wovon man nicht sprechen kann, daruber muss man schweigen"
 - Ludwig Wittgenstein, Tractatus Logico-Philosophicus
From: Jacobite1607
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <09c7ba07-0acd-437b-ac7d-4eb263666405@b64g2000hsa.googlegroups.com>
On Mar 26, 8:36 am, Ken Tilton <···········@optonline.net> wrote:
> Ever reinvent your own wheel cuz ya did it then used it so rarely you
> forgot it? Or similarly ended up poking around your utils code and
> discovered functions written in the heat of a "this will be useful"
> moment but then got forgotten?
>

Yes or open up a program from 10 years ago and start asking
"Why did I do that? What on earth was I thinking! It's much better if
I did...(blah blah blah)..."

William
From: Ken Tilton
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <47eaae39$0$15192$607ed4bc@cv.net>
Jacobite1607 wrote:
> On Mar 26, 8:36 am, Ken Tilton <···········@optonline.net> wrote:
> 
>>Ever reinvent your own wheel cuz ya did it then used it so rarely you
>>forgot it? Or similarly ended up poking around your utils code and
>>discovered functions written in the heat of a "this will be useful"
>>moment but then got forgotten?
>>
> 
> 
> Yes or open up a program from 10 years ago and start asking
> "Why did I do that? What on earth was I thinking! It's much better if
> I did...(blah blah blah)..."

And damn the backup, full editspeed ahead!

I always laugh at debates over the readability of code. If I look at 
code I rewrite it, especially my own. It is always easier than figuring 
out what the code I am looking at does.

This is the strong form of McManus's Rule of Software Reliability: Never 
change the code, or change it all the time.

kenny

-- 
http://smuglispweeny.blogspot.com/
http://www.theoryyalgebra.com/

"In the morning, hear the Way;
  in the evening, die content!"
                     -- Confucius
From: Daniel Barlow
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <47eaf244$0$26074$db0fefd9@news.zen.co.uk>
Ken Tilton wrote:
> I always laugh at debates over the readability of code. If I look at 
> code I rewrite it, especially my own. It is always easier than figuring 
> out what the code I am looking at does.

It's funny, I'm working again on a system which in places is ten years 
old, and which I wrote when I'd only been using Lisp for about a year. 
I'm pretty certain that I wouldn't do an awful lot of it the same way 
now as I did then, but I also find it quite impressive that I even can 
figure out what it was doing in the first place (and why)

On the original subject: BTDT  but I'm damned if I can remember where I 
put the t-shirt.  Usually the previous version is a function in another 
development tree that I ceased work on when it proved to be a dead end.

-dan
From: Rob Warnock
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <YuCdncLMWaHZx3banZ2dnUVZ_tGonZ2d@speakeasy.net>
Daniel Barlow  <···@telent.net> wrote:
+---------------
| Ken Tilton wrote:
| > I always laugh at debates over the readability of code. If I look at 
| > code I rewrite it, especially my own. It is always easier than figuring 
| > out what the code I am looking at does.
| 
| It's funny, I'm working again on a system which in places is ten years 
| old, and which I wrote when I'd only been using Lisp for about a year. 
| I'm pretty certain that I wouldn't do an awful lot of it the same way 
| now as I did then, but I also find it quite impressive that I even can 
| figure out what it was doing in the first place (and why)
+---------------

That's why I switched to Scheme [and then, later, CL] in the first place.
I can actually read and *understand* the stuff 1, 5, or 10 years later.

Unlike Perl, which I'm lucky to be able to read a couple of *days* later
even if I was the one who wrote it!  :-{


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Raffael Cavallaro
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <2008032613271116807-raffaelcavallaro@pasdespamsilvousplaitmaccom>
On 2008-03-26 08:36:54 -0400, Ken Tilton <···········@optonline.net> said:

> Ever reinvent your own wheel cuz ya did it then used it so rarely you 
> forgot it? Or similarly ended up poking around your utils code and 
> discovered functions written in the heat of a "this will be useful" 
> moment but then got forgotten?

Even sadder is going to save the "new" file and getting a warning that 
it already exists - i.e., you not only reinvented the wheel, but named 
the file the same thing!
From: Pascal J. Bourguignon
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <7cr6dxsgx7.fsf@pbourguignon.anevia.com>
Ken Tilton <···········@optonline.net> writes:

> Ever reinvent your own wheel cuz ya did it then used it so rarely you
> forgot it? Or similarly ended up poking around your utils code and
> discovered functions written in the heat of a "this will be useful"
> moment but then got forgotten?
>
> Hell, I won't even use my own code, no wonder I won't use anyone elses.
>
> kenny
>
> ps. Yes, this just happened. k


Of course it does!  An awful feeling it is, knowing we've done that
already ten times, and not being able to find the file where it is.

Thanksfully, nowadays we've got google, and sometimes, I find my own
old code with google, if I took the precaution to publish it, that is.

If I had a cent for each time I did:  
   find / -type f -exec grep -n something {} /dev/null \;
...


-- 
__Pascal Bourguignon__
From: yello62
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <2e3997c7-76ee-438b-b17f-6dcca743f8a2@z38g2000hsc.googlegroups.com>
ok, i don't post to this group all that much cause i ain't programming
on a daily basis and have only used lisp for kicks and grins, although
i do torture myself by reading the postings daily, thinking that by
reading, somehow, someway, and some day, everything about lisp
programming will become clear in my mind  i don't program on a daily
basis cause i found myself feeling like a complete idiot when i would
solve problems and not be able to keep the solutions in my mind from
one problem to the next, even when i would leave (too) extensive notes
for me.  i loved the creative moments when lights would go off and
bells would ring and a solution unfolded in front of me, but having to
go through the struggle to get there time and again became difficult
to wrestle with for someone as old as I am.  i told myself that i am
too old to be attempting to learn how to code, my brain way past the
point of being able to build new constructs.  reading these postings
does my heart a small measure of good, knowing that even those that
have gotten "it" struggle with an issue the same as i.

thank you.
From: Mike G.
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <9094ebcd-d255-4c62-8d21-fa586465ca02@z38g2000hsc.googlegroups.com>
On Mar 26, 12:39 pm, yello62 <·······@yahoo.com> wrote:
> ok, i don't post to this group all that much cause i ain't programming
> on a daily basis and have only used lisp for kicks and grins, although
> i do torture myself by reading the postings daily, thinking that by
> reading, somehow, someway, and some day, everything about lisp
> programming will become clear in my mind  i don't program on a daily
> basis cause i found myself feeling like a complete idiot when i would
> solve problems and not be able to keep the solutions in my mind from
> one problem to the next, even when i would leave (too) extensive notes
> for me.  i loved the creative moments when lights would go off and
> bells would ring and a solution unfolded in front of me, but having to
> go through the struggle to get there time and again became difficult
> to wrestle with for someone as old as I am.  i told myself that i am
> too old to be attempting to learn how to code, my brain way past the
> point of being able to build new constructs.  reading these postings
> does my heart a small measure of good, knowing that even those that
> have gotten "it" struggle with an issue the same as i.
>
> thank you.

Don't be a defeatist, friend. If you have the time to pour over the
slim pickings around here, for god's sake man, write some code for the
pleasure of it. It's better mental exercise than reading the rants
around here, with the exception of some of Kenny's masterpieces, of
course.

Programming is hard, if it wasn't we'd have strong AI doing it for us
by now.

-M
From: Mike G.
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <133a7018-b8fb-4a5b-a43b-6c93da0f440f@e39g2000hsf.googlegroups.com>
On Mar 26, 10:23 am, ····@informatimago.com (Pascal J. Bourguignon)
wrote:
> Ken Tilton <···········@optonline.net> writes:
> > Ever reinvent your own wheel cuz ya did it then used it so rarely you
> > forgot it? Or similarly ended up poking around your utils code and
> > discovered functions written in the heat of a "this will be useful"
> > moment but then got forgotten?

I used to do this with C a great deal. Now that I use Lisp a lot more,
I find that I write much less code to lose. I've met C and Scheme
programmers who shrug off CL's SORT. I've lost or forgotten about
application-specific sort routines, and implementations of various
data structures in C. In Lisp, I always have SORT, and since my
default Lisp world contains a few different packages I've written for
myself, if I forget about them, I suppose I'll be able to find them
much easier with apropos.

Hmmm.. maybe I should write an fapropos / fdescribe which thrash up a
directory tree of Lisp source giving you function names, arguments and
docs along with the path to the file to load.

That will be useful ;)

> Thanksfully, nowadays we've got google, and sometimes, I find my own
> old code with google, if I took the precaution to publish it, that is.

As a kid, I had a Tandy Color Computer, affectionately known as a
CoCo. I had a few models of them, peaking with my CoCo 3 which sported
512k of RAM and 2 720k floppy drives. Small, but it did have a pre-
emptive multitasking OS (OS-9 on the Motorola 6809). Awesome machine.

I digress.. anyhow, awhile back I downloaded an emulator for that old
machine and downloaded some disk images and found code that I wrote
when I was first learning programming with structured BASIC. It felt
like lightning to see all that old code again. Very surreal.

Whoever salvaged that code from the old archives of Compuserve and
Delphi - if you happen to read this - thank you :) hmm.. time for my
first cross-post.

-M
From: vanekl
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <fse24j$j9g$1@aioe.org>
Ken Tilton wrote:
> Ever reinvent your own wheel cuz ya did it then used it so rarely you 
> forgot it? Or similarly ended up poking around your utils code and 
> discovered functions written in the heat of a "this will be useful" 
> moment but then got forgotten?
> 
> Hell, I won't even use my own code, no wonder I won't use anyone elses.
> 
> kenny
> 
> ps. Yes, this just happened. k
> 

In other words,

1. Electronic search is useful;
2. Google and recursive grep are not sufficient.

Additionally, this problem happens to everybody, not
just programmers, and not just wrt code snippets.
Which is why I'm currently working on this problem.
Keeping found stuff found can and will be improved.

But, to get back to the original question, I don't mind
it when my new code is better than old, new-found code,
but it's disconcerting when the inverse situation occurs.
I guess this is nature's way of showing us whether we
are degenerating or advancing. There is power in
knowing, even if the datum is that your knowledge
is declining.
From: Alex Mizrahi
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <47ea8ee1$0$90265$14726298@news.sunsite.dk>
 KT> Ever reinvent your own wheel cuz ya did it then used it so rarely you
 KT> forgot it?

sometimes it's easier to write it again than to remember how, for hell, it 
was called. 
From: Ken Tilton
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <47ea9203$0$25042$607ed4bc@cv.net>
Alex Mizrahi wrote:
>  KT> Ever reinvent your own wheel cuz ya did it then used it so rarely you
>  KT> forgot it?
> 
> sometimes it's easier to write it again than to remember how, for hell, it 
> was called. 

Exactly, so the impulse to resist is to create utility functions just 
guessing they will be commonly needed.

Certainly my long-delayed conversion to looposity obsoletes a lot of the 
stuff in my utils code.

kenny

-- 
http://smuglispweeny.blogspot.com/
http://www.theoryyalgebra.com/

"In the morning, hear the Way;
  in the evening, die content!"
                     -- Confucius
From: Giorgos Keramidas
Subject: Re: Reinventing My Own Wheel: Et Tu?
Date: 
Message-ID: <878wzya6xj.fsf@kobe.laptop>
On Wed, 26 Mar 2008 08:36:54 -0400, Ken Tilton <···········@optonline.net> wrote:
> Ever reinvent your own wheel cuz ya did it then used it so rarely you
> forgot it? Or similarly ended up poking around your utils code and
> discovered functions written in the heat of a "this will be useful"
> moment but then got forgotten?

Heheh!  Sounds familiar, yes.

The flipside of this, of course, is when I look at older code and wonder
why I haven't kept the phone of the drug dealer I must have been using
at the time...