re: 4 practices for better code VIEW POST

FULL DISCUSSION
 

only part I don't really agree with is that long names for functions are bad. Here at work we don't use abbreviations, and it really makes finding out what a function does as easy as reading its name.

 

I agree, abbreviations usually suck. Function/method names should be as long as necessary, not shorter.

 

I agree. I don't see the negative. Your IDE will autocomplete so there is no overhead

 

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

 

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.

code of conduct - report abuse