LinkFriday, July 31, 2009
Wednesday, July 1, 2009
Amazon price match gaurentee: WIN
You saved $1.91 with Amazon.com's Pre-order Price Guarantee!
The price of the item(s) decreased after you ordered them, and we gave you the lowest price.
The following title(s) decreased in price:
Natural Language Processing with Python
Price on order date: $40.11
Price charged at shipping: $40.11
Lowest price before release date: $38.20
Amount to be refunded: $1.91
Quantity: 1
Total Savings: $1.91
Say no to null pointers
In a lot of school projects and academic papers where data structures are involved they may describe certain tree nodes as containing null pointers. This object "null pointer" is of course is the proper term. However, in practice I found that using actually nulls in c, c++, java or whatever language to create problems. In particular, in trees with many elements, its a bad idea trust the language garbage collectors to maintain null pointers. Especially, when testing performance.
As an alternative it is better to use an interface or create an object of type null pointer. This way you shouldn't have to worry about null pointer exceptions and bad null memory management. For now on you can know that if a pointer is "null" there is an error in your code instead of thinking that you should have caught an exception somewhere.
