tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: jot: producing too much output?



> As an extra bonus, the appended patch causes jot to generate what
> you're expecting.

True.  But I don't understand why the code isn't instead something more
like

	if (! (have & REPS)) reps = 100;
	if (! (have & BEGIN)) begin = 1;
	if (! (have & ENDER)) ender = 100;
	if (! (have & STEP)) step = 1;
	...compute t and possibly reduce reps...

I am reminded of the aphorism that there are two ways to build a
system: you can make it so complex that there are no obvious defects,
or you can make it so simple there are obviously no defects.  The code
there now strikes me as closer to the former.

At the very least I think someone who knows jot's actual spec should
check that all 16 possible values of have produce their correct
behaviours.  I'd do it myself except I don't know where to find an
authoritative spec for jot.  What seems obvious to me is apparently not
a reliable guide in this case.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index