They say one of the most difficult tasks as a software developer is naming things but it is also one of the most important practices to have meanin...
For further actions, you may consider blocking this person and/or reporting abuse
this is really helpful!
I relate to this so much, I have a bunch of new engineers join the team.
Getting to unlearn the crap they've been taught in their programming classes is hard.
Some useful examples here
Thank you for the feedback!
Yes, onboarding new engineers is always a challenge so trying to define a styleguide or using some existing one like Google's can be very helpful. I hope the tips here can provide some initial thoughts about that! :)
This should be mandatory.
Awesome content.
Thanks, Thiago.
Thanks Roger!
This advice is contrary to the Linux kernel coding style, which notes “C is a Spartan language, and so should your naming be. … C programmers do not use cute names like ThisVariableIsATemporaryCounter. A C programmer would call that variable tmp, which is much easier to write, and not the least more difficult to understand. … Local variable names should be short, and to the point. If you have some random integer loop counter, it should probably be called i. Calling it loop_counter is non-productive, if there is no chance of it being mis-understood.”
I understand that a lot of this post basically devolves to “this is my opinion, and these are the reasons for those opinions”. That’s fine. For what it’s worth, I agree with a lot of them! But perhaps the first piece of advice should be “find your project’s style guide, and frequently use a beautifying tool that can be configured to your project’s style guide.”
The length of the variable name has little to no impact on resource consumption in embedded systems since the variable names don’t cross the semantic gap in the compilation phase.