# Wednesday, November 09, 2005

One of my personal pet programming projects at one point in time was to create some kind of screen scraper of monster.com and other job websites so I could "download" all the current job postings and do things like:

1) Rank/Prioritize the job listings by personal appeal
2) Detect job listing duplicates between monster/dice/etc.
3) Keep track of which jobs I applied for and when
4) Automate running multiple queries with multiple terms in job site specific ways so I could detect new entries in my areas of interest (something an RSS feed would normally be used for)
5) Categorize jobs by factors that were important to me - Salary, Location, Consulting vs. Full-time, How qualified I thought I was, etc.

Everyone puts that much effort into their job search, right?  ;)

I did get something of an automated process for the worst bits with tons of manual intervention required such that I could do this and it worked wonderfully.  It was never anywhere close to automated enough to share with friends though.  However, screen scrapping different web sites is not fun, rewarding work and I eventually shelved the project (and I now find most of my contract work through recruiters who I've talked to in the past and never apply for jobs from web site job listings anymore).

I still think this is very cool though:

http://www.indeed.com/jsp/apiinfo.jsp

Indeed is yet another job search engine, except with one major difference (it may not be the only job search engine with this feature, but it's the only one I know of).  Indeed publishes a Web Services API which you can query directly that seems to return job listings from Monster, Dice, etc.  This would have made my pet project above a piece of cake to implement.  This is a very good sign of things to come in the web services world!

Now if someone would just publish a web service for stock price quotes (you know it's going to happen eventually).

Wednesday, November 09, 2005 2:13:21 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [2]  | 
# Tuesday, September 27, 2005

Scott Hanselman is great at evaluating all the little tools developers should be usingYesterday, he brought me to PureText.

While not the bane of my existence, the "Paste Special" feature is something I use *constantly*.  Unlike hotkey maven Scott, I was doing it with mouse clicks, which is even more painful.  Windows-V to "paste special" with one click is *exactly* the most important feature I've wanted added to all Microsoft software.  Thank you Steve Miller!!!

Tuesday, September 27, 2005 3:12:36 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, August 11, 2005

ASP.NET Simplicity -- When Is Too Much Simplicity a Bad Thing

This is a good post to read, plus all the comments.  Many developers have real concerns about ASP.NET 2.0 and the direction it's taken.  ASP.NET 1.X is a very good product.  I'm really not so sure about ASP.NET 2.0.

I'd like to see Microsoft step up to the plate here and instead of saying it's "working as designed" say "we are listening to your feedback and we are going to slip the release date so we can do it right".

I've thought about trying to stick with ASP.NET 1.X, but there are just so many (too many?) obstacles.  I can't throw out all of Visual Studio 2005 just because I'm not happy with the breaking changes to ASP.NET 2.0.  I really like most of the VS 2005 non-ASP.NET 2.0 related changes.  I even like some of the ASP.NET 2.0 non-breaking changes.

I'm sure there are a lot of people watching to see what Microsoft does with this one.  Backward compatibility matters.

Thursday, August 11, 2005 11:52:43 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, August 05, 2005

As a Windows user, running applications from the command line is a major pain in the ass (if I preferred working from the command line, I would use Linux).  Yet, with NAnt, there is little choice but to open a command prompt.  Well, there is an open source project called NAntRunner that allows you to run NAnt from a VS.NET Add-In, but that doesn't look like what I want either as I often have to close VS.NET to allow NAnt to overwrite the DLLs VS.NET has locked (I believe this is a bug in VS.NET) and if I want to build a single solution, I just do that in the normal VS.NET way anyway.

So, I often open a command prompt, run a batch file to add nant.exe to my path (I intentionally change my path and other environment variables in an environment specific batch file so I'm sure to always grab the proper version of the applications for that particular development/build environment) and then start cd'ing around to different directory to run the minimal set of NAnt targets I need to get the job done.

So, I did a google search for how to add a right click "Open Command Prompt Here" to Windows File Explorer, so I can at least start the command prompt in an arbitrary directory quickly and easily.  There are some excellent options for this feature here.  I chose option 3 as it was simple and low risk (I can easily undo it - there is no "magic").

This makes running NAnt that much more tolerable, but I think what I really want is a Windows File Explorer Add-In to run NAnt for an arbitrary target in an arbitrary environment, running an arbitrary batch file to initialize the environment first.  It seems very doable, but just doesn't interest me enough to actually implement it.

And why does a google search for "NAnt Runner" (notice the subtle space between the words) return nothing useful?  Hmm...  MSN search would have at least gotten me where I needed to go with a couple of non-obvious clicks, but there still isn't a direct link on the first page of results.  Not that I have much search engine power, but I'm going create this link anyway in hopes that it helps other people: NAnt Runner.

Friday, August 05, 2005 11:36:34 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, July 27, 2005

Migrating from ASP.NET 1.1 to 2.0 can be quite a disturbing experience, at least it has been for me.  You must go through a major (mostly automated) conversion process to recompile your application for 2.0.  Most every one of your source files will be modified during conversion, so there isn't really an option of "going back" or developing a code base against both 1.1 and 2.0 in parallel (although I still hope to attempt this parallel track, it will require tremendous attention to detail and custom automation).

I wish I had read this document from Microsoft before I did the migration for the first time so I wouldn't have been so shocked and horrified at what the conversion wizard did to my code:

Common ASP.NET 2.0 Conversion Issues and Solutions

I highly recommend you at least skim it before attempting the conversion to get a vague idea of what you are in for.  Running the conversion wizard the first time for me caused major problems because of my unrealistic expectations about what I was in for.  My first 3 options for restoring a backup copy of my 1.1 project and source failed for unfortunate reasons, but luckily I had a 4th backup option that I could restore from.  Lesson learned: You can't have enough backups before running the conversion wizard (it's hard to fault Microsoft too much for my near miss, but there are a couple of things they could have done differently that would have saved me quite a bit of grief).

Microsoft has more on migrating from ASP.NET 1.1 to 2.0 here:
http://msdn.microsoft.com/asp.net/migration/upgrade/default.aspx


[via The Daily Grind]

Wednesday, July 27, 2005 10:19:09 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, June 16, 2005

Gunjan Doshi: Using Visual Studio.Net to edit NAnt build files
[via Bill Arnette on WinTechOffTopic]

This very quickly makes the NAnt build script editing environment a lot more pleasant and productive.

Thursday, June 16, 2005 11:05:37 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

For some reason I always have to go searching for this sample code when I want it and it's never as easy to find as I want it to be.  This is a very nice starting point for creating your own custom exception classes in C#.  The translation to VB.NET is straightforward.

using System;
using System.Runtime.Serialization;

namespace YourNamespaceHere
{
    /// <summary>
    /// YourCustomException is a vanilla custom exception for this application.
    /// </summary>
    [Serializable()]
    public class YourCustomException : Exception, ISerializable
    {
        /// <summary>
       
/// Calls the default exception constructor.
       
/// </summary>
       
public YourCustomException()
        {
        }
       
/// <summary>
       
/// Calls the default exception constructor with a message parameter.
       
/// </summary>
       
/// <param name="message">The exception message.</param>
       
public YourCustomException(string message) : base(message)
        {
        }
       
/// <summary>
       
/// Calls the default exception constructor with a message and innerException parameter.
       
/// </summary>
       
/// <param name="message">The exception message.</param>
       
/// <param name="inner">The inner exception.</param>
       
public YourCustomException(string message, Exception inner): base(message, inner)
        {
        }
       
/// <summary>
       
/// Calls the default exception constructor with a serialization info and streaming context parameter.
       
/// </summary>
       
/// <param name="info">The SerializationInfo that holds the serialized object data about the exception being thrown.</param>
       
/// <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
       
public YourCustomException(SerializationInfo info, StreamingContext context) : base( info, context )
        {
        }
    }
}

Note that there is some controversy regarding whether you are supposed to inherit from Exception or ApplicationException for custom exceptions due to Microsoft giving inconsistent guidance.

This is the source of information I've giving the most authority to on this issue in my choice of inheriting from Exception:

Brad Abrams Blog

Thursday, June 16, 2005 11:10:04 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, June 14, 2005

Trying to run NDoc (1.3.1) on a newly setup PC, I ran into this error:

From the NDoc GUI:
---
An error occured while trying to build the documentation.

Exception: NDoc.Core.DocumenterException
Unable to find the HTML Help Compiler. Please verify that the HTML Help Workshop has been installed.

Exception: NDoc.Core.DocumenterException
Unable to find the HTML Help Compiler. Please verify that the HTML Help Workshop has been installed.
---

From the NAnt NDoc Utility:
---
Error building documentation.
    Unable to find the HTML Help Compiler. Please verify that the HTML Help Workshop has been installed.
        Unable to find the HTML Help Compiler. Please verify that the HTML Help Workshop has been installed.
---

As of today, it's not well documented on Google what this error really means.

The fix was to rerun the VS.NET 2003 installer (Control Panel -> Add/Remove Programs -> Select VS.NET -> Change/Remove). Then add the "Enterprise Development Tools->Visual Studio SDKs->HTML Help 1.3 SDK" item.

My original guess was that I got the error because I hadn't installed the MSDN library yet.  Thanks to this weblog entry for pointing me in the right direction (toward the VS.NET installer):

What is "HTML Help Workshop"?

If I were Microsoft, I wouldn't consider the HTML Help compiler as part of the "Enterprise Development Tools" package and hide it in the installer.  NDoc is a best practice that every developer who is writing a component/library should use, not just enterprise developers.  IMHO, hhc.exe should be part of the core VS.NET install.

Tuesday, June 14, 2005 10:38:37 AM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Sunday, June 12, 2005

I am a huge proponent of "fail fast" as a best practice.

Here's a great writeup of what Fail Fast means.  It was written by Jim Shore and edited by Martin Fowler.

Sunday, June 12, 2005 6:17:23 PM (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |