maciej łebkowski
Maciej Łebkowski

Coding standard deviations

in Professional

I’m past my times when I wanted to tweak my projects’ code style. Now I simply conform to one of two standards: either Symfony or PSR. Since the purpose of a coding standard is primarily to be consistent, and readable second, I’d rather keep that consistency across projects (and even open source libraries, vendors, etc), than to bikeshed about little details that nobody can prove would make any real difference.

That said, I do like to deviate some times.

First and most important:

This space right there, after the fn keyword. I mean, how is not mandated by the parser? Important things out of the way, we can move on.

Test cases have long and descriptive names so they are self describing and readable. Let’s take this a little further by sprinkling some magic dust over our names:

Ain’t that better? Once it passes code review at least. And if it doesn’t, I can provide you with a smudge/clean git filter. It’s especially useful if your team can’t conform to this great addition. See the attached gist: camelCase_to_piss off your teammates case.sh 😉

Last but not least, let’s make those dates stand out a bit.

I agree that it’s a little hard to type, but code completion will lend a helping hand, my friend… Well, on the second thought, not for one-letter symbols. 😦

Maybe I just need to force push directly to master, to avoid code review? 🤔

Was this interesting?

About the author

My name is Maciej Łebkowski. I’m a full stack software engineer, a writer, a leader, and I play board games in my spare time. I’m currently in charge of the technical side of a new project called Docplanner Phone.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. This means that you may use it for commercial purposes, adapt upon it, but you need to release it under the same license. In any case you must give credit to the original author of the work (Maciej Łebkowski), including a URI to the work.