Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.programming > #16781
| From | Julio Di Egidio <julio@diegidio.name> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: “Booleans Considered Harmful” |
| Date | 2025-05-23 07:04 +0200 |
| Organization | A noiseless patient Spider |
| Message-ID | <100ovl4$3tqmt$1@dont-email.me> (permalink) |
| References | <100mhh5$3b9hp$3@dont-email.me> <100mpta$32gho$1@dont-email.me> <100o8od$3mk15$3@dont-email.me> |
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
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
“Booleans Considered Harmful” Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-05-22 06:51 +0000
Re: “Booleans Considered Harmful” Julio Di Egidio <julio@diegidio.name> - 2025-05-22 11:14 +0200
Re: “Booleans Considered Harmful” Julio Di Egidio <julio@diegidio.name> - 2025-05-22 12:04 +0200
Re: “Booleans Considered Harmful” Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-05-22 22:33 +0000
Re: “Booleans Considered Harmful” Julio Di Egidio <julio@diegidio.name> - 2025-05-23 07:04 +0200
Re: “Booleans Considered Harmful” David Brown <david.brown@hesbynett.no> - 2025-05-22 13:51 +0200
Re: “Booleans Considered Harmful” Julio Di Egidio <julio@diegidio.name> - 2025-05-22 14:43 +0200
Re: “Booleans Considered Harmful” Julio Di Egidio <julio@diegidio.name> - 2025-05-22 14:57 +0200
Re: “Booleans Considered Harmful” Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-05-22 12:27 -0700
Re: “Booleans Considered Harmful” JJ <jj4public@outlook.com> - 2025-05-23 16:56 +0700
Re: “Booleans Considered Harmful” Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-05-23 22:58 +0000
Re: “Booleans Considered Harmful” Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-05-23 22:48 +0000
Re: “Booleans Considered Harmful” c186282 <c186282@nnada.net> - 2025-06-18 02:40 -0400
csiph-web