Hello all my fellow developers out there!
This is a short little presentation on how to write cleaner, better code.
I enjoyed it and thought you would as well.
Hello all my fellow developers out there!
This is a short little presentation on how to write cleaner, better code.
I enjoyed it and thought you would as well.
Awesome, great video, and has been bookmarked for some rewatching when I get back into my coding game again. Thank you!
No problem, glad it helped someone too!
good to know i follow most of these practices
thank goodness!
Yeah I always thought most of this was common sense until I had to review other people’s code.
My best tip for clean coding is to put units in variable names. Don’t just call it “length”, call it “length_mm”. This saves masses of confusion, especially when you need to maintain it in 5 years time.
that’s a good suggestion.
Another good one is to use the const keyword often in C/C++.
For example, if you have a function that takes a pointer, it could update what that pointer points to. If you make it a pointer to a const it can’t change anything, and the person calling that function can clearly see that it won’t.
This can also help the compiler optimize your code.