-
We don't need magic.
Today, a coworker of another team needed to read the code of my team. He found a class called MagicObject. After tracing for a while, he still couldn’t figure it out why it exists. So he asked me, what the hell this class is for? Although, I know its purpose, and I know who wrote it, I said: “If you can understand magic, that is not magic, its existence is to confuse people.” If fact, this is the habit of those “creative” programmer. Code is not only a tool for coder to communicate with computer, but it is tool to communicate to your team member, if it is so secret so magic, shouldn’t it be locked, and never be viewed? In fact, the job of programmer is to demystify your design via code. I have to say, Let the magic go to hell.
-
Ten good practices for writing JavaScript in 2005
<a href="http://www.bobbyvandersluis.com/articles/goodpractices.php">Ten good practices for writing JavaScript in 2005</a>
-
dbcc freeprocecache
You can use “dbcc freeprocecache” to clear up the procedure cache to ensure the compilation will take place afterwards. How ever it has its drawback, because it will delete the contents of the procedure cache, and all statements and stored procedures will have to be compiled anew.
-
Investigate your SQL's compilation
Following script to investigate the compiler events and corresponding counters and values of your statement
-
AJAX basic
<pre data-sub="prettyprint:_"> var xmlHttp = null; if (window.XMLHttpRequest) { // IE7, Mozilla, Safari, Opera, etc. xmlHttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { try{ xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); //IE 5.x, 6 } catch(e) {} }