Log in

No account? Create an account
A red letter day is upon us. - CERisE's Testing for L

> Recent Entries
> Archive
> Friends
> Profile

December 22nd, 2003

Previous Entry Share Next Entry
11:09 pm - A red letter day is upon us.
For the (say) past 3 hours or so, relsqui has been writing this silly script.

I haven't been entirely sure what she's doing, but she occasionally asks me questions, so
I answer them with some part of my hindbrain, and keep on playing uplink (Thx Mr. or Ms. anonymous benefactor!).

I finally get an actual look at it and realize it's a project that she mentioned a while ago.
She's writing a script which generates index pages for a given ~/public_html hierarchy.

I wrote one a while ago (and told her so when she initially mentioned it) and it's really basic (mostly because I don't care a bunch about The Web in general).

Anyway, it's kinda cool, but everything is hardcoded to /home/relsqui/public_html. So I talk her into changing it to ~/public_html. We're going through a couple of improvements and I come to this part here where it says

"cat pre >~/public_html/index.html"
[ObNonTechExplanation: This puts whatever's in the file "pre" into the file "index.html"]


"cat post >>~/public_html/index.html"
[ObNonTechExplanation: This puts whatever's in the file post at the end of the file "index.html"]

and I tell her that she should put the contents of pre and post into the script (and avoid carrying extra files around with it).

(NonTechs should skip over this)
"cat <<EOF >blah
(Ok. I'm done geeking out...)

And then she says "Well, sure...but if I did that and someone else wanted to use that and change the background color or some such, they'd have to make a copy of the script and modify it themselves."

And she's absolutely right.

I love her so much =D

The direction I'm going to push her in (e.g. My idea of the Right Thing):
1. put the cat <<EOFs in and have an option flag to mention a pre and post file. 2. have it print to stdout and have an option flag to specify an output file I think that's about it. It's kinda sad to add all that stuff into something that should be simple, but it's one of those unfortunate things about software engineering. The concept can be tiny and cute and simple. Then you have to bloat it up with error checking and defaults which you think should be the right idea, but allow changes for the defaults. And so on and so forth. Seems like there's a great opportunity out there for a new computer language which expands stuff like that out. e.g. int a=open("~/public_html/index.html",O_RDWR); becomes int a=open("~/public_html/index.html",O_RDWR); if (a<0) exit(-1); and so on. Now that I think about it, maybe a development environment would be a better idea. Now that I think about it, isn't that more or less the idea of lint? Yup. Sure is. So a development environment that uses lint at runtime and does cool stuff. Hmm...Those already exist...Maybe people should use them. Bah. Too inefficient.

(Leave a comment)

> Go to Top