December 2004 - Posts

<i>Doing Objects in VB.Net and C#</i> - a quick review
21 December 04 09:21 PM | alexcampbell | 2 comment(s)

I've spent the last hour reading Terry Smith's free online book Doing Objects in VB.Net and C#.  If you are familiar with OO programming but new to the .Net framework then this book will probably be good for you.  If you're an old school VB or ASP developer then this book will help you understand OO programming and .Net at a basic level.  Other than that, the content of the book is not going to be much help to an experienced .Net developer although this admitedly isn't one of its stated aims.

If you fall into the experienced OO programmer category, the VB.Net code examples in this book will cause you pain.  I manage to get through daily life without being reminded of the extreme ugliness that is the Visual Basic .Net language, but when I see it in examples it amazes me that anyone could work with it.  Fortunately most of the VB.Net examples are accompanied by C# equivalents.

Smith attempts to dispense with the customary dry computer book tone and take a lighter and more humorous approach.  Sadly, instead of coming across as funny and clever he just seems geeky and sarcastic.  I'm always prepared to say that a product sucks if that's what I think, but Smith's bashing of the .Net framework OO implementation is childish and irrelevant.  The jokes about abstract art are just embarrassing.  A lot of the humour like:

One day the King will return and the angel of the lake will arise again and return Excalibur to its rightful owner and…

breaks the flow of the writing and is distracting for the reader.

I guess it sounds like I'm knocking a free book that a smart guy wrote in his spare time.  I'm not.  To balance my negativity I want to say that this book is much better than a lot of similar commercial books.  This is mostly because of well-documented problems with the computer book publishing industry.  Smith doesn't have a publisher forcing him to pad the book to get its weight up to 12kg so he is able to say a lot in only a few pages.  He doesn't have a team of editors erasing personality from his prose.  It is actually kind of refreshing to read a book that hasn't been mutilated by a big publishing house.

The truths about Search Engine Optimisation
14 December 04 10:42 PM | alexcampbell | 1 comment(s)

I thought I'd post my brief views on Search Engine Optimisation.  My aim is to help clear up some of the common misperceptions / bad ideas that non-technical people often have about it.

Focus on Google

Google has such a big market share that it's not worth spending much time trying to get results with other search engines.  They have some extraordinarily talented engineers and a lot of vision, so I think its safe to assume that they'll be able to hold on to their market position for a fair while.

I suspect that MSN will begin to crush Google next year with billions of dollars of R&D and integration with Internet Explorer.  This will bring new challenges for us and probably new anti-trust lawsuits for Microsoft.  In the meantime, most SEO tricks that work for Google will probably work for MSN.

 

Incoming links are the key

Google's search rankings are mostly determined by their PageRank technology.  This means that every site that links to your site is essentially "voting" for your site. The more people that link to you, the higher you'll appear in Google's search listings. If no one links to your site, it is likely that Google will never discover you.

Keep in mind also that everytime a user sees a link to you from another site, it builds your credibility.  To a user a link is a personal recommendation, whereas to GoogleBot a link is a part of the mechanism for determing your page rank.

 

Don't waste much time on meta data

Meta data was important in the 1990s but modern search engines tend to ignore it - the actual content on the page and its relevance to the search terms is far more important.  You'd be better off to spend time making sure your links are easy to follow for search engine bots, and cleaning your HTML up so it passes the W3C validation tests.

 

Search engine optimisation isn't a black art

http://google.com/webmasters/ documents exactly how to get good results from Google. Apparently reading has become so unfashionable that even SEO experts are unwilling to spend 30 minutes reviewing what Google's experts have to say.

 

The only sustainable strategy for building website traffic is content.

This will increase the amount of content Google can index. If people were prepared to write interesting content for their websites, more people would link to them and their PageRanks would subsequently increase.  Common conversation as follows:

Marketing Manager: "My site isn't getting any traffic!"
Alex: "Really?  What content do you have on it?"
Marketing Manager: "A few product descriptions and biographies of our board members."
Alex: "…"

All of the most successful sites either allow users to contribute content (http://photo.net, http://slashdot.org) or get content from external sources (http://google.com, http://news.google.com) or have huge teams of content producers (http://cnn.com, http://amazon.com) or sites that help users achieve something (http://orbitz.com, http://ebay.com).

The challenges involved in building these sorts of systems had all been overcome by the end of the 1990s.  But for some reason, marketing people still think that their customers want to look at animated flash banners for 5 minutes and then read the CEO's biography.

 

Quotes of the day...
14 December 04 10:11 PM | alexcampbell | with no comments

One of my favorite writers is Paul Graham.  The thing I like about him the most is that he really understands how the best software engineers think...

I don't think it's publication that makes the best hackers want to work in research departments. I think it's mainly not having to have a three hour meeting with a product manager about problems integrating the Korean version of Word 13.27 with the talking paperclip.

And what is important about e-commerce...

Tracking your customers by making them register is like measuring how much water there is in a glass by dropping it on the floor.

A wierd ASP.Net bug or is there a better explanation?
08 December 04 09:15 AM | alexcampbell | 5 comment(s)

I think I have come across a wierd bug in the way ASP.Net Session State works within HttpModules.  I know this sounds implausible, but I can't figure out any other explanation. 

More often than not, the following HttpModule throws an NullReferenceException when I try to access httpContext.Session in the PreRequestHandlerExecute handler:

      public class AuthenticationModule : IHttpModule {

 

            HttpContext httpContext;

 

            public void Init(HttpApplication context) {

                  httpContext = context.Context;

                  context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute);

            }

 

            public void Dispose() {

            }

 

            private void context_PreRequestHandlerExecute(object sender, EventArgs e) {

                  if(httpContext.Request.IsAuthenticated) {

                        if(httpContext.Session["User"] == null) {

                              // the object in the session has been lost, go back to

                              // the database and rebuild it and put it back in the session

                              // ...

                        }

                  }

            }

      }

This is pretty bizarre behaviour - Session State is definitely enabled across the application.

MSN Spaces launch
05 December 04 09:48 AM | alexcampbell | with no comments

Ok, this is really cool.  I've been wanting to start a personal blog for a while now.  I saw some of the hype for MSN Spaces over at http://channel9.msdn.com and I've signed up.  Have a look at http://spaces.msn.com/members/alexc.

One of the most interesting things about MSN Spaces is that it is written entirely in .Net and hosted on IIS / SQL Server.  Their development team has clearly spent a lot of time getting the interface as close to perfect as possible.  This is a real statement for the credibility of .Net on huge volume web applications - and two days after launch the servers don't seem to have slowed down at all.

I'm downloading the beta of the new MSN Messenger right now... I'll be interested to see how these two products have been integrated.

More Posts