Re: Delete a file THAT big? Surely you are joking.

[prev] [thread] [next] [lurker] [Date index for 2006/12/18]

From: Yossi Kreinin
Subject: Re: Delete a file THAT big? Surely you are joking.
Date: 17:34 on 18 Dec 2006

> 
> Unix always had the tradition to give you enough rope so you can
> hang yourself. OTOH, allowing such seemingly dangerous features
> permit powerful tricks and simpler programming.
> 

I always had the tradition of hating this attitude.

I'm a programmer. My program created a big file. Give me the POWER to *DELETE* 
*MY* *FILE*!!

Too bad Unix doesn't give me enough rope to hang *it*, not just myself.

I've learned that "powerful" means "wrong". A feature is called "powerful" when:

* it's not directly related to what anyone would ever need,
* but it can be used to approximate useful things,
* although you won't get exactly what you want,
* and using it will take quite some time,
* and noone will understand how it works,
* and it will occasionally fail.

For example, a dialog saying "print pages x to y" is not powerful (does what you 
want with no side effects and can't be used for anything else). A much more 
powerful approach is to filter your document through a sed script, selecting 
pages x to y, which will only take half a day and only occasionally fail. The 
same approach can be used for mishandling a variety of problems - a clear proof 
that it's powerful.

> 
> This is called an upgrade. The process won't crash because the code
> is already loaded in memory. Upgrades are harder to handle on Win32
> precisely because it doesn't allow (by default) to replace opened
> files.
> 

Yes it will. I'm pretty sure 'cause I've checked a few weeks ago. It won't crash 
if you overwrite the executable. But it will crash if you overwrite a shared object.

By the way, I don't think all Unices do the same thing when it comes to files 
mapped to the memory of a process.

Generated at 03:01 on 20 Dec 2006 by mariachi 0.52