Re: “Booleans Considered Harmful”

Liste des GroupesRevenir à c programming 
Sujet : Re: “Booleans Considered Harmful”
De : julio (at) *nospam* diegidio.name (Julio Di Egidio)
Groupes : comp.programming
Date : 23. May 2025, 06:04:36
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100ovl4$3tqmt$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 23/05/2025 00:33, Lawrence D'Oliveiro wrote:
On Thu, 22 May 2025 11:14:17 +0200, Julio Di Egidio wrote:
 
But we know better: the one best practice that would be relevant there
is *do not use magic values*.
 I think the writer was trying to make a point about
Is this the first time you hear there is something
wrong with the booleans?  And similar stupid shit?
Opinion leaders start some insane and self-serving
bullshit, be it the promotion of the latest magic
positions, or vice versa the bullshitting of whatever
is most sacred of our discipline: and a legion of
blog(ger)s just copies, maybe rephrases, and multiplies.
And a legion of incompetent programmers falls for it.
That's been going on for three decades now.  Indeed,
sorry for the wake up call, but, software-wise, 95%
of all that is available online, from the guidance
to the blogs, is not even wrong to put it charitably.

     saveUser(user, true, false);
with something more like
Here is another maxim: you cannot learn anything at
all about writing code from just the 5 liners!  Sure,
you can speculate, ad libitum: which is yet another
way in which all of that is *the exact opposite* of
what one should do in this job.  But just reread my
initial post, it's all already there, what one should
do, and how it fundamentally differs, in level and
direction from what you are chasing there.
And here is rather a tip: how many lines of code have
you read in your entire life?  For some reference,
I think I have spent at least my first 15 years of
profession not just seriously studying (SE) while
conscientiously practising, but also reading/studying
thousands and thousands and thousands of lines of code
of existing non trivial systems or specific solutions,
written by people who were more expert than me.
Thousands and even hundred thousands: not 5-ish.
Enough said: I won't belabour the point further.
-Julio

Date Sujet#  Auteur
22 May 25 * “Booleans Considered Harmful”12Lawrence D'Oliveiro
22 May 25 +* Re: “Booleans Considered Harmful”4Julio Di Egidio
22 May 25 i+- Re: “Booleans Considered Harmful”1Julio Di Egidio
22 May 25 i`* Re: “Booleans Considered Harmful”2Lawrence D'Oliveiro
23 May 25 i `- Re: “Booleans Considered Harmful”1Julio Di Egidio
22 May 25 +* Re: “Booleans Considered Harmful”3David Brown
22 May 25 i`* Re: “Booleans Considered Harmful”2Julio Di Egidio
22 May 25 i `- Re: “Booleans Considered Harmful”1Julio Di Egidio
22 May 25 +- Re: “Booleans Considered Harmful”1Keith Thompson
23 May 25 +* Re: “Booleans Considered Harmful”2JJ
23 May 25 i`- Re: “Booleans Considered Harmful”1Lawrence D'Oliveiro
23 May 25 `- Re: “Booleans Considered Harmful”1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal