Liste des Groupes | Revenir à col misc |
On 01/10/2024 15:57, Pancho wrote:Yeah, I remember people criticising this 30 years ago, but programmers are used to it now, so it doesn't confuse people.In essence just because you can do something clever, doesn't mean you should.That is what I loathed about compscis. As practising software engineers we specialised in 'good clean workmanlike well documented and structured code'.
Our job was to get the puter to do its job in the most understandable and maintainable way.
Not to impress people with the elegance complexity and incomprehensibility of our REGEX statements.
If all we had was vi and a C compiler, that's what we used.
And knowing that
p=(x>y?3:2);
produced identical assembler to:Yes, it is best that code is obvious. Standard design patterns are good too. A familiar complex pattern, is much easier to understand than an unfamiliar one.,
if (x>y)
p=3;
else
p=2;
there was a strong temptation to use the latter as being sufficiently simple for the time serving amateurs whose failure to complete the project was why we we employed at all...
We weren't employed to be clever. We were employed to write working code. And document it.
Les messages affichés proviennent d'usenet.