First: Given that my point was specifically focused on refuting
that:
If it is identifiably and unmistakenly copied, there must be
_some_ creative freedoms exercised,
by identifying the fact that
such logic is very limited to a very small set of differences..... you're
correcting me on the bugginess of my code is kind of side-tracking the main
point. A possible straw man if you will.
Second: I have 15+ years
experience in developing code, 13 of those years has been with the same
language. So informing me that "Writing code is harder than you think" is
somewhat insulting. Especially given the context of the function in the
example.
Third: I did not author the code following the specific
punctuation of any language that I'm aware of. As a result, to the best of my
knowledge the code won't even compile.
Fourth: I applied the
specification based on the name of the function alone. As a result, I
personally can see several different deviations of what could actually apply so
my code will not work in all possible scenarios - but then neither would the
code authored by jjs. For example, what if the range check was supposed to be
to test the length of a character field. The value is a string. The high is
the max length, the low the min length. The point being: change the spec from
what I assumed and my code is inherently "buggy" due to the spec.
Fifth:
Depending on whether or not the particular language in question considers the
range values inclusively or exclusively would define how checking "3 in 3 to 3"
would play out. So while it may not work in the language(s) you're most
familiar with, it is valid for the one I work with. Admittedly I've never
tested that exact scenario. However, given that it would work for a range
defined within a loop, I highly suspect it will work with an IF statement. When
I get back to work after my vacation, I'm going to test that exact scenario and
post the results.
And Finally: This was such a huge waste of time to have
to explain the above given the more important aspect is that the original poster
apparently figures a range check function contains creative elements rather than
being almost totally functional. But then... I feel rather insulted with the
condescending tone in your final statement. Granted, in some languages you are
correct that 3 would not evaluate properly in "3 to 3". Can you admit there are
languages where it likely will evaluate properly?
Just to clarify the
language: I work with Oracle PL/SQL code.
RAS[ Reply to This | Parent | # ]
|