cameronfletcher.com

random thoughts and discussions on the things that interest me

Welcome to my New Website

For the past 8 or so years I’ve been hosting my own website in various forms on my own hardware located for the most part in a cupboard under the stairs. Today I’ve finally made the leap and moved everything to the cloud.

As part of the transition I’ve also upgraded my blog engine from BlogEngine.net to WordPress. This was made easier by my choice to host on Azure which provides a pre-configured website bundle from the gallery. I was actually up and running within minutes.

I chose an open-source theme called metro-wp-theme written by Joe McBride who’s website can be found here. I also installed a Syntax Highlighter plugin that formats source code rather nicely.

The theme required a few tweaks for my needs most of which were detailed on the theme page on Joe’s site but the bulk of the work was in transferring old posts from my previous blog onto this one. I have not yet been through the process of migrating the comments so for the moment comments are missing from the old posts.

Anyway, I’ve just changed the DNS records so if you’re reading this post it’s been a success. Welcome to my new website!

TeamCity, MSBuild 4.0, a 64bit Server, and Could Not Load File or Assembly

I’ve been spending some time recently setting up TeamCity for continuous integration and stumbled upon an annoying issue that had me stumped for a while.

Following a simple update to a build script where I changed the way paths were resolved my build started failing. The error message was (cut down):

default.build(83,5): error MSB4062: The "xxx" task could not be loaded 
from the assembly C:\Program Files%28x86%29\ .. \xxx.dll. Could not load 
file or assembly. The system cannot find the file specified.

After some serious head scratching and a lot of Google time it turns out that this is a bug with MSBuild 4.0. Basically MSBuild 4.0 can’t handle paths with parentheses in certain situations. As the path on the server to the build files was under c:\Program Files (x86)\ it was just falling over with a file not found exception. The work around suggested by Microsoft is to compensate by decoding the path reference in your build script. In my case this meant changing from this:

<UsingTask 
  AssemblyFile="$(BuildFolder)\xxx.dll"
  TaskName="xxx" />

to this:

<UsingTask 
  AssemblyFile="$([MSBuild]::Unescape('$(BuildFolder)'))\xxx.dll" 
  TaskName="xxx" />

Simples, no?

Coding Nightmare

Oh. I’m not relishing trying to get my head around this…

Stored Procedures vs. ORM

I was recently asked to give an explanation of my preference toward use of stored procedures vs. an ORM solution which happens to be a question that I have considered several times during development myself so I thought I’d throw in my 10 cents, so to speak.

Listing each of their respective benefits is not something I intend to do as there’s plenty out there in the developer community doing just that. Looking about you can find a couple of detailed post on StackOverflow.com (here and here) that describe some of the advantages and disadvantages of each solution. There was a response on one of those threads from an individual who came from a database background who was leaning toward ORM generally for reasons around the simplicity of certain operations and the reduced time in writing them. As for me, I have a tendency to lean a little the other way – whilst I agree with the reduced development time associated with an ORM solution I like the enforced separation of concerns imposed by accessing the database just through stored procedures (although I appreciate that if you’re implementing the repository pattern then there is a separation imposed there).

Knowing also that stored procedures can do much more than perform CRUD operations and queries plays a part in my opinion. Enterprise applications can benefit from stored procedures performing operations that ORM was never designed to replace like distributed transactions, message queuing etc. and remember: stored procedures can be changed\tweaked without requiring a re-release of compiled code.

In my opinion then, the factors that come in to play are speed of development vs. ease of update – and I’d go with ease of update FTW. That means if you’ve got a database team I suggest you use them.

How Lotus Notes is the Worst Piece of Software Ever

I don’t have the time or knowledge to go into details but anyone who has had the misfortune to use Lotus Notes (any version) will no doubt concur that it is the worst piece of software ever. There are some in the industry that have documented it’s many, many pitfalls, details of which can be found here: http://homepage.mac.com/bradster/iarchitect/lotus.htm.

“The great thing about Lotus Notes is, that given that it is working in a Windows environment and that the ubiquitous keystroke in that I use to refresh in any other program is F5, whereas Lotus Notes has deemed it necessary to override this functionality to log you out thereby doing pretty much the exact opposite of refreshing (or somewhere in that ballpark).” – Paul Anderson

TF255440: The following account has a SQL Server login, but the login was denied access

I just got this error when trying to add an Administration Console User to TFS 2010 installed on Windows 7 using a SQL Server database on a different server:

TF255440: The following account has a SQL Server login, but the login was denied access: TEST\cameron.fletcher. The server selected to host the databases for Team Foundation Server is: SQL. The SQL Server login associated with the user account must be granted access to the SQL Server instance on that server.

It turns out that although I have a login specifically assigned to me on the SQL box because I am also a member of a SQL administrators group there appears to be some issue with the TFS logic when verifying the connection. The solution? I simply deleted the login and it worked for me.

The [IT] Stig?

Andy Aitken in his normal working attire.

thestig

Flip-flops, Beer, and a Bottle Opener

I bought got my brother to buy some flip-flops at the weekend. Check them out:

flipflop_top

And guess what is located on the sole of the them? That’s right, a bottle opener. One per flip-flop:

flipflop_bottom

Now I just need a beer. And a holiday…

Hard Drive Weight Increasing?

Possibly the funniest technical question I’ve seen posted on a technical message board. Ever. Worth a look and you’re guaranteed a laugh.

http://social.answers.microsoft.com/Forums/en-US/vistahardware/thread/720108ee-0a9c-4090-b62d-bbd5cb1a7605

My Server Room

Below are some images of my server room. It’s located as far away from earshot as possible which isn’t easy considering it’s in a small flat!

server01

Well, here’s my server cabinet. You can see I’ve still got 6U free, so that should leave space for UPS, NAS, and a few more servers!

server02

Here’s an up close image of my Cisco 2801 router and my Linksys SWR2024W switch. You can also see a bit of my 48-port patch panel.

server03

Here is my messy wiring. About 40 of the ports are patched to outlets but you can see I currently have hardly any of them connected. I’m waiting on patch cables as I have a very low success rate when crimping my own.

Older Posts »