I'm not attending MIX '07 but it looks like we're announcing some good stuff this week. because the stuff I've been working on isn't ready to be announced yet but my coworkers have dropped some cool announcements. Today we announced Silverlight Streaming by Windows Live. To understand this announcement you first have to understand what Silverlight actually is.

From http://www.silverlight.net we learn

Microsoft® Silverlight™ is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, Python, and Ruby, and integrates with existing Web applications. Silverlight supports fast, cost-effective delivery of high-quality video to all major browsers running on the Mac OS or Windows.

If that is still too complex for you; you can consider Silverlight as being akin to the Flash platform but built with the .NET platform with all the attendant benefits (i.e. development with Visual Studio and access to a ton of languages). Now we know what Silverlight is, what exactly is Silverlight Streaming by Windows Live? Glad you asked.

From the blog post entitled New! Silverlight Streaming Service on the Windows Live Dev blog we learn about http://dev.live.com/silverlight which states

Microsoft® Silverlight™ Streaming by Windows Live™ is a companion service for Silverlight that makes it easier for developers and designers to deliver and scale rich media as part of their Silverlight applications.  The service offers web designers and developers a free and convenient solution for hosting and streaming cross-platform, cross-browser media experiences and rich interactive applications that run on Windows™ and Mac..
...
Microsoft® Silverlight™ Streaming by Windows Live™ can be used either directly from the administration web site or via a REST API. The API allows you to upload, update, delete, and invoke Silverlight applications using the Silverlight Streaming service. Click here to view the complete API reference.
...
While the product is in pre-release, storage and delivery is free up to 4 GB, with outbound streaming up to DVD quality (700 Kbps). As we move out of Beta, developers/designers will have continued use of the service with up to 1 million minutes of free video streaming at 700 Kpbs per site per month. Unlimited streaming will also be available for free with advertising, or with payment of a nominal fee for the service for use without advertising.

Not only is Microsoft giving developers a platform for building Rich Internet Applications (RIA) but it is also giving developers free streaming media hosting if they plan to use the platform to build a media sharing service. This is an interesting new wrinkle in the competition between Web application platforms. The response from Microsoft's competitors will definitely be interesting. I wonder if we'll see a partnership between Adobe/Macromedia and Amazon to bundle free usage of Amazon's S3 service if you are building applications with Flex or Apollo?


 

Categories: Web Development | Windows Live

Almost six years ago I wrote an article entitled C# from a Java Developer's Perspective which is still one of the most popular comparisons of C# and Java on the Web today. This update to my 2001 article comparing the primary features of C# and Java is a few years later than I planned. Given the amount of requests I've gotten to update it to account for the changes in Java 1.5 and C# 2.0 I'm sure there are many out there who'll find it useful. Below is the table of contents so you can jump to whatever topic interests you.

  1. The More Things Change The More They Stay The Same
    This section describes concepts and language features that are almost exactly the same in C# and Java.
    1. We Are All Objects
    2. Keyword Jumble
    3. Of Virtual Machines and Language Runtimes
    4. Heap Based Classes and Garbage Collection
    5. Arrays Can Be Jagged
    6. No Global Methods
    7. Interfaces, Yes. Multiple Inheritance, No.
    8. Strings Are Immutable
    9. Unextendable Classes
    10. Throwing and Catching Exceptions
    11. Member Initialization at Definition and Static Constructors
    12. Boxing

  2. The Same But Different
    This section describes concepts and language features that differ either only in syntax or in some similarly minor manner between C# and Java.
    1. Main Method
    2. Inheritance Syntax
    3. Run Time Type Identification (is operator)
    4. Namespaces
    5. Constructors, Destructors and Finalizers
    6. Synchronizing Methods and Code Blocks
    7. Access Modifiers
    8. Reflection
    9. Declaring Constants
    10. Primitive Types
    11. Array Declarations
    12. Calling Base Class Constructors and Constructor Chaining
    13. Variable Length Parameter Lists
    14. Generics
    15. for-each Loop
    16. Metadata Annotations
    17. Enumerations

  3. An Ever So Slight Feeling of Dèjà Vu
    This section describes concepts and language features that exist in C# that are similar to those that exist in Java but with a significant difference.
    1. Nested classes
    2. Threads and Volatile Members
    3. Operator Overloading
    4. switch Statement
    5. Assemblies
    6. Collections
    7. goto (no longer considered harmful)
    8. Virtual Methods (and final ones too)
    9. File I/O
    10. Object Serialization
    11. Documentation Generation from Source Code Comments
    12. Multiple Classes in a Single File
    13. Importing Libraries
    14. Events
    15. Cross Language Interoperability

  4. Now For Something Completely Different
    This section describes language features and concepts that exist in C# and have no Java counterpart.
    1. Deterministic Object Cleanup
    2. Delegates
    3. Value Types (Structs)
    4. Run Time Type Identification (as operator)
    5. Properties
    6. Multidimensional Arrays
    7. Indexers
    8. Preprocessor Directives
    9. Aliases
    10. Runtime Code Generation
    11. Pointers and Unsafe Code
    12. Pass by Reference
    13. Verbatim Strings
    14. Overflow Detection
    15. Explicit Interface Implementation
    16. Friend Assemblies
    17. The Namespace Qualifier
    18. Iterators (Continuations)
    19. Partial Types
    20. Static Classes
    21. Nullable Types
    22. Anonymous Methods

  5. Wish You Were Here
    This section describes language features and concepts that exist in Java and have no C# counterpart.
    1. Checked Exceptions
    2. Cross Platform Portability (Write Once, Run Anywhere)
    3. Extensions
    4. strictfp
    5. Dynamic Class Loading
    6. Interfaces That Contain Fields
    7. Anonymous Inner Classes
    8. Static Imports
  6. Conclusion(2001)
  7. Conclusion (2007)
  8. Resources
  9. Acknowledgements

 

Categories: Programming

Comparing the comments on Slashdot story Seven Reasons Microsoft Loves Open Source to the ones on the Digg story 7 Reasons Microsoft Loves OpenSource on the same topic, it seems that there is a sharp contrast in the quality of the comments posted by the users of the site. In fact, the Digg comments remind me of the following comic on XKCD

At first blush, the naive conclusion could be that Slashdot readers are more intelligent or at least more atticulate than Digg readers. However I just read Freakonomics so I've recently been thinking a lot about how incentive systems influence human behavior. After using both sites, I've come to the conclusion that the default settings on Digg encourages lower quality comments while the Slashdot defaults encourages higher quality comments.

On Slashdot, the default comment threshold is 1. This means that top level comments are only hidden if any negative vote has been applied to the comment by moderators. In addition, the content of comments in response to a top level comment are not shown unless the reply has been [net] positively rated by three or more moderators. Finally, when there are too many top level comments, only the ones that have been [net] positively rated by three or more moderators are shown to readers by default. This encourages the creation of good comments because or else a user's comments will be lost in the shuffle and no one will read it.

On Digg, the default comment threshold is -4. This means that top level comments remain visible until five negative votes have been applied to the comment by other users of the site. Secondly, the content of replies to top level comments are shown as long as they meet the default threshold.  

The upshot of all this is that it is more likely for a comment that is a flame or a one line joke in response to a top level comment to be visible when viewing a comment thread on Digg than on Slashdot. This causes two problems. The first is that it gives the impression that there are more "crap" comments on Digg than on Slashdot even if they have the same relative quality of comments. Secondly, there isn't as much incentive to write high quality posts on Digg because unlike Slashdot most comments are not hidden. Specifically there isn't the urge to make them "good enough" to scale the visibilty threshold on Digg since the threshold is so low that only abusive or spam comments are ever hidden from view.

In conclusion, I suspect that comments on Digg aren't any worse than those on most other forums on the Web. They just seem that way due to the way the site is designed.

Update: This post was submitted to Digg by one of my readers but it seems that it has been deleted from the upcoming stories list. I'm surprised that the admins at Digg would go to such lengths to censor an article that was critical of the site's design. The story seems to still be on Digg here . Now I wonder what happens if it gets enough votes to get out of the upcoming queue? 


 

Categories: Social Software

I've uploaded the pictures from my trip to Nigeria to Flickr. You can find them in my Nigeria Trip 2007 photoset. Below are a couple of entry points into the photo stream

My sister Bunmi and my brother Oba's wife Cynthia dancing at my dad's seventieth birthday party

Nigeria's president (my dad) casts his vote in the presidential elections

A close up of the giraffe that lives in the back yard of the presidential villa

A potrait of my dad from his days in the military



 

Categories: Personal

April 29, 2007
@ 12:13 PM

I really got into Nigerian hip hop and R&B music while I was there over the past few weeks. Below are links to my favorite songs from my trip, many of which are fairly old but were new to me.

  1. Tongolo by D'Banj: A club banger done in a mix of pidgin English and Yoruba

  2. Raise the Roof by Jazzman Olofin: Don't be fooled by the English title this song is mostly in Yoruba. The song is a general exhortation to dance which is a fairly popular topic for Yoruba hit music

  3. Iya Basira by Styl-Plus: A humorous song about a guy who gets so hooked on food from Iya Basira's (i.e. Basira's Mom) restaurant that he thinks she is using jazz (i.e. magic, voodooo, juju, etc) to make the food taste so good.

  4. Nfana Ibaga (No Problem) by 2Face Idibia: The opening rap is beyond wack but the song itself is quite good. He scored an international hit with a song called African Queen which I really didn't feel that much.

  5. Imagine That by Styl-Plus: This is a fairly crappy video but I love the song. The chorus is a mix of Yoruba and English. Roughly translated it goes "Imagine That! She says she doesn't want us to do this anymore. Imagine That! After everything I've done for her. Imagine That! What does she expect to become of me if she goes. Imagine That! If she goes".


 

Categories: Music | Personal | Trip Report

April 29, 2007
@ 11:50 AM

Terry Semel, Yahoo! CEO, can't seem to get a break these days. It seems everyone has assumed his days are numbered and he will be ousted for "incompetence". I've seen everyone get into the act from the technology press like C|Net and TechCrunch to more laid back technology pundits like Jason Fried in his post I'd rather be Microsoft than Yahoo.

All of these calls for Terry Semel's head remind me of a book I've been planning to read, The Halo Effect: ... and the Eight Other Business Delusions That Deceive Managers which describes The Halo Effect as it applies to business. So what exactly is this effect? Well according to Wikipedia

The halo effect refers to a cognitive bias whereby the perception of a particular trait is influenced by the perception of the former traits in a sequence of interpretations. The halo effect is involved in Kelley's implicit personality theory, where the first traits we recognize in other people then influence the interpretation and perception of latter ones (because of our expectations). Attractive people are often judged as having a more desirable personality and more skills than someone of average appearance. Celebrities are used to endorse products that they have no expertise in evaluating.

That may have been a bit difficult to follow, so here's an excerpt from David Wolfe's review of the book that explains the Halo Effect in business

Rosenzweig argues that media is no less error-prone in divining the reasons for a company's performance than gurus who write books on company performance.

He uses two prominent case histories to support the latter claim. Cisco and ABB. He recalls for readers how before the dotcom bubble collapse Cisco's John Chambers was widely regarded as the world's best manager and Cisco itself as without surpass in its organizational structure and corporate culture. Beyond that, according to the common view expressed in media, no company operated with greater customer centricity.

Within months of the dotcom collapse the same media that had virtually canonized Chambers were ripping his reputation as a great CEO to shreds. Cisco's was criticized for lack of attention to customer needs. This was alleged to have played a major role in its downturn in revenues and consequent precipitous loss in stock value. Writers told how the company's organization was fragmented and its culture grossly defective.

Rosenzweig tells a similar story of the Swiss-Swedish power company ABB. From being one of Europe's most highly regarded company to being a favorite whipping boy in media within not very many months, ABB turned out to be another example of what Rosenzweig calls the Halo Effect.

As Rosenzweig explains it, the Halo Effect refers to the aura surrounding a company and its leadership that promotes gross generalizations about its nature. When a company is outperforming, most everyone assumes everything about the company is exemplary. When the same company is underperforming, most everyone assumes everything about the company is defective.
Rosenzweig reminds us that externalities accounted mainly for Cisco's and ABB's decline in fortune. Cisco's downturn for example was inextricably linked to its Internet customers who flamed out in droves when the dotcom bubble burst. No amount of executive brilliance could have stayed the fiscal injury inflected by the dotcom bust.

What does this have to do with Yahoo! and Terry Semel? Glad you asked. See the blog post from ValleyWag entitled Fred Vogelstein's Amnesia which contains the following excerpts

How Yahoo blew it. Semel has been Yahoo's CEO for nearly six years, yet he has never acquired an intuitive sense of the company's plumbing. Semel's vaunted dealmaking skills seem to have deserted him. At Yahoo, the marketers rule, and at Google the engineers rule. And for that, Yahoo is finally paying the price. [Fred Vogelstein, writing in Wired Magazine, January 2007]

By figuring out how to make brand advertising work online, Terry Semel is on the verge of creating the 21st century's first media giant. So far, Semel has put together one of the web's hottest winning streaks... It turns out that the riddle of how to succeed online isn't so tough after all. Semel is taking everything he learned in his analog past and marrying it to what he can see in the digital future. [Fred Vogelstein, writing in Fortune Magazine, August 2005]

Same leadership style, same company. Yet when you tweak the externalities the CEO goes from being "on the verge of creating the 21st century's first media giant" to being someone whose "vaunted dealmaking skills seem to have deserted him". From where I sit, it is unclear that Terry Semel is actually doing a bad job, it just seems that his company isn't doing as well as Google which may or may not have anything to do with him.

I wonder how many years it will take until 20% time, free lunches and all the other things that people hype up about Google are used as examples of why the company has issues when some new upstart shows up on the scene?


 

Copyright, like abortion, is one of those issues that is pretty pointless to debate online. Most people have entrenched positions and refuse to accept the validity of opposing views which may come from a different perspective. However every couple of years I end up reading something that draws me into making a comment online. This year it was the post Scott Adams' Pointy Haired Views On Copyright by Mike over at TechDirt in response to Scott Adams's post Is Copyright Violation Stealing?. I tend to avoid TechDirt because I find the writing particularly poor, full of monotonous arguments and specious generalizations. The article Scott Adams' Pointy Haired Views On Copyright is no exception, I felt dumber after reading the article.

Thanks to the Mike's article I've decided to write this rant on how to avoid sounding like a 15 year old high off the fact he can download the latest Billboard Top 100 hits off of The Pirate Bay without coughing up $15 for a CD when talking about copyright on your favorite message board or "social news" site.

Lots of folks who debate copyright on the Web are familiar with the Copyright Clause of the U.S. Constitution

Article I, Section 8, Clause 8 of the U.S. Constitution, also known as the Copyright Clause, gives Congress the power to enact statutes To promote the Progress of Science and useful Arts, by securing for limited Times to Authors and Inventors the exclusive Right to their respective Writings and Discoveries.

Lots of folks throw this statement around but never really internalize what it means. A key purpose of giving authors and other content creators exclusive rights to their intellectual property is to enable them to be rewarded financially from their works for some time before allowing these creations to become "owned" by society. This is supposed to be an incentive that enables the creation of a professional class of content creators and thus benefits society by increasing the number and quality of copyrighted works as well as creating a market/economy around copyrighted works.

Most arguments against copyright laws are directly or indirectly an attempt to challenge the existence or benefits afforded the professional class of content creators. It should be noted that professionals dominate practically all areas of content creation (i.e. professionally created content is most popular or most valuable) even when you consider newer areas of content creation that have shown up in the past decade or so. For example, if you look at the Technorati Top 100 Most Popular Blogs you will notice that a media format that was popularized by amateurs now has its most popular content (i.e. of interest to the most members of the society) being content that is created by people who make their living directly or indirectly from blogging.

Now lets look at some of the anti-copyright arguments that are common on TechDirt which are mentioned or alluded to in the linked article, Scott Adams' Pointy Haired Views On Copyright

  1. Giving Away Intellectual Property for Free is Free Advertising: It's only free advertising if there is something of even more value that the content creator can sell. In many cases, this simply isn't the case. And trying to apply that rule uniformly is as foolish as trying to point out that since companies like Microsoft and IBM give away free T-shirts with corporate logos as a form of advertising then Nike and Abercrombie & Fitch should do so as well. What's good for the goose isn't necessarily good for the gander.

  2. Copyright infringement isn't stealing because the copyright owner still has the original item: This is one of those attempts to split semantic hairs instead of debating the actual cost of copyright infringement. What the copyright owner loses when people pirate his or her materials is the ability to sell to those customers who are using the pirated goods. The more people who choose to grab the latest songs off the Internet for free, the less money the music industry makes. Not only is this common sense, it is a documented fact. Pointing out that copyright infringement doesn't meet some 17th century definition of the verb "steal" because the original property isn't changing hands is like arguing that calling your ex-girlfriend a slut isn't libel because you only said it to people over IM.

  3. Successful copyright holders and content creators are rich so they deserve copyright infringement: One of the main problems with capitalism is that it leads to inequity. The inequity of capitalism is why the founders of Google and Microsoft have more money than ten Dare Obasanjos could make in a dozen lifetimes. However the balance for society is that in exchange for getting rich, they have built companies and products that add value to our society. This is the fundamental exchange of capitalism, you provide people with something of value and in turn they give you money. If enough people think you have provided something of value then you get rich. Being jealous of someone's wealth isn't a good reason to advocate theft copyright infringement especially since given that we are in a capitalist society their wealth is a direct reflection of how much value they've brought to society.

  4. Copyright take too long to fall into the public domain: The Sonny Bono Copyright Term Extension Act (aka The Mickey Mouse Protection Act) and the laws before it now make it so that copyright lasts for the life of the author plus 70 years or 95 years for content created by a corporation. Many feel that his is excessive especially since it is now quite likely that no works created during the average person's lifetime will fall into the public domain in their lifetime. It is true that the pendulum may have swung to far towards the wants of copyright holders in this regard but it should be noted that even if we did go back to the rules from the Copyright Act of 1790, it is unlikely that the "free stuff" brigade on sites like TechDirt would be happy with copyrights that lasted only 14 years.

  5. Middlemen like record labels and publishers make most of the money from copyrighted works: The fact that an artist or author doesn't make 100% of the money you spend on their works doesn't justify spending zero on their work. After all getting a cut of the money you spent on purchasing their content is better than getting nothing from you. Secondly, middlemen make a bulk of the money in the content industry because they provide funding and exposure to content producers. The people who provide the funding to content producers tend to make a killing whether it is a publisher who funds a book that ends up on the New York Times bestseller list or a venture capitalist that funds a tiny startup that becomes a multibillion dollar company. Thanks to the Web, content producers who feel that they do not need the funding and exposure provided by these middlemen now have a way to route around that system. Consumers should not rob infringe the copyrights of content producers because they don't like that the financial backers who funded the creation of the content are making a lot of money from it.

After reading that, it is probably clear why reading the monotonous and ill-considered arguments on TechDirt gets old for me. If you are going to be writing about copyright on the Web, keep these notes on the default anti-copyright arguments in mind before engaging your keyboard next time you feel like ranting about the RIAA, MPAA, BSA or Metallica.


 

Categories: Rants

Mike Arrington of TechCrunch has a blog post entitled Can PhotoBucket Survive Without MySpace? where he writes

There was a lot of fingerpointing, denials, and “he said, she said” going on today as everyone digested the news that MySpace had blocked PhotoBucket’s 40 million members from embedding videos into their MySpace pages.

From my perspective this looks like MySpace just found an excuse to send a big middle finger to the largest independent widget company in the hope of disrupting their ongoing acquisition talks. Om Malik sees things differently and thinks Photobucket practically asked for this blockade. Robert Scoble calls Photobucket and services like it “parasitic.” Nick Carr says this is all basically inevitable, regardless of who’s to blame.
...
And many MySpace/Photobucket users will simply leave MySpace and go to one of its many competitors rather than lose the ability to embed their Photobucket media. Re-creating a profile at another social network takes a lot less time than re-uploading hours of video. In the end, Photobucket could prove to be stickier than MySpace.

I agree with Om Malik that PhotoBucket clearly violated MySpace's terms of service by having ads in videos embedded on  http://www.myspace.com. I also think that the advice that Mike Arrington gives in his post will lead PhotoBucket down a bad road if they take it. The key question is whether the lock-in from a social network site like MySpace (where all your friends are) is more significant than the lock-in from having my media stored in a particular photo hosting or video hosting site. If MySpace has only blocked new embeds from PhotoBucket then I'm willing to bet that it is more likely that users will simply pick a new media hosting provider (e.g. YouTube for videos, Flickr for photos) than that they'll switch to Facebook or Windows Live Spaces because they are too tied to PhotoBucket.

If I were PhotoBucket, I'd work with MySpace and either (i) agree on how MySpace gets a revshare of PhotoBucket ads shown on their site or (ii) make it easy for MySpace to filter out the embeds with ads (which are a minority) and allow other embedded media from PhotoBucket pass through. Considering that they are trying to flip their startup, the PhotoBucket crew would be wise to avoid going to war with the biggest traffic driver to their site.


 

April 11, 2007
@ 11:53 AM

This morning I was flipping through last Friday's issue of the The Daily Sun: Nigeria's King of Tabloids and came across some of the personals in the section of the paper called Muslim Matrimonials. It was a bit of culture shock for me to see how different they were from personals on U.S. sites like Craig's List, Yahoo! Personals and Match. Here are a few of them

Profile 496: Muslim male, 49, 1.7m tall, genotype AA, from Oyo state, an engineer holder of a Master's degree, married for long without children wants for marriage a practicing Muslim female from any part of the country, honest, tolerant, neat, slim and moderately attractive with at least a minimum of diploma, gainfully employed or employable, aged between 23 and 33 and ready to start a successful family

Profile 502: Muslim male, 43, 1.73 meters tall, Hausa from Bauchi in Bauchi state, Master's degree holder in English, lecturer in higher institution, married and blessed with five daughters, needs a new wife who is loving, hardworking, caring, prepared to share the ups and downs of life with hubby and above all understanding. She may be from any part of Nigeria, any tribe or social class. She must be light-complexioned, exceptionally tall and not be above 25.  

Quite different from the usual fare in the Men Seeking Women section of Craig's List isn't it? The glimpse that online personals give into the culture and social fabric of society is quite revealing.


 

The site formerly known as The Daily WTF has an article entitled Soft Coding which contains the following excerpt

Most programmers consider “Hard Coding” to be a Bad Thing: it’s hack-like, inelegant, and all-around lazy code. And as such, many programmers try their damnedest to avoid it. Unfortunately, this quest of avoidance often leads towards a much worse path: complication, convolution, and all-around unmaintainable code. It’s a path I like to call Soft Coding.

Before I discuss the finer details of Soft Coding, I’d like to briefly define Hard Coding. It’s the practice of embedding “things that shouldn’t be in source code” directly inside of source code. The definition is intentionally vague: while most would agree that database connection strings and logfile directories don’t belong in source code, there’s a lot of gray area. Take, for example, this following code:  

private void attachSupplementalDocuments()
{
if (stateCode == "AZ" || stateCode == "TX") {
//SR008-04X/I are always required in these states
attachDocument("SR008-04X");
attachDocument("SR008-04XI");
}

if (ledgerAmnt >= 500000) {
//Ledger of 500K or more requires AUTHLDG-1A
attachDocument("AUTHLDG-1A");
}

if (coInsuredCount >= 5 && orgStatusCode != "CORP") {
//Non-CORP orgs with 5 or more co-ins require AUTHCNS-1A
attachDocument("AUTHCNS-1A");
}
}

I can already feel some of you cringing: Magic Numbers; String Literals; eww, that’s a lot of Hard Coding! However, not a single character in that example is Hard Coded: there is nothing that “shouldn’t be in source code” in the above code. The function simply implements a very clear and very specific business requirement with very clear and very specific code. Anything less and it would be Soft Coded.

I think it is a laudable goal for The Daily WTF to branch out into describing best practices instead of simply gloating at bad code. I assume this is motivated by some of the comments by Jeff Atwood in his post What's Wrong With The Daily WTF. However the problem I have with this article is that it conflates the difference between hard coding and using magic number (or magic strings).  

From the Wikipedia definition of hard coding:

To hard code or hard coding (also, hard-code/hard-coding, hardcode/hardcoding) refers to the software development practice of embedding output or configuration data directly into the source code of a program or other executable object, or fixed formatting of the data, instead of obtaining that data from external sources or generating data or formatting in the program itself with the given input.
...
EXAMPLE: Fixed installation path
If a Windows program is programmed to assume it is always installed to C:\Program Files\Appname and someone tries to install it to a different drive for space or organization reasons, it may fail to install or run after installation.

EXAMPLE: Startup disk
Some "copy-protected" programs look for a particular file on a floppy disk on startup to verify that they are not pirated. If the computer is updated to a newer machine, which doesn't have a floppy drive, the program now can't be run, since the floppy disk can't be inserted.

From the Wikipedia definition of magic numbers:

The term magic number also refers to the bad programming practice of using numbers directly in source code without explanation. In most cases this makes programs harder to read, understand, and maintain. Although most guides make an exception for the numbers zero and one, it is a good idea to define all other numbers in code as named constants.

This is preferable for several reasons:

  • It is easier to read and understand.
  • It is easier to alter the value of the number, as it is not redundantly duplicated. Changing the value of a magic number is error-prone, because the same value is often used several times in different places within a program
  • It facilitates parameterization.

Hard coding is bad because it assumes that information which should be flexible is actually fixed and unchanging. On the other hand, using magic numbers is a code maintenance problem which does not necessarily mean that the program is inflexible.


 

Categories: Programming

From the Microsoft press release entitled we learn Instant Messaging Comes to Xbox 360, Expanding the Largest Social Network on Television

Beginning the week of May 7, 2007, the Xbox 360 Spring Update will provide Xbox 360 owners worldwide with access to Windows Live Messenger features, broadening the communication options on the Xbox LIVE social network. Members of the 6 million-strong Xbox LIVE community currently send more than 2 million text and voice messages a day and can now use Windows Live Messenger to text chat with up to six people on their contact list at one time, while playing games, listening to music or watching movies. Text chat adds to the variety of options friends and families already have to communicate with on Xbox LIVE, including voice and video chat.

Current relationships on Windows Live Messenger and Xbox LIVE will be unified on Xbox 360 and users will see at a glance if their existing friends on Windows Live Messenger have gamertags, instantly expanding the breadth of connected experiences they can share online.

Although I didn't directly work on this feature, I sat in a couple of meetings with the XBox folks a few months ago to brief them on how to integrate with certain parts of Windows Live Messenger and I'm glad to see that the ball kept rolling and we're bringing this functionality to our users. Being aware of other's online presence and being able to communicate with them from any device or application is a worthy goal.

Sitting here in Abuja, Nigeria using Windows Live Messenger to send text messages to my girlfriend's cell phone in Seattle, Washington while she gets ready for work brings into sharp relief the importance of bridging communication forms and online presence in applications across several contexts.


 

Categories: Social Software | Windows Live

The combination of my messed up internal clock and the fact that it seems there is now a wireless LAN at the villa means that I am up blogging when I should be sleeping. The Web geek blog buzz today is the announcement contained in the blog post entitled Map-making: So easy a caveman could do it on the Official Google blog which states

That's why we're announcing My Maps, a new feature that makes it quick and easy to create your own custom Google Maps just by pointing and clicking. You can add placemarks, draw lines and shapes, and embed text, photos and videos -- all using a simple drag and drop interface. Your map automatically gets a public URL that you can share with your friends and family, or you can also publish your map for inclusion in Google Maps search results. We'll continue to show organic local search results with red pushpins; user-generated results will have blue pushpins. The user-created results include KML as well as maps made through My Maps.

To give you a better idea of what kind of maps you can make, here are some examples that Googlers created after we released the feature internally. (We ran a contest and gave a Nintendo Wii to the best map-maker.)

As usual the reactions from the blog pundits are equal parts surprising and unsurprising to me. The unsurprising bit is that I didn't find anyone who compared this to the collections feature of MSN Virtual Earth Windows Live Local Live Search Maps Live Maps which can be viewed at http://collections.live.com. I'm sure when the "Web 2.0" pundits eventually discover we have this feature it will be claimed we copied it from Google. :)

On the other hand what I did find surprising were blog posts like Google Launches MyMaps - Platial Gets Screwed and My Maps at Google: Is Google Doing a Microsoft? from Pete Cashmore and Paul Kedrosky which complained that Google was killing "social mapping" startups like Platial and Frappr with this move. Ignoring that "social mapping" seems like a silly product category in the first place, I wonder what exactly is wrong with this move. Some startups point out consumer demand for certain features from online mapping sites (i.e. missing features) and the consumer mapping sites add the features.

Is the expectation that companies shouldn't be able to improve their products once startups start trying to build a business out of the fact that their product is missing features? I've never understood that reasoning. Paul Kedrosky specifically calls this "pulling a Microsoft". I wonder...do users really want their computers to ship without a Web browser or a media player? Do users really want to go to one site to get maps and another to add annotations to these maps? Adding features to products is good for users and we shouldn't be trying to artificially limit products because some startups are trying to build a business out of a feature. If startups like  Platial and Frappr are actually adding value then they'll survive. If they don't, then they probably didn't have much of a business to begin with.  

PS: I understand that the philosophy of anti-trust law in Europe is about preventing unfair competition whereas in the U.S. it is about preventing harm to consumers. Thus depending on where you are from these questions will strike a different chord with you.


 

April 4, 2007
@ 06:56 PM

Paul Bryant has a blog post entitled How Microsoft could crush Google in one easy step. Seriously. where he writes

Henry Blodget has a post up on "One way for Microsoft to Kill Google" It's interesting, but I think there's a much easier and faster method that Microsoft could use to more effectively “kill” Google tomorrow if they so chose.

It’s more than a little bit evil - - but on the other hand, I never heard Microsoft promise that they wouldn’t be:

So what is it?

The height of simplicity. Introduce an integrated ad-blocker to Windows (purely as a customer service, of course) that blocks all Google ads in both IE and Firefox.

Allow users to temporarily or permanently turn off the blocker if they choose. (Knowing full well that 95% of users use just the default settings.)

MSFT would probably need to block their own ads too, in order to make the effort legitimate, but how big a loss would that be for them really, on a relative basis?

For G, on the other hand, it would literally eliminate their entire revenue stream. Overnight. And Microsoft could push this out via a Windows Update in a few weeks time, at most. Buy the very excellent AdMuncher and bundle it if it’s too time consuming to build.

Part of me hesitates to point this out (in fact, I first thought of it a couple of years ago, and didn’t say anything for that very reason) but I can’t possibly be the only person who has thought of this, right? What am I missing?

Usually when I see a post like this, I just post a comment pointing all the ways the idea is stupid problematic. However given that the Paul Bryant's blog doesn't allow comments and I'm supposed to be on vacation, I'll just let the merits of this idea stand on their own without further comment.


 

I just arrived at London Heathrow and can look forward to another 9 hours or so until my flight to Nigeria. In the meantime, I've found complimentary Web access in the business class lounge so it looks like I won't be bored. I am a little worried about keyloggers and spyware on this computer given how easy it was for me to install Firefox on it. Here are a couple of quick thoughts I had on the way related to links I've seen over the past 24 hours

I'm hungry and need to get back to my book. Holla at y'all later.