hackification

Homepage

...rediscover the joy of coding

Occasional Links - Programming Mistakes, Fixing Them, C, Pointers, and more

The gaps between these link articles get longer and longer. I've just renewed the hosting for this site, so hopefully that will encourage me to write a proper article soon. In the meantime, another collection of the best coding articles from the past month.

Top 25 Most Dangerous Programming Mistakes

http://www.codinghorror.com/blog/2009/01/top-25-most-dangerous-programming-mistakes.html

Summary article listing the 25 most dangerous (in terms of security impact) programming mistakes. Even if you're aware of all of these, it's worth re-familiarizing yourself (and your co-workers) with them.

Microsoft runs fuzzing botnet, finds 1,800 Office bugs

http://www.computerworld.com/s/article/9174539/Microsoft_runs_fuzzing_botnet_finds_1_800_Office_bugs

No, not that sort of botnet. Microsoft are using a distributed computer system to generate random changes to Office files, in an attempt to discover buffer overruns and other vulnerabilities in the file format parser.

Much ado about NULL: An introduction to virtual memory

http://blog.ksplice.com/2010/03/null-pointers-part-i/

Down-to-the-metal article explaining pointers, memory mapping, and virtual memory. Worth reading as it covers the basics that we rarely think about.

Amazing feats of Clang Error Recovery

http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html

Clang is the new up-and-coming C/C++ open-source compiler. If you've ever worked with C++, you'll know how cryptic and downright useless the error messages emitted by most compilers are. Clang is attempting to address that weakness.

Good Math, Bad Pointer Math / C Is Not Assembly

http://james-iry.blogspot.com/2010/04/good-math-bad-pointer-math.html http://james-iry.blogspot.com/2010/04/c-is-not-assembly.html

A deep-dive into the intricacies of C pointers, and how they relate to the C standard. If you're interested in writing portable and correct C code, this is worth a read.

Underscore.js

http://documentcloud.github.com/underscore/

Not so much an article as a useful download - Underscore.js (named after the identifier used to access the functions) provides a suite of functional programming constructs for JavaScript.

What’s wrong with extending the DOM

http://perfectionkills.com/whats-wrong-with-extending-the-dom/

JavaScript allows any objects to be extended, either on a per-object or per-type basis. The popular Prototype library used this mechanism - and subsequently found it to be a bad idea. Prototype 2.0 is moving away from  this technique - read this article for a clear explanation why.

The ASP.NET Web Development Horror

http://www.codingthewheel.com/archives/asp-net-web-development-horror

I've recently started (belatedly) playing with ASP.NET MVC 2, and it's a breath of fresh air compared to "classic" ASP.NET. (Presumably "classic" ASP is now "classic classic ASP"). If you've not been able to articulate why ASP.NET wasn't up to scratch, this well-written and funny article will help. How can you not read an article containing the phrase "tricksy little hobbits doing obscene things in the cupboards"?

Use C# dynamic typing to conveniently access internals of an object

http://igoro.com/archive/use-c-dynamic-typing-to-conveniently-access-internals-of-an-object/

I've linked to Igor's blog before - the articles are clear, well-written, and well-laid-out. This article suggests a new use for one of .NET 4.0's new features, dynamic types.

A Brief, Incomplete, and Mostly Wrong History of Programming Languages

http://www.cvaieee.org/html/humor/programming_history.html

I like to end on a light note, so here's a couple of funnies. If you've ever wondered about this history of various programming languages, this article is completely incorrect.

First among SQLs

http://www.theregister.co.uk/2010/04/20/verity_stob_sql/

If you're ever bored at work, you can do far worse that read Verity Stob's collection of articles. They're tongue-in-cheek, deadpan, and scarily accurate.