Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > this should work

Reply
Thread Tools

this should work

 
 
Ivan Shmakov
Guest
Posts: n/a
 
      07-22-2013
>>>>> Rainer Weikusat <(E-Mail Removed)> writes:
>>>>> Ivan Shmakov <(E-Mail Removed)> writes:
>>>>> Rainer Weikusat <(E-Mail Removed)> writes:


> The text below is only remotely concerned with software engineering


It's still concerned with food, though, which I'm having a kind
of a lifelong interest in.

[...]

>>> Minus some obvious misconceptions (eg, the 'off the shelf' food is
>>> designed by 'food engineers' to be 'soundly nutrirional', ie,
>>> contain everything fashion currently demands that it should and
>>> not contain anything fashion demands that it currently mustn't,


>> The nutritional requirements of an average healthy adult are more or
>> less well-known (check, e. g., [1]), and do not depend much on
>> "fashion," whatever one's misconceptions may be.


>> [1] http://www.iom.edu/Global/News%20Ann...ry_Listing.pdf


> I'm sorry if I didn't pay proper respect to your preferred
> (mis-)conception, but there are simply to many of them, even when
> just counting 'current' ones which include books of
> impressively-looking tables.


While I understand the importance of doubt, I'd like to point
that in this case, these "impressively-looking tables" are based
on the very same kind of scientific evidence as that a surgeon
or a rocket engineer rely upon.

Sadly, the conventional wisdom puts more trust in glossies that
it does in the Institute of Medicine publications.

> Prior to Mad Cow Disease, nutrional requirements of cows were already
> well-known.


Isn't it stretched a bit? It sounds as if prions were once
thought as a constituent of a healthy cow diet, and then, -- all
of a sudden, -- were found not to be. (While in reality, the
"health benefits" of prions are as dependent on "fashion," as
are those of the most of cyanides, dioxins, or strychnine.)

> Do we really have a surge of ideologically blinded suicide bombers
> nowadays?


Somehow, it was my understanding that the family of a suicide
bomber will at times receive support from those "authorizing"
the bombing. Therefore, it indeed may have more to do with the
"diet" than with the "ideology."

[...]

>>> while less sophisticated people like me get by somehow with
>>> vegetables, meat, spices


>> (... Except that all of the above were "engineered," one way or the
>> other.)


> Indeed. I remember an old joke which went roughly like this:


[...]

> With the help of a suitable set of definitions, any term can be
> interpreted to mean anything, at the expense of rendering meaningful
> communication impossible (which may be desired).


Yet another joke I recall says that one doesn't ask questions to
a programmer, for the answer will be true, precise, and useless
in practice.

But the fact is: the varieties grown on the fields of today are
"better" (at least when it comes to the yield; and the
difference may easily be of an order of magnitude) than those
cultivated a century ago; and it's likely that those that will
be grown a century from now will be "better" still.

So, the choice is: to wait, or to use what's available right
now?

>>> and tools to prepare these in some completely 'unscientific' way),


>> The "food engineers" of today have learned that they have to make
>> food "tasty", not "healthy," in order to succeed. Which more or
>> less corresponds to what I may otherwise call an "unscientific" way.


> The purpose of 'the sense of taste' is to enable distinction between
> 'healthy' and 'unhealthy' things one could possibly eat. It works
> better for horses because these tend to approach the matter
> empirically and with an unprejudiced mind, something humans,
> especially humans wielding statistics, rarely do.


The evolution (which gave the horse its "sense of taste" -- as
well as all the other senses) is as wise as it's blind. And, if
it's so easy to fool the eye with an optical illusion, shouldn't
it be at least remotely possible to fool one's sense of taste?

Why, it was my understanding that it's what at least some of the
pesticides do: use a toxin which is "tasty" to its victim.
(Something that, they argue, is the ultimate goal of the
"fast food" industry of today.)

>>> I have no idea what this was supposed to mean.


>> My point is simple: if the deadline is today, one has to forget
>> about "science" (be it Wirth's, Borlaug's, or someone's else), and
>> use whatever "ingredients" available to solve the task at hand. Be
>> it a program, or a dinner.


> That just a convenient justification the proverbial old poodle uses
> in order to defend against the supposition of having to learn new
> tricks: Whatever the benefits might be, I've got no time for this
> ATM, I'm to busy performing the old ones, constantly working around
> their deficiencies, and won't ever have any time for that, either.


And it's quite natural, and happens in just every field of human
activity. To paraphrase, it takes a touch of genius to do
otherwise.

I'd like to also respond to the other argument here.

> According to my experience, writing 'bad' code (for a suitable
> definition of 'bad') doesn't take less time than writing 'good' code
> (for a suitable definition of 'good')


... It sounds as if the time required to learn to write "good"
code was somehow assumed to be zero or negligible, while I
sincerely doubt that it really is.

--
FSF associate member #7257
 
Reply With Quote
 
 
 
 
Rui Maciel
Guest
Posts: n/a
 
      07-26-2013
Ivan Shmakov wrote:

> [...]
>
> ... Once, I will find the patience to wait for the food
> engineers out there to design a sound nutritional solution.
>
> Meanwhile, I'm forced to rely on the off-the-shelf products,
> which are known to be full of undocumented features, deviate
> from the specifications every now and then, and (while I'm yet
> to see one myself) are reported to contain actual bugs...
>
> [Cross-posting to news:alt.food and news:comp.programming.
> Just in case.]


All engineering relies on off-the-shelf products. The shelf, though, does
depend on the circumstances and requirements. Nevertheless, it's off-the-
shelf all the way down to the turtles, if you will.[1]


Rui Maciel

[1] http://en.wikipedia.org/wiki/Turtles_all_the_way_down
 
Reply With Quote
 
 
 
 
Xho Jingleheimerschmidt
Guest
Posts: n/a
 
      09-16-2013
On 09/15/13 16:16, David Harmon wrote:
> On Sun, 14 Jul 2013 17:34:50 +0200 in comp.lang.perl.misc, "Dr.Ruud"
> <(E-Mail Removed)> wrote,
>> On 14/07/2013 17:11, Tim McDaniel wrote:
>>> In article <(E-Mail Removed)>,
>>> Ben Morrow <(E-Mail Removed)> wrote:
>>>> Quoth "Dr.Ruud" <(E-Mail Removed)>:

>>
>>>>> qq{
>>>>> SELECT
>>>>> $columns_csv
>>>>> FROM
>>>>> $table
>>>>> WHERE
>>>>> id IN (@ids) -- hundreds easily
>>>>
>>>> Please, someone tell your cow-orkers about placeholders...
>>>
>>> The classic "Bobby Tables" strip:
>>> http://xkcd.com/327/

>>
>> Yeah, also doesn't apply.
>>
>> See how I left out what @ids is. Now, in stead of assuming anything else
>> again, assume that @ids can only contain numbers, and that each is
>> between 1 and some maximum.

>
> Uhm, no. When evaluating whether code is broken or not, you don't
> assume perfect flawless input. You assume worst case malicious NSA
> type input.
>


Fascinating. So no matter how much validating I've done of the data, I
have to assume that the data has not been validated. Do I get an
exemption from this if the data was consumed and validated with no
semicolons intervening? How about no newlines intervening? None of either?

Xho



 
Reply With Quote
 
Rainer Weikusat
Guest
Posts: n/a
 
      09-16-2013
David Harmon <(E-Mail Removed)> writes:
> On Sun, 14 Jul 2013 17:34:50 +0200 in comp.lang.perl.misc, "Dr.Ruud"
> <(E-Mail Removed)> wrote,
>>On 14/07/2013 17:11, Tim McDaniel wrote:
>>> In article <(E-Mail Removed)>,
>>> Ben Morrow <(E-Mail Removed)> wrote:
>>>> Quoth "Dr.Ruud" <(E-Mail Removed)>:

>>
>>>>> qq{
>>>>> SELECT
>>>>> $columns_csv
>>>>> FROM
>>>>> $table
>>>>> WHERE
>>>>> id IN (@ids) -- hundreds easily
>>>>
>>>> Please, someone tell your cow-orkers about placeholders...
>>>
>>> The classic "Bobby Tables" strip:
>>> http://xkcd.com/327/

>>
>>Yeah, also doesn't apply.
>>
>>See how I left out what @ids is. Now, in stead of assuming anything else
>>again, assume that @ids can only contain numbers, and that each is
>>between 1 and some maximum.

>
> Uhm, no. When evaluating whether code is broken or not, you don't
> assume perfect flawless input. You assume worst case malicious NSA
> type input.


The code is 'broken' when it doesn't process the data it is supposed to
process such that the intended result results from that. Eg, this

sub sum
{
return $_[0] + $_[1];
}

is a function which will return the sum of its first two arguments
provided that both are numbers. It can be made to do something very much
different,

---------
package Ha;

use overload "+" => negate;

sub new
{
return bless([], $_[0]);
}

sub negate
{
return ~$_[1];
}

package main;

sub sum
{
return $_[0] + $_[1];
}

print(sum(3, 4), "\n");
print(sum(Ha->new(), 4), "\n");
---------

but this doesn't mean 'sum is broken': The precondition 'first two
arguments are numbers' is not true for the second call, hence, the
postcondition won't necessarily be true afterwards.

Whether or not 'will be a number > 1' is a sensible precondition in a
given situtation would be a different question.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Who can explain this bug? mathog C Programming 57 06-11-2013 10:09 PM
How do I encode and decode this data to write to a file? cl@isbd.net Python 11 05-01-2013 11:36 PM
Why does this incorrect CRTP static_cast compile? kfrank29.c@gmail.com C++ 2 04-25-2013 01:38 PM
This looks like a Perl bug George Mpouras Perl Misc 18 04-21-2013 11:56 PM
Really throwing this out there - does anyone have a copy of my oldDancer web browser? steven.miale@gmail.com Python 1 04-10-2013 03:32 PM



Advertisments