On Google Chrome omitting the http:// from the Omnibox

September 10th, 2010

Google Chrome Logo
Recently a Google Chrome update removed the ‘http://’ from the Omnibox (aka the address/search bar). When the change was originally introduced in the development branch of Google Chrome in April this year there was massive backlash (~150 comments on a bug, specifically Bug 41467). Of course within about 5 days the comments died down and everyone moved on with their lives. The Chromium team have marked the ‘bug’ as ‘Won’t fix’.

Now the feature has hit the main release. If you still aren’t sure what I’m talking about, here’s a screenshot:
The Omnibox sans 'http://'

Personally I like the change, and here’s why:

  • Copy and Paste use cases still work (at least they do on my machine).
  • Because I read left to right I don’t have to skip 7 characters to get to the domain name.
  • I consider my browser to be primarily an HTTP client. I expect HTTP to be the default protocol and don’t need this information exposed.
  • My own personal biases.

Of course, HTTPS urls display differently.
Omnibox with https://

So this could be a little confusing, but it does further highlight the fact that the connection is secured.

Nevertheless one of the reasons I do include Chrome as part of my browser cycle is because it is different. This change is different from the other browsers, but it is exactly this difference that I like.

VSMDI Normalizer

February 11th, 2010

Have you noticed that your Visual Studio test lists always seem to get re-ordered? Make sense of this randomness with the VSMDI Normalizer.

It works by sorting your test lists and tests by name, creating a consistent ordering, allowing better merging and comparison of test lists. It’s a command line tool so it can integrate with automated processes really well.

It works in two modes:

  1. Target Mode: Specify the VSMDI file as the first argument and the target output file as the second. If the target exists it will be overwritten. This is ideal if not everyone is using VSMDI Normalizer. Some file comparison tools accept external converter tools (such as Beyond Compare).
  2. In Place Mode: The VSMDI file will be normalized in place. This would be a good operation to run prior to check in. Just specify the VSMDI file as the first and only argument at the command line.

Download VSMDI Normalizer Now (~13K)

For support, visit http://www.i-think22.net/support/

VSMDI Normalizer is free for personal and commercial use. It comes with no warranty, explicit or implicit.

To use VSMDI Normalizer with Beyond Compare:

  1. Open Beyond Compare
  2. Select Tools > File Formats
  3. Click New
  4. Enter *.vsmdi as the mask
  5. In the Conversion Tab, select “External program (Unicode filenames)”.
  6. Browse for the VSMDI Normalizer tool (for the Loading field).
  7. Append the following to the Loading path: ” %s %t” (without the quotes).
  8. Check Disable editing
  9. Click Save and Close

Windows Easy Transfer: Easy when you know how

October 6th, 2009

I recently installed Windows 7 RTM on my laptop. Knowing that Asus didn’t supply 64-bit drivers for my laptop I installed the 32-bit version. After all, I only had 2GiB of RAM anyway.

Working from home the last few weeks has put more stress on my laptop than it has previously and I was constantly hitting my 2GiB limit leaving my hard drive thrashing as Windows struggled to swap pages in and out of memory.

I was surprised when I installed Windows 7 that I didn’t need to download any drivers from my manufacturer (Asus). My graphics drivers were installed through Windows Update and everything else worked out of the box.1

So, after some encouragement from a friend on twitter I decided to try installing the 64-bit version of Windows 7 and if it worked, move up to 4GiB of RAM.

I already had the 64-bit image ready to go on Windows Deployment Services, but I had just recently finished setting up my machine perfectly. I was particularly worried about having to reconfigure Outlook and set up new PST file. Now I could have tried copying my user profile and transferring that way, but instead I figured that I’d give Windows Easy Transfer a try. Once I passed the initial welcome screen I was confronted with the following options:

An Easy Transfer cable

I guess this is a good idea for people who don’t have a wired home network. I didn’t have one of these cables (and I don’t think looping it back to the same computer would work right) so I moved to the next option.

A network

Surely this was the option I wanted. After all, I wanted to copy the files to my network server. Unfortunately, no. This option migrates directly to the new computer. This wasn’t right either.

RemovableDiskTransfer

An external hard disk or USB flash drive? That sounds very specific. Fortunately this includes network drives too. In fact, it just brings up a standard file dialog so you could likely store the migration file anywhere you want.

Then it was just a case of following the on-screen directions. It not only backed up the Documents folder, but it grabbed other folders on the disk and on different partitions. Unfortunately it doesn’t grab the settings for all applications, but it covered enough for my needs.

Once you’ve migrated back you get this handy migration report which you can use as a guide to see what applications you still have to install:

Previously Installed Applications

  1. Unfortunately this didn’t include my Bluetooth drivers, but as I am now using the Microsoft Explorer Mouse this doesn’t seem like such a loss.[back ↩]

LINQ to SQL and tables with no Primary Key

July 24th, 2009

I ran into an interesting issue with LINQ to SQL yesterday. I had to update a table with no Primary Key. As I expected, LINQ to SQL wasn’t too happy with this scenario. Unfortunately LINQ to SQL will only throw an exception when you try to Insert or Delete a record with no primary key. Updates fail silently.

It’s actually quite obvious when you look into what is happening. To do an update you would usually do something like this:

var update = (from v in db.SimpleRecords
              where v.identifier == 12
              select v).First();
update.value = "new value";
db.SubmitChanges();

Of course, nothing happens. Here’s the code (slightly edited for readability) that is generated by the LINQ to SQL classes:

[Table(Name="dbo.SimpleRecord")]
public partial class SimpleRecord
{
   private int _identifier;

   private string _value;

      public SimpleTable()
      {
      }

      [Column(Storage="_identifier", AutoSync=AutoSync.Always,
         DbType="Int NOT NULL IDENTITY", IsDbGenerated=true)]
      public int identifier
      {
         get
         {
            return this._identifier;
         }
         set
         {
            if (this._identifier != value)
            {
               this._identifier = value;
            }
         }
      }

      [Column(Storage="_value", DbType="VarChar(50)")]
      public string value
      {
         get
         {
            return this._value;
         }
         set
         {
            if (this._value != value)
            {
               this._value = value;
            }
         }
      }
}

Without a primary key the two following interfaces aren’t emitted: INotifyPropertyChanging and INotifyPropertyChanged

Therefore LINQ to SQL doesn’t know that your record has changed (so can’t warn you that it can’t update).

Now that you understand the problem the solution is simple: Define a primary key in your table.

LINQ Talk from Queensland MSDN User Group

May 7th, 2009

Last month I did a talk on LINQ at the Queensland MSDN User Group. For your viewing pleasure the talk is available on Live Meeting. Check it out here:

LINQ: Powerful Stuff (QMSDNUG)

You may need to skip the first 5 minutes.

Slides are available here: http://linq.i-think22.net/LinqApril2009.pdf

Demos will be available soon.