CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

December 2004 - Posts

  • Resharper Update Released...

    Via Peter Provost : Resharper Build 151 Is Out!

    Trust me, no matter what others will tell you, Resharper really is the best way to speed up your coding and enhance the VS IDE.  Bar none.

    -B

  • Tech Ed on $200 A Day - Is It Possible?

    Being self-employed definitely has it benefits, but one of the drawbacks is you really don't get to go on those all-expense-paid vacations we call conferences... You know, where you can win lots of stuff, eat lots of free food, go to a theme park, gamble, see a band... all that stuff you do when the rest of your office thinks you're hard at work learning stuff.

    Of course, I'm only half-kidding about it being a total vacation.  Going to an event like Tech Ed will charge up your dev juices for long time after you get back to work.  It's a great experience for any coder.

    Now, I'm dying to go to a conference, but honestly, I don't see myself forking out the thousands I think it'd end up ultimately costing me to go to one.  Conference ticket + airfare + hotel, + lost billable hours for a week = a lot of $$$!  There are some free events, like Code Camps, and the MSDN events, these are great things, gifts from above you may even say, but nothing beats a good old technology conference (vacation). 

    My goal is for the next year is to go to Tech Ed in Orlando, and do it on a budget.  What I really need is a “Rough Guide” to tech conferences.  You know, like Conferences on $50 a Day or something like that.  Okay, well, we're not students here (most of us anyhow), so let's pick some realistic price. How about Tech Ed on $200 a Day? Think it's possible? Well, I'm going to try it.  I'm going to give myself a budget of $1000.   If I can do it, I promise to blog about the process as I do it.  I have some ideas for recouping some of the various costs here and there, but one of the biggest hurdles I'm going to have to overcome is the attendance fee.

    There's got to be a way to get in on the cheap. Perhaps I could dress all in denim and sneak onto the pavilion floor?  Maybe I could get a job on the sly with foodservice and work the lunches?   I wonder if I link to Scoble, if he'll get me a free ticket?  There has to be a way.

    -B

  • Paint.NET 2.0

    Via Eric Wise: Paint .NET 2.0

    This has to be one of the coolest free .NET apps I've seen in a long time.  A great replacement for Windows paint.

    -Brendan

  • Don't Misunderstand Darwin...

    Just wanted to make a small point about Frans Boumas latest post. Which has really fired up some people, BTW. Good post, but classic Darwinism may be misrepresented here.

    Don't get me wrong, I think that Darwinism is at play here, AND that Firefox is superior in many ways BUT, that IE May still win out, even in it's current incarnation.  See, Darwinism doesn't propose that the "best" will win out, simply that the "fittest" will.  What is fit may not be what's best, epecially in terms of features, performance, security, etc. - the things we developers look for.  This is a common misunderstanding of Darwinism.

    IE may be "selected for" for other reasons, completely unrelated to features we devleopers look for.  Anything that it does to promote it's use will be selected for. IMO, IE will win out, because Microsoft owns the environment, therefore controls, for the most part, what is the most "fit" for the platform.

    -Brendan

  • The Linear Software Price/Bug Ratio

    I am now totally convinced that the more you pay for a software package, the crappier the code base and the buggier it is.  Of course, all of my evidence is anecdotal, but here's a quick graph I threw together that illustrates this.

    This is all based on some recent experience with companies, who I'll not name here...

    -Brendan

  • Map Point WS First Impressions and a Customer Data Source Example

    I spent the last week working with the Map Point Web Services from Microsoft.   This application truly rocks.  Almost everything I wanted to do, I quickly found in the SDK samples and docs. 

    One of the cool things about the service, is that you can upload your own “Customer Data Source” containing your points of interest, which the service will automatically geocode for you based on street address, and this data is then available to you  when using the service.  As an example, here's a map that shows all of the trucker sites near one of our terminals.  The trucker data was data that we have here, that I uploaded to the Map Point server:

    This data has to be in a specific file format, in order for the Map Point servers to correctly geocode it.  Now, I had a bit of trouble getting started, mainly because I couldn't find an example of a Customer Data Source. Yes, there is an SDK document here that describes the format that your data file has to be in, but I'm lazy, and I just wanted an example! 

    So, I thought I'd provide one here.  The format is simple, and you can add you own custom fields to be returned to your application, for example, I uploaded a “CompanyType” field that my application uses.  Download my Customer Data Source file here.

    The only thing I couldn't figure out how to do is upload an overlay, to outline our port.  I'm not even sure that the Map Point service supports this. Overall, working with this has gotten me even more psyched than I already am about Web services in general.  What a great application.

    -Brendan

  • Some Positivity... For a Change

    Someone recently replied to one of my posts, with the question “Why so negative?”  It's made me reflect a bit, and although, to me, a bit of skepticism and negativity is healthy, being positive is really the way to go, in the karma-esque grand scheme of things...

    So, without further ado, here are a bunch of un-related things that for some reason, I'm very positive about right now..

    Um.  Okay.   This is hard.  It's funny, but it's much easier to be negative and to bitch about stuff.  I don't consider myself negative in real life... But something about this blog brings it out in me.  Okay.  The positive juices are starting to flow... Here we go...

    The new Wes Anderson movie, The Life Aquatic is out soon!  Hooray!

    Joel on software's latest post rocks.  What a good writer!  I think he's my new hero.

    I'm finally honing my blog list to a point where every day, I am pumped by what I read about .NET and Web Services.

    I just used Jeff Key's Ruler for the first time in months..  And it's still darn cool.  I love measuring things.

    Thank goodness for Gmail.  And Google in general.

    My stocks are up!

    There.  I thought I'd get this nasty business of positivity out of the way, so I don't have to make any related new years resolutions in the next few weeks, beyond the typical “go to the gym“ ones. 

    -Brendan

  • Google and what is RIGHT with the industry...

    You may or may not agree with this post about what is wrong with the industry.  But, yesterday, Google definitely showed us what is right with the industry.

    Google operator of the world's most popular Internet search service, announced today that it had entered into agreements with some of the nation's leading research libraries and Oxford University to begin converting their holdings into digital files that would be freely searchable over the Web.

    -Brendan

  • No Truly Original Ideas and the MSN Toolbar

    Yes they copied Google.  Just like they copied Java, and MacOS, and Palm, and Oracle, and Netscape, and Word and everything else.  They copy stuff.  Is it fair in the grand scheme of things?  Probably not. Am I increasingly irritated by MS? Yes.  Do I still think .NET is the greatest thing since sliced bread? Yes. Does asking myself questions like this remind you of Rumsfeld?  I hope so.

    Is it better than Google?  No.  The one thing I can say for sure, is that the OS integration is much nicer that Google's.  It looks better.  It's got some potential with it's desktop backend indexing engine. See Scott Hansleman's post here.  There's also a video on Channel 9 that shows some of the cool features that you can watch (that is if you can stomach all of the sentences starting with the word “so...“ bleah). 

    But all that is not enough to get me to use the MSN web search over Google. Sure, it searches the desktop better, but I already know what's on my desktop, for the most part anyway.  The only thing I really ever need to search is email. 90% of my searching happens on the web. 

    And this is where Google has it all over Microsoft.  Google's web search is just plain superior.  And I have a feeling that it will be for some time to come. What makes me say this? Well, when I search for stuff that I know is out there (because I put it there) Google finds it.  MSN search doesn't.  In fact, it only finds a fraction of it. If you don't blog, or publish stuff to the web, you'll never even know that MSN searching is inferior.  Most people can't do this test, but I assure you.  If you want to find something on the Web, “Google First.“ Leave MSN Web search for your grandmother.

    Someone once told me that there's no such thing as a truly original idea.  That's probably true.  If this is true, we shouldn't get so hung up on original ideas, it's too hard to patent them anyhow. MS can and will copy any original idea it needs to.  What they can't copy is Google's back end searching and indexing technology, at least not as quickly, because although it may be an original idea, it's secret.  Microsoft can't look at it and copy it and Google will never need to allow access to it's back end technology.  This is a huge protection that they have going for them, and is what will keep me Googling for some time to come... As long as Google can provide me better searching of what I care most about (everything outside of my computer) they'll have an edge on MSN.

    -Brendan

  • SQL 2005 XML DataType...

    I know people are having difficulties with XML inside of SQL, but I for one, can't wait! 

    Some details on the SQL XML DataType and Compression

    IMO, .NET XML Serialization + SQL XML DataType == Some really powerful stuff!

    -Brendan

  • Not So Sure About CAPTCHA...

    I've been comment spammed more and more lately too, but I'm not so sure I like the solution of CAPTCHA images to deter the spammers.  Why?  Because they deter us, the comment providers, too!  I groan every time I need to decipher one of those things, just to say “Nice Post!”

    Now, I get about 10 spam comments a week, admittedly, not that many.  But, I just go and delete them, as soon as I'm notified that I have a new comment for “Holdem Poker” or whatever.  I feel like if I put CAPTCHA puzzles on my blog, I'd just be passing the buck, er the effort, to my readers.

    There's got to be a better way.  I've heard of people using Blacklists or other intelligent filtering technologies, which are the real solution, IMO. 

    The real reason you see so much CAPTCHA on blogs?  It's cool technology, and we love to play around with cool technology.. But is it the best solution for filtering out comment spam, I don't think so.

    -B

  • Setting Up Vault 3.0 on WebHost4Life

    A couple of weeks ago, I promised to create a step-by-step guide to setting up Vault on a WebHost4Life (WH4L).  I've been stalling on this basically because for me to do an accurate, detailed step-by-step guide, it will involve setting it up again, so that I can record each and every step.  Short of doing that, here's the general gist of what I did to get it setup.

    Step 1

    Run the install locally on my machine, using a local SQL instance.  Test it, create your users etc.

    Step 2

    Create a new database called “sgvault“ on your WH4L account, your username should be “sgvaultuser“ NOTE: If someone has previously created this database on your shared SQL Server, you may be out of luck.  Not sure this will work with a different DB Name. To do this, login to your WH4L control panel, and click on the “MS SQL“ link.

    Step 3

    Backup the “sgvalut” database on your local machine, you will need to restore this database on your WH4L SQL Server.  First you'll have to FTP the “sgvault” backup to your WebHost4Life account, follow the instructions on the MS SQL page on your WH4L account for doing a DB restore.

    Step 4

    Create a directory on your WH4L account called VaultService, FTP the contents of your local “VaultSevice“ directory created in step 1.  Should located on  c:\\inetpub\wwwroot\VaultService or something like that.

    Step 5

    Give the ASPNET Account WR permissions to the VaultService directory on your WH4L account (Do this under the “File Permission“ link.  You may be able to tighten security more, but this'll get you started.

    Step 6

    Create an IIS Application for the VaultService directory.  Click the “Set IIS Application“ link and follow the on screen directions.

    Step 7

    Edit the web.config file in the VaultService directory, making two changes:

        <add key="ConfigPath" value="c:\hosting\webhost4life\member\[WH4L ACCT NAME]\VaultService\Vault.config" />

        <add key="ConnectString" value="Application Name='SourceGear Vault Server'; Connection Reset='false'; Server=[YOUR DB IP]; Database=sgvault; User ID=sgvaultuser; password=[YOUR PASSWORD]" />

    Note that you're using a clear text password here.  Vault uses a Machine hashed password if you're using the “pwd“ attribute for the line above.  Short of having someone at WH4L running a program to gen this, I had to go with clear text.

    That's about it.  Launch your vault client and start controlling some source code!  It's been working great for me!

    -Brendan

  • Strongly Type DropDownList with .NET Attributes!

    A while back I posted about using an enum as a datasource for your drop-down lists, see Strongly-Type a DropDownList with Enumerated Types.  As it turns out, the big drawback to this approach is that your DropDownList's text is limited to the text that you use in your enum.  This is fine if your text doesn't have any spaces, or other special characters, since enumerations don't allow these.  But most of the time, you'll need a more presentable version of your text to show to your end-users. 

    One approach would be to create a method to convert your enumerated value to text, switching on the value.  This isn't the best approach, however, because you've now logically separated the original enum from it's text representation, which can lead to some problems with maintenance.  Also the code for doing this can get ugly, and really should probably be relegated to The Daily WTF

    Fortunately, there's a better way: Attributes.  I've been reading Applied .NET Attributes, by Jason Bock and Tom Barnaby recently, and attributes are a perfect solution to this problem.  They keep the meaning of the enum together with the definition, and the code to access this information is simple and straight forward.   So, here's the code from the last post, re-written to use attributes:

    The new enumeration, with the Description attribute:

    public enum TShirtSize
    {
          [Description("Small (size 0-5)")] Small =
    0,
          [Description("Medium (size 6-10)")] Medium =
    1,
          [Description("Large (size 10-13)")] Large =
    2,
          [Description("Extra-Large (sizes 13 and up)")] ExtraLarge =
    3
    }

    A helper method to reflect and get the Description:

    public static string GetDescription(Enum value)
    {
      FieldInfo fi= value.GetType().GetField(value.ToString());
      DescriptionAttribute[] attributes =

         (DescriptionAttribute[])fi.
    GetCustomAttributes(typeof(DescriptionAttribute), false);
      return (attributes.
    Length>0) ? attributes[0].Description : value.ToString();
    }

    And finally, our new ddl code:

    DropDownList ddl = new DropDownList();
    foreach(TShirtSize siz in Enum.GetValues(typeof
    (TShirtSize)))
    {
       
    ddl.Items.Add(
          new ListItem(GetDescription(siz), Convert.ToInt32(siz).ToString())
        );
    }

    For more on this, see this great article, Mapping Text to Enum entries By Reto Ravasio

    -Brendan

  • The OBP API for WebServices

    There's a good debate going on between Dare Obasanjo and Don Smith about the OBP (one big parameter) approach vs. messages with multiple params to designing Web Service endpoints.  If you've taken a look at WSMQ's API, you already know which method I prefer.  In fact, it's one of the big reasons why, personally, I hope developers will choose WSMQ over Amazon's Simple Queue Service.

    -Brendan

    P.S. Speaking of WSMQ, look for some announcements next week on the project!  Big changes are in the works!

  • Don't Hate Oracle Because it's Beautiful

    I'm disappointed in all the Oracle criticism from the .NET blogging community.  I'll list and number my reasons for you so you can just flame me by number:

    1. It's the tools, not the database engine itself that really suck. Bashing Oracle based on installers, SQL +, or any other tool is like bashing your new BMW because all your wrenches are standard, not metric.
    2. If you hate the installer, you probably shouldn't be installing Oracle in the first place.  What's anyone other than a DBA doing installing any database anyhow?
    3. If you hate the tools for design, get yourself a copy of ERWin. If you can't afford ERWin, you can't afford Oracle either. 
    4. No matter how fancy the IDE tools are, all you really need is a simple interface like Query Analyzer/SQL+ anyhow. 
    5. Oracle runs on multiple platforms.
    6. Oracle has *always* worked, SQL Server has only really worked since version 7

    Oracle won my heart when it worked, and worked, and worked, back when SQL Server just crashed, and crashed and crashed.  Now, I use SQL Server 99% of the time, and yes, it's good.  I love SQL Server too, but we’ve got to stop the Oracle bashing.  I'm not against bashing software, but there's much better fodder out there if you're up for some good 'ol software bitching.  Bashing something as respected as Oracle, just makes you look like you don't know what you're talking about, at least in the area of enterprise databases..

    -Brendan

More Posts