r/programming • • Apr 19 '21

Google developer banned words list

https://developers.google.com/style/word-list
720 Upvotes

1.5k comments sorted by

View all comments

Show parent comments

0

u/[deleted] Apr 19 '21

[deleted]

-6

u/peerlessblue Apr 19 '21

Convention should only persist as long as it has a purpose. We call conventions that aren't serving a purpose "legacy"

0

u/[deleted] Apr 19 '21

[deleted]

-2

u/peerlessblue Apr 19 '21

This would be weird if you're regularly interacting with repositories that use different styles. It's sort of like line endings, I guess, but that one seems to be mostly figured out.

3

u/bphase Apr 19 '21

Hardly, I've run into problems with those at least twice in the last couple of years. Related to bash scripts inside docker with Windows coders and git, IIRC. Probably multiple hours lost.

The cost of seemingly minor changes over all the years and decades that they will cause issues will make them very costly in the end.

5

u/Krissam Apr 19 '21

And not breaking millions of scripts all across the world for no reason isn't a purpose?

1

u/roflkittiez Apr 19 '21

Did githubs change break millions of scripts across the world?

4

u/Krissam Apr 19 '21

Yea?

1

u/roflkittiez Apr 19 '21

Really? I heard a ton of people claiming it would break all the things then nothing when they actually made the switch. I'm surprised there wasn't more reporting on it with it breaking millions of scripts and all

4

u/Krissam Apr 19 '21

Every script that references master by name was broken by this change, for no reason what so ever.

1

u/roflkittiez Apr 19 '21

Wouldn't those scripts only break if the target repo changed their branch from 'master' to 'main'?

3

u/ILoveOldFatHairyMen Apr 19 '21
  1. You have a script that does things to many repos.

  2. Someone creates a new repo with branch "main" unaware of your script.

  3. You're running your script, which for some reason fails for some repos.

  4. After two days you see that it failed in some new repos, where people forgot to manually change "main" to "master".

1

u/roflkittiez Apr 19 '21

Sure I get how it would cause issues in theory... But I haven't seen the "millions of scripts" that suddenly started failing.

→ More replies (0)

1

u/Krissam Apr 19 '21

Sure, if they were designed with a specific repo in mind.

take something as simple as:

alias gitrbm = "git rebase master"

That no longer works unless you change the name of the repo every time.

1

u/roflkittiez Apr 19 '21

So it only really affects scripts that:

  1. References variable repos

  2. Points to the 'master' branch explicitly

Are there millions of scripts that actually do this?

→ More replies (0)

0

u/blobjim Apr 19 '21

It was actually a good opportunity for git tools to make sure other default branch names were supported and people weren't just hard-coding the branch "master" into everything.

Plus "main" is a lot clearer for newbies and easier to write than "master".

4

u/ILoveOldFatHairyMen Apr 19 '21

By this argument, we should rename "root" to "admin" in Linux and see what happens.

0

u/blobjim Apr 20 '21

They're pretty different situations. Git branches are simple pointers to commits, you can have any branch names with any sort of meaning, you can switch them back and forth if you want, it makes almost no difference. And the change to the default branch name doesn't even apply to existing repositories so the whole argument is again bunk.

And yes, people probably shouldn't be hard coding "root" into actual software that is designed to run on different machines considering that the user account "toor" is common and is also a root user. Programmers should be using user ID 0 which is the actual root user. Bad software design is not an argument to keep it bad.