|
Every developer knows you should have a one, exact, coding standard in your company. Every developer also knows you have to fight to get your rules into the company standard. Every developer secretly despairs when starting a new job, afraid of the crazy coding standard some power-mad architect has dictated. It’s better to throw coding standards out and allow free expression. The small win you get from increased conformity does not move the needle. I expect everyone to write good clean code. You decide what that means.
|
|
|
|
|
Coding standards are pointless . They simply massage the ego of whoever writes them . Write the tests first , pass the tests , then re factor . Coding standards are irrelevant.
|
|
|
|
|
Totally disagree.
There are different levels of coding standards.
1. How files and projects are organised and named
2. How namespaces, classes and all objects and variables are named
3. How code is organised within files (eg Adhering to StyleCop, how different sections are laid out)
4. How you code within a method (eg do you always ensure input params are checked? Output is checked?
5. How you format code. Braces on new or the same line? Wrap at 100 chars? Braces around all code blocks even if they are 1 line?
6. How you comment code.
7. How you handle error conditions. Do you throw exceptions or rely on passing around state?
8. How you handle return values - do you allow nulls, or do you always return an object, for example?
and on it can go.
These aren't nice to haves. These standards massively reduce the effort needed to scan large projects. Once someone understands the conventions in place in one part, they can move to any other part and understand how things are laid out and what to expect.
Standards such as how errors are handled ensure consistency in the code, and standards such as commenting ensure sufficient comments are placed where they are needed, and no more.
Coding Standards are like building or wiring standards. They reduce mistakes.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
10!
I'd much rather work at a place with a standard than one without.
|
|
|
|
|
Much of what you are talking about I would term good design practices - no problem with those . To me only 3 and 5 are coding standards . And in the case of these I would much rather that time was spent on designing , and testing than these . If having or not having a curly brace on a single line block is your biggest issue then you are very lucky .
I have yet to see a project yet where 3 and 5 have been a significant issue. However I have been involved with hundreds of arguments with developers as to what the style should be . And invariably it boils down to 'my style is best' . I have lost count of the number of times we ended up with ' I think X' ' ' No I think Y' arguments . When in reality the time would have been better spent thinking about the design , process or testing .
|
|
|
|
|
There's a difference between coding style and coding standards.
cheers,
Chris Maunder
The Code Project | Co-founder
Microsoft C++ MVP
|
|
|
|
|
Tabs or spaces? Which do you prefer? What about your colleagues? Are they all the same?
If any one of you prefers a different indentation type, then good luck with your code check ins and merges - not all repositories are forgiving of whitespace changes.
|
|
|
|
|
I was also a big advocate of strict coding stadards. I was nit-picking on every single curly brace and intendation and totally missing the big picture. Then I got into same realization as the blog's writer that the most important thing is to be consistent and get something delivered to the customer!
Now I'm much happier without having to worry about the semicolon placements and all. I know that my teammates will do a good job
|
|
|
|
|
How can you be consistent if there is no standard? Consistency is achieved through standards. Even if those standards are then unwritten standards, they are still standards.
|
|
|
|
|
I meant that it's quite impossible to have a single coding standard that everyone sticks to. So it's everyone's responsibility to write code that's predictable in their own way. I think that's the message the OP's article wants to tell.
For example in C# naming member variables is usually done by prefixing them with an underscore. If you don't like that then fine, but don't mix different prefixes around in different places of your program.
|
|
|
|
|
Extremist programming (no relation to extreme programming) is the act of taking some principle, elevating it above everything else and applying it everywhere. After the dust settles, people often look at this extremism and think, “Well, that was kind of interesting, but using X in Y was clearly inappropriate. You need to use the right tool for the job!” Here’s the catch: sometimes you should use the wrong tool for the job—because it might be the right tool, and you just don’t know it yet. Too much is never enough.
|
|
|
|
|
Word!
Especially when it comes to whitespace.
|
|
|
|
|
But is it news?
Director of Content Development, The Code Project
|
|
|
|
|
Not to anyone who reads my code.
|
|
|
|
|
Apple's built a great marketplace for apps, and with the popularity of the iPhone and the iPad, it's created a huge userbase of people ready to spend money to support them. Right now, there's still a fairly large wall of knowledge required to put an app together. But with new interfaces like ScriptKit, we're moving closer and closer to the point where anyone with a really great idea will have the chance to drag some code together and make something really useful and cool. Point-and-click programming is getting better and better.
|
|
|
|
|
and so it seems coding (if even needed) gets easier, but much more expensive...
|
|
|
|
|
Google has enjoyed a considerable head start on the mobile-mapping front, but Apple and Microsoft haven’t been idle. Both companies have licensed data from a number of services to flesh out their competing map offerings in an effort to bolster their respective phone platforms and chip away at Google’s dominance. But there’s more to a map than getting users to and from work: We rely on maps to figure out where we are, to find new places, and to plan trips far beyond our local haunts. Here's a look at which mapping service offers the best features and functionality. We got a full tank of gas, one bar of cell reception, it's dark... and we're using maps from...
|
|
|
|
|
A new security hole has been discovered in Microsoft’s product activation process that allows pirates to get a free legitimate activation of Windows 8 using the current Windows Media Center upgrade promotion. Pirates have been having a harder time with Windows 8 because Microsoft no longer allows volume keys — each Windows 8 activation requires a unique key. However, a hole was discovered that involves using the KMS (Key Management System) , and then applying the freely available Windows Media Center upgrade on top of it. ITSNOT-THAT-EXPEN-SIVE-JUST-BUYA-COPY
|
|
|
|
|
Thats right it is nor really expensive
BUT !
I think Windows 8 is only needed if you have an Touch-Sensitiv-Display or Laptop or Tablet or Mini-Tablet or Ebookreader or ...
if you don´t have such a "thing" well then you dont need Win8 cause APPS look really really ... BAD! why Fullscreen ? WHY ?
and what about all the clicky-clicky till i shutdown my PC ... just pull the damn cable ...
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello Reader!");
}
}
|
|
|
|
|
Given the recent controversy around the design of Windows 8, it’s interesting that Jensen Harris, one of the people behind the Windows 8 design recently spoke at UX Week, and that his presentation is available online for all to watch. If you’re concerned about this topic, you’ll want to check it out.... His central argument is that while each Windows revision has been familiar to users since Windows 95, people are willing to change if you give them something better. Resting on familiar is the way to mediocrity.
|
|
|
|
|
I, like so many thousands of other entrepreneurs, developers, IT professionals, and businesses small and large have been able to support our families because of Lotus products and their value to the businesses who rely upon them. Then, last week, IBM's Ed Brill quietly announced on his blog the sunsetting of the Lotus brand. Notes and Domino will be with us for quite some time (after all, so many companies rely on these workhorses), but the Lotus brand is officially now one with history. I'd rather keep the brand and lose the software, but maybe I haven't used it enough...
|
|
|
|
|
I know there are a lot of people who made a lot of money supporing Lotus Notes. I avoided it. Don't know if Sharepoint if better or worse, but think they are similar. It is also a pain to work with, and people make lots of money supporting Sharepoint.
|
|
|
|
|
|
|
I do not understand the message!
|
|
|
|