Re: I Need Help



On May 1, 12:04 am, "mensana...@xxxxxxxxxxx" <mensana...@xxxxxxx>
wrote:

[..]

I never said it was the BEST algorithm. That wasn't the question.
And besides, MS-Access can't execute Pascal or C. And even if it
could, you sometimes need such output in a query to link to other
database structures, so the practice isn't nearly as pathetic
as you imagine. Of course, it's intractable if you ask for too much,
but you think a C implementation isn't also intractable if you ask
for all possible 12 letter permutions of 26 letters?

[..]


We need to distinguish simplicity of expression v. runtime
simplicity, where I'd interpret the latter as "overhead"
in some sense, and perhaps a third consideration also
needs throwing into the pot - conceptual simplicity.

Yes, the SQL expression is much shorter and simpler looking
than the full expression of an algorithm in terms of code.
So in that sense you're correct.

Also, runtime simplicity is open to interpretation, depending
on where you place the "ground level" so to speak, in other
words what you consider atomic operations. If your PC user
is not in a position to use a programming language, but
they have a database package installed and are comfortable
with SQL, then yes again the SQL solution is best and, being
only a single statement cannot be bettered (unless one can
code the Johnson-Trotter algorithm as a stored procedure ;-)

But as a hacker, I tend to think "closer to the iron" i.e.
in terms of machine intructions. Anyone with a rudimentary
grasp of how database engines work knows the SQL solution
will use several orders of magnitude more machine opcodes
to implement than the busy-looking psuedo-code in which
each step is (or, depending on the compiler, could be)
moreorless one-to-one with machine instructions.

What's more, if the database procedure is followed through
and expressed explicitly, even in an idealized sense, it will
involve many database-specific aspects that do not directly
relate to the algorithm (except in so far as they are needed
for the SQL solution to work). So in other words, the SQL
statement conceals many extraneous "concepts".

So in summary we're both right (although I still think I'm
more right than you on this, even if that makes me one of
the bad guys ;-)


Cheers

John R Ramsden

.



Relevant Pages

  • Re: I Need Help
    ... database structures, so the practice isn't nearly as pathetic ... We need to distinguish simplicity of expression v. runtime ... with SQL, then yes again the SQL solution is best and, being ... solve a linear congruence, ...
    (sci.math)
  • Re: General Opinion on a how to?
    ... You could store the name of the algorithm in the database along with some ... Load into a prize pool object instance for that game ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: out of memory
    ... read only the smaller file into a hash. ... the smaller file will fit into RAM. ... Depending upon the sorting algorithm this would be Ologor ... put your relevant data into a database and use ...
    (comp.lang.perl.misc)
  • Re: out of memory
    ... the smaller file will fit into RAM. ... Depending upon the sorting algorithm this would be Ologor ... put your relevant data into a database and use ...
    (comp.lang.perl.misc)
  • Re: Who is a Good Programmer?
    ... >>optimum for speed and maintainability, ... There is an implication here about the choice of algorithm. ... get a database and don't try to write the code ... Chuck that clean, ...
    (comp.programming)