Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] using rusage
- Date: Mon, 23 Jun 2008 09:48:52 +0900
- From: Curt Sampson <cjs@example.com>
- Subject: Re: [tlug] using rusage
- References: <20080619035005.GB11561@lucky.cynic.net> <78d7dd350806190155k328d24bcjcf61cb707c42045c@mail.gmail.com> <20080619114706.GA15943@lucky.cynic.net> <d8fcc0800806191638u4afa8ac9v62409fe0305ad233@mail.gmail.com> <20080620001947.GD19792@lucky.cynic.net> <d8fcc0800806200039t32a6fe51h11ad9b0bec24037e@mail.gmail.com> <20080622003114.GI7494@lucky.cynic.net> <d8fcc0800806211748y4bf4783cla401afe0df23b04a@mail.gmail.com> <20080622043337.GC9873@lucky.cynic.net> <d8fcc0800806221604i19e81180r9e50256dd6a273aa@mail.gmail.com>
- User-agent: Mutt/1.5.17 (2007-11-01)
On 2008-06-23 08:04 +0900 (Mon), Josh Glover wrote: > 2008/6/22 Curt Sampson <cjs@example.com>: > > > For any software you're modifying, you essentially pay a maintenance > > charge on every single line of code, every month. > > Of course. But this is never a good reason to not program defensively. Sure it is. You can go overboard with defensive code as much as with anything else. Perhaps you really meant, "defensively within reason," for example, by not doing a readback and compare of every block you write to the disk, in which case we would be in agreement that you need to strike a balance. You might also have a look at Erlang, where it's common practice not to bother with error-checking code, and "let it fail" is the usual mode of operation. > In C, you just have to accept that you are going to need some guard > code. You should certainly factor that guard code well; macros can be > your friend here. Yup. > I find that any maintenance charge that defensive programming may > introduce is less than that of debugging a catastrophic failure that > lost data because "malloc() can never fail". Right. That is a cost-benefit decision where in most cases I would agree with you. The difference is that I looked at it explicitly from a cost-benefit point of view, and recognised that that's a trade-off I'm making. cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com
- Follow-Ups:
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Edward Middleton
- References:
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Hung Nguyen Vu
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [OT] Re: [tlug] Looking for Mailman expert
- Next by Date: Re: [OT] Re: [tlug] Looking for Mailman expert
- Previous by thread: Re: [tlug] using rusage
- Next by thread: Re: [tlug] using rusage
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links