Development today
-
👋 all Do you find yourself in a PR battle where you discuss if you should use const or const ref, or otherwise discuss why you use using to reduce the name of certain types, I can get so frustrated sometimes when I develop a feature or new code, I have it tested and all work and then you have this colleague who wants everything to be how he or she is seeing it and in the end it doesn’t matter as you spent more time discussing or changing it for their joy, code wise it would end up as the same code for the compiler.
-
👋 all Do you find yourself in a PR battle where you discuss if you should use const or const ref, or otherwise discuss why you use using to reduce the name of certain types, I can get so frustrated sometimes when I develop a feature or new code, I have it tested and all work and then you have this colleague who wants everything to be how he or she is seeing it and in the end it doesn’t matter as you spent more time discussing or changing it for their joy, code wise it would end up as the same code for the compiler.
dbstudio wrote:
the same code for the compiler
The best possible code review result. No reason to worry.
-
👋 all Do you find yourself in a PR battle where you discuss if you should use const or const ref, or otherwise discuss why you use using to reduce the name of certain types, I can get so frustrated sometimes when I develop a feature or new code, I have it tested and all work and then you have this colleague who wants everything to be how he or she is seeing it and in the end it doesn’t matter as you spent more time discussing or changing it for their joy, code wise it would end up as the same code for the compiler.
That's one of the reasons I don't miss working on dev teams.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
👋 all Do you find yourself in a PR battle where you discuss if you should use const or const ref, or otherwise discuss why you use using to reduce the name of certain types, I can get so frustrated sometimes when I develop a feature or new code, I have it tested and all work and then you have this colleague who wants everything to be how he or she is seeing it and in the end it doesn’t matter as you spent more time discussing or changing it for their joy, code wise it would end up as the same code for the compiler.
dbstudio wrote:
or otherwise discuss why you use using to reduce the name of certain types
What I can say for sure is a concise code is much more readable and that's why if there are several references made to get to a certain type then it's good to use usings. If I had a dev who wasn't convinced with this reason alone, I'd do it myself.
-
👋 all Do you find yourself in a PR battle where you discuss if you should use const or const ref, or otherwise discuss why you use using to reduce the name of certain types, I can get so frustrated sometimes when I develop a feature or new code, I have it tested and all work and then you have this colleague who wants everything to be how he or she is seeing it and in the end it doesn’t matter as you spent more time discussing or changing it for their joy, code wise it would end up as the same code for the compiler.
It's not about what it looks like to the compiler - it's about what it looks like to the *team*. The cure is to establish reasonably rigid coding standards, and make sure everyone adheres to them.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
It's not about what it looks like to the compiler - it's about what it looks like to the *team*. The cure is to establish reasonably rigid coding standards, and make sure everyone adheres to them.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013I strongly believe that it should be less rigid and more flexible and who don’t want to have a const signature if you are not changing the value, I feel the it’s more due to the fact of junior developers fresh out of school believing we are building a kernel or cathedral if you wish.
-
dbstudio wrote:
or otherwise discuss why you use using to reduce the name of certain types
What I can say for sure is a concise code is much more readable and that's why if there are several references made to get to a certain type then it's good to use usings. If I had a dev who wasn't convinced with this reason alone, I'd do it myself.
GKP1992 wrote:
concise code is much more readable
My code may not be concise in the same way yours is.
-
👋 all Do you find yourself in a PR battle where you discuss if you should use const or const ref, or otherwise discuss why you use using to reduce the name of certain types, I can get so frustrated sometimes when I develop a feature or new code, I have it tested and all work and then you have this colleague who wants everything to be how he or she is seeing it and in the end it doesn’t matter as you spent more time discussing or changing it for their joy, code wise it would end up as the same code for the compiler.
Either you have coding guidelines or you do not. We have guidelines, they dates from the 80s and 90s (seriously). The mantra has been don't change anything. (even crazy bad tab/spaces everywhere) But... When I go in a file to do work in it, I clean it up and bring it to more modern best practices as much as the underlying code allows me to do. I wish I could go deeper, but time and money are not infinite.
CI/CD = Continuous Impediment/Continuous Despair
-
I strongly believe that it should be less rigid and more flexible and who don’t want to have a const signature if you are not changing the value, I feel the it’s more due to the fact of junior developers fresh out of school believing we are building a kernel or cathedral if you wish.
Nope the standards should be quite rigid, the senior developer setting the standards should be open to new ideas and concepts with a willingness to implement them. Junior and new hires (and everyone else) should be encouraged to put forward suggestions.
Never underestimate the power of human stupidity - RAH I'm old. I know stuff - JSOP
-
That's one of the reasons I don't miss working on dev teams.
Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix
-
Either you have coding guidelines or you do not. We have guidelines, they dates from the 80s and 90s (seriously). The mantra has been don't change anything. (even crazy bad tab/spaces everywhere) But... When I go in a file to do work in it, I clean it up and bring it to more modern best practices as much as the underlying code allows me to do. I wish I could go deeper, but time and money are not infinite.
CI/CD = Continuous Impediment/Continuous Despair
I've been on the same project for 24 years now. Everyone else has been less than 3 years. I tell them what my coding standard is, and they follow it. It's really very simple: 1) Pattern match what already exists in the code you are editing. 2) In SQL, keywords are all caps and all statements end in a semi-colon. 3) Use the built-in formatters the IDE provide prior to every check-in. 4) Write code as if you have to maintain it for 24 years (correct spelling of variables/classes, no one-offs, use best practices and architecture, etc.). 5) Log state and location frequently. 6) Remove useless comments/only add comments that provide value. The new devs are the worse with the last one. For example, they will add a section (C# code) to method GetUserPermissions() that has the text "Gets the user's permissions.". Why waste their time writing that useless text and everyone else's time reading it? If I see useless comments in a code review, I most definitely tell them to delete it.
Bond Keep all things as simple as possible, but no simpler. -said someone, somewhere
-
dbstudio wrote:
or otherwise discuss why you use using to reduce the name of certain types
What I can say for sure is a concise code is much more readable and that's why if there are several references made to get to a certain type then it's good to use usings. If I had a dev who wasn't convinced with this reason alone, I'd do it myself.
-
It's not about what it looks like to the compiler - it's about what it looks like to the *team*. The cure is to establish reasonably rigid coding standards, and make sure everyone adheres to them.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013