Click here to Skip to main content
16,004,906 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCoding Convention Pin
pjmvn19-Jun-06 17:03
pjmvn19-Jun-06 17:03 
AnswerRe: Coding Convention [modified] Pin
Stephen Hewitt19-Jun-06 17:17
Stephen Hewitt19-Jun-06 17:17 
GeneralRe: Coding Convention [modified] Pin
Stephen Hewitt19-Jun-06 19:27
Stephen Hewitt19-Jun-06 19:27 
AnswerRe: Coding Convention [modified] Pin
capricious_00119-Jun-06 17:27
capricious_00119-Jun-06 17:27 
GeneralRe: Coding Convention [modified] Pin
Stephen Hewitt19-Jun-06 17:54
Stephen Hewitt19-Jun-06 17:54 
GeneralRe: Coding Convention Pin
capricious_00119-Jun-06 18:21
capricious_00119-Jun-06 18:21 
GeneralRe: Coding Convention Pin
FarPointer19-Jun-06 18:56
FarPointer19-Jun-06 18:56 
GeneralRe: Coding Convention Pin
Blake Miller20-Jun-06 8:33
Blake Miller20-Jun-06 8:33 
I do this one:

if( x == y ){
x = x + 1;
}

Because I have had too many entry-level programmers do this to the code...

if( x == y )
z = x + 1;
{
x = x + 1;
}

When the brace is on the end of the line, they almost never insert an extra line of code between the if and the opening brace!

And completely bollox up the logic. And sometimes these are the types of bugs I have spent DAYS trying to find. Needles to say, this is a trivialization for purposes of the sample. The error in logic on production code is not always so readily spotted.


I've seen better runs in my shorts! - Patches O'Houlihan
QuestionC++/Non MFC [modified] Pin
Bram van Kampen19-Jun-06 14:20
Bram van Kampen19-Jun-06 14:20 
AnswerRe: C++/Non MFC Pin
Stephen Hewitt19-Jun-06 16:19
Stephen Hewitt19-Jun-06 16:19 
QuestionQueueUserAPC Pin
neilsolent19-Jun-06 9:41
neilsolent19-Jun-06 9:41 
QuestionRe: QueueUserAPC Pin
David Crow19-Jun-06 9:55
David Crow19-Jun-06 9:55 
AnswerRe: QueueUserAPC Pin
neilsolent19-Jun-06 10:32
neilsolent19-Jun-06 10:32 
GeneralRe: QueueUserAPC Pin
David Crow19-Jun-06 10:38
David Crow19-Jun-06 10:38 
GeneralRe: QueueUserAPC Pin
neilsolent19-Jun-06 11:03
neilsolent19-Jun-06 11:03 
GeneralRe: QueueUserAPC Pin
neilsolent19-Jun-06 11:05
neilsolent19-Jun-06 11:05 
QuestionQuestion about Com in Visual C++... Pin
Yanshof19-Jun-06 9:18
Yanshof19-Jun-06 9:18 
AnswerNo one can help me with this question ... ? Pin
Yanshof19-Jun-06 17:36
Yanshof19-Jun-06 17:36 
GeneralRe: No one can help me with this question ... ? Pin
Milton Karimbekallil19-Jun-06 21:27
Milton Karimbekallil19-Jun-06 21:27 
GeneralRe: No one can help me with this question ... ? Pin
Steve S19-Jun-06 21:30
Steve S19-Jun-06 21:30 
GeneralRe: No one can help me with this question ... ? Pin
Milton Karimbekallil20-Jun-06 6:25
Milton Karimbekallil20-Jun-06 6:25 
QuestionEnumerating processes Pin
Shawn Brant19-Jun-06 8:50
Shawn Brant19-Jun-06 8:50 
AnswerRe: Enumerating processes Pin
Justin Tay19-Jun-06 9:14
Justin Tay19-Jun-06 9:14 
AnswerRe: Enumerating processes Pin
David Crow19-Jun-06 9:16
David Crow19-Jun-06 9:16 
QuestionSimple Reg Exp Pin
spelltwister19-Jun-06 8:23
spelltwister19-Jun-06 8:23 

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.