× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Sun, Jan 22, 2012 at 7:22 AM, CRPence <CRPbottle@xxxxxxxxx> wrote:
On 21-Jan-2012 21:08 , John Yeung wrote:
It's interesting to see the solutions people come up with, based to a
very large extent on what they are comfortable with. "When all you
have is a hammer, all your problems start looking like nails" and all
that.

  Or, the problem might just be a nail.

Absolutely. Plus, I think it's an oversimplification to imply that
modern tools are as simple and narrow-purpose as a hammer. It
actually grates on me whenever I read someone say, in a computer
context, "use the right tool for the job". I think most computer
problems have many "right" tools. It would be more accurate to say
"don't use the wrong tool for the job", but that is longer and doesn't
have the same ring to it, I guess.

(And, as you imply when you say "if ..., then the best tool for the
job would presumably be...", it is more often the case that there are
"better" and "worse" tools, rather than "right" and "wrong" ones.)

  Besides that, the OP stated that they wanted to avoid their current
proposed solution that would "create an intermediate file, with the Last
Name as a separate field".  And their own solution description which
they apparently have chosen to avoid, seems little different than the
"Unixy" solution that was proposed.?

I agree. My own feeling is that, if the OP has enough disk space (he
seems to mention the size of the file in order to impress upon us that
either memory or disk could be a constraint), then the most
straightforward solution, regardless of specific language/environment,
is to make an explicit intermediate file which is more easily sorted.
I.e. in broad terms, to use OP's own solution.

You brought up another good point, which is: It could make a
difference whether the file is a physical file or a stream file. This
is one reason my favorite "hammer" on the i is iSeries Python. It
handles both with incredible ease. (I didn't already suggest this
route for the OP mostly because he seemed to be looking for solutions
that don't involve writing his own program.)

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.