I think these types of discussions are rare but important (in moderation) in
a programming newsgroup.
By all means solving the A-Z question using a loop rather than 26 case
statements tells us something. Among them that you're efficient in your
solving of the dreaded uppercase A-Z conundrum
This can reasonably be
translated into "he thinks logically" and this is a programming asset.
Does this translate into "he can write applications?" I'm fairly certain it
does not. Lots of programmers are (algorithmically speaking) top notch but
are barely able to create a useable application. I fix code all the time,
these days usually taking over projects that have been abandoned by other
developers. In every case the code works, in some cases it was a creative
solution (not too often though) but in almost every case the "application"
shouldn't have worked that way.
I can't give detailed examples in a message but I find a menu option for
"Search" and sub-menu items for "By Code", "By Name", etc. The user is
forced to decide too early which method to find something, if the code he
keys in isn't found then he has to choose the menu and another sub-menu and
try again. Clearly the user just wants to find something so all search
options should be available from a composite search form. Having keyed in a
code and getting a "not found" dialog the user would simply try typing in a
name not navigate down a menu tree again. I don't even want the user to
have to dismiss a dialog box it's annoying after the 3rd or 4th miss. And
of course the thing should support (as an option) wild-card searches.
I'd say a good number of projects fail not because there isn't a lot of code
but because they are coding the wrong thing. When complete it isn't what
any user really needs though it may be want the user said he wanted.
I ran across a case where "reprints" prompted "Enter Invoice Number:" and
then reprinted one. The user often needed to reprint multiples so it was
suggested I let the user key up to 5 invoice numbers. Uhhh.... how about I
display the list of available invoices and they select as many as they feel
like? That eliminates having to check (and report) that the invoice number
doesn't exist (if they key it in wrong), the repeated selection of the
"Reprint" option and it means they could select several dozen and go off and
work on other things.
Are those questions asked during the interview? Is the goal to write
applications quickly or with the fewest lines of code or (once complete) to
make the company run more efficiently? The hotdog who wrote "Enter Invoice
Number" surely did it faster than my rewrite. I may have taken 5 times as
long to write it but I saved the users hours per week from them on. It
isn't my salary that was the offset it was the cumulative cost of all the
user's salaries.