I wish we could use the same naming conventions across the stack, but snake_case looks odd in JavaScript, CamelCase feels off in Python, and kebab-case is wrong everywhere except in CSS.
-
I wish we could use the same naming conventions across the stack, but snake_case looks odd in JavaScript, CamelCase feels off in Python, and kebab-case is wrong everywhere except in CSS.
I liked the other two points of the post. Worth a read!
Greppability is an underrated code metric
Keeping your codebase searchable will make your maintenance life easier in the long run
(morizbuesing.com)
-
Marijke Luttekesreplied to Anže :python: last edited by
@anze3db I am currently using camel case in Python for some projects, and yes, it feels odd, but it's great for screen readers.
The article has some good tips; thanks for sharing!
-
Anže :python:replied to Marijke Luttekes last edited by
@mahryekuh oh, I didn't thought about that. The screen readers pronounce all the underscores/dashes, don't they?
-
Marijke Luttekesreplied to Marijke Luttekes last edited by
@anze3db This also unlocked a memory from when a colleague decided they didn't like an American English name used throughout the entire codebase and instead used the British spelling for new code.
-
Marijke Luttekesreplied to Anže :python: last edited by
@anze3db Every screen reader is different, so you cannot definitively say that they do or do not pronounce something.
However, some do indeed not pronounce dashes (one reason why I started using asterisks for list items in Markdown).
For Braille it's also important because you have limited character space, so omitting underscores nets you extra real estate.
-
Marijke Luttekesreplied to Marijke Luttekes last edited by
@anze3db Obligatory: I am not an expert, but I have been learning from working with blind programmers.