Archives

Archives / 2006
  • Scott Guthrie presents at NDDNUG

    Scott gave a whirlwind presentation to a standing room only crowd at the North Dallas Dot Net User Group tonight. A wide range of topics were covered from IDE tips and tricks to ASP.NET tips to MS AJAX to LINQ and DLINQ (I still like to call it DLINQ rather than LINQ to SQL). I'm still not sure how all this got packed into a little over 2 hours. :)

  • ASP.NET AJAX 1.0 (excitement builds)

    I just downloaded beta 1 of ASP.NET AJAX today. Wow! Lots and lots of changes. The type system has been greatly simplified. I like this. The move to prototypes over closures was a good decision. The core scripts are much easier to read and comprehend as well. The CTP download has been a 404 for me this evening so I haven't had a chance to dive into it.

  • Problems with RewritePath and Search Engines.

    We just recently launched the new version of LearnVisualStudio.NET. The implementation uses the RewritePath method to serve up dynamic pages based on templates. All of our pre deployment testing showed that this was all working without a hitch. Once we deployed to production however it became clear which test cases we had left out. We didn't test how the site responded when getting crawled by search engines.

  • Made the switch to Vista

    Well I took the plunge this weekend and installed the August CTP (build 5536) on my MacBook Pro. I know, I couldnt wait for RC1 to be posted to MSDN. So far everything has been running smoothly. Due to the nature of working on LearnVisualStudio.NET I have all of my dev tools in VMWare so changing out primary OSes is actually a breeze for me.

  • Remote workers and Agile/SCRUM/XP

    Andrew raises the question: What is the impact of the remote worker on Agile approaches?

    A couple of months ago I started working with Bob on LearnVisualstudio.NET. We are just about ready to launch a major redesign of the site. The development process for this redesign may not have been text book Agile but there were moments where we were definitely pair programming. Now what I havn't mentioned is that we were never in the same room. He is at his house and I am at mine. Both of us are in Dallas and the web design guy, Dustin is in Chicago! So how is this possible? Well, heres what we did:

    I set up a VMware image with Win2k3 server + dev tools. This image was configured pretty much the same as the production server. Dev SSL certs and all. I installed Tight VNC so that we could easily share the desktop. I installed shortcuts in the VM that would allow each of us to connect to the others version of the web site as well as connect to thier desktop with VNC. Source control was preconfigured in the VM to connect to our Vault server. This setup has created a consistant dev enviroment for each of the team members.

    We pretty much exclusively use google talk  to do text and voice chatting. When we have to have a voice conference with Dustin we use Skype. Looking at my google chat logs I can see several occasions where one of us would say something like: "Hey can you come on over to my VM?". This usally initiates a little pair programming session or a design review etc.

    This setup is working very well for our small team (2 devs, 1 web designer). To some degree this is working better than when I was in an office sitting right next to other devs. I can't really say how well it would work for larger teams or more complex projects. But I can say that is very easy to try out. All you have to do is install some software and give it a try.

    Tools Link-o-rama:

  • A great article on functional programming...

    http://www.defmacro.org/ramblings/fp.html

    This article was a great overview of many of the aspects of functional programming. With what Micosoft is doing to the CLR and C# and VB it would seem that functional programming is making advances into the main stream. His article has imaginary Java samples and if you squint your eyes when he creates a class to hold a function you can see delegates.

    I studied functional languages such as LISP and ML in college but quickly lost track of them after years of programming in corporate IT. To catch back up I've been spending the better part of a year studying functional programming concepts. While its been challenging at times, there have been alot of aha and oh yeah moments.

    Since I have a great comfort level with C syntax I started my ride on the functional wagon with COmega. This is where I really began to "get" things like closures. I even found myself purposfully writing my own code to mimic a closure in good ol C# 1.0 for certain situations like Regex match evaluators. Once you see the "patterns" that higher order functions exhibit you can write them in plain imperative code. This will make you hunger for language constructs to do this work for you. Its like writing OO code in assembly language.

    C# 2.0 Added true closures to the language with anonymous delegates. Woo hoo no more private nested classes to hold lexical context! (at least not that I write).

    At PDC I got to see the preview of C# 3. This takes anonymous delegates a step further with "lambdas". There's lazy evaluation galore with LINQ. It would seem that MS has been bitten by the functional bug. Even the Atlas client APIs make good use of the functional elements of JavaScript.

    I've also ventured out into IronPython and Ruby. These are great places to practice functional programming techniques.

    The real challenge moving forward is finding the right balance. Theres no doubt in my mind that functional programming techniques are headed to the main stream. With the populatrity of Ruby and Rails and Microsoft adding functional capabilites into C# and VB the winds of change are blowing.

    Link dump so I can keep track of what I'm researching:
    COmega: http://research.microsoft.com/Comega/
    LINQ: http://msdn.microsoft.com/data/ref/linq/
    F#: http://research.microsoft.com/fsharp/fsharp.aspx
    IronPython: http://www.codeplex.com/Wiki/View.aspx?ProjectName=IronPython
    Ruby: http://www.ruby-lang.org/en/
    Ruby.NET: http://www.plas.fit.qut.edu.au/rubynet/
    IronRuby: http://wilcoding.xs4all.nl/Wilco/IronRuby.aspx
    RubyCLR: http://www.iunknown.com/articles/2006/06/19/rubyclr-drop-4
    Atlas: http://atlas.asp.net/Default.aspx?tabid=47
    #Smalltalk: http://www.refactory.com/Software/SharpSmalltalk/index.html
    brianbec's blog:
        http://weblogs.asp.net/brianbec/default.aspx
        http://weblogs.asp.net/brianbec/archive/2006/06/01/Lambdas_2C00_-Closures_2C00_-Currying_2C00_-and-All-That.aspx


  • Microsoft Robotics Studio ?!?

    Just ran across this on my daily news rounds:

    http://www.eweek.com/article2/0,1895,1978917,00.asp

    I think Lance and I saw some of this stuff at PDC. I dont think they had all the tooling around it but this def sounds pretty darn cool.

    I cant wait to start programming some lego robots with my son!


    Doh! Erik beat me to it: http://weblogs.asp.net/eporter/archive/2006/06/20/Building-Robot-Software-Using-Microsoft-Robotics-Studio.aspx

    He's even got links to channel 9 videos.

    Resources:

    Tech Preview

    Channel9 Video

    Similar:
    RobotC

  • Patterns in .NET

    Andrew makes some obversations about MVC in the .NET world.

    I too have been delving into OO principles and patterns over the last couple of years. I'm still getting my head around the ups and downs of page vs front controller. ASP.NET uses a page controller pattern and frameworks such as Struts, Rails, and several PHP frameworks use the front controller pattern.

    There's some really good reading on these patterns in Fowler's Pattern of Enterprise Application Architecture. Also read everything you can on www.martinfowler.com.

    You can still implement front controllers in ASP.NET using an HttpModule or .ashx. The thing that turns people off to this is you ditch most of the IDE support for designers and most of the features that webforms give you (viewstate, postback etc). This is where you have to look around at some other frameworks that implement a front controller. Castle MonoRail and Spring.NET are two major ones that I have found.

    MS also seems to be getting more an more on the OO/Patterns bandwagon ever since .NET was introduced (Or maybe this is just when I started the transition). For example, the provider model in ASP.NET 2.0 is really awesome. You should def be using it to decouple your web tier from your biz/data tier. Check out this MSDN article on the provider pattern.

    If you want to go swimming in an ocean of patterns take a look at Enterprise Library 2.0. Lots and lots of good stuff in there.

    Another great book on practical application of patterns and refactoring to existing code is Feather's Working Effectively with Legacy Code.

  • Web Deployment Project frustration turning to enlightenment.

    Thanks to some great suggestions by Scott and others I have put aside any fears/laziness of delving into the msbuild script and managed to come up with an alternate way of changing web.config settings as part of the build process. While the web.config replacement stuff works for me at the moment, I like having this method around since it can be used to vary any kind of output as part of the build.

  • Frustrations with Web Deployment Projects

    Web deployment projects are an elegant way of integrating the compilation of an asp.net web site into a build process. I was initially really impressed with the msbuild task that replaces sections of your web.config at build time. Unfortunately  this feature is starting to dissapoint. As this forum post points out it is fairly limited in scope as to what sections it can modify. I recently tried getting the deployment project to update the system.net/mailSettings section. I have yet to get it to modify this section. The build will just fail saying that it cant find system.net/mailSettings. This shouldnt be this hard. I hope I'm totally missing something and the rest of this post can just be ignored.


    Ok, Im the moron on this one. under is a group not a config section as I orginally thought. Once I changed the deployment project to this:

    system.net/mailSettings/smtp=mailSettings.config;

    It worked like a champ.

    So the moral of this story is check, double check and triple check what type of node you are trying to replace in the deplyment project.

    I'm still not sure why it matters what type of node you are replacing.

    Update: Some good ideas here for more advanced scenarios.

  • How the ProfileCommon class gets compiled

    Lance and I were puzzling over the magic that happens when you configure the profile provider in asp.net 2.0. As you may or may not know it codegens a strongly typed class called "ProfileCommon" when  you set up the properties in the web.config. Our question was how is this codegen happening and how is it that I'm getting intellisense at design time.

    We both immediatly thought of the build providers. Those are plugins to asp.net that are used to generate code and compile specific file types. (e.g. web references, resxs etc.). You can write your own as well which is very cool. Anyhow this made the most sense but upon inspecting the main web.config there was no such build provider configured:

       1:  <buildProviders>
       2:      <add extension=".aspx" type="System.Web.Compilation.PageBuildProvider" />
       3:      <add extension=".ascx" type="System.Web.Compilation.UserControlBuildProvider" />
       4:      <add extension=".master" type="System.Web.Compilation.MasterPageBuildProvider" />
       5:      <add extension=".asmx" type="System.Web.Compilation.WebServiceBuildProvider" />
       6:      <add extension=".ashx" type="System.Web.Compilation.WebHandlerBuildProvider" />
       7:      <add extension=".soap" type="System.Web.Compilation.WebServiceBuildProvider" />
       8:      <add extension=".resx" type="System.Web.Compilation.ResXBuildProvider" />
       9:      <add extension=".resources" type="System.Web.Compilation.ResourcesBuildProvider" />
      10:      <add extension=".wsdl" type="System.Web.Compilation.WsdlBuildProvider" />
      11:      <add extension=".xsd" type="System.Web.Compilation.XsdBuildProvider" />
      12:      <add extension=".js" type="System.Web.Compilation.ForceCopyBuildProvider" />
      13:      <add extension=".lic" type="System.Web.Compilation.IgnoreFileBuildProvider" />
      14:      <add extension=".licx" type="System.Web.Compilation.IgnoreFileBuildProvider" />
      15:      <add extension=".exclude" type="System.Web.Compilation.IgnoreFileBuildProvider" />
      16:      <add extension=".refresh" type="System.Web.Compilation.IgnoreFileBuildProvider" />
      17:  </buildProviders>

    So what gives? Well Luts Roeder's Reflector to the rescue (again). It turns out that a build provider is being used but its added dynamically in code by the CodeDirectoryCompiler:

       1:  internal class CodeDirectoryCompiler
       2:  {
       3:      private void FindBuildProviders()
       4:      {
       5:            if ((this._dirType == CodeDirectoryType.MainCode) && ProfileBuildProvider.HasCompilableProfile)
       6:            {
       7:                  this._buildProviders.Add(ProfileBuildProvider.Create());
       8:            }
       9:            VirtualDirectory directory1 = HostingEnvironment.VirtualPathProvider.GetDirectory(this._virtualDir);
      10:            this.ProcessDirectoryRecursive(directory1, true);
      11:      }
      12:  }


    Now, why this is done this way and not with the standard buildProvider config section is still a mystery. My guess is that it has to do with the config that it is compiling exisitng in the web.config file. Which is a minor detail that I wish was differnet in the ProfileProvider stuff. I would have rather had a .profile file in the App_Code folder. Oh well not that big of a deal.

  • Windows graphics system to be overhauled post Vista

    I just found this interesting article on some of the limitations in WDDM 1.0. Looks like most of the issues are around GPU multitaksing where generation 1 will be mostly cooperative multitasking. With some hardware improvements and subsequent software releases things will become more pre-emptive.

    Man, how long is it until we are running a complete 2nd computer + OS on our video cards? Will we see display devices in the future that build in the gfx hardware? So you just plug all 9 of your monitors into a highspeed serial cmd bus (USB9) and let the parts of your "computing grid" that are doing general program execution send their display commands to any remotly connected display. The future is bright friends. Just wish it was here now.

  • See Windows Vista

    Just came across http://www.seewindowsvista.com/. Looks like MS has put up a collection of videos to show off Vista. It's pretty funny seeing Tom Skerritt introducing the demos. If you just sit on the home page for a bit and dont click anything he starts nagging you. :)

    Most of the demos seem really geared towards business  and all are using WPF heavily. The virtual books from the British library look really cool even if it does harken back to the Saturday Night Live sketch. Go on over and take a sip of the kool-aid.

  • Windows Live OneCare is finally out...

    Nice to see that OnCare has made it out into the wild. I was on the beta for OneCare and found it to be very usable. I've used Norton AV and McAfee virus scanners in the past. I really have not liked the 3rd party antivirus apps because they eat up alot of resources and cause compatibility issues. OneCare seemed to play nice and I didnt notice any system degradation while using it. If your still riding bare back I highly suggest you try out OneCare.

    P.S. another really nice light weight virus scanner is portable clamwin. It's free and can run from your usb thumb drive. Good for those times when you have to play IT guy for your family or friends. :)

  • No more codeplex for me...

    I tried the forgot my password option and codeplex sent me the email with the link to reset my password. I clicked it and went to the page that let me specify a new password. When I submitted the form it took a long time and eventually just died with no response. (Just aborted the connection, Fiddler showed that it didnt respond with any data.). Now my account is locked out. I sent the codeplex guys an email via the contact us link about a week ago and still havnt recieved a reply. I guess I have to create a whole new login with a different email address if I want to continue trying codeplex.

    Has anyone else been able to successfully use the forgot my password option?

  • Windows Vista Photo Gallery frustrations

    I have about 20gig of digital photos. And I'm constantly adding more pictures from my Canon Digital Rebel. I am really looking forward to the Windows Photo Gallery app in Vista. I just installed Vista beta2 and the app seems to run really well.

    I have one big complaint though. The photo import for digital cameras. Why do all the photo apps insist on using the "film roll" metaphor? They all seem to want to organize the filesystem storage based on the date that you import them into the photo app. This is my biggest complaint about iPhoto as well so I'm not just picking on MS. ALL digicams these days stamp the date and time of the picture in the EXIF data. Why cant we use this data for naming the folders and files? Windows Photo Gallery can use this data but in a VERY limited way. I have all my photos organized like this on the file system:

    My Pictures\2006\May\2006-05-01 12-05-37_1.jpg
    or
    My Pictures\Year\Month\YYYY-MM-DD HH-MM-SS_#.jpg
    This makes it very easy to make backups of the photos because they are organized by the date and time they were taken. In the age of 1-8Gig flash cards you can take alot of pictures before importing them so the date that you get around to loading them onto the computer really has little or no meaning. This system works really well when you have tons of photos. I'll use tagging features of photo apps to organize by event types and such. I can use photo gallery to tag the pictures as "birthday" and such. But when it comes to the filesystem structure I need more control!

    It's worth noting that no photo manager out there really supports photo renaming and filesystem organizing very well. This is why I have to use Downloader Pro today.

    I really hope MS gives me more options for naming the folders and files during the photo import process. If its too hard for the grandmas to use just bury it in an advanced dialog or something I dont care. As long as I can  get the filesystem structure above I'll be happy as a clam.

  • Good writeup on CodePlex and Team Explorer

    bsimser has a good writeup on CodePlex and Team Explorer here.

    It would seem that Team Explorer still works with any TFS. I'm still in shock that MS actually did this. Now I just have to get everything set up and give it a spin.

    bsimser says that the Team Explorer client comes with TFS. I just finished downloading the CD image and I'm having problems finding a stand alone server install. I know that on MSDN theres a 5 user version of TFS that you can download separately.

  • Are you using Context.RewritePath and having problems with Themes?

    Well I sure was. I was rewriting paths in a sub folder to a single template page in the root of the site. This really monkeyed up all the paths to the App_Themes folder. None of the images or css links worked anymore. Then I found that ASP.NET 2.0 added an overload to RewritePath that takes a second param to tell it whether or not to change the virtual path. Setting this to false fixed everything!

    Check it out here: http://msdn.microsoft.com/en-us/1kz7fdx9.aspx

  • My portable thumb drive toolbox as of May 2006

    Here's a list of my current usb thumb drive build out of portable apps and tools:

    1. Locknote - for all my little secrets (passwords and such)
    2. Portable Firefox
      • Extensions:
        ===========
      • Tabsidebar
      • Gmail notifier
      • Copy plain text
      • Google toolbar
      • Tiny url creator
      • Tag editor
      • DeepestSender
      • Answers
      • Web Developer
      • Tabmix Plus
      • CoLT
      • Javascript Debugger
      • Google Notebook
    3. OperaUSB
    4. PortableThunderbird (email + rss aggregator)
    5. PortableSunbird (Calendar)
    6. Portable FileZilla
    7. PortableGAIM
    8. Notepad2
    9. SciTE
    10. Microburner
    11. Portable ClamWin
    12. ColorCop
    13. Lutz Roder's Reflector
    14. SnippetCompiler
    15. uTorrent
    16. TightVNC (server and client)
    17. Media Player Classic
    18. Autoruns
    19. DebugView
    20. FileMon
    21. RegMon
    22. Process Explorer
    23. Rootkit Revealer
    24. ZoomIt
    25. Bluescreen Screensaver
    26. Portable GIMP
    27. XAMP
    28. Instant Rails

    To tie it all up I have an autorun for PStart, a nice launcher that sits in the tray. Lets me assign hotkeys to the most commonly used  apps.

  • E3 thoughts...

    MS is kicking but and taking names with XBox 360. All the trailers and game demos on the marketplace was so cool. I love the live arcade games as well. Uno is alot of fun.

  • Starting the new job today...

    Well, I traded in the corporate uniform for a jeans and t-shirt startup. As of today I am officially working for learnvisualstudio.net. This change has been a long time coming and I'm sure Bob is glad the waiting is over. While I will certainly miss all the great people at my previous job (Mary Kay), this is a great opportunity for me. I look forward to having the time and responsibility to be more involved with the .NET community.

  • Going split personality...

    I just took the MacBook Pro plunge. I must say it was very sureal to go through the XP install on Apple hardware. I got all my VPCs running under XP and VS.NET 2005. Looks like it will make a pretty sweet development machine. Since I love to play with technology, I'm looking forward to having access to both OS X and Windows. Now I can do my Ruby on Rails experiments properly. :)

  • Atlas declarative blocks

    The text/xml-script declarative model is great. I'd just like to see it declared outside of the .aspx file. Semething like an "ajax" behind file.

  • Taking the dynamic language tour.

    I spent a good part of this weekend taking a tour of some of the most popular dynamic/scripting languages out there. I mainly looked at IronPythin and Ruby. Other dynamic languages that I've already used or researched are JavaScript and monad shell. My head is still spinning! :)

  • MSBuild, Team Build and the big lie

    MSBUILD : warning : Visual Studio Team System for Software Testers or Visual Studio Team System for Software Developers is required to run tests as part of a Team Build.

  • The Future of JavaScript.

    http://ajaxian.com/archives/the-future-of-javascript-an-update-from-brendan-eich

    I'm a big fan of JavaScript. It's amazing how versatile it is. Just look at all the AJAX libs that have popped up (e.g. Atlas). It's good to see that there is some thought being put into keeping this great programming tool up to date.

    Iterators and generics in .NET 2.0 has laid the foundation for things to come in C# 3.0 (LINQ). I'm kind of wondering if some of these JavaScript features could be built upon to add some LINQ like functionality to JavaScript.

    The article points out that there are many similarities between ECMAScript and Python. Admittedly I'm not that familiar with Python. I guess it's time I got serious with IronPython.NET. After many years of doing corporate web development with Microsoft tools (VB,C#,JavaScript) I've started to miss those college days of developing with many different languages for different kinds of problem domains. Thanks to things like JavaScript, Cw, IronPython and C# 3/LINQ my interest in other programming languages is peaking again.

    All this focus on programming languages lately has just reminded me that it is a great time to be a developer!

    If I have seen farther than others, it is because I was standing on the shoulders of giants - Isaac Newton