Click here to Skip to main content
15,887,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Is there a standard about how to structure the code?

Thanks!
Posted
Comments
Duncan Edwards Jones 12-May-15 4:13am    
Do you mean how to structure code files in a folder structure (and classes in namespaces) or do you mean how to format the code within each file?

The main thing to bear in mind when writing code is: do the thing that makes it easiest for a human to read.

No.
There are lots of standards. Probably nearly as many as there are people writing code! :laugh:

There are too many variables here to give you a meaningful answer: a lot depends on the language you will use, the company you work for, the technologies and patterns you will code for. And the end market can also dictate the code structure: the military market tends to want this, a medical application will want that.

So the only meaningful answer is "No" - despite there being a heck of a lot of them!
 
Share this answer
 
Comments
Frankie-C 12-May-15 5:48am    
Sure +5
Of course there are some general lines for each language...
Nope.
However there are wise guidelines. The most important is: "Structure your code in a way the compiler would accept it..."
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900