Click here to Skip to main content
15,894,312 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Coding Standards Pin
Member 1008817113-Feb-14 8:54
Member 1008817113-Feb-14 8:54 
GeneralRe: Coding Standards Pin
jschell13-Feb-14 9:12
jschell13-Feb-14 9:12 
GeneralRe: Coding Standards Pin
Member 1008817113-Feb-14 9:35
Member 1008817113-Feb-14 9:35 
GeneralRe: Coding Standards Pin
jschell14-Feb-14 10:16
jschell14-Feb-14 10:16 
GeneralRe: Coding Standards Pin
S Houghtelin13-Feb-14 4:29
professionalS Houghtelin13-Feb-14 4:29 
AnswerRe: Coding Standards Pin
Ravi Bhavnani13-Feb-14 4:39
professionalRavi Bhavnani13-Feb-14 4:39 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 5:12
Matt U.13-Feb-14 5:12 
GeneralRe: Coding Standards Pin
Dennis E White13-Feb-14 5:23
professionalDennis E White13-Feb-14 5:23 
When Code Complete was first published there was actually a chapter dedicated to this. The idea was that you would design your code with comments. It would go something along these lines...

step 1 was to write comments of how the code would work.

Objective-C
// an add method to add two integers
    // add the two integers and return the result


You could in theory then have a review meeting of just those comments. This in turn causes you to get a better understanding of what you are trying achieve.

step 2 was to add the code
Objective-C
// an add method to add two integers
-(int)add: (int)a b:(int)b
{
    // add the two integers and return the result
    return a+b;
}


More importantly is that if you did step 1 properly then in theory someone else could do step 2 just by implementing your comments.

we did something similar at my first programming job out of college (20++ years ago) and it helped in slowing things down to get you thinking before writing. I don't follow it to the same detail today but I do find at times when I am working on something a bit complex to follow similar steps.

think of it like a mental dump of what you are thinking at the time you write the code. we have all asked the question when reading someone else's code.

What were they thinking when they wrote this piece of code?

I would take the time to learn more of how and where these standards started. there is generally a wisdom or history behind things like this and knowing that can help more than the actual standard itself.
you want something inspirational??

GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 6:05
Matt U.13-Feb-14 6:05 
GeneralRe: Coding Standards Pin
jschell13-Feb-14 9:07
jschell13-Feb-14 9:07 
GeneralRe: Coding Standards Pin
Matt U.13-Feb-14 10:37
Matt U.13-Feb-14 10:37 
GeneralRe: Coding Standards Pin
Dennis E White13-Feb-14 12:52
professionalDennis E White13-Feb-14 12:52 
GeneralRe: Coding Standards Pin
jschell14-Feb-14 10:06
jschell14-Feb-14 10:06 
GeneralRe: Coding Standards Pin
Matt U.14-Feb-14 10:10
Matt U.14-Feb-14 10:10 
GeneralRe: Coding Standards Pin
_Maxxx_13-Feb-14 16:47
professional_Maxxx_13-Feb-14 16:47 
GeneralRe: Coding Standards Pin
Stefan_Lang14-Feb-14 0:03
Stefan_Lang14-Feb-14 0:03 
GeneralRe: Coding Standards Pin
Stefan_Lang13-Feb-14 23:58
Stefan_Lang13-Feb-14 23:58 
GeneralRe: Coding Standards Pin
User 754579914-Feb-14 3:54
User 754579914-Feb-14 3:54 
GeneralRe: Coding Standards Pin
agolddog14-Feb-14 4:11
agolddog14-Feb-14 4:11 
GeneralRe: Coding Standards Pin
Member 999720314-Feb-14 5:48
Member 999720314-Feb-14 5:48 
GeneralRe: Coding Standards Pin
Ralph Little14-Feb-14 6:10
Ralph Little14-Feb-14 6:10 
GeneralRe: Coding Standards Pin
Kirk 1038982114-Feb-14 8:12
Kirk 1038982114-Feb-14 8:12 
GeneralRe: Coding Standards Pin
Daniel R. Przybylski14-Feb-14 8:21
Daniel R. Przybylski14-Feb-14 8:21 
GeneralRe: Coding Standards Pin
Matt U.14-Feb-14 10:08
Matt U.14-Feb-14 10:08 
GeneralRe: Coding Standards Pin
James Lonero17-Feb-14 5:19
James Lonero17-Feb-14 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.