Monday, 10 November 2008

Where is my Opacity IE-8?

Was not expecting to hit this issue with IE-8 - Couldn't work out how to make sure my div is transparent. 
Here is the CSS I found from the IE Team blog:

    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);

Thursday, 2 October 2008

Wireless WiFi Link 4965AGN and 802.11N Connections

I just upgraded my wireless router from a humble 802.11g 54Mbps Belkin to a shiny new Netgear WNR2000.

After a little issue with the connection speed on my laptop being stuck at 54Mbps, i'm now sailing at very nice 130Mbps.

The issue related to the security settings and my Intel Wireless Wifi Link 4965AGN card.  This is from intel:

"Operating in 802.11n Mode

Intel recommends using security with your wireless network. The Intel(R) Wireless WiFi Link 4965AGN adapter can only achieve transfer rates greater than 54 Mbps on 802.11n connections when using AES security, or no security. You should only use no security when setting up or troubleshooting the network."

So how do you get faster than 54 Mbps? either don't use security OR make sure you are using AES Security mode.


Friday, 26 September 2008

IE8 CSS 'Active' hover not working

I'm creating a new web-site layout for my company.  We are targeting the latest most standard compliant browsers (IE7 be damned)...

Anyway.  Has anyone else noticed that the CSS action "Active" doesn't work anymore?  It does in FF, Chrome and IE7 compatible mode of IE8.

What happened to here?

DotNetRocks #Show 380

Listening to DotNetRocks 

Carl and Richard really struggle to get a good flowing discussion going, painful to listen to.  Which is a pity because I generally believe that the Show is outstanding...  Although I wish there was a bit more variation in the Ads (Same Telerek ad for 6 months?!?!)

Anyway... Rant Over

LINQ to SQL is unbelievingly faster than the Entity Framework, and this really shouldn't be overlooked.

Windows Home Server & IIS Reinstallation

I've been using windows home server as a very cheap way to get a hold of windows server 2003 for one of my production machines, the other day I ran into a Hosting issue with the WCF .svc files not being recognised in IIS 6.0 - The solution? reinstalling IIS.

But this had it's own problems... Windows Home Server needs IIS and had some half dozen virtual directories installed as virtual directories.  All with special privileges and who knows what.

I was prepared to do away with the backup facilities, but I wanted to expose my web-site to the world and to be honest.... I wouldn't have a clue how to setup the router!  WHS (Windows home server) has a nifty facility to do this for you... Only it needs to be functioning correctly in order to do it.

So... back to my original problem... how do I fix WHS after a IIS reinstall?  A quick scan around the web brought little encouragement... Lots of advice that it is easier to reinstall the OS! (What the!)  There was also hints that there is a WHS folder in the main installation drive.

A quick glance and I remembered these all being run during the original installation routine.  They all ran after the principal windows server 2003 was installed. 

I didn't exactly write down which ones I installed. But I believe that I ran at least the following:c:\WHS file contents

  • umrabase.exe
  • umrahome.exe
  • umraremote.exe

So problem solved.

And no OS reinstall required!

Thursday, 25 September 2008

WCF and IIS 6.0 Hosting Issue

I've developed a WCF Service which I have tested extensively in the Visual Studio environment.  I have had it successfully hosted on Vista and also Windows XP.

Today when I attempted to install the Service on my windows Server 2003 machine, it refused to display the .svc file.  It would only return a 404 error.

After much stuffing around I found this resource which described the same problem I was facing. (Always nice to know you are not alone!)

The only method that worked for me was uninstalling and reinstalling IIS.  I then repaired my .NET 3.5 SP1 installation and Vola! A visible svc and wsdl file!

Wow what a waste of an afternoon that was!


Tuesday, 23 September 2008

MVC Preview 5 Bug

Seems the Routing doesn't work correctly with my newly ported MVC project.  With <compilation debug="false"> it shows the correct Head description for the page, but the content is from another section of the web-site (Home in this case).  When I change the <compilation debug="true"> it behaves correctly again!

Should I use SQL 2008?

As I have noted in previous posts I'm currently migrating to a New Production Server.  This always brings to the fore the question of installing new technologies.

Previously I was using SQL2005 (Workgroups) for Production and I have been using 2005 Express locally for Development.  Just recently (two weeks ago) I switched to SQL 2008 Express on my dev machine, so far I haven't noticed any great differences other than the minor changes to the Management Studio.

So, should I use SQL 2008?

I think I need to do more research into this question.

[EDIT] Interesting article weighing up the pros and cons


Copying Files remotely

Today I commenced migrating to our new web-server.  Everything was going well when I stumbled across an Error when copying files via FTP onto the new machine.

I connected via Remote Desktop, and had opened up a new 'Network Places' location, this is a very efficient means of connecting to FTP.  I created a new folder for the Database files and dragged the new files across.  This was greeted by a obscure message from Windows Server 2003:

"Your current security settings do not allow you to download files from this location"

Google wasn't particularly helpful either.

The solution? Simply navigate iexplorer to the FTP location and attempt to download the files from here.  This will bring up the Security Message - with a difference... This one allows you to add the FTP location to the authorised list.

Friday, 5 September 2008

Rare praise for Windows Vista

Can I just say... what is with the constant Vista bashing in the world at large?

I keep on coming across people (Non-IT people mainly) who flat out hate vista.  Most of whom have not even used it or even seen it running.  Is this just a reflection of the numerous articles on the web bagging it?

I have been using Vista Ultimate on my dell laptop since January this year and I have to say I'm very pleased with it.  This machine is my development platform so stability really is my number one priority in it's O/S.  Vista is remarkably stable. 

It seems that Microsoft is caught in an awkward transition from previous security woeful XP into Vista.  People all know that XP has been heavily targeted by virus and had streams of security patches.  And yet they expect that they can just port all of their old programs over onto this new platform?  Windows has had a history of being over backwards in ways that Apple never has had to do in order to accommodate compatibility with ancient product lines.  I think people should have some cost in order to bring a new level of security and stability to their O/S platform. 

In this case that means deciding what is worth more to them: Stability and security? or extensive backwards software compatibility?

Is this the only choice? well no... you can always install a Virtual machine and install your old O/S on top of vista. 

Me personally, I couldn't go back to XP.

Can you remember your last 'blue screen of death?'

I can't say that I have had more than two in the last 8 months.  Now that is a real change from my previous years of experience on the windows platform.

Wednesday, 3 September 2008

Google Chrome first experiences update

Ok, I have played with Google's new browser for a bit longer.

I'm starting to notice some functionality which I am already missing:

  • Where are my syndicate feeds?
  • How do I easily get to my old homepage? without opening or closing the current tab?

Also, I think I am not alone in starting to question... When do we stop sending our Internet data to Google?  If you are anything like me you have:

  • A personal Gmail account
  • Google Analytics installed on your website(s)
  • Use Google Search extensively
  • Installed the Google Desktop search
  • Made the mistake of installing the Google tool bar
  • Brought a Dell with all of the above crap pre-installed

Google - Will you do no Evil?

Here is an interesting article about Google and Privacy concerns

Google Chrome

I just installed Google Chrome the newest browser on the beta market.

First impressions... wow

Second impressions.... cool :)

Favourite features to date:

  1. Dragging out a Tab to create a whole new window
  2. Speed and stability
  3. Omnibox - New and improved search and address bar combo

Anyone want to be the fly on a wall in IE Microsoft right about now?

Friday, 29 August 2008

Entity Framework Verses LINQ to SQL

I have found myself in a rare opportunity to redesign the Data access layer in a WCF web service application.  Previously we were using a mixture of table adapters and typed data-sets abstracted away behind 'manager' classes.  By defining the manager classes with interfaces and creating mocking version we were able to easily decouple the functionality from the data.  The Data-set representations themselves being the only exception.

I have significant experience using typed data-sets on many projects. And I must say I have become rather sick of writing CRUD operations, sure learning to use new design patterns with them has brought new life.  But really... Do I need to define this stuff over and over again?

I am sure that I am not alone.

I'd heard about LINQ to SQL earlier in the year and had briefly toyed with it.  I'm a big fan of the LINQ concept, but the performance factor has always kept me weary of it as a technology.

Now for my confession.  I'm a virgin O/R mapping developer.  I have never had the excuse to use any database/object mapping tools on any production code as yet.

So being green, I decided to start learning more about the options available.

I think I am a creature of habit and I will keep to the Microsoft technology stack.  So I freely admit that I did not consider any other contenders.

"To use Entity Framework or Not to use Entity Framework"

I took the plunge and stripped out my table adapters from the DAL.  And in my eagerness inserted a new bright and shiny copy of the Entity Framework from .Net 3.5 SP1.  Being the later (I assumed greater) of the two options I chose it over LINQ to SQL.  And all was right with the world.

That night thoughts came unbidden...

How does the context know what to update?

Are two context instances independent of each other?

How do I make atomic level commits?

Can only the original context instance update any changes?

So this morning I was determined to nail this thing out.  Firstly I started making sure I understood how the entity framework behaves (and cracks it).  It is amazing how different using a O/R mapper is from simple Typed Data-sets.  But the more I played with the entities the more doubts crept in.

Previously my Manager classes would happily accept my word on the fact that a foreign key was correct.  The Entity Framework isn't so polite.  After playing around I stumbled upon a method of entity association which satisfied it.  Now I was really starting to worry, I had previously assumed that I could keep my changes limited to within the manager classes with the rest of the application none the wiser to the difference.  But Entity Framework was either demanding I Load the related table in order to associate the entity, or I was going to start leaking outside of my manager class.

I really really didn't want to leave the manager classes. 

While testing out the Entity Framework, I decided it would be worth while comparing it to raw data-sets / table adapters and also the LINQ to SQL alternative.  I set up a simple test of adding a new entry into the account table with a valid foreign key in the user table. 

The results were something of a surprise:

Entity Framework 8,700 milliseconds
LINQ to SQL 3,100 milliseconds
Data-sets 2,000 milliseconds

With only 500 repetitions it was quite clear that the Entity Framework is significantly slower.  What I didn't expect to see was how fast LINQ to SQL is!

And the real clincher for me was that I can manually set the foreign key with LINQ to SQL.  Also if speed becomes a critical we can down-grade to Data-Sets again.

Saturday, 23 August 2008

Simple delay mechanism for preventing Brute-Force attacks

SQL 2008 Express Management Tools Released

Microsoft has released the new management tools for MS SQL 2008 Express

Where was this earlier? I installed SQL 2008 on my new home server last week only to find that there was no compatible management tool.

Oh well.... Can i be bothered uninstalling SQL 2005? Will they play well together?


Monday, 18 August 2008

MVC development

Well, I've finished the website in record time.  Developing on the new MVC platform has been a treat really.  I really love the cleaner urls.

Could you go back to old url's like this:

when compared to MVC:

Plus the newer MVC pages are much more lean and clean.  Not to totally dis webforms as they really opened up web development to me from my winforms background.

BUT there was a hiccup - deployment wasn't exactly what I expected. IIS 6.0 wasn't too frilled with my extention-less urls at all.

Thankfully a quick Google search provided a timely and easy solution.

Now... if the DNS changes would just hurry up already!

Friday, 15 August 2008

Well it is Friday already!

Dang, this week has gone really fast.

Started a new project yesterday called SearchPLUS.  This is going to be my first MVC project.  I'm using pre-release MVC 3.0 on the .Net 3.5 platform.  First impressions? Much better than web forms!

I have a lot of questions to research yet:

  1. How secure is MVC?  Being pre-release is it very easily hacked?
  2. Does MVC support the user management backend?
  3. Performance: How does it compare to classic webforms?
  4. Scaling: Will MVC Scale well?
  5. Static Content: Does MVC's routing tables allow for static .html files?

The above list is just off the top of my head, but it really highlights my initial distrust.  Perhaps I was a fan of webforms after all?

I definitely see that given a simple CRUD web interface or just a Read-only Database driven app (like SearchPLUS) MVC really offers a better development experience.

Thursday, 7 August 2008

Work progresses

Just when you thought you were meant to be testing... you find yourself developing more changes to your code!  Ever find yourself doing this?

This must be the main reason why it is common practice to get someone else to test your code. 

Is this a form of agile programming?

(Hoping to justify my actions here)

Either way; I'm really enjoying the combination of unit testing with mock classes.

I'm not using a standard mocking framework though, I've found the easiest way to remove dependences has been to use the following steps:

  1. Define Interfaces: This is probably a very obvious step, but I'm pretty new to unit testing so I haven't had any real need to create any before.
  2. Use a Simple Factory: Use a Simple factory class to create concrete instances of the interface.  This allows you to swap the concrete implementation for a mock version.
  3. Create a Mock Version: Control of the mock version is supplied by static variables inside it.  Because they are static you can reach in from inside the unit test and determine the mock classes responses.

It is then a simple matter to build unit tests which can ensure 100% code coverage. 

If you were anything like me and were unsure of unit testing.  Don't avoid it because of the overly complex mocking frameworks.  With a little interface magic you can easily create your own mock class implementations.

Monday, 4 August 2008

Adding Google Analytics to Blogger

Ever wondered who was reading your blog?

Or even where they came from? how they found you?...

All of these questions and more can be answered by adding Google Analytics to your site.

I have used Analytics for numerous web-sites and it truly is amazing the amount (and wealth) of the data you can get at your finger tips.

Want to know more about Analytics? here is the link to the official blog

Here is the guide I used to add it to blogger

Who Am I?

In the famous words of derek zoolander....  "Who am I?"

I am a 20 something (1979.... 29 still counts!) programmer living in Adelaide Australia.  I am recently married to my beautiful wife Carol.

Oh and my name is Andrew Harry.

I have an ancient degree in computers (Applied Science) from 1999.  The degree was something of a watered down Computer Science (less maths heavy) with a practical knowledge focus.

This was just when the .dot com crashed occurred.  The world came to the sudden and ugly conclusion that making money online isn't as easy as everyone had dreamed.

I also was disillusioned with my degree having spent more than a couple of late nights trying to find why my code was broken!

I ended up working for a drafting consulting service for 4-5 years in the petro-chem industry.

Quickly I discovered multiple uses for my programming skills in the form of VBA scripts inside of AutoCAD.  And also integrating databases with drawings.

in 2006 I moved from Melbourne to Adelaide to work for my older brother's small Internet business.  Since this move I have actively pursued programming as a profession.

I have a background in Graphic Design, and when I stumbled upon Microsoft Web Developer Express I was very excited at the possibilities.

Anyway... I should actually get some lunch.

My First Post

Ok, I have to admit straight up that I have attempted numerous blogs before.

Am I alone in this?....  Probably not.

But, I am determined that this time i shall make this a more consistant experience.

Without further ado....


My First Post!