ALL


  Hacking Vs. Programming

What is the difference between Hacking and programming? One opinion I have heard expressed is that a hacker can put a lot of code together in a hurry but if a change is needed the code has to be completely rewritten. A programmer may take a little longer but if changes are needed they are more quickly and easily installed without the need for a complete rewrite. One source I heard attributed an observation like this to Maggie Johnson of Google. It rings true to me though. Hacking is usually described as “quick and dirty.” You though a bunch of code together and make it up as you go...

43,827 21       PROGRAMMING CODING STYLE HACKING


  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,886 1       CODING STYLE CODING STANDARD BOOLEAN FUNCTION PARAMETER METHOD PARAMETER


  Coding skill and the decline of stagnation

I am a decent programmer. I know a decent amount of computer science theory, I can type correct code fairly easy. I don’t let my classes expand too much. But I still struggle some with math, and I have a tendency to have too many cross-dependencies in my code.I used to think I was an awesome programmer. One of the best. After I made a game in the first programming lesson in school, I got told to don’t bother showing up for the rest. I was the one who taught all my friends what big O notation is and how it’s useful, or why hashmaps can have an effective constant speed if us...

3,743 0       CODING STYLE SOPA STAGNATION DECLINE