- 29,203
- 4,626
See https://www.physicsforums.com/showthread.php?t=486869
Both pictures identical, but when you click on them code is different.
Both pictures identical, but when you click on them code is different.
The discussion revolves around a perceived issue with LaTeX rendering on the Physics Forums, where identical images are generated from different code inputs. Participants explore whether this behavior constitutes a bug in the LaTeX processing system or the forum's web server.
Participants do not reach a consensus on whether the behavior constitutes a bug. There are multiple competing views regarding the nature of the issue and the appropriate response to it.
Participants note that the complexity of handling improper input can lead to significant overhead in software development, and that recognizing improper input can be particularly challenging.
Borek said:By my book it is a bug - if the code is invalid it should not yield correct, but different image.
I guess image was first generated OK, then message was edited and wrong code was entered, so new image was not generated, but old one WAS NOT DELETED.
There is a subtle misfeature here; it is the same one that forces us to refresh while generating a post that contains [ tex ] blocks. Whether this is a bug worthy of correction is a matter of opinion. Your book is not the same book that the owner of this site uses to make that distinction.Borek said:By my book it is a bug - if the code is invalid it should not yield correct, but different image.
D H said:Making software do the right thing given proper input is hard. For the most part, this site does do just that. (Occasionally we do get some weird database errors; those truly are bugs.) Making software do the right thing given improper input is extremely hard, an order of magnitude harder / more time-consuming compared to making software merely do the right thing given proper input.
D H said:Is the correction offered by I like Serena in post #3 "correct"?
[tex](Actual yield)/(Theoretical yield) * 100\%[/tex]
My opinion: Yech. No space before yield, and the spacing in actualyield looks a lot more like the product of a, c, t, u, a, l, ... rather than words. Much better is
[tex]\mbox{(Actual yield)}/\mbox{(Theoretical yield)} * 100\%[/tex]
Or just (Actual yield)(Theoretical yield)} * 100%.
If only it were that simple. Even if it was that simple, that still represents a huge cost overhead.I like Serena said:In short, it takes 2-3 times as much code to handle improper input.
D H said:Making software do the right thing given proper input is hard. For the most part, this site does do just that. (Occasionally we do get some weird database errors; those truly are bugs.) Making software do the right thing given improper input is extremely hard, an order of magnitude harder / more time-consuming compared to making software merely do the right thing given proper input.
D H said:Right, but you are doing it for profit. I also write scientific software, and I do do my best to make it foolproof. There is however a huge cost in doing so -- and even then I care a whole lot more about whether our software works correctly given correct input than I care about how our software works in the face of goofy input.
Greg is doing this for fun, and mostly for free. If physicsforums.com did generate all of or even a significant fraction of Greg's income we would have a significantly increased case here.
D H said:If only it were that simple. Even if it was that simple, that still represents a huge cost overhead.
There are times when the even recognizing that the input is improper is extremely hard, if not downright impossible. Some examples:
- Having the compiler determine whether a program halts. First off, there's the halting problem that makes answering this question a bit more than problematic. Secondly, what if the program isn't supposed to halt? Is halting an error? (In many cases, yes it is.)
- Having the compiler determine whether a variable is assigned a value before the variable is accessed. This is equivalent to the halting problem.
- Having a C compiler make sense of i = 5; printf ("%d\n", (i++)*i); The result might be to print 36. Or it might print 25, or 30, or 1234567890. Then it might result in a call reformat_hard_drive() or even eject_nasal_demons(). All are valid responses to such nonsense.
There is no way to anticipate all the goofy ways users can get things wrong. We can try, and trying is a "good thing", but there are no guarantees.
Borek said:Allocation of resources devoted to making program foolproof probably depends on the intended audience and their expected level of computer competence. I must assume I wrote for complete idiots Even then I am sometimes overestimating their knowledge - https://www.physicsforums.com/showthread.php?p=3184107#post3184107
I like Serena said:Nice one .
So did the customer get his money back?