February 2004

20 posts

« January 2004 | Main | March 2004 »

The Study of Video Games

The New York Times has a technology article about what happens when academics discover video games. Ludology, the theory of video games, is the name of a new academic field that seeks to explore concepts behind video games. I glanced at Ludology.org and Ludonauts, and noticed some emerging terminology in the field such as agonistic integrity and epistemic conditions. Hmm... why do I have the feeling that the people who study video games are not the people who play them.

Correct Code Is Hard To Write

Even the simplest, most primitive data structures have special cases that make it difficult to find all bugs. Consider integers, for example. How would you write a Compare function for two integers, that returns a negative value for less-than relationship, zero for equality, and a positive value for a greater-than relationship? If you write the following, public void Compare(int i1, int i2) { return i1-i2; } you would have a problem with extreme values (values with the 30th bit set), because Compare(int.MinValue, int.MaxValue) will incorrectly return 1 and Compare(int.MaxValue, int.MinValue) will incorrectly return -1 in unchecked mode. Using checked mode...

Chris Pratley Has Second Thoughts

Chris Pratley is pondering whether he should consider blogging. His blog is one of the cream of the crop, and it would be a major loss for him to go. Well written and informative. I look forward to reading each entry he posts. (I did know him for some years while at Office, but I have not spoken to him for several years.) He feels a little cheapened that his work at Microsoft is boosting his traffic, and wonders if anyone actually cares for him personally. Well, I send in my vote. A look at technorati shows that he has...

What Happens to Java/Linux When Longhorn Ships?

I remember reading a quote from a Linux enthusiast, dismissing the impact of Longhorn, stating that the features new in Longhorn essentially exists in Linux in its present form. XAML--oh, that's just XUL--and so on. WINFS--oh, that's just a database. I feel that, if Longhorn does deliver in its promises, it will severely complicate the future of Linux and Java. If the whole Windows world becomes managed, won't Java performance suffer a bit with two runtimes, two libraries, two garbage collectors needed to run a Java application. Will Java based UIs appear rather dated compared to new Avalon applications, or...

What's Missing In .NET and Other Collection Libraries

Collections are probably one of the most important components of any library. The framework's collection classes, as of Everett, are somewhat weak, especially compared with Java and STL. With the recent work with collections in Whidbey, much of the gap in functionality with Java will be reduced but not eliminated, although the integration and performance of generics collection should be superior to Java's collection libraries. Some new collections, like linked lists, will be introduced, but I haven't seen any indications of sets or other tree-based data structures from Java being introduced. STL.NET, a .NET port of STL, will also be...

Easter Eggs

I have seen a number of posts, lamenting the death of Easter Eggs, which can pose a reliability and security risk. In the course of developing Excel 95, several Excel developers from the charting feature team were caught up in the Doom craze, and each day they would be spend about two hours playing network Doom in company time. At some point, a few developers decided to build their own 3D engine after hours. After several weeks, they decided it was too hard and abandoned the effort; however, all was not lost, the engine survived and became an easter egg....

Self-Censorship

While I try to be very open in my blog, I find myself becoming less and less frank about Microsoft. Already, I killed a few posts, particularly those which deal with Microsoft Office, the product that I spent six years developing with. I don't want to say anything potentially embarrassing to Microsoft, because I still want to preserve any possibilities for some future relationship with Microsoft. Also, I only develop for the Windows platform, and I plan to take advantage of many of the new ISV opportunities and partnerships available. I also don't want to be in the position where...

GC Myth is Real

Paul Wilson points out a Garbage College myth, "Set Object to Null," that he tries to dispel, but he is only half right. The myth is: There is never any reason to set your objects to null since the garbage collection will do this for you automatically. He asserts that there are times where setting objects to null can make huge differences in the memory footprint of the application. This is true; there are times. However, he also implies that references, which are not nulled out, will only be collected after the reference goes out of scope. This is not...

Colors Undocumented

I have been looking at how colors are implemented in GDI+. System.Drawing.Color is a value type, but it is not the lightweight data structure that you might expect as in Win32. In Win32, colors were represented as 32-bit integers. The framework's Colors, in contrast, occupy 16 bytes or 128 bits. Despite the size, each color component--red, green, blue, alpha--still occupies a mere 8 bits. Apparently, four bytes are unused and the rest of the other bytes are used to point to the color's name or to identify the color is being one of standard set of known or system colors....

Empty Arrays

Microsoft guidelines recommend developers to avoid using nulls for returning arrays or strings inside managed code. Instead, the empty string should be returned for strings, and an empty array should be returned for arrays. Benefits There are several benefits to following the guidelines. Reliability. The avoidance of nulls eliminates the possibility of a NullReferenceException being raised, potentially bringing an application down to a halt. Usually, most code will continue to work correctly if presented with an empty array or string, since a length of zero follows a continuous programming model for dealing with exceptional cases; however, null references must always...

© 2015 - Wesner P. Moise, LLC. All rights reserved.

free web stats