[ProgClub programming] Announcing the base() shell function
John Elliot V | ProgClub
jj5 at progclub.org
Sun Jun 23 13:26:59 AEST 2019
On 22/6/19 5:15 pm, Jedd Rashbrooke wrote:
> Elegance is a consensus activity.
It's really not. Elegance is a very personal and subjective experience.
I expect the qualia experienced by different programmers, even when they
agree on what constitutes elegance, varies quite a bit between people.
Of course I couldn't prove that. But for example I think that your
emotional response to "elegance" is more pronounced than mine. I'm
actually on record as saying that elegance is for children and that Real
Programmers just embrace the shit smelling slop that passes for mature
software. But I do still have some ideas about what is or isn't well
factored or fit for purpose code.
> You could ask a random selection of informed people whether they find a
> 70 line bash function that may work in some situations is more or less
> elegant than a one line alias that will work in every instance.
lol. You don't think it's a little presumptuous of you to speak for all
of the other people who might have an opinion?
I expect results would vary based on which programming languages people
knew, what kind of work they did, how much experience they had, and so
But there would certainly be plenty of people who appreciated a well
documented, error checked, general solution to a bunch of cryptic,
messy, limited, unmaintainable, error prone, poorly named, highly
dependent, special cases that didn't even meet the specification's
requirements ("because those requirements are stupid," obviously). The
number of lines of code in the solution is perhaps one small
consideration, not the alpha and the omega.
My personal opinion is that it's junior programmers who try to optimise
the number of lines of code in their solution. IMHO battle-hardened
programmers know that robust and debuggable solutions are gonna require
more lines of code (to handle all of the special/edge/error cases,
assert the state of their program, gather variables for watching or
reporting, logging, and so forth) and they just get on with the job
rather than worrying about that.
My experience of awkward error handling code is that it fades into the
background when you read the code and the generality of the algorithm
shines through. That is of course when you're dealing with an underlying
May the Force be with you,
John Elliot V
|_|_|O| Because every programmer needs a good club!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 231 bytes
Desc: not available
More information about the programming