Archive for the 'Programming' Category

Design Patterns Quick Reference

Jason McDonald has put together a cheatsheet of some Gang of Four design patterns.
I used to visit DoFactory’s patterns pages for all the patterns but now I have a sheet with all of them on a page.  Cool!

Adding 2 integers (32-bit)

A 32-bit signed integer has valid values ranging from−2,147,483,648 to +2,147,483,647.
So why do I always see sample code of an integer addition method written in C# like this: