Thursday, February 24, 2011

AccuTimeCard for vWorker (RAC) crashes

The AccuTimeCard for vWorker (previously RAC – Rent A Coder) crashes when you first run it.

The exception dump is listed below is a Google-friendly search helper for people having the same issue.

I’m running Windows 7 (Ultimate) x64 and got this exception as soon as I ran the application. Thankfully, the application was written in .net so I was able to use the .Net Reflector to resolve the issue. The exception was occurring in the Form Load event in the application so I took that into disassembly in the reflector coming up with the following:

private void Form1_Load(object sender, EventArgs e)
{
this.Visible = false;
StringBuilder builder
= new StringBuilder();
builder.Append(
"-classpath ");
builder.Append(
".;");
builder.Append(
@"resources\jars\axis.jar;");
builder.Append(
@"resources\jars\commons-discovery-0.2.jar;");
builder.Append(
@"resources\jars\forms-1.1.0.jar;");
builder.Append(
@"resources\jars\jaxrpc.jar;");
builder.Append(
@"resources\jars\JMF2_1_1e\lib\jmf.jar;");
builder.Append(
@"resources\jars\org.apache.commons.logging_1.0.4.v200706111724.jar;");
builder.Append(
@"resources\jars\saaj.jar;");
builder.Append(
@"resources\jars\wsdl4j-1.5.1.jar ");
builder.Append(
"RacTimeCard");
string arguments = builder.ToString();
Process.Start(
"javaw.exe", arguments);
this.Close();
}





The offending line, the file it cannot find is, of course, Process.Start(“javaw.exe”, arguments); One quick check concluded that the path to the Java-Runtime was not present in my PATH environment variable.

Since non-technical people now use vWorker.com I will try to explain how to add this path to your own environmental variable PATH. These instructions are for Windows 7 and will likely work fairly closely to Vista (for those of you who are masochists and still use that OS Smile)

 

First, find your install of the Java runtime. Mine was located at: C:\Program Files (x86)\Java\jre1.6.0_13\bin. If you’re not using a 64 bit operating system it should be under C:\Program Files\Java\jre1.6.0_13\bin. Copy that path to your clipboard.

Open up your Control Panel and go to “System and Security”, “System”, “Advanced System Settings”. I’m sure there’s a faster way to do this but that’ll work for now. Go to the advanced tab: we’re getting really advanced now! Click on “Environment Variables”. In the second list box you’ll need to local your PATH variable. Double click on that and you should see something like the following when you’re done pasting at the end of your variable setting. Please note it’s very important you add a semi-colon “;” (no quotes) between the last path setting and your newly pasted path to your Java Runtime binary folder.

image

 

 

microsoft.NET Framework
The sistem cannot find the file specified
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at RacTimeCardLauncher.Form1.Form1_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
RacTimeCardLauncher
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/octa/AppData/Local/Exhedra/RacTimeCard/RacTimeCardLauncher.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Saturday, February 12, 2011

Software Development Productivity in Windows 7

   This won’t replace my AutoHotKey but it’s a step in the right direction from Microsoft Windows.

   I recently stumbled across some keyboard shortcuts in Windows 7 that have increased my productivity as a software developer. If you’re a developer you probably favor the keyboard over the mouse when getting your work done. I’m constantly on the lookout for keyboard shortcuts and new automation tools to help liberate me from that pesky mouse and speed up my work process.

   Windows 7 has some nice new keyboard features I didn’t know about until recently. I actually stumbled upon them quite by accident and did a little exploring. When I put 2+2 together in my head I came up with a quick way to jump around to all of the applications I use frequently during the day.

   Here are some applications I use constantly and their corresponding shortcut key combinations. These keyboard combinations are built into Windows (since Vista) as described by Wikipedia.

image

   That’s right – starting with the first application running it’s the Windows Key + 1 [ 2, 3, … n ] to bring up the application (Win+0 is the 10th and final application shortcut in the chain).

   Now the first thing that’s nice is that I will get the running instance of the application if the application is already running or a new instance of the application if it is not (singleton approach). If I want to start a new instance of the application rather than pop up the instance already running all I need to do is Win+Shift+1 [2, 3, … n].

   If I have multiple instances already running repeatedly hitting Win+Ctrl+1, Win+Ctrl+1 will alternate between (in my case) my instances of Visual Studio 2010 that are running. Alternatively, simply pressing Win+1, Win+1 will alternate between the desktop preview windows for that application and releasing will bring up the application instance.

   As long as I keep these application pinned to my taskbar in the same position Win+1 will ALWAYS be Visual Studio 2010, Win+2 will ALWAYS be Microsoft Blend, etc.. That is a big deal coming from the Alt+Tab world.

“Now you may be thinking “so what” I use a keyboard mapping or macro program called AutoHotKey (or something similar) and already have this set up. Me too - 

but wait, there’s more!

   If we press Win+Alt+1 [ 2, 3, … n] we get access to the application’s '”Jump List”. This is where these keyboard shortcuts really start to shine. Here’s what I get when I press Win+Alt+1 asking for Visual Studio 2010’s Jump List – and yep, I can use the good old arrow keeps to get to the solutions I’m currently working on

image

   I’m currently doing development in WPF so it is a HUGE time saver to switch between Visual Studio & Blend using Win+1 and Win+2 respectively. Alt+Tab is great but  sometimes you go to other application in between using your core tools and it’s always that few milliseconds spent recognizing where the application I need is in the Alt-Tab chain that drives me insane.

   By the way, if you use Alt+Tab quite a lot with many windows open, you can use the arrow keys to navigate the large tiled list. For instance the down arrow will take you down a row of applications after you’ve started the Alt+Tab maneuver, skipping a few Alt+Tab key iterations.

Sunday, January 17, 2010

Using Microsoft Live Writer with Blogger

I was recently pondering my reluctance to post to my blog. I analyzed the problem and came up with the following facts…

  • I don’t like the blogger interface for posting to my blog. Especially when I need to post code samples.
  • I don’t typically take the time to post something cool I just did with some code I’ve written because I would typically want to upload a new project that people could download and explore should they want to.
  • I won’t typically post to my blog after a long day of writing code.

Having made these identifications this is the first step in solving the problems. I’m certainly not a lazy person. I want to post more useful content to my blog so these issues need to be resolved for me personally before blogging on a regular basis will become reality.

Setting up Live Writer with blogger is a snap. I simply went to the Tools menu then Accounts…

WindowsLiveWriterBloggerSetup1

… entered in the required URL for my blog, my username and password ( I use my Google credentials ) and viola… Windows Live Writer is up and running. I’m publishing as I go as I write this. A very cool feature.

WindowsLiveWriterBloggerSetup2

So far, so good but what about source code? I use the Manoli Formatter which is quite good. I actually downloaded the source code and started to write myself a little blogger application to handle my blog posts or at least allow me to cut/paste the content into the blogger editor. That didn’t pan out due to time constraints and the fact that I wanted something now, now, now.

Anyway, Live Writer seems to bridge that gap for me so far. The previous images (which are totally superfluous) since the setup process is so easy were all handled automagically via Live Writer. That means I don’t have to upload the image to flicker, get the public link to the image, cut/paste and mangle that link into Blogger, etc. OK, I’m making it sound harder than it is but repetitive processes like that drive me insane. That’s why I’m a software developer… I’m too lazy to do anything twice.

So now, lets try some code… If I hop over to Visual Studio and copy some generic Cache code I wrote and paste it into Manoli I get my CSS tagged HTML back and paste it into Live Writer I can preview what my code snippet is going to look like quite easily…

LiveWriterPreview1

That’s good stuff! I can immediately see that one code line is wrapping due to the format, styling and layout of my blog. Poof! No worries, I can just edit my code in Visual Studio and paste back into Manoli for a quick update…

public class Cache<TKey, TValue>
{
private readonly Dictionary<TKey, TValue> cache = 
    new Dictionary<TKey, TValue>();

public TValue this[TKey key] 
{ 
get 
{ 
return cache.ContainsKey(key) ? cache[key] : default(TValue); 
} 
set 
{ 
cache[key] = value; 
} 
}

public TValue Fetch(TKey key, TValue value)
{
if (!cache.ContainsKey(key))
{
this[key] = value;
}

return value;
}
}


…and there you have it. Easy code that will fit inside my blog nicely without too much hassle. So far, Windows Live Writer just scored mega kudos with me. Look for more blogging soon. Maybe I can keep my New Years Resolution after all. Note: Live Writer is by no means specific to Blogger. It supports many blogging platforms. Let me know what you like and don’t like about it. My 5 minute analysis is “Why wasn’t I using this the minute it was released”? Anyone use any similar applications? Love to hear your stories. My next task: Making the format of my blog more Web 2.0 compliant.

Sunday, January 3, 2010

Linq Queries against most collections including ListView, ListViewItemCollection, ControlCollection or anything IEnumerable

The Problem:


You can not run Linq queries against many Framework collections such as ListViewItems and Controls in an immediately obvious manner.

if (list.Items.All(item => item.Checked))
    return true;

The previous code snippet won't compile, won't work and won't shove you in the right direction via IntelliSense, Online Help, or by performing a super-quick Google for the hopelessly attention-deficit disordered such as myself. (more on the Googling later)

The Fix:


Introducing the Enumerable .Cast (TResult) Method

if (list.Items.Cast<ListViewItem>().All(item => item.Checked)
    return true;

Using this method you can rewrite the original code quite easily to this code and Linq query the collection to death with all of your favorite little Linq sledgehammers...

The Why:


Background story for those of you who didn't jump ship to go off using the solution...

I was trying to something I thought would be very straight-forward using Linq. I wanted to sync a tri-state "parent-relationship" CheckBox control with a ListView control that contained "child-relationship" items that had their own respective item specific checkboxes. The parent to child relationship here is conceptual and not baked into the controls, we're talking a simple CheckBox and ListView here.

You've all probably done something similar whether it be with a TreeView using checkboxes containing items with checkboxes. You've certainly seen this behavior if you've ever done a backup and selected what you want backed up on a hard drive. The concept is simple: if all child items are checked or unchecked, the parent CheckBox should be Checked or Unchecked accordingly. If some of the child objects are checked and some aren't, the parent CheckBox should be Indeterminate.

(The backup then flubs your selection, doesn't back up your nicely selected SQL database, and can't seem to adequately backup to your 1TB external HD popping up endless dialogs to let you know how inefficient it truly is but that's a whole different post altogether.)

All fine and dandy, this will be easy, right? Well, the first thing I wanted to do is say something like...

if (listEmployees.Items.All(λ => λ.Checked))
    checkEmployees.CheckState = CheckState.Checked;
else if (listEmployees.Items.All(λ => !λ.Checked))
    checkEmployees.CheckState = CheckState.Unchecked;
else
    checkEmployees.CheckState = CheckState.Indeterminate;

Obviously, my ListView is a list of Employee business objects and my CheckBoxes on my list items are per employee item that I'm displaying. Nothing fancy here.

Note: I use the λ character now for a lot of my Linq statements after reading this question about LINQ to SQL business object creation best practices. I agree that it's technically not the most accurate usage of the Lambda characer however it does clarify the code (to me) and reduces the chance of variable declaration conflicts with Linq queries.

So, I'm ready to compile, skip testing, deem this code ready for production and ship it to my hungry client when this little nastygram pops up during compile...

'System.Windows.Forms.ListView.ListViewItemCollection' does not contain a definition for 'All' and no extension method 'All' accepting a first argument of type 'System.Windows.Forms.ListView.ListViewItemCollection' could be found (are you missing a using directive or an assembly reference?)

Grr. OK, so off to Google I go (oh you do it too!)... I land on
LINQ on ListView.Items (ListViewItemCollection) telling me in no uncertain terms, with an accepted answer, that this just can't be done. Piffle! No way! I'm outraged! Linq can do anything!

So, I typically look at one Google answer like this and go back to the code to see what I, with all my omnipotent developer powers, can figure out. (Usually I'm humbled to admit the same defeat as the previous blog poster but not this time!

So, instinct and too much coffee tells me to look up 2 things...

1.) What are the requirements, more specifically, the "where" clause, if any, of the Linq method "All"
2.) If the ListView.Items property doesn't meet this requirement, then why doesn't it dangit!?!

So, doing a "Go to definition" on the All Linq Extension method I come up with the following in my sweet little meta data viewer.

public static bool All<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate);

The Linq All entension method requires an IEnumerable<TResult> as the source of the extension meaning that only objects that expose IEnumerable<TResult> as part of their class definition will get picked up, and be extensible using the Linq system. There's no where clause, it must be an IEnumerable<TResult> supported object whether by inheritance or interface support.

OK, I was thinking just IEnumerable personally but actually IEnumerable<TResult> makes sense since Linq has to perform anonymous queries using properties of the object that's being extended. Meaning if Linq extended IEnumerable (pure) that's great but when I went to do my neat little .Checked (is true) statement Linq wouldn't know what the heck a .Checked was because IEnumerable would be based on an enumerable object collection.

Fine, makes sense, so what the heck is a ListView.Items collection then? Back over to the "Go to definition" meta lookup for that guy...

[Localizable(true)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor("System.Windows.Forms.Design.ListViewItemCollectionEditor, System.Design, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (UITypeEditor))]
[MergableProperty(false)]
public ListViewItemCollection Items { get; }

Uh...OK, so the Items property is this ListViewItemCollection class, but what is that? AGAIN with the lookup I come to...

public class ListViewItemCollection : IList, ICollection, IEnumerable

Aha! It's the problem I just defined in my mind. ListViewItemCollection is just an IEnumerable collection (of objects). The indexer...

public virtual ListViewItem this[int index] { get; set; }

.. is the reason we can easily deal with ListViewItems when we're doing foreach loops on the ListView.Items property. It does the boxing for us. Interesting performance hit, will have to check that out later as Microsoft is probably (hopefully) doing something to defer the boxing cost of each item in the List.

OK, so problem identified but what could I do about it. I'd love to say it was some methodical deduction that brought me to the Cast method but I just did an IntelliSense on the ListView.Items property to see what Linq extensions were available to me.

I started looking into AsQueryable() but I couldn't quite achieve what I wanted. Then, I noticed the little Cast beneath it (in IntelliSense). Poof, that worked.

Voila, now you can run your handy Linq queries against most anything IEnumerable as long as you can, with some accuracy, cast each member to a specific type.

On the Googling: I thought to myself cool! I figured out a problem everyone can use everywhere at all times. Then that creeping feeling overcame me that, "Nah, that was too easy" so I went back to Google. I wasn't a pioneer after all, drat. A Good, practical LINQ example shows you the same technique with a bit more detail and insight (but less comedy) than I came up with. I didn't realize that Linq works on Sequences so you should check this post out as well for a better understanding. Our similarities in deducing the same conclusion was a bit eerie however but I'll let that slide and drink more java (coffee not the language).

I will post my final solution to the checkbox issue itself because it screams reusable code to me. I will refactor my solution into something that isn't bound to specific controls, maybe not even Windows.Forms controls and post it here later.

I made a New Years Resolution to blog at least 4 times a week and mean to keep it up so this is the first installment (late already).

That's all for today and happy Linq'ing...

Friday, October 23, 2009

Where does my blog title come from?

In case you are wondering about the odd title of my blog it is a little inside joke. In addition to being an old school software developer I'm also an old school gamer. The reference is best described here: All your base are belong to us. It's just a simple play on words built on an old poorly translated game dialog.

Using the ResolveUrl method inside your class library Business Logic Layer (BLL)

Getting around passing HttpContext.Current to your business logic layer, or BLL.


The Problem: 
You want to use handy methods like ResolveUrl inside your Business Logic Layer (BLL) which is a class library. You don't want to reference System.Web or any .Net framework library beneath the System.Web subsystem inside your BLL libraries.

The Fix:
Create a small Utility class inside your class library and pass it a delegate. I know, I'm not a big fan of Utility (or similar) classes but sometimes you need a little tool-belt class for miscellaneous utilitarian methods. I actually have a Common class library that has even less dependencies than my typical BLL library which is where I stuck this class. Obviously, place the code where appropriate for your solution.



using System; 
namespace Common 
{ 
    public static class Utility 
    { 
        public static Func<string, string> ResolveUrl; 
    } 
} 

Now in your global.asax place the following.

private void Session_Start(object sender, EventArgs e) 
{ 
    AssignBusinessLogicLayerHelpers(); 
} 

private static void AssignBusinessLogicLayerHelpers() 
{ 
    var context = HttpContext.Current; 
    if (context == null) return; 

    var page = context.Handler as Page; if (page == null) return; 

    // assign the resolve url method 
    if (Utility.ResolveUrl == null) 
    { 
        Utility.ResolveUrl = page.ResolveUrl; 
    } 

    // assign other helper methods here... 
} 


Here we've elegantly passed a generic delegate to our Utility class that will reference back to the provided ResolveUrl method. The method stamp deals with primitive types only (strings) so we have no dependencies passing this function pointer across the domains.

The Why:  

You do not want to have a BLL or similar class library system utilizing System.Web, or System.Windows.Forms for that matter. If you have a solution with a web service, a web site and a common class library (BLL or other) and you start using methods dependent on HttpContext.Current you are going to run into issues as this context is not the same between the web service and your web site. A common scenario might be a LINQ2SQL Business Object Layer on top of your SQL Database which has effectively become your BLL. You may have classes that need to store virtual, resolved paths into the database but you want to place the resolving of the URL inside your business object classes to enforce a  strong encapsulation of the class. Here's an easy, 5 minute way to provide such features to your business objects without breaking your nTier application model. Now you can happily store the AvatarUrl of your users in the database and have your aspnet_User class do the resolution on the fly!

Saturday, October 17, 2009

FIXED: Windows could not start the Subversion Apache on Local Computer

The Error:

Windows could not start the CollabNet Subversion Apache on Local
Computer. For more information, review the System Event Log. If this is
a non-Microsoft service, contact the service vendor, and refer to
service-specific error code 1.



The Fix:
Open the file C:\Program Files\CollabNet\Subversion Server\httpd\conf in notepad. If you installed to a different directory or you're not installing Apache via/ CollabNet navigate to [Root of Apache Install]\httpd\conf and open in Notepad.

find the following lines near the top of the file.

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 80


Change the red line to a port number you're not using. If you don't know one, pick an oddball and change until it works.
#Listen 12.34.56.78:80 (this is a comment, leave it alone)
Listen 31337

The Why:
I ran into this error while installing the Apache 2.2 server on my local Windows Vista Machine during the CollabNet Subversion install process. The error reared its ugly head when I tried to actually run the Apache service that was installed. The problem, which I'll freely admit, is I've installed so many software applications for Windows I am prone to accept the default install settings and fix things later if need be. Obviously, when you're trying to port the Apache server to Windows a little more care may be needed than when you're installing a simple Windows application. This little issue popped up because I accepted the default value of Port 80 to use with the Apache server. Oops. Needless to say, as an Asp.Net developer I already have that port in use.

The Event Logs provided the real information I needed to solve the issue.

Error in System Log: 
The CollabNet Subversion Apache service terminated with service-specific error 1 (0x1).

Information in System Log: 
The CollabNet Subversion Apache service entered the stopped state.

Error in the Application Log:
The Apache service named  reported the following error:
>>> (OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions.  : make_sock: could not bind to address 0.0.0.0:80

Eureka! Yes, that would cause a problem. It's times like these when I'd like to perform some aerodynamics testing on my laptop...
  .

Software Developer Browser and Plugin Choices

Firefox
I do a lot of Asp.Net development and I use Firefox as part of my development toolkit when diagnosing performance and design issues with any website I'm working on. I'm not going to touch on various methods of developing a website as I feel that's akin to trying to change someone's religion. Most of the tools I use however are software development platform choice independent.

Firefox really shines as a development tool when you start utilizing some of the powerful developer-minded plug-ins that are available. I'm going to take the long view of some of these plug-ins in this post then drill down into some of the various features of some of the more comprehensive tools in future posts.

Yahoo! YSlow: I love it when powerhouses like Google, Yahoo, and Microsoft give back to the developer community by providing some free and useful tools. YSlow is a monster albeit a well designed one in that it's features aren't invoked until you ask for them thus keeping your average browsing experience relatively quick. This tool is indispensable for analyzing website speed bottlenecks and consequently design (layout) issues. Yahoo's YSlow relies on another must-have tool Firebug. Again, I will go into much greater detail about these tools soon but if you're not currently using them I highly recommend checking them out. They will make your website development a brighter world and neither are specific to Asp.Net.

Skynet's HTML Validator: Even if you're not a standards compliant centric developer (shame on you) this tool is invaluable. There have been countless times I've run into a layout or design flaw that I couldn't figure out even with FireBug. Sometimes the issue is, quite simply, that I have an artifact in my outgoing XHTML that is propogating down the DOM model to create very undesired results. The HTML Validator is a great tool for catching these flubs.
If you are a standards minded developer and strive to add the...

Valid XHTML 1.0 Transitional

(or similar compliance) logo to your website then this tool offers huge time saving by bring the validation service to your local machine via Firefox.

Colorzilla: This is a handy tool for fetching HTML color codes in various formats. Although not a power tool in terms of performance analysis I couldn't live without this tool and use it daily.

LiveHttpHeaders: When I need information on what is being posted/received in the HTTP headers this is where I go.

IE Tab: Although I do my personal browsing and development testing in Firefox my target audience is typically an Internet Explorer browsing crowd. This tool is great for switching your gecko rendering engine over to IE to take a look at what the customer will see. I'd rather not load up IE 8 just to take a look at each web page I've designed to make sure it looks the same as my Firefox page, this is how. Also, if you've ever been to an ActiveX dependent web page, having filled in form information only to get stopped because the page requires IE, this is a great way to switch over, refresh the page and not lose everything you've typed in up to that point.

FireShot: I use this extensively for documentation provided to clients of the websites I'm working on. The ability to grab complete screen-shots of a web page, not just the portion visible on the screen/browser, is invaluable. It also provides powerful annotation/editing tools to make documentation simple and easy.

ShowIP: A nice quick tool that keeps me from having to dig up the IP Address of the server I'm working on.

Extended Statusbar: This is a useful one-stop shop for page download and render times.

Clear Cache Button: O.K., not really a developer tool but install it and try living without it. Often I need to clear the browser cache to ensure I'm looking at my last minute development changes.

Google Chrome: While Firefox will probably always remain my workhorse for development testing and debugging sometimes I need a light-weight browser just to take a quick test run through some code changes. Please note: Firefox is a very lightweight browser until you load a ton of plug-ins into it. As a contract software and web developer I do a lot of work on laptops when I'm not at home. When I'm working on a less than hardy development workstation such as a laptop I'll use a default, no frills,  install of Chrome to view and test website changes with. It carries a much lighter footprint than Internet Explorer of course, while also providing me with glaring design flaws under the WebKit rendering engine. The WebKit rendering engine is also used by Safari so if you don't have a Mac lying around somewhere this is a simple and easy way to get a look at what your Mac based audience is typically seeing. Please note that Chrome and Safari do not run parallel compliance to the WebKit versions so Chrome is not a replacement to Safari targeted development. So, until Firefox (or a plug-in) makes profile switching a breeze, allowing me to mindlessly run a stripped down version or bloated version of Firefox with ease I will continue to have a place for Chrome in my toolkit.

That's all for now. Soon I will do a much more detailed write up of FireBug and YSlow.

Sunday, October 4, 2009

FIXED - Cannot eliminate warning VSP2013 when Code Coverage is enabled in TeamBuild builds

Code coverage instrumentation warning while processing file [Your Assembly]
Warning VSP2013 : Instrumenting this image requires it to run as a 32-bit process. The CLR header flags have been updated to reflect this.

This is something I ran into while writing unit tests for a project. The error pops up when you have code coverage enabled for your unit tests.

Workaround:

1) Open the project properties of the assembly you are instrumenting.

2) Go to the Build tab.

3) Make sure the combo configuration selection is set to the Debug (or equivalent) configuration.

4) Set the "Platform target" to x86.
Note: This sets the assembly to be compiled specifically as 32 bit but only the debug assembly so you do not alter the output of your production, deployment assembly.

This will remove the warning when you are performing code coverage on the debug version of your assembly.