DEV Community

loading...

Discussion on: 4 practices for better code

Collapse
effingkay profile image
Klaudia Author

That is a good point actually, I haven't thought of that but counterpoint - if you need a long name to describe what a function does, doesn't it mean that it does too much? I'm sure there's exceptions where long name is necessary but usually, shouldn't you need a few words to describe a function or variable? Genuine question

Although yes - abbreviations do suck so I agree, longer name is better imo

Collapse
mikeschinkel profile image
Mike Schinkel

I agree Klaudia.

In our shop we have a convention that is you need to use more than one underscore (we do PHP with snake_case) then you are probably trying to do too much and should probably refactor it. But then our shop is highly convention driven, so we are probably more pedantic about it than most.