Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #20950
| From | Twirlip of the Mists <twirlip@killfile.me.now.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: single instance |
| Date | 2013-01-04 14:04 -0500 |
| Organization | Zamps Anonymous |
| Message-ID | <kc793t$ivk$1@news.mixmin.net> (permalink) |
| References | <iah6e8hb9ssp4q46ukh3scb81bjb9fdq1k@4ax.com> <_8FFs.54988$LS5.54894@newsfe10.iad> |
On Fri, 04 Jan 2013 10:26:01 -0800, Daniel Pitts wrote: > I might also have my program "watch" that file, and if it disappears or > becomes modified, then shut down because I know the user is trying > something they shouldn't. I'm HIGHLY dubious of nannying your users to that extent. Unless it's very dangerous, in some sense, to allow multi-instances (data-destroying race conditions in important files in the install directory?), if the user takes specific and knowledgeable action to circumvent the default behavior of only having a single instance, the user should probably be deferred to and the perceived problem solved in other ways (e.g. using a lightweight but properly ACID database instead of just a file, or locking the file and requiring separate concurrent instances use separate files or even distinct installs altogether). I know that if I deliberately circumvent something like that, I do so at my own risk and buggy, even data-destroying behavior is theoretically possible among the consequences (so I should either not do so or back up the program's data files first). I also know that there have been many occasions when I've been frustrated by a program "straight-jacketing" me into being unable to do something the programmer thought unwise or even just unnecessary, but where the programmer clearly hadn't anticipated all the uses to which the program might be put, especially by someone that's a hacker and not just a garden variety end-user. Programs are the user's tools and, as such, should empower, not limit, the user. Whereas it can make plenty of sense to include safety features designed to make it difficult for the user to accidentally shoot himself in the foot, cut off his finger in the saw, or shoot his co-worker from across the room with the nailgun, it is rarely if ever worthwhile to additionally try to design in a "cop-in-the-box" intended to catch and "punish" deliberate attempts to circumvent such features. If I purposely circumvent the safety on a nailgun, I do so at my own risk and probably because a burglar broke into the shop and I need a makeshift weapon for self-defense in a hurry, rather than because I'm an irresponsible idiot, and if I *am* an irresponsible idiot, I'll probably find some other way to shoot myself or my co-worker no matter how idiot-proof you try to make the nailgun. Disclaiming all warranty and liability in the event of such tampering is the furthest it's generally reasonable to take matters -- and, of course, software makers are already in the habit of blanket disclaiming ALL liability, even for actual defects in workmanship! So I'd suggest that instead of monitoring the file for deletion or tampering you just name it something cutesy like "DELETING ME VOIDS WARRANTY AND MAY CAUSE MALFUNCTION.txt". :) Nah, probably not even that, since if the program hangs and has to be force-quit, then won't restart properly because of a stale lockfile, your support forums will end up chock full of long threads going Q: It hung, I end-tasked it, and it wont restart! A: Delete the lockfile and try restarting it again. Q: What's the "lockfile"? A: It's the file called "DELETING ME VOIDS WARRANTY..." Q: But I don't want to void my warranty and maybe cause even more bugs! A: The name's a joke. There's no warranty anyway and deleting it won't cause a malfunction if the program isn't currently running. Q: Are you sure? A: Yes. Q: Are you really, REALLY sure? A: Yes! Q: It won't void the warranty on my *computer itself* will it? A: It didn't come with the computer, so, no, it can't. Q: Hmm. It still doesn't seem like a good idea. I think I'll get a second opinion. <starts new thread on the same topic> A: <bangs head against wall> -- Hexapodia is the key insight.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-01 12:23 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-01 16:40 -0500
Re: single instance Robert Tomsick <robert+usenet@tomsick.net> - 2013-01-03 01:20 -0500
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-03 00:55 -0800
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-03 19:31 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-03 19:49 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-03 19:56 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-04 12:18 -0500
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-04 10:22 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-04 13:44 -0500
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-04 11:03 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-04 14:12 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-05 21:56 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 19:22 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:23 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 20:43 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:47 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 20:51 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:24 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 20:46 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:58 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 21:08 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 21:19 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 21:31 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 21:41 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 22:00 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 22:11 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-07 00:23 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-02-24 18:20 -0500
Re: single instance Joshua Cranmer <Pidgeot18@verizon.invalid> - 2013-01-06 21:39 -0600
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-07 00:30 -0500
Re: single instance lipska the kat <lipskathekat@yahoo.co.uk> - 2013-01-07 08:53 +0000
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-02-24 18:18 -0500
Re: single instance lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-25 08:31 +0000
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-02-24 18:17 -0500
Re: single instance Lew <lewbloch@gmail.com> - 2013-01-06 17:32 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 20:47 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:53 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 21:01 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-05 21:59 -0500
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 19:34 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:00 -0500
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-03 07:12 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-03 09:56 -0800
Re: single instance Martin Gregorie <martin@address-in-sig.invalid> - 2013-01-03 21:05 +0000
Re: single instance Martin Gregorie <martin@address-in-sig.invalid> - 2013-01-03 22:08 +0000
Re: single instance "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-05 12:48 +0000
Re: single instance Martin Gregorie <martin@address-in-sig.invalid> - 2013-01-05 17:43 +0000
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-05 09:49 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-05 13:02 -0500
Re: single instance Martin Gregorie <martin@address-in-sig.invalid> - 2013-01-05 20:29 +0000
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-05 19:07 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-06 20:04 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-05 21:40 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-05 22:10 -0500
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-05 19:49 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-05 23:09 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 11:00 -0500
Re: single instance Lew <lewbloch@gmail.com> - 2013-01-06 09:41 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-06 20:41 -0500
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-15 22:51 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-15 23:12 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-15 23:49 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-15 23:16 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-15 23:52 -0800
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-16 08:46 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-16 10:46 -0800
Re: single instance markspace <markspace@nospam.nospam> - 2013-01-16 13:01 -0800
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-16 17:10 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-15 23:50 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-16 00:13 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-16 02:48 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-16 07:28 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-16 10:46 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-16 16:53 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-16 23:44 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-17 07:03 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 14:25 -0800
Re: single instance Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2013-01-17 16:31 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 22:11 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 22:36 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-16 13:34 -0500
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-16 08:45 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-16 13:29 -0500
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-16 17:14 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-16 20:20 -0500
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-16 23:52 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-17 01:44 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-18 01:47 -0800
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-18 20:50 -0800
Re: single instance Roedy Green <see_website@mindprod.com.invalid> - 2013-01-20 00:53 -0800
Re: single instance Lew <lewbloch@gmail.com> - 2013-01-20 12:00 -0800
Re: single instance Knute Johnson <nospam@knutejohnson.com> - 2013-01-20 13:33 -0800
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-02-24 18:12 -0500
Re: single instance Arne Vajhøj <arne@vajhoej.dk> - 2013-01-20 21:33 -0500
Re: single instance "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-01-06 13:34 +0000
Re: single instance Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-01-04 10:26 -0800
Re: single instance Twirlip of the Mists <twirlip@killfile.me.now.invalid> - 2013-01-04 14:04 -0500
Re: single instance stledger@lanl.gov - 2013-01-16 14:51 -0800
Re: single instance stledger@lanl.gov - 2013-01-16 15:09 -0800
csiph-web