|
So do your variable and function names explain "why" as well?
You have just been Sharapova'd.
|
|
|
|
|
yes, sometime have lengthy variable name because I am training to read code without comments like those in GitHub or StackOverflow
|
|
|
|
|
Generally I won't write comments too, with same reasons, but sometimes commenting is really necessary. I'm a simple developer, if necessary I write comment, if not, I don't. C'mon, who needs to write comment to a function whose name is Login ?
|
|
|
|
|
true right. I write comments for co-worker
|
|
|
|
|
[joke]
Beginner Luck wrote: I just make meaningful name to my variable and function
That's what I do as well. Here, enjoy this masterpiece.
public double ThisMethodCalculatesTheInsurancePremium(Insurance basically_All_That_We_Collect_On_Screen_Plus_Some_Flags_That_Are_Set_Based_On_User_Inputs_Oh_And_Totally_Forgot_Dynamic_Pricing_Flag_Works_Opposite_To_The_Way_It_Is_Named_I_Did_Not_Name_It_So_I_Will_Not_Change_It)
[/joke]
"You'd have to be a floating database guru clad in a white toga and ghandi level of sereneness to fix this goddamn clusterfuck.", BruceN[ ^]
|
|
|
|
|
and I include my current self and usually address "us" as "we need to..."
<sig notetoself="think of a better signature">
<first>Jim</first> <last>Meadors</last>
</sig>
|
|
|
|
|
Mandatory Geek and Poke: http://geek-and-poke.com/geekandpoke/2013/11/24/simply-explained[^]
I try to write good, usable comments during the initial writing of my code. Then, after I have worked on some other stuff for half a year before returning to make a new release, I add 50% more comments for the parts of my own code I do not immediately understand - and delete half of the old comments because they are really redundant. After two or three releases, with fewer and fewer additions/deletions of comments, those left are usually quite helpful.
|
|
|
|
|
Most of time, Managers and Team Leaders won't see your code, they just want to know it if works or not. But code efficiency and maintenance is the main aspect for long running projects, comments will always helpful in such cases.
Yes, debugger is there to trace to code but comments are more useful for elaboration of logic.
Find More .Net development tips at : .NET Tips
The only reason people get lost in thought is because it's unfamiliar territory.
|
|
|
|