Latest Posts

  • Unit Testing the MVC4 Account Controller
    In my previous post, I touched on the subject of the new MVC4 account controller and its use of SimpleMembership. While that post is not directly related to this one, I would like to go into more depth about the account controller and show one way you might go about unit testing it. One of the firs
     
  • Including Asp.net Simple Membership Tables as Part of Your Entity Framework Model
    Simple Membership is a membership system originally created for Web Matrix but is now being used by some of the Asp.Net project templates. When using Asp.Net along with the Entity Framework, it would be very nice if you could access the database tables created for SimpleMembership just like you woul
     
  • Running NBlog on Windows Azure
    In an attempt to get back into some regular cadence of blogging, I decided to refresh the look and functionality of my blog. I decided to switch over to NBlog as my blogging engine and Windows Azure as my host. Getting NBlog up and running on Windows Azure turned out to be pretty simple and only req
     
  • Introducing Stacky: A .Net Client Library for the StackOverflow API
    Looking back at the various open source projects I have started, I am starting to see a pattern. When I use a REST API provided by a given web site, I end up writing a full-fledged client for that library if one doesn’t exist. There is something I really enjoy about writing wrapper libraries. In an
     
  • Recent Must Haves
    There are a couple of things lately that I enjoy so much that I feel I need to share them with others. This American Life http://www.thisamericanlife.org This is a free podcast of a public radio show which features stories about everything from stories about being switched at birth to the cruelty
     
  • For The Kids
    The things you do for your kids: I put this song in a playlist we play to help our 8 month old sleep. Now the play count is embarrassingly high. I am very tempted to use the reset play count feature of iTunes to cover my tracks…
     
  • Code I Almost Wrote
    The only thing scarier than the code I actually write is the code I thought of and decided not to write. Actually, that is not true. The code I write is always perfect. Until I decide to change it later and make it more perfect. Today I was writing a small console app which I wanted to run indefini
     
  • Microsoft Year One
    I can’t believe it but as of today I have already been at Microsoft for a whole year. It really has been a great year. Moving up to Washington from San Diego happened so fast my head was spinning for the first couple of months. Now that we feel more settled we really like it up here. What I Have
     
  • Paparazzi For Nerds
    Being a relatively new employee at Microsoft, I have really enjoyed getting to know the culture and the wide array of people that work for Microsoft. To that end, I really enjoy the web site Microspotting which chronicles some of these interesting people. I was hooked as soon as I saw Golden Helmet
     
  • Hidden Gem in .net 3.5 SP1 Announcement
    There is some great stuff hidden in Tim SneathÁ€™s post announcing the WPF aspects of the .net 3.5 SPI release: It's been a long time in coming, but we're finally adding the much-requested DataGrid control to WPF. This will ship out-of-band at first, just after we release 3.5 SP1Á€¦ ...Ano
     
  • Vote to Improve Sql Management Studio
    I rarely write feedback to product teams but today I decided that I have had enough of this Identity Specification nonsense. How often do you create tables in Sql Management Studio which have some sort of identity column which is a primary key and an auto incrementing integer. Unless I am way off ba
     
  • SubSonic BlogProvider for BlogEngine.net
    One of the things I love about BlogEngine.net is that it is built with extensibility in mind. On example of this extensibility is the ability to customize the provider which it uses to retrieve and persist posts, pages, categories, etc. Currently there are two providers that are supported out of th
     
  • Dotnetkicks Penance
    I am a big fan of Dotnetkicks. I have found several interesting articles written by mostly lesser known authors (like myself) on that site. I have also received the benefits (more traffic) of getting some of my articles on the front page. As has been discussed previously, the Á€œDotnetkicks EffectÁ€« is
     
  • Some of My Favorite Extension Methods
    There has been some discussion about extension methods and how they should be used and when. Personally, I try to use them when it will increase the readability of my code. A common candidate for extension methods is the static helper method. These mostly take the form of something like: public sta
     
  • New Server for My Blog
    Dont worry - the address and rss feed for my blog will remain the same. I have just moved from wordpress.com to hosting my own blog using BlogEngine.net. I just got too tired of the lack of customization available on wordpress.com. I have to say, the move was much harder than I had anticipated. Get
     
  • Finding Out which Groups a User is a Member Of When Using Windows Authentication in Asp.Net
    When using Windows authentication with Asp.net, I often need to know which active directory groups a user is a member of. Now I know that you can do something like: if (User.IsInRole("Admin")) { //Give Access to Secrets } The problem with this is you need to know the name of the group ahead
     
  • What I Miss
    So I have been living up here in Washington for about 5 months now and I am really missing some of the food I am used to in San Diego. In no particular order they are: In N Out Lolita's Taco Shop Phil's Barbeque Hopefully it is just a matter of having to learn about the local spots up here for
     
  • Using BlogEngine.net as a General Purpose Content Management System - Part I
    So I keep running into the same problem - I am building a small website for somebody (in this case, my Mom) and I need to provide them with a way to update the content of their site so I don't have to. Basically, I need a lightweight and flexible content management system that is easy to use. In th
     
  • YUI: I Officially Can't Keep Up
    First off, congratulations to Eric Miraglia and the YUI team - they have just announced the release of YUI 2.5.0: The YUI Team just released version 2.5.0 of the library. WeÁ€™ve added six new components Á€” Layout Manager, Uploader (multi-file upload engine combining Flash and JavaScript),
     
  • Google Charts for Asp.Net now on Codeplex
    I have received very positive feedback on my Asp.Net control for Google charts so I decided to place it up on Codeplex to allow people to participate and add code to the project. I am currently working on a project roadmap so please let me know if you are interested in participating. One feature I
     
  • C# Language Improvements: Know What You Are Getting Into
    The C# language has changed a lot since its initial release in 2000. C# 2.0 brought us: Generics Iterators Anonymous Methods Partial Classes Nullable Types Static Classes Property and Indexer Accessibility Changes C# 3.0 brought us: LINQ Automatic Properties Object and Collection Initializers
     
  • Microsoft + Yahoo! and My Affair With YUI
    If you read my blog regularly, there are two things you may or may not know about me: I work at Microsoft I love the Yahoo User Interface Library So today's big news that Microsoft has offered to buy Yahoo! for 44.6 billion dollars speaks to both of these facts about me. This is obviously big ne
     
  • C# Enum Craziness: Sometimes What You Expect Isn't The Case
    I learned something new today about enums that I find really weird. Lets start with the following test enum: public enum Action { Run = 2, Walk = 4, Crawl = 8 } and then some code to do something with that enum: static void Main(string[] args) { Console.WriteLine((Action)2);
     
  • Associating Strings with enums in C#
    I have seen other great articles out lining the benefits of some pretty clever and useful helper classes for enums. Many of these methods almost exactly mirror methods I had written in my own EnumHelper class. (Isn't it crazy when you imagine how much code duplication there must be like this out the
     
  • Useful Code Snippet: Web Property
    Write WebControls much? Well, I do and I have a code snippet that I pretty much can't live without. It is used for creating ViewState backed properties. Here is the basic pattern I use when creating properties for my web controls: public string Name { get { object o = ViewState["Nam
     
  • Windows Vista Ultimate Extras - Sometimes the Truth Hurts
    Long Sheng has posted a very humorous and clever post about the lack of Windows Vista Ultimate extras. http://www.istartedsomething.com/20080109/ultimate-extras-inactive-reminder/ I really respect the way that he states the facts and doesn't resort to anger. I also love how he has suggestions for
     
  • I Was Given the Gift of Smugmug Customer Service
    In my previous post, I outlined a little trouble I ran into trying to purchase a friend a Smugmug account as a gift. Well, I am happy to report that the folks at Smugmug responded amazingly and have managed to show how much they care about their customers (as well as potential customers)...I guess t
     
  • Why Won't You Let Me Give the Gift of Smugmug?
    Ok, so here is the story. I have some friends that are having a baby soon so I thought a good Christmas gift to give them would be a subscription to a photo sharing web site so they could share all their photos of them and their new child. Since I have a Flickr pro account and love it, I figured I w
     
  • You Know You Are An Influential Blogger When...
    Sometimes it is hard to see threads of discussions in blog land because you may only be reading a subset of the blogs involved in the discussion. In this case, I just happened to be subscribed to many of the blogs in this thread. First let me lay out the timeline of posts: Jeff Atwood published
     
  • Finally - Asp.Net MVC
    For those of you who have been following the new Asp.Net MVC (Model View Controller) framework know how much developers have been chomping at the bit (no pun intended) to try out new framework. Well, that day has finally arrived! ASP.NET 3.5 Extensions preview For those of you who haven't been fol
     
  • Productivity Tip: Copy As Path
    Here is a quick little tip I just learned that I use all of the time now. In Windows Vista, if you hold down the Shift key and right click on a file, a new option appears in the context menu: "Copy As Path" This will copy the full path of the file you select to the clipboard. This is very handy f
     
  • Asp.Net Control For Google Charts
    Google has launched a new service which allows you to very simply build charts for any web application. Their design decision to make an interface to their service which is all based on the format of the query string is very interesting to me. Basically, you send them a Url and they return a PNG ima
     
  • Productivity tip: Visual Studio Smart Tags
    In Visual Studio 2005 they added a feature that is very useful - when you type the name of a class, if you have the assembly for that class referenced but you don't yet have a using tag in your file, it can add it for you. This is accomplished using a Smart Tag (much like the smart tags in Microsoft
     
  • Life Changes So Fast
    If Scott Hanselman and Phil Haack can do it then why can't I? That's right, I am joining Microsoft on the Windows reliability team as an SDET. The craziest part is it has all happened so fast that I am not sure the best way to prepare to move from San Diego to Washington in two weeks. I am very exc
     
  • Welcome to BlogEngine.NET 1.3 with MSSQL provider
    If you see this post it means that BlogEngine.NET 1.3 is running and the SQL Server provider is configured correctly. Setup If you are using the ASP.NET Membership provider, you are set to use existing users. If you are using the default BlogEngine.NET XML provider, it is time to setup some users.
     
  • Is Ruby the new Perl?
    I just now completed the ruby tutorial over at try ruby! and I couldn't help but think how much ruby is like Perl. My first programming jobs in college were using mostly Perl so I have some (mostly) fond memories of how easy Perl made some tasks. I know I am late to the party when it comes to checki
     
  • Asp.Net Ajax: How do you know all of your Ajax calls have completed?
    Some Background Here is a situation I ran into recently: I have an Asp.Net Ajax service (.asmx) which has a method used to create rows in a database similiar to: [WebMethod] public int CreateItem(string description, double value) This method basically created a row in the database and returns th
     
  • Using JQuery to Make Asp.Net Play Nice with Asp.Net
    I have found that developing an Asp.Net application that makes heavy use of javascript is very difficult. One of the major pain points is dealing with the horrendously long ids that Asp.Net server controls generates. For example, the following Asp.Net markup: <asp:TextBox ID="myTextBox" runat="s
     
  • Microsoft Ajax Enabled Web Site Organization Patterns
    Lately I have been writing a lot of code utilizing the Microsoft Ajax framework. This means that I am writing "Ajax Services" to handle my asynchronous callbacks. Ajax Services is a term I heard from Rob Bagby which emphasizes the fact that while these services are generally in a .asmx file and the
     
  • Addictive Applications
    I made the mistake of reading this post from Jeff Atwood's blog Coding Horror. What was the mistake? Well, it was clicking on the link to Geni - a family collaboration site. Not only did the developers at Geni remove the login barrier, they also made a very addictive application. So go ahead. Do it
     
  • Book Review: Smart And Get Things Done by Joel Spolsky
    I just recently finished the book Smart and Gets Things Done: Joel Spolsky's Concise Guide to Finding the Best Technical Talent. Joel Spolsky is the author of the very popular blog Joel On Software and owner of Fog Creek Software. This is another one of those books that is very unique when it comes
     
  • Book Review: Don't Make Me Think by Steve Krug
    I know I am probably late to the game but I have just completed reading through Don't Make Me Think by Steve Krug. I have recently become very interested in learning more about what I can do as a developer to improve the user experience of the apps I write. The thing is, I am not and will never be m
     
  • Southern California Code Camp In Review
    This past weekend I attended the Southern California Code Camp and I had a great time. This is the second code camp I have attended and I am continually amazed at the quality of the sessions. For those of you who don't know, code camps are completely free events where the sessions are all made of of
     
  • Windows Vista: A prisoner in my own computer
    Well, I have had Windows Vista installed on my development machine for about 5 months now and feel it is time to reflect on my experience. As you may infer from my post title, there are many things I don't like. There are, however, many things that I do like so I will start with those. User Interfa
     
  • Is Hand Written Xml Too Much For Mere Mortals?
    I am currently working on a project that requires the editing of information in a very free flowing way (like in Word or Excel) but has very strict data and validation conditions as well. I have considered many different mechanisms/interfaces which would allow a reasonable amount of freedom on the u
     
  • Yui.Net: The Tooltip
    As part of my ongoing series covering the Yui.Net library (an asp.net wrapper for the Yahoo User Interface Library), today I will cover a fairly simple but useful component - the ToolTip. This component is exactly what you would expect it to be - a ToolTip which you can associate with any element
     
  • My Learning Todo List
    Asp.Net Alternative All of this talk about Asp.Net being a leaky abstraction and having an overly complicated page lifecycle, I have been considering looking at some alternatives to see what all the fuss is about. I am one of those developers who has taken the time to learn a lot about the page lif
     
  • Codesmith 4.0 Feedback and Feature Requests
    Codesmith is a product that I have considered purchasing multiple times in the past. It seems to be the code generations suite that has the best community built around it and I think that is a very import aspect of any software I purchase. Every time I download the trial of Codesmith, my trial expir
     
  • Child Collections in Asp.Net Custom Controls
    I have been developing custom web controls for many years now and I am just now getting comfortable with many of the advanced features afforded by the rich System.Web.UI.WebControls namespace. One feature I have implemented many different times over the years is having a web control which contains a
     
  • DelimitedList - a useful utility class
    There are several classes which I have written over the years which have become almost like my own personal BCL when developing .Net projects. I think most people have these classes laying around in some form or fashion. In fact, I have joined a formalized effort led by Steve Wright to make an open
     
  • YUI.Net: Calendar Control
    The first control I will highlight in the Yui.Net control library is the calendar. I find that I often need a client side calendar control to allow users to just choose a quick date without having to deal with the overhead brought on by the Asp.Net calendar control (ViewState, Postback, etc). When I
     
  • Asp.Net Controls for the Yahoo User Interface Library
    I am a big fan of yahoo! and how they handle their developer resources. They release APIs for most of their services free of charge and their documentation is always top notch. One of my favorite developer resources they support is not a service but a group of javascript libraries called the Yahoo U
     
  • A New Custom WPF Panel: SpanningStackPanel
    Nick Thuesen has just published a new custom WPF panel that functions like a stack panel but takes up the entire space provided to it. I love to see new custom panels come out. I think there should be a Codeplex project for custom WPF panels. Maybe if I write any clever ones of my own I will start o
     
  • My version of sombody else's code: Finding the Index of an item in a Drag Drop operation
    While working on an application that requires drag and drop, I ran into trouble when trying to figure out where in the target list (in my case, a ListBox) to insert the dropped item. I ran across Josh Smith's article Drag and Drop Items in a WPF ListView which covers (quite nicely) how to handle dra
     
  • Why Not
    I'll bite. In the name of science. http://acephalous.typepad.com/acephalous/2006/11/measuringthes.html
     
  • The Spice of Life
    Sometimes it can be a pain to subscribe to Rss feeds which are collections of many different authors. For instance, back in the day, I subscribed to the main MSDN feed and it was just to laborious sifting through all posts to find just what I was interested in. Not to mention the 100 obligatory "M
     
  • My Journey Through "Applications = Code + Markup" Part 2
    Ok, so I haven't been writing as often as I had anticipated about my journey through Applications = Code + Markup by Charles Petzold. Since my last post Petzold has posted some reactions to some of the common criticisms of his book. It is definitely worth a read. I read through the first part of
     
  • Netidentity Email Migration Nightmare: Update
    Last week I wrote about how my email provider Netidentity had completely messed up a migration with their web email system and left thousands of user without their paid for email service. Well, after 5 days with no email I did finally gain access to my email. So how did my email get fixed? Did the
     
  • Netidentity.com's Email Migration Nightmare
    Back in 1998 or so, I decided to see if the domain name for my last name was available for purchase. To my surprise (my last name is not that common), a company called Mailbank ha purchased the domain and was selling email addresses and web space on the domain for $5/year. That seemed like a small
     
  • My Journey Through "Applications = Code + Markup"
    I finally received my copy of Applications = Code + Markup by Charles Petzold. It is rare that I buy a computer book with so much anticipation and desire to just sit down and read it cover to cover. The last time I had this feeling was with Framework Design Guidelines by Brad Abrams and Krzysztof
     
  • How to Traverse the Control Tree in Asp.Net with C# 2.0
    I couldn't find any easy way to traverse the entire asp .net control tree using the framework classes, so I decided to write my own implementation. In the end, I wanted to be able to traverse all of the controls and get all which are of a certain type. First, the method which traverses the tree:
     
  • How Much Does The Name Of Your Blog Matter?
    I have noticed a curious thing lately. The actual name of the blogs I read have to do with my perception of them. Let me explain. I use NewsGator integrated with Outlook as my rss reader. When I come into work in the morning, all of the blog posts since the end of the previous work day are downloade
     
  • Snakes on a Phone
    I doubt I will go to see this movie in the theaters, but you have to admit the marketing and internet buzz about Snakes On A Plane has been pretty amazing. The best part? You can have Samuel L. Jackson call anybody you like and remind them to see the movie.
     
  • You Had Better Watch What You Say In Public
    I just recently discovered a couple of websites that have completely changed the way I think about life in this Wikipedia/Digg/YouTube society we are now living in. The sites I have discovered came from listening to Scott Hanselman's podcast called Hanselminutiae #2. In this podcast, he mentions a s
     
  • A Little Birdie Told Me About Steve Jobs
    I wanted to write my views on the whole Windows Vista vs. Mac OS Leopard but Paul Thurrott has done a better job than I could have ever dream in his article Apple Mac OS X Leopard Preview: Who's the Copycat Now?. It is good to know that somebody can still be objective and seek truth in the OS religi
     
  • Buy Our Condo
    Hey, if Robert Scoble can do it, why can’t I? We have done a lot of work on our place but now we have the chance to buy a house. So here is our Condo for Sale.
     
  • Data Binding in Windows Presentation Foundation
    Hopefully this is just part of the pains associated with trying to use beta software, but I can't find good documentation on data binding in Windows Presentation Foundation. I have found multiple examples of how easy it is to bind to an Xml data source but I have never had a need to bind to Xml data
     
  • Greg Laswell
    Back in college, I saw these 3 guys with guitars playing these catchy songs at some event and I was immediately hooked. I went to watch that same band, known as Simpl, many times in coffee shops and such. The three members were Tim Timmons, Chad Lansford, and Greg Laswell. Greg and Chad later went o
     
  • Using Reflection in Asp.Net 2.0 Web Applications
    I have been searching far and wide for this solution for a long time and I just sort of happened upon it...so I thought I would share it here. One of the big changes from Asp.Net 1.1 to 2.0 was the format of their web projects. I actually really like the new format alot. There was, however, one prob
     
  • Funny, useless sites
    I love the fact that people spend so much time and effort just to humor others. http://www.stuffonmycat.com http://www.chucknorrisfacts.com