- Sep 19, 2000
- 10,277
- 125
- 106
Abstract
Use code tags, like this [code]Insert code here[/code].
Why we care
We are programmers here. We love programming, and we love helping people with their programming problems. There is, however, one thing that you can do over anything else to make us cringe and look away from your code (and hence, not help you) that is not using code tags.
Code tags (with proper indentation) will make your code easier and more enjoyable for us to read. They make a BIG difference in the code.
Example
With code tags
Compare that to this:
int foo(void* bar)
{
int val = *(int*)bar;
switch(val)
{
case WM_COMMAND:
if (val > 7)
{
throw "*bar is too big!";
}
break;
case WM_SIZE:
resizeWin(bar);
break;
case SOME_CASE:
switch(bar)
{
case NULL:
saySomething();
default:
finishUp();
}
break;
default:
doThings();
}
return false;
}
(I didn't even remove the spaces). See the difference? Well, if you don't, we do.
Conclusion
Use code blocks. It makes a huge difference. In case you didn't read the abstract, its [code]Insert code here[/code].Please use them. They make a big difference.
Use code tags, like this [code]Insert code here[/code].
Why we care
We are programmers here. We love programming, and we love helping people with their programming problems. There is, however, one thing that you can do over anything else to make us cringe and look away from your code (and hence, not help you) that is not using code tags.
Code tags (with proper indentation) will make your code easier and more enjoyable for us to read. They make a BIG difference in the code.
Example
With code tags
Code:
int foo(void* bar)
{
int val = *(int*)bar;
switch(val)
{
case WM_COMMAND:
if (val > 7)
{
throw "*bar is too big!";
}
break;
case WM_SIZE:
resizeWin(bar);
break;
case SOME_CASE:
switch(bar)
{
case NULL:
saySomething();
default:
finishUp();
}
break;
default:
doThings();
}
return false;
}
int foo(void* bar)
{
int val = *(int*)bar;
switch(val)
{
case WM_COMMAND:
if (val > 7)
{
throw "*bar is too big!";
}
break;
case WM_SIZE:
resizeWin(bar);
break;
case SOME_CASE:
switch(bar)
{
case NULL:
saySomething();
default:
finishUp();
}
break;
default:
doThings();
}
return false;
}
(I didn't even remove the spaces). See the difference? Well, if you don't, we do.
Conclusion
Use code blocks. It makes a huge difference. In case you didn't read the abstract, its [code]Insert code here[/code].Please use them. They make a big difference.