On Thu, 15 Aug 2024, Mike Katz wrote:
I am amazed at how many fresh outs I have met who
really can't program their
way out of a paper bag.
Advanced programming techniques don't help until they can actually
successfully think about the problem.
I had a guy working for me VERY briefly, with a UC Berkeley degree, but he
couldn't figure out how to do 3-up mailing labels on a daisy wheel
printer!
(sequence not mattering becuse they were manually peele off and use for a
mailing.)
He couldn't figure out any way to do it other than needing a way to roll
the paper back to get back to the top for the next column! not on THAT
printer!
(simple way - read three records into memory, print them side by side, and
then advance the paper)
He had a few other similar shortcomings.
I let him stay around until he peeled and stuck all of the labels, and to
give him time to find another job.
I gave a final exam question on how to sort/sequence the records of a
large file that was too big to fit into memory.
Several students who had gotten their start at the university insisted
that the only way it could be done was to add more memory.
(simple way - read a memory sized block from the file and sort it; do that
again, until you have a whole bunch of sorted shorter files, do a merge
sort of those)
Another: "A client has a large file that is in order. But each
day/week/month, additional records are appended to it. What's the best
sort algorithm to get the file back into order?"
(simple 1: put the new records into a separate file, sort that; then do a
merge sort between that and the main file.
simple 2: (if it isn't too large to manage) a bubble sort, with each pass
starting at the ENF of the file where the new records are, and working
towards th beginning, or a "shaker sort" that alternates direction. The
maximum nuber of passes is the number of records that were out of order.
(a "shaker sort" is the best sort algorithm for taking advantage of any
existing order, such as a few random records being in the wrong place)
--
Grumpy Ol' Fred cisin(a)xenosoft.com