As a developer everyone thinks that they should write a coding in such a format which can easily perform the particular operation. Sometimes we used to be irritate of writing a lots of code and we used to commit such a silly mistake by writing codes, because while writing codes we don't used to think that what will be the final output. We should always take care about the destiny of the code. It may change later but while writing the code we should make it clear that it will work properly.
The the standards referred to are "fixed", "well defined", "clear". Anyone out there have guidelines that you follow, but which are not fully prescriptive? That's certainly the case for me. Some aspects of our coding standard are prescriptive (variable names, for example). Other's offer guidance, but (bizarrely) assume that the programmers are bright, thoughtful people who can make appropriate context sensitive decisions without being told exactly what to do.
You assume the guy above you just did not think about anything before accepting the standard. I would hate to be in a project with a guy that instead of looking at the way that everyone has coded on the project just questions everything and makes the work harder for everyone. You cant just play the smartass and say "question everything" when all the information you have is that the guy follows a standard . He never said "we are a bunch of robots that don't think", he said "he have a standard and follow it".
You assume the guy above you just did not think about anything before accepting the standard.
Not only did I "assume" that, I was proven right. Six times in ten years.
I would hate to be in a project with a guy that instead of looking at the way that everyone has coded on the project just questions everything and makes the work harder for everyone.
I'm sorry, but I consider that to be part of my job. I bet you'd hate it for everyone to stay until 7 PM and discuss the most common patterns. You wouldn't hate it if we'd order a pizza.
You cant just play the smartass and say "question everything" when all the information you have is that the guy follows a standard .
It took me a week to find an answer to your question, and it's "yes, I can". I'm not a soldier that's going to follow orders, nor am I a businessman. I'm a coder, damn good at my craft, and taking it seriously. You wanna follow a standard? Find a job that doesn't involve thinking.
He never said "we are a bunch of robots that don't think", he said "he have a standard and follow it".
Did i mentioned anywhere that we never changed the standard.Before downvoting can't you even think that if an organization is following a standard then definitely they will take all measures to avoid mistakes in that.
If by chance there is a mistake which i found in that standard then i will definitely approach concerned person and explain him in detail about it. Then the standard is modified and passed to each and every developer in the organization.
Generally standards are followed by companies because if one developer leaves the organization then other developer who is handling that task won't get much trouble to understand the code.
Without informing anyone if you follow your own coding style then what is the use of preparing a standard.
I follow strict coding standard and suggest/recommend to follow it strictly to my colleagues, that will help us to track huge code easily. coding standard includes all comments, variable naming conventions, declarations etc.
If you are TL/ML then we have to be too quick to identify any code, obviously coding standard is big way/support for us.
finally, Programming coding is like sex: One mistake and you have to support it for the rest of your life.
Rating always..... WELCOME
The only reason people get lost in thought is because it's unfamiliar territory.
My favorite quote for coding..
Code as if the next programmer is an axe murderer who knows where you live.
With all of the different projects over the last few decades, I can't say I've found more than a tiny handful that code consistently and logically. And, no, I am not among that handful. However, whichever way I code, I always try to take the time to comment in whatever the frack I was trying to do with the code. You don't need to comment print or calculations...
When you have to step through your code...anyone's code... it's great to find a few troubleshooting tips and what-not for something that hasn't been seen by humans in years. One of our old programmers tended to swear and drink while coding... and comment about the same, too.
No single raindrop believes it is to blame for the flood.
Calculations need not be commented? What kind of programs do you write? Last weekend I worked on some code to initialize 3D objects procedurally. Input: A radius and the level of detail, output: rendering buffers with vertices, an index buffer to assign the vertices to triangles, a buffer with normal vectors, and several sets of texture coordinates and blending weights for each vertex.
It's about two pages full of lengthy equations and it only prepares a sphere. Calculating more complex 3D objects may require yet a little more code. Without comments you will certainly have a problem remembering why you did something the way you did it when you revisit the code after some time. I certainly was glad to have left behind more comments than code in that method.
At least artificial intelligence already is superior to natural stupidity
Well, your specific quote was preceded by "always try to take the time to comment in whatever the frack I was trying to do with the code.".
I am fairly certain most people understood that to mean to code for the whole, not for specific mundane bits of logical code like print/output or calculations. I consider commenting in a more holistic form of documentation. I believe any coder worth his salt should be able to be able to understand all the basic bits of code and really only need coding for the wicked complex items....like "complex 3D objects". This make me think back to QuakeC from Carmack.
No single raindrop believes it is to blame for the flood.
Code as if the next programmer is an axe murderer who knows where you
Here is the comment I will prepare for this guy in my code:
// Crap, I don't have time to do things the right way because I sold my house
// to a cop and have to move to #XXX on #YYY Street (put in address of boss or
// whoever you hate :) tomorrow, the next programmer can go to hell ...
I agree. The trouble is that coding standards often include style, so that doesn't help in not getting them mixed up! Standards (excluding style) are more important than style. Although I have a preferred style I would make more fuss over things such as not using magic numbers than code layout.
The first I do in any class or module is create sections for Storage, Properties, Constructors and Methods. Sections for event handlers, interface implementations, internal classes, enumerations and the like are added if needed. If the code is really complicated, I'll use subsections, like separating public and private methods, or grouping menu handling events away from other controls. In each section, the methods are sorted alphabetically. With this setup, I can look at my code years later and know what is what, and even find stuff faster than I can navigate the search functionality.