February 2008 - Posts

Firebug rocks. Nothing, I mean nothing beats it for debug web pages. But what do you do for problems specific to IE (most notably IE 6) Here are a list of tools I use to help cause telling the user to get a real browser is not a solution

Internet Explorer Developer Toolbar

This toolbar provides some of the features of firebug.
CropperCapture[2]

XRAY

Is a bookmarklet that let's you see information about elements on a page.
CropperCapture[3]

Companion.JS

An javascript debugger for IE
CropperCapture[4]

This may not be free in the future. Debug Bar from the same guy is also a very useful tool, but it's not free for professional use but probably worth the 59 euro if you do a lot of work with IE.

And finally something while not useful for debugging but damn useful in its own right is the Inline Search for IE.

CropperCapture[5]

Hope this helps somebody out.

There I said it.

I'm a C# guy. Now about 4 years when I started with .Net I started writing in VB.Net but I quickly decided to move C#. This, despite having spent the 3+ years prior working in ASP Classic. After a little bit of C# I quickly adopted the typical C# snobbish opinion of VB. For no good reason mind you, just cause it was different.

My how things change.

I've joined a VB team and instead of trying to make the team change to C# I figured I'd just get back to VB. Also we do a lot of work with XML so it got me looking into the VB 9.0 XML features and I found that you can do things like this:

   1:  Imports <xmlns:ns="http://contacts">
   2:   
   3:  Dim contact1 As XElement = _
   4:      <contact>
   5:        <name>Joe Bloggs</name>
   6:        <phone type="home">09-555-0144</phone>
   7:        <phone type="mobile">021-555-0145</phone>
   8:      </contact>

Okay, nifty and all, but what do you do from there...How about this?

   1:  Dim phoneTypes As XElement = _
   2:    <phoneTypes>
   3:        <%= From phone In contacts...<phone> _
   4:            Select <type><%= phone.@type %></type> _
   5:        %>
   6:    </phoneTypes>

And that will give you the following XML

<phoneTypes>
    <type>home</type>
    <type>mobile</type>
</phoneTypes>

That's rather cool and really useful with some of the stuff I'll be working on.

Check out the Overview of LINQ to XML in Visual Basic for more details

Now, I still want to say I'm a C# guy, but I think the snickering at the mention of VB stops now. 

I like the NUnit 2.4 Constraint based syntax. So In my new role I am having to implement Unit Testing so I decided on going with NUnit to begin with despite my preference for MbUnit. But once I got started writing my tests, I discover Is is a keyword in VB (I'm more of a C# person, but hey I'm no language bigot). I kinda freak out a little. Did I do something wrong? Forget to add something? Google a bit and still no joy. Then I remember the code examples installed with NUnit and have a look and what do you know? Is is now Iz in VB. Not exactly as clear as Is but you gotta do what you gotta do. So now in VB a Unit Test looks like this

   1:  Imports NUnit.Framework
   2:  Imports NUnit.Framework.SyntaxHelpers
   3:  <TestFixture()> _
   4:  Public Class MyVIsualBasicSampleTests
   5:   
   6:      <Test()> _
   7:      Public Sub TestBlankForSyntax()
   8:          Assert.That(something.IsSomething(), Iz.False)
   9:      End Sub
  10:   
  11:      <Test()> _
  12:      Public Sub AnotherSampleTestForSomethingElse()
  13:          Assert.That(something.IsSomethingElse(), Iz.True)
  14:      End Sub
  15:   
  16:  End Class

And there you go.

So, I'm working on a Web Application Project in Visual Studio 2008 and I realize I don't have a strongly typed Profile object...So I Google around and find that this a Problem in Visual Studio 2005 and that Microsoft didn't fix the problem in VS 2008. Needless to say I was a little unimpressed. But I also found the Web Profile Builder at the MSDN Code Gallery. I followed the instructions here and was away running.

More Posts