Welcome!

Featured

I am a .Net developer by day; a PHP developer, Linux systems administrator and small business owner by night and a husband and father 24/7/365!

This is my blog about technology and my life in general!

Why Are We Still Using Internet Explorer 6? – Part Two

Nearly a year and a half ago I wrote this post about why many large organizations are still using Internet Explorer 6. Every now and again, the post is re-discovered and is re-circulated and I get some great feedback about it. I’ve decided that it is time for a bit of an update on the subject, so here goes.

I’m going to assume that you’ve read my original post, but in one line, the reason many large organizations still use Internet Explorer 6 is application compatibility. My employer (a large government department) has recently experienced this first-hand, having had to postpone deployment of Internet Explorer 8 after discovering compatibility issues (mid-deployment) with some important business applications. I have no idea how come they only discovered the issues after starting to deploy. Either someone didn’t do due diligence and test before-hand, or worse, they were completely clueless about the risks of incompatibilities. Either way, as a fellow IT employee in the same organization, it’s down right embarrassing.

One of the most frequent comments I receive as feedback on my original post is that folks get the compatibility issues, but they believe that we wouldn’t be in this situation if these incompatible applications had been written using web standards. It’s the fault of the application developers that their applications only work properly with Internet Explorer 6.

Continue reading

Planning to build a new PC

About 6 or 7 years ago I wrote a series of blog posts about the process of selecting components for a new PC. Believe it or not, the PC I actually built as a result of those posts is still my primary PC today. I’ve added addition hard drive, and memory and replaced the video card a few times, but otherwise it’s the same box. And it’s beginning to show its age. Okay, more than just beginning to…

So I am starting to again plan to build a new PC and figured I might as well blog about it again. If only to give myself a place to track my hardware decisions.

Here’s what I’ve got so far:

  • Intel Quad-Core processor (or better, maybe Intel i7)
  • Minimum of 8GB of RAM
  • Asus SLI-capable motherboard (P5Q or P6?)
  • Intel X25 or OCZ Vertex SSD hard drive (system drive)
  • Western Digital SATA hard drive (bulk storage)
  • Promise SATA RAID controller (maybe)
  • Antec 300 Case
  • NVidia video card (GT 260?)
  • Windows 7

Any suggestions?

Why Are We Still Using Internet Explorer 6?

There has been some discussion online recently between public servants about how the public service is still overwhelmingly using Microsoft Internet Explorer 6. I got involved when someone tweeted a link to this site: http://hey-it.com/download.html. The site provides cute posters asking the IT folks to basically get off their arses and give us a newer web browser. I responded back that there are other issues involved when upgrading web browsers, such as legacy application compatibility, and that things aren’t as clear cut as it may seem from the perspective of someone outside IT.

Well, responses to that included “don’t punish users for your deployment issues” and “are you afraid of losing your job if I upgrade my own browser”? Oh, and the term “visionless IT geeks” was tossed around. My response to this was a flurry of tweets quoting other folks rhyming off reasons why large organizations all over still use Internet Explorer 6. I then signed off Twitter and did not log back in for two days.

I essentially had a hissy-fit.

Continue reading

An Introduction to Subversion

Subversion (also referred to as SVN) is an open-source revision control system. Subversion tracks changes to files and folders, and keeps copies of all revisions, or versions, of your files and folders. Subversion allows you to retrieve at any time older versions of your files and folder. And because subversions keeps copies of all revisions of your files separate from the copy you’re currently working with, there’s an element of a backup system to it. Subversion can work across a network, with more than one user as well, and can help manage the situation where many users may be modifying the same file. Subversion can help manage any conflicts that may arise when more than one users makes changes to the same file.

For this tutorial we are going to start with the basics. We will assume that there is only one user, and we won’t deal with Subversion being used across a network. We are also going to focus on one particular Subversion program, TortoiseSVN. TortoiseSVN is an open-source windows implementation of a Subversion client program.

Continue reading

Full Story: How Windows 7 Messed Up My System and How Windows Home Server Saved the Day

I’ve had a number of people ask about the two posts I made to Twitter (and this blog) yesterday. So here’s the story.

I’d heard a lot of good things about the new Windows 7 Beta operating system. I’d read a number of posts about how easy it is to dual-boot a Windows 7 installation along side a Windows XP or Vista installation.

My computer has 2 Windows XP installations: one that I use for everyday computing and one that basically exists only for those rare occasions when the main installation won’t boot for whatever reason (I’ve used the second installation 2 or 3 times in the last 5 years. It’s handy to have around). I figured a Windows 7 installation would be just as useful a as second installation for recovery. So I decided to install Windows 7 on the hard disk partition that contained my second Windows XP installation.

So I started up the Windows 7 installation, found the partition that contained the second Windows XP installation, re-formatted it, and installed Windows 7. Piece of cake, worked like a charm. Poked around in Windows 7 for awhile, overall a pretty cool operating system. Then I started thinking about rebooting into Windows XP (my primary computing environment). Started looking around to check that Windows 7 had set itself up with an entry to boot “Previous Version of Windows” as all the blog posts had told me it would.

It hadn’t. In fact it wasn’t even aware that the hard drive containing my Windows XP installation even existed.

Then it hit me. My XP installation is on a RAID 0 volume. Windows 7 didn’t have the drivers, so it didn’t find the drive, didn’t see the existing XP installation, and didn’t set up dual-boot automatically. Fortunately Windows 7 was able to recognize the older RAID drivers, and I was able to get it to find the RAID volume. Now I just had to get the boot loader set up. Well, I can tell you one of the things about Windows 7 that isn’t that great the tool for managing the boot loader bcdedit.exe. I tried a couple of times to get a working boot record going, but ultimately had to give up.

How was I going to get back into my Windows XP installation, where ALL my files are located? Fortunately I have a Windows Home Server that backup all the PCs on my home network every night. I was able to pop the Restore CD into my PC, and rebooted into the recovery console. At first it didn’t find my network card, or my RAID volume, but all I had to do was put the network and RAID drivers on a USB drive and hit the “Scan” button. It takes a minute or two and scans the USB drive, finds the drivers and enabled the network card and RAID volume.

It then connects to the Windows Home Server, prompts you to pick which volumes you wish to restore and from which backup. I choose my D: drive (my second Windows XP installation) and let it do it’s thing. In about 20 minutes my D: drive was back to the state it was in at 2:30 am that morning. Boot loader and all.

So, in the end it wasn’t necessarily Windows 7 that messed things up. But it was Windows Home Server that saved me in the end.

In about 20 minutes.

My Current Thoughts on the OC Transpo Bus Strike

The union is doing what it has to do. They are being asked to give up certain benefits (i.e. the ability to control their scheduling). From the union’s perspective it’s a dangerous precedent if they start giving stuff up so they HAVE to hold their ground.

The problem I think is that the majority of Ottawa residents (myself included) believe that the drivers don’t deserve to have control of the scheduling (in part because, true or false, we hear that they abuse it). The residents who most want this strike settled at any cost are those who are suffering the most because of it. Therefore the union needs as many people as possible suffering, so that the strike gets settled at any cost, most likely in the union’s favour. That is why the union had to strike just before Christmas, in the dead of winter. Maximum pain = union’s best chances of getting/keeping what it wants.

The union and drivers are prepared to see this through, because we’ve heard them say that they banked up their overtime in the summer (presumably by abusing their scheduling privileges) so they can afford to keep fighting.

For highlights of their last contract, Google “oc transpo collective agreement” (should be the first result, a PDF).

Their starting salary is more than what mine would be if I was starting out today. They start earning 6 weeks of vacation 4 years before I will. The most senior drivers will get 7 weeks, which isn’t even possible for me. They have just as many paid holidays as I do.

I’m a federal civil servant working in the Information Technology (IT) field, for goodness sakes. I thought I had one of the cushiest jobs in the world, but apparently OC Transpo bus drivers do.

I am in my early 30s and don’t have a drivers license. I’ve lived in Ottawa all my life, and my reasoning has always been that I don’t need a license because we had an awesome bus system. I’ve defended the bus system.

I’m beginning to change my mind.

I’ll either be getting my drivers license soon, or leaving Ottawa.

Seriously.

Defining Access Strategy in FluentNHibernate

I am posting this because it took me a little while (longer than it should have) to figure out how to define the access strategy for an domain object’s fields or properties. The documentation for FluentNHibernate is still fairly basic, and Googling for the answer didn’t get me anywhere. In the end I figured it out from Visual Studio’s intellisense (which frankly is where I should have looked in the first place).

For all those like me who decide to Google first, here is the answer.

A number of the *Part classes in the FluentNHibernate.Mapping namespace implement the IAccessStrategy(Of ComponentPart(Of T)) interface. This interface defines one property, Access which returns an AccessStrategyBuilder(Of T) object. The AccessStrategyBuilder object has a number of methods used to define the access strategy:

  • AsCamelCaseField
  • AsField
  • AsLowerCaseField
  • AsPascalCaseField
  • AsProperty
  • AsReadOnlyPropertyThroughCamelCaseField
  • AsReadOnlyPropertyThroughLowerCaseField
  • AsReadOnlyPropertyThroughPascalCaseField

This information I found relatively quickly. What I was missing was how to specify that my camel case fields are prefixed with the underscore character. But all of the CamelCase, LowerCase and PascalCase variations of the methods listed above have an overload which accepts an instance of a Prefix object, of which there are 4 variations:

  • m
  • mUnderscore
  • None
  • Underscore

So in the end, my mapping is as follows:

WithTable("client")

Id(Function(c) c.ID, "id").WithUnsavedValue(0).GeneratedBy.Identity()

Map(Function(c) c.AccountName).TheColumnNameIs("account_name")
Map(Function(c) c.Company).TheColumnNameIs("company")
Map(Function(c) c.Created).TheColumnNameIs("created")
Map(Function(c) c.Updated).TheColumnNameIs("updated")
Map(Function(c) c.UseAdministrativeContactAsBillingContact).TheColumnNameIs("blg_is_adm")

Component(Of Client)(Function(c) c.AdministrativeContact, _
                     AddressOf MapAdministrativeContact).Access.AsCamelCaseField(Prefix.Underscore)
Component(Of Client)(Function(c) c.BillingContact, _
                     AddressOf MapBillingContact).Access.AsCamelCaseField(Prefix.Underscore)

My First Extension Method

This evening I wrote my first VB.Net extension method while working on my S#arp Architecture based project. I added another overload of the TextBox method (which is itself an extension method, I believe). I wanted to be able to specify the size of the text box. One of the existing TextBox methods has the following signature:

HtmlHelper.TextBox(name As String, value As Object, htmlAttributes As IDictionary(Of String, Object))

I wanted to be able to specify a text box size without having to declare a new IDictionary every time. So I wrote the following extension method:

<Extension()> _
Public Function(html As HtmlHelper, name As String, value As Object, size As Integer)
    Dim attributes as IDictionary(Of String, Object) = New Dictionary(Of String, Object)

    attributes.Add("size", size)

    Return html.TextBox(name, value, attributes)
End Function

Neat stuff.

Now I just have to figure out how to create an extension method that will allow me to pass a lambda expression to RedirectToAction().

The Inner Workings of *.vbproj Files: <ProjectTypeGuids>

During the conversion of the S#arp Architecture template project from C# to VB.Net I inadvertently broke (at least) one thing: the ability to add ASP.Net MVC items directly to the SharpArch.Web project directly from the “Add New Items…” dialog. This led to my first question asked on StackOverflow.com (which I ended up answering myself, 38 minutes later).

Turns out Visual Studio project files can have an element called <ProjectTypeGuids> which contains one or more guids identifying what type of project the file describes. ASP.Net MVC projects have a particular guid specified: {603c0e0b-db56-11dc-be95-000d561079b0}.

So I added this guid to both my SharpArch.Web project file and my SharpArch.Controllers project file, and now I can add new MVC template items directly from the “Add New Item…” dialog. Cool!