Freek
1 min readMay 4, 2021

--

It's probably a good idea to mention somewhere that these are at least aimed at Javascript/Typescript developers. The PascalCase vs camelCase rule is a different story for C# and some C++ projects, for instance.

Regarding 3. Comments, I always find this a touchy subject. Telling someone their code 'needs to be self-explanatory' could potentially lead to longer variable names. Which could then lead to less readable code. Speaking of...

"12. Avoid One-Letter Variables Names" comes across as 'never *ever* use single letter variables, except in loops'. But when writing pure mathematical code (like shaders or algorithms or other formulae) it's not unusual to prefer very short variable names or even, indeed, single letters.

In the end I think the most important thing is to set up guidelines and rules with your team. A general consensus, style guides, linter rules, you name it. Different projects may require a different perspective. :)

--

--

Freek
Freek

Written by Freek

Graphic design, computer graphics, iOS and web development. Fan of Go, Rust, Swift and Typescript. My words bear no authority whatsoever.

No responses yet