Everything old is new again

What with all the, um, unpleasantness around FriendFeed this week, it reminded me about something that I’ve been thinking on for a while now. There have been a lot of new sites starting up in the last couple of years that are primarily focused on social communication over the web. Facebook, FriendFeed, Tumblr, Pownce, Twitter, Orkut, Jaiku, about a billion blogs, and so on. The social web it’s being called.

The idea is that the new web, ‘Web 2.0′, is introducing the concept of social networks to the internet as opposed to the ‘old’ web which was just corporate marketing.  Of course this is ridiculous.  If the internet has ever had a single defining feature, it is its social nature.  The internet was originally nothing but interpersonal communication. Anyone remember bulletin boards, Usenet?  Even with the advent of html and the font tag we had newsgroups and forums.  Myspace? It’s just Geocities with music. It was only in the very late 90s that the internet started turning into the corporate marketing platform that people seem to think it is.  The new social platforms are just newer, shiner versions of newsgroups.  Bulletin boards with animated emoticons and super poke.

image So why does everyone think that the internet is just one giant marketing tool? And if social isn’t new, what is it that the new “Web 2.0” brings that is actually, well, new?  The simplistic answer to both questions is this: volume

The sheer volume of people using the internet now on a daily basis is enormous.  The advent of broadband and its relative cheapness (unless you’re in Australia that is) means that pretty much anyone can load up a page within seconds.  I’m old enough to remember waiting minutes for things to load.  Minutes!  And I’m not really that old (don’t ask my kids).  Now, if your website takes more than 5 seconds to load, people from above start asking questions.  Your average office worker now has super high-speed access to the internet. And while offices often block non-work related sites, they can’t block them all, and there are always ways around the blocks if you know what you’re doing.  The fact is that a lot of people are spending a lot of time online, and they’re bored.  Why bother with solitaire when you can load up Kongregate?  Not only do you get more entertaining games, you get to broadcast your l33t skillz through the high score lists (and parade your achievements on your Facebook account with their app).

But it’s not so much the number of people online that led to the idea that corporations own the net.  It’s the rate of growth …

Continue reading

Google Transit is coming to Australia

Google Transit will provide directions for travelling to and from locations using local public transport.

Its Australian launch, in Perth using data from the Western Australian transport authority’s online service Transperth, will be the first in the southern hemisphere.  Mr Noble said the company would seek to work with authorities in other states to launch Google Transit across Australian cities.

Google to launch transport tool in Australia: News.com.au

Nice, I wondered when they’d roll this out to us.  Google has a history of not abandoning us here in Aus like some other IT companies do.

Google Maps (and Earth) have super-high res for Sydney

image(via Simon Job) Google Maps now has maximum resolution images for Sydney.  Not just Sydney actually, here’s the Penrith Regatta Centre.  How about the Three Sisters at KatoombaNewcastle’s covered too, and it looks like everywhere in between is covered too!  This is a huge update.  Doesn’t goes so far south though, the high res layers seem to stop at Waterfall.

Cool things we can now see:

Oh and sorry, but Melbourne doesn’t have this yet.

Comparing two arrays (or IEnumerables) in C#

Much to my surprise I found that .NET 3.5 doesn’t seem to have a native method for comparing two arrays or collections of any type.  The LINQ extension methods offer a whole lot of added functionality for IEnumerable<T> collections, but not native comparison.  The Equals method is still the base object.Equals method that does a reference equality (i.e. Are these two the same object?) not a value equality (do they contain the same values?)

So, finding myself needing an equality comparison between two arrays, I’ve written the following extension method:

   1: /// <summary>
   2: /// Checks whether a collection is the same as another collection
   3: /// </summary>
   4: /// <param name="value">The current instance object</param>
   5: /// <param name="compareList">The collection to compare with</param>
   6: /// <param name="comparer">The comparer object to use to compare each item in the collection.  If null uses EqualityComparer(T).Default</param>
   7: /// <returns>True if the two collections contain all the same items in the same order</returns>
   8: public static bool IsEqualTo<TSource>(this IEnumerable<TSource> value, IEnumerable<TSource> compareList, IEqualityComparer<TSource> comparer)
   9: {
  10:     if (value == compareList)
  11:     {
  12:         return true;
  13:     }
  14:     else if (value == null || compareList == null)
  15:     {
  16:         return false;
  17:     }
  18:     else
  19:     {
  20:         if (comparer == null)
  21:         {
  22:             comparer = EqualityComparer<TSource>.Default;
  23:         }
  24:  
  25:         IEnumerator<TSource> enumerator1 = value.GetEnumerator();
  26:         IEnumerator<TSource> enumerator2 = compareList.GetEnumerator();
  27:  
  28:         bool enum1HasValue = enumerator1.MoveNext();
  29:         bool enum2HasValue = enumerator2.MoveNext();
  30:  
  31:         try
  32:         {
  33:             while (enum1HasValue && enum2HasValue)
  34:             {
  35:                 if (!comparer.Equals(enumerator1.Current, enumerator2.Current))
  36:                 {
  37:                     return false;
  38:                 }
  39:  
  40:                 enum1HasValue = enumerator1.MoveNext();
  41:                 enum2HasValue = enumerator2.MoveNext();
  42:             }
  43:  
  44:             return !(enum1HasValue || enum2HasValue);
  45:         }
  46:         finally
  47:         {
  48:             if (enumerator1 != null) enumerator1.Dispose();
  49:             if (enumerator2 != null) enumerator2.Dispose();
  50:         }
  51:     }
  52: }
  53:  
  54: public static bool IsEqualTo<TSource>(this IEnumerable<TSource> value, IEnumerable<TSource> compareList)
  55: {
  56:     return IsEqualTo(value, compareList, null);
  57: }
  58:  
  59: public static bool IsEqualTo(this IEnumerable value, IEnumerable compareList)
  60: {
  61:     return IsEqualTo<object>(value.OfType<object>(), compareList.OfType<object>());
  62: }

Updated: Jugen (see comment below) made some quality suggestions that I’ve used to improve the code here.  To see the state of the code when the comment was made, see here.

It gives you an extension methods on any collection that implements IEnumerable<T>.  There is an optional parameter of type IEqualityComparer<TSource> which if not null will be used to compare each item in the collections.  Otherwise it will use the default comparer for TSource. It will also work for untyped IEnumerable collections, the overloaded method passes the collections through to the IsEqualTo<TSource> method with object as the TSource.  This is really just there for backwards compatibility.

As far as speed goes, I ran a test with 2 collections of 10,000,000 (I stopped there because I started getting out of memory exceptions when I was populating the test collections after that!) items & it took 0.89 seconds, so I think that’d do for most scenarios.  If you want to use this code you can grab a copy of it here.

New version of Firebug works in Firefox 3 beta

Sweet.  I didn’t see this before, but Firebug has a new beta version too, which means that it works in Firefox 3 beta 4.  Grab it from the releases page under the Firebug 1.1 Betas heading.  Possibly the single most useful Firefox plugin for me, the fact that it wasn’t working in the beta releases of FF3 was what was stopping me from switching to the beta. No more excuses now, the Adblock Plus plugin even works.

Mozilla Firefox 3 beta 4 available

Mozilla has released the 4th beta of the upcoming Firefox 3 browser.  Check out the review of the new beta by Mozilla Links.  Updates in this release:

  • Improvements to the user interface: better search support in the Download Manager, ability to zoom entire page or just the text, continuing look and feel improvements on Windows Vista, Windows XP, Mac OS X and Linux.
  • Richer personalization through: location bar that uses an algorithm based on site visit recency and frequency (called “frecency”) to provide better matches against your history and bookmarks for URLs and page titles, as well as an adaptive learning algorithm which tunes itself to your browsing habits.
  • Improved platform features such as: support for HTML5’s window.postMessage and window.messageEvent, JavaScript 1.8 improvements, and offline data storage for web applications.
  • Performance improvements: changes to our JavaScript engine as well as profile guided optimization resulted in significant gains over previous releases in the popular SunSpider test from Apple, web applications like Google Mail and Zoho Office run much faster, and continued improvements to memory usage drastically reduce the amount of memory consumed over long web browsing sessions.

There’s a link to the download site at the bottom of this page.

It has also been announced that there will be a 5th beta release, with the code freeze on the 18th of March, which means the beta should be available around March 31st. Or they may release it on 1st April just to screw with everyone :)

Google adds site search underneath site links

imageI hadn’t noticed this before, but Google has added a site search box underneath the site links in their results.  

Not sure what criteria they’re using to generate this, because it doesn’t work for every site.  The SMH gets it, but Drive doesn’t.  It seems to be based on sites that are listed on Google News and their size.  That’s a total guess just based on the couple of dozen of searches I’ve checked out.

Not sure how I missed this seeing as it was posted on the official blog site.  The official word on what sites it will show up for is:

This feature will now occur when we detect a high probability that a user wants more refined search results within a specific site. Like the rest of our snippets, the sites that display the site search box are chosen algorithmically based on metrics that measure how useful the search box is to users

Not sure what that means in real terms, but as I said, I’ve only seen it show up for sites that exist in Google News.  That may simply be coincidental though, as people are often searching those sites too.

Update: Strike my theory. The search box shows up for gimp.org & ubuntu.org & they’re not in Google News.  I guess it’s just down to the pigeons then.

Internet Explorer 8 public beta available

Microsoft has released the first public beta of IE8.  The release was announced at the keynote of Mix in Las Vegas (which apparently is full of cool stuff).

Grab the beta now & check out the noise about it on TechMeme.

Update: Ha! Check out the latest article on the IEBlog:

Although we said that IE8 Beta 1 passes the ACID2 test, some of you may be seeing results like the image above; we thought we should explain what’s going on. IE8 passes the official ACID2 test hosted on http://www.webstandards.org/files/acid2/test.html. (Note, this seems to be a popular destination at the moment. You may have trouble reaching the site.)There are also a number of copies of this test around the net. One popular copy that I’ve seen of late is http://acid2.acidtests.org/

People didn’t wait long to start fact checking them!

Update 2: Note, you may need to install this hotfix if you haven’t already: http://www.microsoft.com/downloads/details.aspx?FamilyID=c1ac48ad-f4f9-4b4b-9cb5-460593b052cc&displaylang=en

Microsoft launches Office Live Workspaces

Office Live Workspaces is now in public beta for anyone with a Live account.  The concept is very much the same as Google Docs, it gives you a space to store & share Office documents online. Unlike Google Docs, you can’t edit documents online, you still require a copy of Office.

From the Workspaces page you can download a little plugin app that will allow Office to talk to Live Workspaces.  The cool thing about this is that you can save documents to Workspaces directly from the Office Application. Fortunately you don’t need a copy of Office2007: Office XP SP3 and up will allow you to open and save documents to & from Workspaces. There are some limitations for the earlier versions of Office around Outlook Contact lists

What it does do:

  1. Open an office document online in read-only mode
  2. Create documents in Word, Excel & PowerPoint and save directly to Workspaces, or open a document from Workspaces for editing.
  3. Create Event, Contact and Task lists in Workspaces and sync it with Outlook (in Outlook 2007 you can modify the lists in Outlook and have those changes reflected online, in earlier versions it’s read only). These can be edited online inside Workspaces too.
  4. Create ‘Lists’, which are essentially static spreadsheets without the functions.  These can be exported to Excel (using the Sharepoint connector).
  5. Create ‘Notes’.  Essentially text files with a WYSIWYG editor online.
  6. You can upload pdf documents and view them in read-only online. Sort of.  It renders the whole document as an image, so you can’t select the text.  Also the fonts aren’t all right, and the colours go a bit strange.  Example:  this is the top of my latest telco bill in normal pdf & then what it looks like in Live Workspaces:
    imageimage
  7. You can upload pretty much any sort of document and it will try and render it for viewing (text, images, etc).
  8. Uploads are asynchronous. You can keep doing other things inside Workspaces while it is uploading the document you selected to add.
  9. File versioning & comments.  Every time you save a document to a Workspace a note is attached to the file in the Activity panel showing who saved it and when.
  10. Sharing.  You can share documents, you can share Workspaces and you can share screens (using SharedView).  You can choose to share with read or write access, and people don’t even have to be logged into Windows Live to view the shared documents.

Continue reading