ALL


  Do NOT use boolean variable as function parameters

We follow lots of coding styles and coding standards when we do programming, but we may frequently forget one. The forgotten one is that do not use boolean parameter as the function parameters. The reason is it would greatly reduce the readability of the code. Don't believe it?When you read the following code, what does this code mean? widget->repaint(false); Do not repaint? Or what does this mean? After looking at the document, we know that this parameter is whether to repaint immediately, i.e, false to not immediately redraw or true to immediately redraw. The Windows A...

14,887 1       CODING STYLE CODING STANDARD BOOLEAN FUNCTION PARAMETER METHOD PARAMETER


  The Mature Programmer

1. The Mature ProgrammerThe mature programmer manages their own time and productivity well. The MP knows that maintenance is as much work as the initial writingand code always takes longer than you think. The MP knows that any changes to code can introduce bugs, no matter how seemingly trivial.The MP knows that premature optimization is foolish and dangerous. The MP knows that sexy coding like writing big complex systems fromscratch is rarely the best way to go. The MP does not get into ego competitions about who has the prettiest code. The MP acheives thebest final result in the minimum ...

2,562 0       EFFICIENCY FEATURE CODING STANDARD MATURE PROGRAMMER MP