Discussion:
[ale] One for systemd haters
Lightner, Jeffrey via Ale
2018-10-09 14:38:10 UTC
Permalink
I just ran across this issue. (Not asking for help since the link solved it - just venting.)

https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory

What mentally deficient cretin in the Systemd development world decided naming a file with a "-" as first character was a good idea?

This is right up there with Oracle long ago deciding to name things "core" while ignoring the fact most people had cron jobs to find and delete core dump files on a regular basis.

P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.



CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you
Jim Kinney via Ale
2018-10-09 14:50:47 UTC
Permalink
????? That is not what I see in my /usr/lib/systemd/system dir. There's
exactly 0 files whose name begins with a '-'. That would be beyond
dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
Post by Lightner, Jeffrey via Ale
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good
idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find and
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or
confidential information and is for the sole use of the intended
recipient(s). If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this
electronic transmission in error, please reply immediately to the
sender that you have received the message in error, and delete it.
Thank you
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
James Taylor via Ale
2018-10-09 15:05:01 UTC
Permalink
Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No files
starting with -
IS there some special case where it is used?
-jt



James Taylor
678-697-9420
????? That is not what I see in my /usr/lib/systemd/system dir.
There's
exactly 0 files whose name begins with a '-'. That would be beyond
dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
Post by Lightner, Jeffrey via Ale
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good
idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find
and
Post by Lightner, Jeffrey via Ale
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or
confidential information and is for the sole use of the intended
recipient(s). If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this
electronic transmission in error, please reply immediately to the
sender that you have received the message in error, and delete it.
Thank you
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
Lightner, Jeffrey via Ale
2018-10-09 15:10:22 UTC
Permalink
Jim followed up saying he saw it on CentOS7. I saw the same "-slice" file on 2 of my RHEL7 systems before I posted. CentOS7 is compiled from RHEL7 sources.

Since he didn't see it in Fedora and you don't see it in *Suse15 it may be something that was there in earlier implementations of Systemd that they figured out was a bad idea and got rid of in later ones. RHEL7 (and therefore CentOS7) by design doesn't update to latest and greatest of anything. Fedora on the other hand is bleeding edge.


-----Original Message-----
From: Ale [mailto:ale-***@ale.org] On Behalf Of James Taylor via Ale
Sent: Tuesday, October 09, 2018 11:05 AM
To: Atlanta LinuxEnthusiasts; Jim Kinney
Subject: Re: [ale] One for systemd haters

Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No files starting with - IS there some special case where it is used?
-jt



James Taylor
678-697-9420
????? That is not what I see in my /usr/lib/systemd/system dir.
There's
exactly 0 files whose name begins with a '-'. That would be beyond dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
Post by Lightner, Jeffrey via Ale
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find
and
Post by Lightner, Jeffrey via Ale
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or
confidential information and is for the sole use of the intended
recipient(s). If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this
electronic transmission in error, please reply immediately to the
sender that you have received the message in error, and delete it.
Thank you
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/


_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Jim Kinney via Ale
2018-10-09 15:16:20 UTC
Permalink
Post by Lightner, Jeffrey via Ale
Fedora on the other hand is bleeding edge.
i.e. not as broken the same way but for different reasons :-)
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
James Taylor via Ale
2018-10-09 15:19:52 UTC
Permalink
I am also seeing the reference in slices.target.
I used find to do a search, but it didn't return any files with - and
the beginning, though.



James Taylor
678-697-9420
Jim followed up saying he saw it on CentOS7. I saw the same "-slice"
file on 2 of my RHEL7 systems before I posted. CentOS7 is compiled from
RHEL7 sources.

Since he didn't see it in Fedora and you don't see it in *Suse15 it may
be something that was there in earlier implementations of Systemd that
they figured out was a bad idea and got rid of in later ones. RHEL7
(and therefore CentOS7) by design doesn't update to latest and greatest
of anything. Fedora on the other hand is bleeding edge.


-----Original Message-----
From: Ale [mailto:ale-***@ale.org] On Behalf Of James Taylor via
Ale
Sent: Tuesday, October 09, 2018 11:05 AM
To: Atlanta LinuxEnthusiasts; Jim Kinney
Subject: Re: [ale] One for systemd haters

Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No
files starting with - IS there some special case where it is used?
-jt



James Taylor
678-697-9420
????? That is not what I see in my /usr/lib/systemd/system dir.
There's
exactly 0 files whose name begins with a '-'. That would be beyond
dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
Post by Lightner, Jeffrey via Ale
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find
and
Post by Lightner, Jeffrey via Ale
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or
confidential information and is for the sole use of the intended
recipient(s). If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this
electronic transmission in error, please reply immediately to the
sender that you have received the message in error, and delete it.
Thank you
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/


_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo

_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/
DJ-Pfulio via Ale
2018-10-09 16:19:40 UTC
Permalink
Not that anyone cares, but found it on Ubuntu 16.04 ... but not in a directory
that would be modified outside the package management.

/lib/systemd/system$ ll -- -.slice
-rw-r--r-- 1 root root 403 Jul 30 16:39 -.slice


If their intent was to make it hard to modify for noobs, they've succeeded.
Post by Lightner, Jeffrey via Ale
Jim followed up saying he saw it on CentOS7. I saw the same "-slice" file on 2 of my RHEL7 systems before I posted. CentOS7 is compiled from RHEL7 sources.
Since he didn't see it in Fedora and you don't see it in *Suse15 it may be something that was there in earlier implementations of Systemd that they figured out was a bad idea and got rid of in later ones. RHEL7 (and therefore CentOS7) by design doesn't update to latest and greatest of anything. Fedora on the other hand is bleeding edge.
-----Original Message-----
Sent: Tuesday, October 09, 2018 11:05 AM
To: Atlanta LinuxEnthusiasts; Jim Kinney
Subject: Re: [ale] One for systemd haters
Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No files starting with - IS there some special case where it is used?
-jt
James Taylor
678-697-9420
????? That is not what I see in my /usr/lib/systemd/system dir. There's
exactly 0 files whose name begins with a '-'. That would be beyond dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
Post by Lightner, Jeffrey via Ale
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find
and
Post by Lightner, Jeffrey via Ale
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
Jim Kinney via Ale
2018-10-09 17:31:55 UTC
Permalink
security through extra knowledge obscurity....
Post by DJ-Pfulio via Ale
Not that anyone cares, but found it on Ubuntu 16.04 ... but not in a
directorythat would be modified outside the package management.
/lib/systemd/system$ ll -- -.slice-rw-r--r-- 1 root root 403 Jul 30
16:39 -.slice
If their intent was to make it hard to modify for noobs, they've succeeded.
Jim followed up saying he saw it on CentOS7. I saw the same "-slice"
file on 2 of my RHEL7 systems before I posted. CentOS7 is compiled
from RHEL7 sources.
Since he didn't see it in Fedora and you don't see it in *Suse15 it
may be something that was there in earlier implementations of Systemd
that they figured out was a bad idea and got rid of in later
ones. RHEL7 (and therefore CentOS7) by design doesn't update to
latest and greatest of anything. Fedora on the other hand is
bleeding edge.
Behalf Of James Taylor via AleSent: Tuesday, October 09, 2018 11:05
AMTo: Atlanta LinuxEnthusiasts; Jim KinneySubject: Re: [ale] One for
systemd haters
Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No
files starting with - IS there some special case where it is used?-jt
not what I see in my /usr/lib/systemd/system dir.There'sexactly 0
files whose name begins with a '-'. That would be beyond dumb. I
suspect a faulty distro implementation.Checked on Fedora 28 and
CentOS 7.5. No -name files.
I just ran across this issue. (Not asking for help since the
linksolved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by DJ-Pfulio via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good idea?
This is right up there with Oracle long ago deciding to name
things“core” while ignoring the fact most people had cron jobs to
findand
delete core dump files on a regular basis. P.S. I still generally
like Systemd but this filename is a fairlystupid thing to
do. _______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
Lightner, Jeffrey via Ale
2018-10-09 18:23:29 UTC
Permalink
It seems more likely a developer just had no idea how things are done in the real world. He/she likely thought this would be a good name and never thought “But what if someone needs to finding something in one of the other 200 files in the /usr/lib/systemd/system subdirectory?” If you’re a REAL coder you don’t use command line tools do you? :D

I once worked at a place where development came up with a new way of doing something they planned to roll out to customers. When they showed me their new way and bragged about its majestic code I told them it was truly inspired but would never work because most of the end users were lucky to have high school diplomas and would never understand the flow they were suggesting. If A and B but not C or D then E might make sense to many in IT but for many end users A better get you to E without other (visible) considerations or they’ll stop at A and complain that it is broken.

As an FYI the “-“ at start of file name doesn’t just affect grep/egrep. Any command that tries to look at * in a directory will have the issue because it expands that “-“ as if it were an additional flag to the command issued rather than just the start of a file name.


From: Ale [mailto:ale-***@ale.org] On Behalf Of Jim Kinney via Ale
Sent: Tuesday, October 09, 2018 1:32 PM
To: DJ-Pfulio; Atlanta Linux Enthusiasts
Subject: Re: [ale] One for systemd haters

security through extra knowledge obscurity....

On Tue, 2018-10-09 at 12:19 -0400, DJ-Pfulio via Ale wrote:

Not that anyone cares, but found it on Ubuntu 16.04 ... but not in a directory

that would be modified outside the package management.



/lib/systemd/system$ ll -- -.slice

-rw-r--r-- 1 root root 403 Jul 30 16:39 -.slice





If their intent was to make it hard to modify for noobs, they've succeeded.







On 10/09/2018 11:10 AM, Lightner, Jeffrey via Ale wrote:

Jim followed up saying he saw it on CentOS7. I saw the same "-slice" file on 2 of my RHEL7 systems before I posted. CentOS7 is compiled from RHEL7 sources.



Since he didn't see it in Fedora and you don't see it in *Suse15 it may be something that was there in earlier implementations of Systemd that they figured out was a bad idea and got rid of in later ones. RHEL7 (and therefore CentOS7) by design doesn't update to latest and greatest of anything. Fedora on the other hand is bleeding edge.





-----Original Message-----

From: Ale [mailto:ale-***@ale.org<mailto:ale-***@ale.org>] On Behalf Of James Taylor via Ale

Sent: Tuesday, October 09, 2018 11:05 AM

To: Atlanta LinuxEnthusiasts; Jim Kinney

Subject: Re: [ale] One for systemd haters



Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No files starting with - IS there some special case where it is used?

-jt







James Taylor

678-697-9420

***@eastcobbgroup.com<mailto:***@eastcobbgroup.com>







Jim Kinney via Ale <***@ale.org<mailto:***@ale.org>> 10/9/2018 10:50 AM >>>

????? That is not what I see in my /usr/lib/systemd/system dir.

There's

exactly 0 files whose name begins with a '-'. That would be beyond dumb. I suspect a faulty distro implementation.

Checked on Fedora 28 and CentOS 7.5. No -name files.





On Tue, 2018-10-09 at 14:38 +0000, Lightner, Jeffrey via Ale wrote:

I just ran across this issue. (Not asking for help since the link

solved it – just venting.)









https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory







What mentally deficient cretin in the Systemd development world

decided naming a file with a “-“ as first character was a good idea?









This is right up there with Oracle long ago deciding to name things

“core” while ignoring the fact most people had cron jobs to find

and

delete core dump files on a regular basis.



P.S. I still generally like Systemd but this filename is a fairly

stupid thing to do.





_______________________________________________

Ale mailing list

***@ale.org<mailto:***@ale.org>

https://mail.ale.org/mailman/listinfo/ale

See JOBS, ANNOUNCE and SCHOOLS lists at

http://mail.ale.org/mailman/listinfo
--
James P. Kinney III



Every time you stop a school, you will have to build a jail. What you

gain at one end you lose at the other. It's like feeding a dog on his

own tail. It won't fatten the dog.

- Speech 11/23/1900 Mark Twain



http://heretothereideas.blogspot.com/
Beddingfield, Allen via Ale
2018-10-09 18:32:43 UTC
Permalink
I used to have a co-worker who named his workstation "-" - complete with
an A record in DNS.

Try to ping, ssh, etc... to "-.domain.edu"

Escaping it or putting it in quotes didn't work, as I remember.

Allen B.
Post by Lightner, Jeffrey via Ale
It seems more likely a developer just had no idea how things are done in
the real world.  He/she likely thought this would be a good name and
never thought “But what if someone needs to finding something in one of
the other 200 files in the /usr/lib/systemd/system subdirectory?”   If
you’re a REAL coder you don’t use command line tools do you?  :D
I once worked at a place where development came up with a new way of
doing something they planned to roll out to customers.   When they
showed me their new way and bragged about its majestic code I told them
it was truly inspired but would never work because most of the end users
were lucky to have high school diplomas and would never understand the
flow they were suggesting.   If A and B but not C or D then E might make
sense to many in IT but for many end users A better get you to E without
other (visible) considerations or they’ll stop at A and complain that it
is broken.
As an FYI the “-“ at start of file name doesn’t just affect
grep/egrep.   Any command that tries to look at * in a directory will
have the issue because it expands that “-“ as if it were an additional
flag to the command issued rather than just the start of a file name.
*Sent:* Tuesday, October 09, 2018 1:32 PM
*To:* DJ-Pfulio; Atlanta Linux Enthusiasts
*Subject:* Re: [ale] One for systemd haters
security through extra knowledge obscurity....
Not that anyone cares, but found it on Ubuntu 16.04 ... but not in a directory
that would be modified outside the package management.
/lib/systemd/system$ ll --  -.slice
-rw-r--r-- 1 root root 403 Jul 30 16:39 -.slice
If their intent was to make it hard to modify for noobs, they've succeeded.
Jim followed up saying he saw it on CentOS7.  I saw the same "-slice" file on 2 of my RHEL7 systems before I posted.  CentOS7 is compiled from RHEL7 sources.
Since he didn't see it in Fedora and you don't see it in *Suse15 it may be something that was there in earlier implementations of Systemd that they figured out was a bad idea and got rid of in later ones.   RHEL7 (and therefore CentOS7) by design doesn't update to latest and greatest of anything.  Fedora on the other hand is bleeding edge.
-----Original Message-----
Sent: Tuesday, October 09, 2018 11:05 AM
To: Atlanta LinuxEnthusiasts; Jim Kinney
Subject: Re: [ale] One for systemd haters
Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No files starting with - IS there some special case where it is used?
-jt
James Taylor
678-697-9420
????? That is not what I see in my /usr/lib/systemd/system dir.
There's
exactly 0 files whose name begins with a '-'. That would be beyond dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
I just ran across this issue.   (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find
and
delete core dump files on a regular basis.
P.S.  I still generally like Systemd but this filename is a fairly
stupid thing to do.
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
James P. Kinney III
Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
http://heretothereideas.blogspot.com/
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
Allen Beddingfield
Systems Engineer
Office of Information Technology
The University of Alabama
Office 205-348-2251
***@ua.edu
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mai
Solomon Peachy via Ale
2018-10-09 18:35:58 UTC
Permalink
Post by Lightner, Jeffrey via Ale
As an FYI the “-“ at start of file name doesn’t just affect
grep/egrep. Any command that tries to look at * in a directory will
have the issue because it expands that “-“ as if it were an additional
flag to the command issued rather than just the start of a file name.
The thing is, leading '-' is perfectly legal for a POSIX filename.
Which is why getopt and other bog-standard cmdline parsing libraries
implement the special '--' option to signify that subsequent arguments
are filenames rather than options.

This quirk of shell wildcard expansion/ambiguity isn't anything new,
especially to anyone who has had to work with real-world-supplied
filenames.

- Solomon
--
Solomon Peachy pizza at shaftnet dot org
Coconut Creek, FL ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum videtur.
Lightner, Jeffrey via Ale
2018-10-10 14:18:24 UTC
Permalink
"valid" and "reasonable" are two different things in my view.

You may have "valid" reasons to cuss out your great grandmother but almost no one else hearing you do so will consider it "reasonable".

While it is true shell expansion can cause unexpected behaviors, creating a file with such a name is completely unreasonable even if allowed. There are many characters one might put in a file name that most of us know not to do because of their special meanings. Usually when one finds such a bizarre filename it is because of some typo or other action that added weird characters - not intent. Typically if I find such files I verify they're not in use and delete them. I couldn't do that in this case as it was clearly intended to exist.

"your [developers] were so preoccupied with whether or not they could, they didn't stop to think if they should."

-----Original Message-----
From: Solomon Peachy [mailto:***@shaftnet.org]
Sent: Tuesday, October 09, 2018 2:36 PM
To: Lightner, Jeffrey; Atlanta Linux Enthusiasts
Subject: Re: [ale] One for systemd haters
Post by Lightner, Jeffrey via Ale
As an FYI the “-“ at start of file name doesn’t just affect
grep/egrep. Any command that tries to look at * in a directory will
have the issue because it expands that “-“ as if it were an additional
flag to the command issued rather than just the start of a file name.
The thing is, leading '-' is perfectly legal for a POSIX filename.
Which is why getopt and other bog-standard cmdline parsing libraries implement the special '--' option to signify that subsequent arguments are filenames rather than options.

This quirk of shell wildcard expansion/ambiguity isn't anything new, especially to anyone who has had to work with real-world-supplied filenames.

- Solomon
--
Solomon Peachy pizza at shaftnet dot org
Coconut Creek, FL ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum videtur.
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/l
Jim Kinney via Ale
2018-10-10 14:39:11 UTC
Permalink
Another way to look at this is those files are so absolutely critical
to the operation that naming in a way that defies ordinary users from
easily finding them helps protect their content. I would further
suggest that as those files have been renamed and apparently made an
automatic inclusion/embedded in the start-up of systemd that was the
intent all along but the method was not finished at the systemd release
in CentOS7/RHEL7. I see the -.mount and -.slice in Fedora 28 as having
been loaded/run/achieved but those are NOT explicitly named as such
anywhere in the /usr/lib/systemd/system structure.
My dad once said a cuss word around his mom. She reversed the bowl of a
large cooking spoon on his head.
Post by Lightner, Jeffrey via Ale
"valid" and "reasonable" are two different things in my view.
You may have "valid" reasons to cuss out your great grandmother but
almost no one else hearing you do so will consider it "reasonable".
While it is true shell expansion can cause unexpected behaviors,
creating a file with such a name is completely unreasonable even if
allowed. There are many characters one might put in a file name
that most of us know not to do because of their special
meanings. Usually when one finds such a bizarre filename it is
because of some typo or other action that added weird characters -
not intent. Typically if I find such files I verify they're not in
use and delete them. I couldn't do that in this case as it was
clearly intended to exist.
"your [developers] were so preoccupied with whether or not they
could, they didn't stop to think if they should."
Lightner, Jeffrey; Atlanta Linux EnthusiastsSubject: Re: [ale] One
for systemd haters
As an FYI the “-“ at start of file name doesn’t just affect
grep/egrep. Any command that tries to look at * in a directory will
have the issue because it expands that “-“ as if it were an
additional flag to the command issued rather than just the start of a
file name.
The thing is, leading '-' is perfectly legal for a POSIX
filename. Which is why getopt and other bog-standard cmdline parsing
libraries implement the special '--' option to signify that
subsequent arguments are filenames rather than options.
This quirk of shell wildcard expansion/ambiguity isn't anything new,
especially to anyone who has had to work with real-world-supplied
filenames.
- Solomon-- Solomon Peachy pizza at
shaftnet dot orgCoconut Creek, FL ^^
(email/xmpp) ^^Quidquid latine dictum sit, altum
videtur._______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
Lightner, Jeffrey via Ale
2018-10-10 14:48:53 UTC
Permalink
If that was the intent it might have backfired. As I noted I typically delete files with unusual characters in the name. Luckily I knew to check on whether this was “intended” before I did so but I wonder if others would delete it to solve their grep problem without thinking of ramifications.

No matter why they did it I suggest this was a boneheaded name to use and whoever thought it up should be cussed out by his own great grandmother.

Funny about the spoon. Once when we were teens and far taller than our mother my brother made the mistake of asking her what she was “babbling about”. She immediately hit him with the hard cover book she was reading at the time and exclaimed that she doesn’t babble. The look on his face was priceless.


From: Jim Kinney [mailto:***@gmail.com]
Sent: Wednesday, October 10, 2018 10:39 AM
To: Lightner, Jeffrey; Atlanta Linux Enthusiasts
Subject: Re: [ale] One for systemd haters

Another way to look at this is those files are so absolutely critical to the operation that naming in a way that defies ordinary users from easily finding them helps protect their content. I would further suggest that as those files have been renamed and apparently made an automatic inclusion/embedded in the start-up of systemd that was the intent all along but the method was not finished at the systemd release in CentOS7/RHEL7. I see the -.mount and -.slice in Fedora 28 as having been loaded/run/achieved but those are NOT explicitly named as such anywhere in the /usr/lib/systemd/system structure.

My dad once said a cuss word around his mom. She reversed the bowl of a large cooking spoon on his head.

On Wed, 2018-10-10 at 14:18 +0000, Lightner, Jeffrey via Ale wrote:

"valid" and "reasonable" are two different things in my view.



You may have "valid" reasons to cuss out your great grandmother but almost no one else hearing you do so will consider it "reasonable".



While it is true shell expansion can cause unexpected behaviors, creating a file with such a name is completely unreasonable even if allowed. There are many characters one might put in a file name that most of us know not to do because of their special meanings. Usually when one finds such a bizarre filename it is because of some typo or other action that added weird characters - not intent. Typically if I find such files I verify they're not in use and delete them. I couldn't do that in this case as it was clearly intended to exist.



"your [developers] were so preoccupied with whether or not they could, they didn't stop to think if they should."



-----Original Message-----

From: Solomon Peachy [mailto:***@shaftnet.org<mailto:***@shaftnet.org>]

Sent: Tuesday, October 09, 2018 2:36 PM

To: Lightner, Jeffrey; Atlanta Linux Enthusiasts

Subject: Re: [ale] One for systemd haters



On Tue, Oct 09, 2018 at 06:23:29PM +0000, Lightner, Jeffrey via Ale wrote:

As an FYI the “-“ at start of file name doesn’t just affect

grep/egrep. Any command that tries to look at * in a directory will

have the issue because it expands that “-“ as if it were an additional

flag to the command issued rather than just the start of a file name.



The thing is, leading '-' is perfectly legal for a POSIX filename.

Which is why getopt and other bog-standard cmdline parsing libraries implement the special '--' option to signify that subsequent arguments are filenames rather than options.



This quirk of shell wildcard expansion/ambiguity isn't anything new, especially to anyone who has had to work with real-world-supplied filenames.



- Solomon
--
Solomon Peachy pizza at shaftnet dot org

Coconut Creek, FL ^^ (email/xmpp) ^^

Quidquid latine dictum sit, altum videtur.

_______________________________________________

Ale mailing list

***@ale.org<mailto:***@ale.org>

https://mail.ale.org/mailman/listinfo/ale

See JOBS, ANNOUNCE and SCHOOLS lists at

http://mail.ale.org/mailman/listinfo
--
James P. Kinney III



Every time you stop a school, you will have to build a jail. What you

gain at one end you lose at the other. It's like feeding a dog on his

own tail. It won't fatten the dog.

- Speech 11/23/1900 Mark Twain



http://heretothereideas.blogspot.com/
DJ-Pfulio via Ale
2018-10-09 18:29:32 UTC
Permalink
Some times it is just fun to do a chattr +i to be just a little evil for
noobs ... or to prevent the resolv.conf from being freakin' modified!

There's lots of fun ways to screw with file permissions that aren't
obvious at first glance.

* read-only NFS mount for /var/html/ - web devs LOVE this!
* mount over an existing directory that is full of stuff (flash drive
mounted over someone's HOME is almost always fun.
* abusing ACLs, so everyone except your target has access. ;) "Works for me"
Post by Jim Kinney via Ale
security through extra knowledge obscurity....
Post by DJ-Pfulio via Ale
Not that anyone cares, but found it on Ubuntu 16.04 ... but not in a directory
that would be modified outside the package management.
/lib/systemd/system$ ll -- -.slice
-rw-r--r-- 1 root root 403 Jul 30 16:39 -.slice
If their intent was to make it hard to modify for noobs, they've succeeded.
Jim followed up saying he saw it on CentOS7. I saw the same "-slice" file on 2 of my RHEL7 systems before I posted. CentOS7 is compiled from RHEL7 sources.
Since he didn't see it in Fedora and you don't see it in *Suse15 it may be something that was there in earlier implementations of Systemd that they figured out was a bad idea and got rid of in later ones. RHEL7 (and therefore CentOS7) by design doesn't update to latest and greatest of anything. Fedora on the other hand is bleeding edge.
-----Original Message-----
Sent: Tuesday, October 09, 2018 11:05 AM
To: Atlanta LinuxEnthusiasts; Jim Kinney
Subject: Re: [ale] One for systemd haters
Same here. I checked on my openSUSE Leap 15 and SLES15 systems. No files starting with - IS there some special case where it is used?
-jt
James Taylor
678-697-9420
????? That is not what I see in my /usr/lib/systemd/system dir. There's
exactly 0 files whose name begins with a '-'. That would be beyond dumb. I suspect a faulty distro implementation.
Checked on Fedora 28 and CentOS 7.5. No -name files.
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find
and
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.
Jim Kinney via Ale
2018-10-09 15:03:27 UTC
Permalink
I stand corrected. In a CentOS 7.5 I _do_ see a -.slice. systemctl
shows a -.mount running as well but it's not in the systemd/system dir.
Yeah. That's boneheaded.
In Fedora it's changed to slices.target. I still have -.mount and
-.slice for / mount and / slice setups but that is called by ostree-
remount.service and slices.target as both being 'after= -.mount' and
'after= -.slice'
So the very top level structure of systemd does the -.mount and -.slice
to load in the / to start everything else.
really dumb naming. At least it didn't start with whitespace.
Post by Lightner, Jeffrey via Ale
I just ran across this issue. (Not asking for help since the link
solved it – just venting.)
https://serverfault.com/questions/844584/why-grep-doesnt-work-in-the-usr-lib-systemd-system-directory
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a “-“ as first character was a good
idea?
This is right up there with Oracle long ago deciding to name things
“core” while ignoring the fact most people had cron jobs to find and
delete core dump files on a regular basis.
P.S. I still generally like Systemd but this filename is a fairly stupid thing to do.
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or
confidential information and is for the sole use of the intended
recipient(s). If you are not the intended recipient, any disclosure,
copying, distribution, or use of the contents of this information
is prohibited and may be unlawful. If you have received this
electronic transmission in error, please reply immediately to the
sender that you have received the message in error, and delete it.
Thank you
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
Steve Litt via Ale
2018-10-12 05:29:04 UTC
Permalink
On Tue, 9 Oct 2018 14:38:10 +0000
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a "-" as first character was a good idea?
Just speaking for myself, files I create contain a-z,A-Z,0-9, dots,
and underscores. Nothing else.

First thing I do when somebody sends me a file with spaces is replace
them with underscores. Have you ever seen these people who send you
files with singlequotes in the name?

SteveT

Steve Litt
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Charles Shapiro via Ale
2018-10-12 14:43:22 UTC
Permalink
Me too. The more interesting question: snake_case or CamelCase for naming
in source code? I'm Old School and learned snake_case deep in my fingees,
but all the CoolKids these days seem to have migrated to CamelCase, so I'm
trying to do this also. Alas, sometimes the result of this is a mix of
both, which I am positive is the pessimal outcome.

-- CHS
Post by Steve Litt via Ale
On Tue, 9 Oct 2018 14:38:10 +0000
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a "-" as first character was a good idea?
Just speaking for myself, files I create contain a-z,A-Z,0-9, dots,
and underscores. Nothing else.
First thing I do when somebody sends me a file with spaces is replace
them with underscores. Have you ever seen these people who send you
files with singlequotes in the name?
SteveT
Steve Litt
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Jim Kinney via Ale
2018-10-12 15:08:10 UTC
Permalink
rAnd0m_casE 1S MORE fun whn mix3D with l33t.
OR JUST GLUE THE CAPSLOCK KEY DOWN SO IT ALWAYS LOOKS LIKE FORTRAN IV
ON GREEN BAR
ALL WE NEED IS LOVE ALLCAPS
Post by Charles Shapiro via Ale
Me too. The more interesting question: snake_case or CamelCase for
naming in source code? I'm Old School and learned snake_case deep in
my fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also. Alas, sometimes the result
of this is a mix of both, which I am positive is the pessimal
outcome.
-- CHS
Post by Steve Litt via Ale
On Tue, 9 Oct 2018 14:38:10 +0000
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a "-" as first character was a good
idea?
Just speaking for myself, files I create contain a-z,A-Z,0-9, dots,
and underscores. Nothing else.
First thing I do when somebody sends me a file with spaces is replace
them with underscores. Have you ever seen these people who send you
files with singlequotes in the name?
SteveT
Steve Litt
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
Leam Hall via Ale
2018-10-12 15:11:33 UTC
Permalink
I tend to use snake_case unless the project I'm helping uses something
else. Never was a CoolKid, never really expect to be...
Post by Charles Shapiro via Ale
Me too. The more interesting question: snake_case or CamelCase for
naming in source code? I'm Old School and learned snake_case deep in my
fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also. Alas, sometimes the result of
this is a mix of both, which I am positive is the pessimal outcome.
-- CHS
Pete Hardie via Ale
2018-10-12 15:24:25 UTC
Permalink
Snake_case prevents issues with acronyms and homonyms....
Post by Leam Hall via Ale
I tend to use snake_case unless the project I'm helping uses something
else. Never was a CoolKid, never really expect to be...
Post by Charles Shapiro via Ale
Me too. The more interesting question: snake_case or CamelCase for
naming in source code? I'm Old School and learned snake_case deep in my
fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also. Alas, sometimes the result of
this is a mix of both, which I am positive is the pessimal outcome.
-- CHS
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Jeff Hubbs via Ale
2018-10-13 15:01:44 UTC
Permalink
Wait, is this CamelCase or is *this* camelCase?
Post by Pete Hardie via Ale
Snake_case prevents issues with acronyms and homonyms....
I tend to use snake_case unless the project I'm helping uses
something else. Never was a CoolKid, never really expect to be...
On Fri, Oct 12, 2018 at 10:50 AM Charles Shapiro via Ale
Me too.  The more interesting question: snake_case or
CamelCase for naming in source code?  I'm Old School and
learned snake_case deep in my fingees, but all the CoolKids
these days seem to have migrated to CamelCase, so I'm trying
to do this also.  Alas, sometimes the result of this is a mix
of both, which I am positive is the pessimal outcome.
-- CHS
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
DJ-Pfulio via Ale
2018-10-13 15:05:34 UTC
Permalink
Post by Jeff Hubbs via Ale
Wait, is this CamelCase or is *this* camelCase?
yes.
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Leam Hall via Ale
2018-10-13 15:33:34 UTC
Permalink
Post by Jeff Hubbs via Ale
Wait, is this CamelCase or is *this* camelCase?
yes.
Perl the camel says TMTOWTDI.
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Jim Kinney via Ale
2018-10-13 16:08:05 UTC
Permalink
More reasons I'm only a fan of java in my mug, java likes camelCase.

Second word (and later) is capitalized. First word is never. So middle humps, not all humps.
Post by Leam Hall via Ale
Post by Jeff Hubbs via Ale
Wait, is this CamelCase or is *this* camelCase?
yes.
Perl the camel says TMTOWTDI.
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
Sent from my Android device with K-9 Mail. All tyopes are thumb related and reflect authenticity.
Pete Hardie via Ale
2018-10-13 16:41:50 UTC
Permalink
Dromedary case, not bactrian case
Post by Jim Kinney via Ale
More reasons I'm only a fan of java in my mug, java likes camelCase.
Second word (and later) is capitalized. First word is never. So middle
humps, not all humps.
Post by Leam Hall via Ale
Post by Jeff Hubbs via Ale
Wait, is this CamelCase or is *this* camelCase?
yes.
Perl the camel says TMTOWTDI.
------------------------------
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
Sent from my Android device with K-9 Mail. All tyopes are thumb related
and reflect authenticity.
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
DJ-Pfulio via Ale
2018-10-12 15:26:30 UTC
Permalink
OOP - CamelCase. BeginningCaps for methods, classes, camelCase for
classData.

All others - snake_case.

I use type hints in variable names.

Shell scripting, ALL_CAPS.
Me too.  The more interesting question:  snake_case or CamelCase for
naming in source code?  I'm Old School and learned snake_case deep in my
fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also.  Alas, sometimes the result of
this is a mix of both, which I am positive is the pessimal outcome.
Joey Kelly via Ale
2018-10-12 22:14:47 UTC
Permalink
Post by DJ-Pfulio via Ale
OOP - CamelCase. BeginningCaps for methods, classes, camelCase for
classData.
All others - snake_case.
I use type hints in variable names.
Yeah, me too... floating arrays, char integers, etc...


--Joey
Post by DJ-Pfulio via Ale
Shell scripting, ALL_CAPS.
Me too.  The more interesting question:  snake_case or CamelCase for
naming in source code?  I'm Old School and learned snake_case deep in my
fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also.  Alas, sometimes the result of
this is a mix of both, which I am positive is the pessimal outcome.
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Todor Fassl via Ale
2018-10-18 13:53:19 UTC
Permalink
If it is of any interest, screen readers (as used by the blind) do way,
way better with camelCase than with snake_case.

A blind person listening to your code would probably very much prefer
camelCase.
Me too.  The more interesting question:  snake_case or CamelCase for
naming in source code?  I'm Old School and learned snake_case deep in my
fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also.  Alas, sometimes the result of
this is a mix of both, which I am positive is the pessimal outcome.
-- CHS
On Tue, 9 Oct 2018 14:38:10 +0000
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development world
decided naming a file with a "-" as first character was a good idea?
Just speaking for myself, files I create contain a-z,A-Z,0-9, dots,
and underscores. Nothing else.
First thing I do when somebody sends me a file with spaces is replace
them with underscores. Have you ever seen these people who send you
files with singlequotes in the name?
SteveT
Steve Litt
September 2018 featured book: Quit Joblessness: Start Your Own Business
http://www.troubleshooters.com/startbiz
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
Todd
Jim Kinney via Ale
2018-10-18 14:08:23 UTC
Permalink
That makes for a very good argument to use camelCase.
Thanks for the perspective.
Post by Todor Fassl via Ale
If it is of any interest, screen readers (as used by the blind) do
way, way better with camelCase than with snake_case.
A blind person listening to your code would probably very much prefer
camelCase.
Me too. The more interesting question: snake_case or CamelCase for
naming in source code? I'm Old School and learned snake_case deep in
my fingees, but all the CoolKids these days seem to have migrated to
CamelCase, so I'm trying to do this also. Alas, sometimes the result
of this is a mix of both, which I am positive is the pessimal
outcome.
-- CHS
On Tue, 9 Oct 2018 14:38:10 +0000 "Lightner, Jeffrey via Ale"
Post by Lightner, Jeffrey via Ale
What mentally deficient cretin in the Systemd development
world > decided naming a file with a "-" as first character was a
good idea?
Just speaking for myself, files I create contain a-z,A-Z,0-9,
dots, and underscores. Nothing else.
First thing I do when somebody sends me a file with spaces is
replace them with underscores. Have you ever seen these people who
send you files with singlequotes in the name?
SteveT
Start Your Own Business http://www.troubleshooters.com/startbiz
_______________________________________________ Ale mailing
https://mail.ale.org/mailman/listinfo/ale See JOBS, ANNOUNCE and
SCHOOLS lists at http://mail.ale.org/mailman/listinfo
_______________________________________________Ale mailing
ANNOUNCE and SCHOOLS lists athttp://mail.ale.org/mailman/listinfo
--
James P. Kinney III

Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain

http://heretothereideas.blogspot.com/
Scott Plante via Ale
2018-10-15 17:01:06 UTC
Permalink
Back in the early 80s when I was first learning Bourne shell scripting, I was taught to use lower case for script variables. CAPS was strictly for environment variables and that was so they wouldn't conflict with local script variables. I do see a lot of scripts that use caps for all variables, so it doesn't seem to be a widely followed norm but it does make sense to me.

Separately, some languages have clear norms for this stuff. Almost everyone in Java land uses camel case with variables, methods and class attributes starting lower case, Classes starting upper case, and constants (public static final) being ALL_CAPS snake case. Indention and curly brace location is not quite as standardized from what I've seen.


Scott Plante ----- Original Message -----

From: "DJ-Pfulio via Ale" <***@ale.org>
To: "Charles Shapiro via Ale" <***@ale.org>
Sent: Friday, October 12, 2018 11:26:30 AM
Subject: [ale] Coding Style

OOP - CamelCase. BeginningCaps for methods, classes, camelCase for
classData.

All others - snake_case.

I use type hints in variable names.

Shell scripting, ALL_CAPS.
Ed Cashin via Ale
2018-10-15 17:37:34 UTC
Permalink
A good technique is to find out what linters are the most popular for
the programming language you're interested in, figure out which one
you can work with, and defer to its judgement. Sometimes the linters
even have documentation for the rationales behind their criteria,
which can help soothe the pain of conforming to arbitrary-seeming
rules.

I was about to say I don't know of a good Bourne shell linter, but
shellcheck looks pretty good. I always have to suggest double quoting
to the student workers I'm working with.

https://www.shellcheck.net/

If there's an issue I feel strongly about, but no linter supports
checks for the issue, then I try to get self-critical and to consider
the possibility that perhaps I might be too picky.
Post by Scott Plante via Ale
Back in the early 80s when I was first learning Bourne shell scripting, I was taught to use lower case for script variables. CAPS was strictly for environment variables and that was so they wouldn't conflict with local script variables. I do see a lot of scripts that use caps for all variables, so it doesn't seem to be a widely followed norm but it does make sense to me.
Separately, some languages have clear norms for this stuff. Almost everyone in Java land uses camel case with variables, methods and class attributes starting lower case, Classes starting upper case, and constants (public static final) being ALL_CAPS snake case. Indention and curly brace location is not quite as standardized from what I've seen.
Scott Plante
________________________________
Sent: Friday, October 12, 2018 11:26:30 AM
Subject: [ale] Coding Style
OOP - CamelCase. BeginningCaps for methods, classes, camelCase for
classData.
All others - snake_case.
I use type hints in variable names.
Shell scripting, ALL_CAPS.
_______________________________________________
Ale mailing list
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
--
Ed Cashin <***@noserose.net>
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
DJ-Pfulio via Ale
2018-10-15 20:53:50 UTC
Permalink
If you do team programming, having a coding standards to follow that the
entire team agrees to follow is helpful. The hard part is getting
everyone to agree, but let the best reasons determine the resulting
coding standards. After a month, everyone basically prefers anything
they weren't doing already.

Plus, having someone else review your code is great for spotting dumb
mistakes and passing on knowledge to less experienced members of the
team. Whenever a problem is found, at least 2 people missed it, so
there's company for the embarrassment. That's always a good thing for
better code.

IMHO.
Post by Ed Cashin via Ale
A good technique is to find out what linters are the most popular for
the programming language you're interested in, figure out which one
you can work with, and defer to its judgement. Sometimes the linters
even have documentation for the rationales behind their criteria,
which can help soothe the pain of conforming to arbitrary-seeming
rules.
I was about to say I don't know of a good Bourne shell linter, but
shellcheck looks pretty good. I always have to suggest double quoting
to the student workers I'm working with.
https://www.shellcheck.net/
If there's an issue I feel strongly about, but no linter supports
checks for the issue, then I try to get self-critical and to consider
the possibility that perhaps I might be too picky.
Post by Scott Plante via Ale
Back in the early 80s when I was first learning Bourne shell scripting, I was taught to use lower case for script variables. CAPS was strictly for environment variables and that was so they wouldn't conflict with local script variables. I do see a lot of scripts that use caps for all variables, so it doesn't seem to be a widely followed norm but it does make sense to me.
Separately, some languages have clear norms for this stuff. Almost everyone in Java land uses camel case with variables, methods and class attributes starting lower case, Classes starting upper case, and constants (public static final) being ALL_CAPS snake case. Indention and curly brace location is not quite as standardized from what I've seen.
Scott Plante
________________________________
Sent: Friday, October 12, 2018 11:26:30 AM
Subject: [ale] Coding Style
OOP - CamelCase. BeginningCaps for methods, classes, camelCase for
classData.
All others - snake_case.
I use type hints in variable names.
Shell scripting, ALL_CAPS.
_______________________________________________
Ale mailing list
***@ale.org
https://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo
Loading...