Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 27 |
Nodes: | 6 (0 / 6) |
Uptime: | 41:18:28 |
Calls: | 631 |
Calls today: | 2 |
Files: | 1,187 |
D/L today: |
24 files (29,813K bytes) |
Messages: | 174,725 |
On Sat, 23 Aug 2025 19:45:19 -0400, Arne Vajh|+j wrote:
1) VMS Basic using = for both assignment and equal comparison,
while most other languages use different symbols (= and ==,
:= and =, = and .eq., ...)
But they only apply to non VMS Basic developers.
Nearly all BASICs were like that, including I think Microsoft BASIC.
On Sat, 23 Aug 2025 23:49:14 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Sat, 23 Aug 2025 19:45:19 -0400, Arne Vajh|+j wrote:
1) VMS Basic using = for both assignment and equal comparison,
while most other languages use different symbols (= and ==,
:= and =, = and .eq., ...)
But they only apply to non VMS Basic developers.
Nearly all BASICs were like that, including I think Microsoft BASIC.
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
On 8/24/2025 10:34 PM, Lawrence D?Oliveiro wrote:
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
Yes.
But note that the feature is not "interval comparison" but
"chaining comparison operators".
The above example is very readable and makes sense.
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
On 2025-08-25, Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/24/2025 10:34 PM, Lawrence D?Oliveiro wrote:
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
Yes.
But note that the feature is not "interval comparison" but
"chaining comparison operators".
The above example is very readable and makes sense.
Just don't try getting that code past me without first having used
brackets around the subexpressions. :-)
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
I am all for shoveling lots of parenthesis's all over the code to make
it really obvious.
On 2025-08-25, Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/24/2025 10:34 PM, Lawrence D?Oliveiro wrote:
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
Yes.
But note that the feature is not "interval comparison" but
"chaining comparison operators".
The above example is very readable and makes sense.
Just don't try getting that code past me without first having used
brackets around the subexpressions. :-)
True1 < 3 < 4
False1 < (3 < 4)
On 2025-08-25, Arne Vajhoj <arne@vajhoej.dk> wrote:
On 8/24/2025 10:34 PM, Lawrence D?Oliveiro wrote:
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
Yes.
But note that the feature is not "interval comparison" but
"chaining comparison operators".
The above example is very readable and makes sense.
Just don't try getting that code past me without first having used
brackets around the subexpressions. :-)
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
On 2025-08-25, Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/24/2025 10:34 PM, Lawrence D?Oliveiro wrote:
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
Yes.
But note that the feature is not "interval comparison" but
"chaining comparison operators".
The above example is very readable and makes sense.
Just don't try getting that code past me without first having used
brackets around the subexpressions. :-)
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
On 2025-08-25, Arne Vajh|+j <arne@vajhoej.dk> wrote:
[snip]
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
Which is why I always preferred working for people with well defined
local coding (and comment) standards. And, yes, I have worked for both.
In article <mhdnkaF9t36U1@mid.individual.net>,
bill <bill.gunshannon@gmail.com> wrote:
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
On 2025-08-25, Arne Vajh|+j <arne@vajhoej.dk> wrote:
[snip]
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
Which is why I always preferred working for people with well defined
local coding (and comment) standards. And, yes, I have worked for both.
Yup, though this doesn't _really_ address the question.
But yes: having a locally agreed upon style for such things is a
_huge_ boon for maintainability, particularly across a large
codebase. Sure, it's fun to belly up to the virtual bar and
debate the relative merits of different styles on USENET,
complete with contrived examples for or against different
conventions. But the reality is that if one is consistent
within a code base, it doesn't really matter all that much;
competent programmers will absorb the rules in a matter of days
or weeks.
The issue is that someone has to define the style and then
mandate its use, and it has to be enforced through rigorous
review and automated tooling. Given a sufficiently large group
of users, not everyone is going to agree with every rule; the
trick is in getting them to follow those rules regardless.
On 8/29/2025 9:24 AM, Dan Cross wrote:
In article <mhdnkaF9t36U1@mid.individual.net>,
bill <bill.gunshannon@gmail.com> wrote:
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
On 2025-08-25, Arne Vajh|+j <arne@vajhoej.dk> wrote:
[snip]
But it is less obvious with other operators.
Example:
4 == 4 == True
Most languages (possible all exception Python) evaluate
that to True, because it is treated like:
(4 == 4) == True
But it is False in Python because it is treated like:
(4 == 4) and (4 == True)
Which feels less natural.
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
Which is why I always preferred working for people with well defined
local coding (and comment) standards. And, yes, I have worked for both.
Yup, though this doesn't _really_ address the question.
But yes: having a locally agreed upon style for such things is a
_huge_ boon for maintainability, particularly across a large
codebase. Sure, it's fun to belly up to the virtual bar and
debate the relative merits of different styles on USENET,
complete with contrived examples for or against different
conventions. But the reality is that if one is consistent
within a code base, it doesn't really matter all that much;
competent programmers will absorb the rules in a matter of days
or weeks.
The issue is that someone has to define the style and then
mandate its use, and it has to be enforced through rigorous
review and automated tooling. Given a sufficiently large group
of users, not everyone is going to agree with every rule; the
trick is in getting them to follow those rules regardless.
If you are an employee you either comply, find a new position
or get fired. No real trick at all.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
You write them for the people who come after you who have to
maintain and extend them. People who have a good understanding
of the language but may have your level of expertise/knowledge/skills.
You write them for the people who understand most of the algorithms
involved, but maybe not at the level you do.
You also write them for yourself a couple of years from now and who
is now looking at this code written a couple of years ago and is now wondering which &*%&^% idiot wrote this code like this in the first
place :-)
On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
You write them for the people who come after you who have to
maintain and extend them. People who have a good understanding
of the language but may have your level of expertise/knowledge/skills.
You write them for the people who understand most of the algorithms
involved, but maybe not at the level you do.
You also write them for yourself a couple of years from now and who
is now looking at this code written a couple of years ago and is now wondering which &*%&^% idiot wrote this code like this in the first
place :-)
On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
You write them for the people who come after you who have to
maintain and extend them. People who have a good understanding
of the language but may have your level of expertise/knowledge/skills.
You write them for the people who understand most of the algorithms
involved, but maybe not at the level you do.
You also write them for yourself a couple of years from now and who
is now looking at this code written a couple of years ago and is now >wondering which &*%&^% idiot wrote this code like this in the first
place :-)
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
I doubt that.
I would expect with parenthesis's:
actually read expression : 2 second
thinking "nice to see good craftmanship" : 1 second
and without:
actually read expression : 1.9 second
thinking "arghh - this code looks written in hast - should I raise an
issue? No - there are probably more important issues!" : 3 seconds
:-)
In article <68b2087a$0$712$14726298@news.sunsite.dk>,
Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
I doubt that.
I would expect with parenthesis's:
actually read expression : 2 second
thinking "nice to see good craftmanship" : 1 second
if ((a == 6) || (a == 7)) {
// do the thing...
}
"Huh; I wonder why they parenthesized `a == 6` and `a == 7`....
the operator precedence is obvious, so what am I missing here?
"Huh; I wonder why they parenthesized `a == 6` and `a == 7`....
the operator precedence is obvious, so what am I missing here?
Not being an expert.
On 8/29/2025 5:44 PM, Dan Cross wrote:
In article <68b2087a$0$712$14726298@news.sunsite.dk>,
Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
I doubt that.
I would expect with parenthesis's:
actually read expression : 2 second
thinking "nice to see good craftmanship" : 1 second
if ((a == 6) || (a == 7)) {
// do the thing...
}
"Huh; I wonder why they parenthesized `a == 6` and `a == 7`....
the operator precedence is obvious, so what am I missing here?
Not being an expert.
There are experts that like to drizzle parenthesis's out
over the code.
There are experts that do not like to drizzle parenthesis's out
over the code.
There are no experts that has never heard of the practice of
drizzling parenthesis's out over the code.
On Fri, 29 Aug 2025 19:01:21 -0400, Arne Vajh|+j wrote:
"Huh; I wonder why they parenthesized `a == 6` and `a == 7`....
the operator precedence is obvious, so what am I missing here?
Not being an expert.
Not knowing how to keep docs handy?
In article <mhdnkaF9t36U1@mid.individual.net>,
bill <bill.gunshannon@gmail.com> wrote:
Which is why I always preferred working for people with well defined
local coding (and comment) standards. And, yes, I have worked for both.
Yup, though this doesn't _really_ address the question.
But yes: having a locally agreed upon style for such things is a
_huge_ boon for maintainability, particularly across a large
codebase. Sure, it's fun to belly up to the virtual bar and
debate the relative merits of different styles on USENET,
complete with contrived examples for or against different
conventions. But the reality is that if one is consistent
within a code base, it doesn't really matter all that much;
competent programmers will absorb the rules in a matter of days
or weeks.
The issue is that someone has to define the style and then
mandate its use, and it has to be enforced through rigorous
review and automated tooling. Given a sufficiently large group
of users, not everyone is going to agree with every rule; the
trick is in getting them to follow those rules regardless.
On 8/29/2025 9:24 AM, Dan Cross wrote:
In article <mhdnkaF9t36U1@mid.individual.net>,
bill <bill.gunshannon@gmail.com> wrote:
Which is why I always preferred working for people with well defined
local coding (and comment) standards. And, yes, I have worked for both.
Yup, though this doesn't _really_ address the question.
But yes: having a locally agreed upon style for such things is a
_huge_ boon for maintainability, particularly across a large
codebase. Sure, it's fun to belly up to the virtual bar and
debate the relative merits of different styles on USENET,
complete with contrived examples for or against different
conventions. But the reality is that if one is consistent
within a code base, it doesn't really matter all that much;
competent programmers will absorb the rules in a matter of days
or weeks.
Yes.
The issue is that someone has to define the style and then
mandate its use, and it has to be enforced through rigorous
review and automated tooling. Given a sufficiently large group
of users, not everyone is going to agree with every rule; the
trick is in getting them to follow those rules regardless.
It does not take that much to get coding conventions
followed.
If >5% of code is reviewed and not following coding
convention get flagged and the guilty get asked to fix
the code *and* other code that has same problem, then
in a few months everyone is following. The risk of
non compliance eventually being detected and the hassle
of doing the fixes makes it easier to do the right
thing the first time.
This is all true. I think one might paraphrase this as meaning
that you write code for the programmer that is slightly below
the median, and only hire engineers at median level or higher.
But this is slightly different than what I meant, which might be
similarly reframed as asking, how does one figure out what
"median" means? What is the base level of competence one might
assume when working on any given project/codebase/etc?
For instance, this demonstrably differs between organizations; I
would argue it often varies across projects within an
organization as well, and probably even within a project as the
project evolves over time. So how does one calibrate the median
point to which one targets ones programming standards, and how
does one ensure that it remains applicable?
So the way that I write software is likely to be far different
between projects/teams and across organizations. If I am
working on a project where excellence is the norm, then
parenthesizing every boolean expression is going to be tedious
and actually slow folks down; if I'm assuming all new-grads,
less so.
On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
This is all true. I think one might paraphrase this as meaning
that you write code for the programmer that is slightly below
the median, and only hire engineers at median level or higher.
But this is slightly different than what I meant, which might be
similarly reframed as asking, how does one figure out what
"median" means? What is the base level of competence one might
assume when working on any given project/codebase/etc?
For instance, this demonstrably differs between organizations; I
would argue it often varies across projects within an
organization as well, and probably even within a project as the
project evolves over time. So how does one calibrate the median
point to which one targets ones programming standards, and how
does one ensure that it remains applicable?
You could always create a "!!!Change_Skills_Required.README" in the
project (or subproject) root directory, stating with specific detail
what skills, knowledge, and experience level, are required before
it is appropriate for someone examining the project to start work
on it. Include references to appropriate papers or tutorial and
background material. Include the actual material in a references/
directory tree if appropriate.
Also include contact details for advice when they get stuck. Try to
list departments or teams instead of specific people if possible.
People change roles much more quickly that the overall team or
department does.
So the way that I write software is likely to be far different
between projects/teams and across organizations. If I am
working on a project where excellence is the norm, then
parenthesizing every boolean expression is going to be tedious
and actually slow folks down; if I'm assuming all new-grads,
less so.
You could also state this initial target audience in the above document.
PS: I'm actually serious about this. _You_, as the original team or
person to create a project, then get to set what is expected before
someone later on starts work on the project.
This stops that future person from having to guess what skills are
required and then finding out the hard way that they are in way over
their heads. It also avoids having to ask the questions you are
asking here.
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
- Dan C.
On 8/29/2025 9:11 AM, Dan Cross wrote:
In article <108k9de$1f69$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
And _this_ is an example of why Simon's policy of backets around
everything makes it explicitly clear what was intended. :-)
*At some expense for expert users.
Which again, comes back to what I think is _actually_ the
interesting question: who do we write these programs for?
We program for requirements, but have to remember that another may have to work
on the code at some time in the future. Clarity should be very important. As
for "experts", which can be nebulous, clarity never hurts.
I've noticed your preference over some time for "experts".
You were doubtful of my fondness for detailed comments in
programs.
"An expert should be able to understand code."
Well, there is no such thing as an "expert" that never
misunderstands some complex code. "WTINSTAAETNMSCC" :-)
But even if there was, what does such do to productivity? Nothing good, I'd think.
In article <10943ve$3r9go$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
This is all true. I think one might paraphrase this as meaning
that you write code for the programmer that is slightly below
the median, and only hire engineers at median level or higher.
But this is slightly different than what I meant, which might be
similarly reframed as asking, how does one figure out what
"median" means? What is the base level of competence one might
assume when working on any given project/codebase/etc?
For instance, this demonstrably differs between organizations; I
would argue it often varies across projects within an
organization as well, and probably even within a project as the
project evolves over time. So how does one calibrate the median
point to which one targets ones programming standards, and how
does one ensure that it remains applicable?
You could always create a "!!!Change_Skills_Required.README" in the
project (or subproject) root directory, stating with specific detail
what skills, knowledge, and experience level, are required before
it is appropriate for someone examining the project to start work
on it. Include references to appropriate papers or tutorial and
background material. Include the actual material in a references/
directory tree if appropriate.
Also include contact details for advice when they get stuck. Try to
list departments or teams instead of specific people if possible.
People change roles much more quickly that the overall team or
department does.
This all seems reasonable.
I would go a bit further and suggest
that this is largely what style guides _should_ provide. For
instance, see the Google C++ style guide, which is extremely
detailed: https://google.github.io/styleguide/cppguide.html
All engineers working in C++ at Google are expected to read and
internalize these rules, and a side-effect of the level of
detail expressed in them is that they do a reasonable job of
outlining the level of expertise expected of those programmers.
Google also scatters "OWNERS" files throughout the monorepo;Now. How many of them will be in the company in 25 years and
this is mainly for the vectoring code reviews (a review from an
OWNER is required for integration), but also gives a good
pointer to a team of folks who can help with any given project.
In article <68b2549f$0$718$14726298@news.sunsite.dk>,
Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/29/2025 9:24 AM, Dan Cross wrote:
In article <mhdnkaF9t36U1@mid.individual.net>,
bill <bill.gunshannon@gmail.com> wrote:
Which is why I always preferred working for people with well definedYup, though this doesn't _really_ address the question.
local coding (and comment) standards. And, yes, I have worked for both. >>>
But yes: having a locally agreed upon style for such things is a
_huge_ boon for maintainability, particularly across a large
codebase. Sure, it's fun to belly up to the virtual bar and
debate the relative merits of different styles on USENET,
complete with contrived examples for or against different
conventions. But the reality is that if one is consistent
within a code base, it doesn't really matter all that much;
competent programmers will absorb the rules in a matter of days
or weeks.
Yes.
The issue is that someone has to define the style and then
mandate its use, and it has to be enforced through rigorous
review and automated tooling. Given a sufficiently large group
of users, not everyone is going to agree with every rule; the
trick is in getting them to follow those rules regardless.
It does not take that much to get coding conventions
followed.
Statements like this beg the question, what is the largest
project you have worked on, and with how many other engineers?
I am asking sincerely, by the way; that's not a dig.
I once worked in a, at the time, 2BLOC monorepo with ca O(10^5)
programmers working in it concurrently in ~20 engineering
offices spread across the globe.
Mgr->Dev
A tiny subproject within that was ~1MLOC split between about 500
KLOC in C++, and the other 500 KLOC in Common Lisp; HC was
around 20 FTEs mostly in a single office.
The local style guide mandated that the maximum line lenth in
Lisp was 100 characters; I counted and estimated that at least
20% of lines had more than 110 characters.
That project came through an acquisition, and the code was
inherited. On the other hand, the rest of the organization had
_very_ rigorous code style rules for various languages (five
officially supported languages, and a dozen or so other,
unofficially supported languages) and gated integration
verifying compliance with those rules through both review and
automatic tooling. In that code base, style violations were
exceedingly rare.
But this is the difference between making something a strong
part of the organization's cultural norms and supporting it with
tooling and just wishing the problem away.
If >5% of code is reviewed and not following coding
convention get flagged and the guilty get asked to fix
the code *and* other code that has same problem, then
in a few months everyone is following. The risk of
non compliance eventually being detected and the hassle
of doing the fixes makes it easier to do the right
thing the first time.
That's cute, until managers step in and tell you to igore all of
that, because they've got a customer breathing down their neck
to get a feature they need into production. It also shows a
distinct lack of respect for your engineers.
The point is that you really need to inculctate respect for the
value that comes from rigorous adherence to those rules, and
support it with tooling so that they are easy to comply with
(and there are meaningful consequences for igoring them---like
your change just can't be submitted). Otherwise, they will just
be ignored, and attempts to force them by making people do a
bunch of grunt work if they're caught violating one will
backfire.
The "culture of fear" approach that you and Bill both seem to be
advocating simply does not scale, especially once it runs
headlong into the reality of the business considerations that
come with taking engineer time to do a bunch of busy work to
fix something that somebody else did.
Arne Vajh|+j <arne@vajhoej.dk> wrote:
* Wirth Pascal did not have it (conformant array)
AFAIK Wirth Pascal had it.
On 8/29/2025 10:33 PM, Dan Cross wrote:
In article <68b2549f$0$718$14726298@news.sunsite.dk>,
Arne Vajh|+j <arne@vajhoej.dk> wrote:
On 8/29/2025 9:24 AM, Dan Cross wrote:
In article <mhdnkaF9t36U1@mid.individual.net>,
bill <bill.gunshannon@gmail.com> wrote:
Which is why I always preferred working for people with well defined >>>>> local coding (and comment) standards. And, yes, I have worked for both. >>>>Yup, though this doesn't _really_ address the question.
But yes: having a locally agreed upon style for such things is a
_huge_ boon for maintainability, particularly across a large
codebase. Sure, it's fun to belly up to the virtual bar and
debate the relative merits of different styles on USENET,
complete with contrived examples for or against different
conventions. But the reality is that if one is consistent
within a code base, it doesn't really matter all that much;
competent programmers will absorb the rules in a matter of days
or weeks.
Yes.
The issue is that someone has to define the style and then
mandate its use, and it has to be enforced through rigorous
review and automated tooling. Given a sufficiently large group
of users, not everyone is going to agree with every rule; the
trick is in getting them to follow those rules regardless.
It does not take that much to get coding conventions
followed.
Statements like this beg the question, what is the largest
project you have worked on, and with how many other engineers?
I am asking sincerely, by the way; that's not a dig.
I once worked in a, at the time, 2BLOC monorepo with ca O(10^5)
programmers working in it concurrently in ~20 engineering
offices spread across the globe.
Some small some big.
Not quite as big as that though.
But the important question is not the size of the org.
The important question is the commitment of senior management
to enforce governance.
A tiny subproject within that was ~1MLOC split between about 500
KLOC in C++, and the other 500 KLOC in Common Lisp; HC was
around 20 FTEs mostly in a single office.
The local style guide mandated that the maximum line lenth in
Lisp was 100 characters; I counted and estimated that at least
20% of lines had more than 110 characters.
That project came through an acquisition, and the code was
inherited. On the other hand, the rest of the organization had
_very_ rigorous code style rules for various languages (five
officially supported languages, and a dozen or so other,
unofficially supported languages) and gated integration
verifying compliance with those rules through both review and
automatic tooling. In that code base, style violations were
exceedingly rare.
But this is the difference between making something a strong
part of the organization's cultural norms and supporting it with
tooling and just wishing the problem away.
Wishing does not solve anything.
But leadership does.
The CTO want the standard followed.
All supervisors get a goal in their MBO/WG/whatever
to implement review minimum X% of code, ticket
deviations and ensure they get fixed.
Then do it. Nobody will want to mess up their >bonus/raise/promotion/stackranking/whatever
for that.
Developers get the stuff reviewed. They get a ticket
to fix it in that code and other code. After one or
two times they make sure that there is no deviations -
easier to just do it right the first time than to
have to do it later.
If >5% of code is reviewed and not following coding
convention get flagged and the guilty get asked to fix
the code *and* other code that has same problem, then
in a few months everyone is following. The risk of
non compliance eventually being detected and the hassle
of doing the fixes makes it easier to do the right
thing the first time.
That's cute, until managers step in and tell you to igore all of
that, because they've got a customer breathing down their neck
to get a feature they need into production. It also shows a
distinct lack of respect for your engineers.
Those tickets just get handled similar to any other tickets
not making it for the release.
They go into the todo-list/backlog/whatever.
Totally standard process.
The point is that you really need to inculctate respect for the
value that comes from rigorous adherence to those rules, and
support it with tooling so that they are easy to comply with
(and there are meaningful consequences for igoring them---like
your change just can't be submitted). Otherwise, they will just
be ignored, and attempts to force them by making people do a
bunch of grunt work if they're caught violating one will
backfire.
The "culture of fear" approach that you and Bill both seem to be
advocating simply does not scale, especially once it runs
headlong into the reality of the business considerations that
come with taking engineer time to do a bunch of busy work to
fix something that somebody else did.
It is how businesses work.
Developers are free to use whatever standard or lack
of standard in their hobby projects.
At work they do whatever the company want, because the
company is paying them to do that.
It is the only approach that scale.
Having everyone do what they believe is right does
not scale.
On 9/2/2025 9:35 AM, Dan Cross wrote:
In article <10943ve$3r9go$1@dont-email.me>,
Simon Clubley <clubley@remove_me.eisner.decus.org-Earth.UFP> wrote:
On 2025-08-29, Dan Cross <cross@spitfire.i.gajendra.net> wrote:
This is all true. I think one might paraphrase this as meaning
that you write code for the programmer that is slightly below
the median, and only hire engineers at median level or higher.
But this is slightly different than what I meant, which might be
similarly reframed as asking, how does one figure out what
"median" means? What is the base level of competence one might
assume when working on any given project/codebase/etc?
For instance, this demonstrably differs between organizations; I
would argue it often varies across projects within an
organization as well, and probably even within a project as the
project evolves over time. So how does one calibrate the median
point to which one targets ones programming standards, and how
does one ensure that it remains applicable?
You could always create a "!!!Change_Skills_Required.README" in the
project (or subproject) root directory, stating with specific detail
what skills, knowledge, and experience level, are required before
it is appropriate for someone examining the project to start work
on it. Include references to appropriate papers or tutorial and
background material. Include the actual material in a references/
directory tree if appropriate.
Also include contact details for advice when they get stuck. Try to
list departments or teams instead of specific people if possible.
People change roles much more quickly that the overall team or
department does.
This all seems reasonable.
Horrible idea.
It works fine as long as original team is around and the language
used is still a main language in the company.
But a lot of software stay around for a very long time. 20 years,
30 years, 40 years.
Employees and skills does not.
Companies merge and spinoff. Developers get new jobs. Main
languages are changed.
And suddenly there is a need to make a fix or an enhancement in that
old program (which may still be making lot of money). And none from
the original team is around and the language is no longer a main
language so no real experts in that language around any more.
Some developer get assigned to do the fix/enhancement and start by
finding the "You need to be an expert in this language and if you
have questions ask A or B" file.
Depending on the personality it will end in:
* laughing
* crying
* cursing
* writing to TheDailyWtf
Useless.
There is an old joke with a very good point:
"Always code as if the guy who will maintain your code is a violent >psychopath who knows where you live"
I would go a bit further and suggest
that this is largely what style guides _should_ provide. For
instance, see the Google C++ style guide, which is extremely
detailed: https://google.github.io/styleguide/cppguide.html
All engineers working in C++ at Google are expected to read and
internalize these rules, and a side-effect of the level of
detail expressed in them is that they do a reasonable job of
outlining the level of expertise expected of those programmers.
That works great in current situation.
But what if Google sell the product in 15 years due to some
corporate restructuring. The buying company will not adopt
that guide.
What if Google in 20 years decode to drop C++ as a main
language and drop the guide. Maybe not likely with that
company and that language, but in general companies change
preferred languages occasionally.
Google also scatters "OWNERS" files throughout the monorepo;
this is mainly for the vectoring code reviews (a review from an
OWNER is required for integration), but also gives a good
pointer to a team of folks who can help with any given project.
Now. How many of them will be in the company in 25 years and
still remember anything?
On Sat, 23 Aug 2025 23:49:14 -0000 (UTC), Lawrence DrCOOliveiro wrote:
On Sat, 23 Aug 2025 19:45:19 -0400, Arne Vajh|+j wrote:
1) VMS Basic using = for both assignment and equal comparison,
while most other languages use different symbols (= and ==,
:= and =, = and .eq., ...)
But they only apply to non VMS Basic developers.
Nearly all BASICs were like that, including I think Microsoft BASIC.
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
On Mo 25 Aug 2025 at 02:34, Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
One trick they missed was allowing interval comparisons like this:
if "0" <= ch <= "9" or "a" <= ch <= "f" or "A" <= ch <= "F" :
I think only Python has that.
You can do rhe same in Common Lisp and various schemes.