729 posts categorized under “Software Development”

  • Improving Method and Function Clarity

    Improving Method and Function Clarity

    Date Published: 22 June 2021

    (Originally sent to my weekly tips subscribers in March of 2019) When you look at a method or function, it should have a name that describes what it does. Naming things is hard but important, and probably the most important thing you can do when you design a method is give it a good name. This mainly applies to methods (or functions) that are or may be called from more than one place. It's less…


  • Prioritizing and Microservices

    Prioritizing and Microservices

    Date Published: 15 June 2021

    It's not unusual to have different levels of prioritization in backend systems. Imagine you have a process that generates and sends reports that users have requested. Some of these might be low-priority reports that are simply generated periodically so they're available to view, while others might be generated on demand, with a user actively waiting for the results. These could be further…


  • C# Generics Best Practices

    C# Generics Best Practices

    Date Published: 08 June 2021

    There was a time when C# didn't support generics. It was a dark time. Ragged bands of .NET developers roamed the harsh landscape, copy-pasting strongly-typed list implementations to avoid the evils of primitive boxing operations. Forced to choose between loose typing and explicit casts at every turn, would-be developers of strongly-typed object models somehow managed to endure and ship (mostly…


  • What If Product Owners Reported to Dev Teams?

    What If Product Owners Reported to Dev Teams?

    Date Published: 01 June 2021

    In most organizations, if there's a Product Owner, the dev team is generally subservient to it and charged with building whatever the Product Owner comes up with. That's not to say they aren't often "on the same team", but the flow of responsibility is usually the PO pushes new requirements and the developers respond to them. Sometimes this relationship, even if only implied, has ramifications for…


  • VS Code Disable Logging Loading Symbols

    VS Code Disable Logging Loading Symbols

    Date Published: 25 May 2021

    When I create a new .NET (5) console application and run it in VS Code, I get output like the following: This is just a lot of noise that adds no value and I'd like to disable it so I can see the actual output of my program. Fortunately, there's a simple way to do this - just add a setting in your file: Here's the relevant setting if you just want to copy/paste it: That's it. Once this is done…


  • Use AutoHotKey to Paste Text as Typing

    Use AutoHotKey to Paste Text as Typing

    Date Published: 18 May 2021

    I've heard about AutoHotKey before but never gotten round to installing it until recently. Basically I had a bunch of text (code) that I wanted to display in chunks as part of an upcoming Pluralsight course. I didn't want it to just all appear at once, but rather to show as if it were being typed. But actually typing frequently involves typos and backspaces and other distractions. I knew others…


  • GitHub Fetch Upstream Branch

    GitHub Fetch Upstream Branch

    Date Published: 11 May 2021

    A couple of years ago, I wrote an article on how to use the git command line to sync a fork with its upstream branch. Now, you should need those instructions much less frequently, because GitHub has added support for it to its web application. You'll find it in the image below: Once you click on the 'Fetch Upstream' button, there's a dialog to confirm: Click the button and assuming no major…


  • Simple Systems and Gall's Law

    Simple Systems and Gall's Law

    Date Published: 04 May 2021

    When it's time to build that big new system to replace the aging old one, consider Gall's Law and the benefit of frequent feedback and evolutionary development. Gall's Law states: A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a…


  • Add ImgBot to your GitHub Repository

    Add ImgBot to your GitHub Repository

    Date Published: 21 April 2021

    My blog is hosted on GitHub using GatsbyJS and Netlify. One nice thing about this setup is that I have complete control over my content, and it's all version controlled and backed up both on GitHub and on various machines where I've cloned the repo. Along with the text content, almost all of the images associated with my content are in the same repository. Sometimes they're hi-res screenshots…


  • Testing Exceptions with xUnit and Actions

    Testing Exceptions with xUnit and Actions

    Date Published: 14 April 2021

    When you're writing unit tests for a method, it's a good idea to test various failure conditions ("sad paths") in addition to testing the expected, everything is working condition ("happy path"). In particular, if you have a method that may throw exceptions, especially if they're custom domain exceptions, you should be sure you're testing this behavior. Another common source of exceptions is guard…


  • Speed Up Docker Compose with Parallel Builds

    Speed Up Docker Compose with Parallel Builds

    Date Published: 07 April 2021

    I've been using docker-compose quite a bit lately for a distributed app that includes 3 front end apps, 2 databases, RabbitMQ, and PaperCut (test email server). For the most part, this works great as a way to encapsulate all of these processes and run them in a containerized manner so that everything works together. But building this whole solution is pretty slow, by default. When you work with…


  • How to measure elapsed time of command line tools using PowerShell

    How to measure elapsed time of command line tools using PowerShell

    Date Published: 05 April 2021

    I'm using the command line to run build scripts and other tasks more and more, especially now that .NET Core / .NET 5 has the CLI and things like and are in heavy use. When you're running a single command, like or it usually tells you about how long it took to run. But when you have a scripted build that involves multiple steps, it's often nice to be able to see how long the whole thing took…


  • Run a Docker Command to Launch RabbitMQ from a StreamDeck

    Run a Docker Command to Launch RabbitMQ from a StreamDeck

    Date Published: 23 March 2021

    I'm working on a distributed system demo that relies on RabbitMQ for its inter-app messaging. Not wanting to force users to actually have to install RabbitMQ, I'm using Docker to run it. It's really easy to do this. If you've never tried to launch RabbitMQ, complete with its management web app, from a docker command line, try this: Once you've run that, open up localhost:15672 and you should be…


  • Hardware Hides Many Sins

    Hardware Hides Many Sins

    Date Published: 17 March 2021

    Early in my career I was taught this lesson by one of my clients. We were building an application for internal use at the company which would run on a dedicated server sitting in a server room in the same building as its users. I had concerns that some approach we were taking was inefficient. My client (and mentor at the time) explained: Hardware hides many sins. What he meant was, it didn't…


  • New Software Project Checklist

    New Software Project Checklist

    Date Published: 10 March 2021

    A client I'm working with wanted a set of initial decisions and questions their team should address as they begin a new project. I did a bit of research, thinking surely such a list must exist already, but I didn't find one I liked. So I made an open source one and put it on GitHub. If you just want to jump to it now, check out the Ultimate New Software Project Decision Checklist. In coming up…


  • Designing for Related Data without Foreign Keys

    Designing for Related Data without Foreign Keys

    Date Published: 03 March 2021

    A recent discussion on the devBetter.com private server spurred this article. One of the members was trying to work out a fairly complex design involving many different parts, and the idea of trying to model all of this as a set of database tables with primary key and foreign key relationships was daunting. The sheer number of many-to-many and one-to-many relationships along with recursive and…


  • What is the difference between a DTO and a POCO (or POJO)

    What is the difference between a DTO and a POCO (or POJO)

    Date Published: 16 February 2021

    Two terms that come up frequently when discussing software development in .NET and C# are DTO and POCO. Some developers use these terms interchangeably. So, what is the difference between a DTO and a POCO? First, let's define each term. Data Transfer Object (DTO) A DTO is a "Data Transfer Object". It's an object whose purpose is to transfer data. By definition, a DTO should only contain data, not…


  • Keep Tests Short and DRY with Extension Methods

    Keep Tests Short and DRY with Extension Methods

    Date Published: 10 February 2021

    Today as I was writing functional tests for API endpoints again I created some helpers to assist with the boilerplate code involved in such tests. When you're testing an API endpoint, you typically need to write code that looks like this: Create data to send in request (optional) Make an HTTP request to a route/URL Verify the response is successful Capture the response as a string Convert the…


  • MVC Controllers are Dinosaurs - Embrace API Endpoints

    MVC Controllers are Dinosaurs - Embrace API Endpoints

    Date Published: 20 January 2021

    I've been programming web applications using the MVC pattern for a very long time. What's more, I've been helping companies dig themselves out of technical debt for an even longer time, and I work with a wide variety of teams every year. So, I've seen things. And while I would absolutely never want to return to the old Web Forms way of building apps, I can tell you that more often than not, MVC…


  • 2020 Year in Review

    2020 Year in Review

    Date Published: 12 January 2021

    Time for a recap of stats and important (and not so important) milestones from 2020, the year of the COVID-19 pandemic. Here are some other year-in-review recaps for reference and a checklist for writing your own: My 2017 Year in Review My 2018 Year in Review My 2019 Year in Review My Year in Review Post Checklist Blogging Last year I added 41 articles to my blog - the same as the year before…


  • Data Deficient Messages

    Data Deficient Messages

    Date Published: 16 December 2020

    A common feature of distributed architectures is message-based communication between systems or microservices. Whether using a message bus or queue, messages provide a means of reducing coupling between systems, allowing overall systems to remain available even when some subsystems are not. However, when designing the messages that will be used in such systems, care must be taken to include…


  • Avoid Wrapping DbContext in Using (and other gotchas)

    Avoid Wrapping DbContext in Using (and other gotchas)

    Date Published: 01 December 2020

    EF and EF Core DbContext types implement . As such, best practice programming suggests that you should wrap them in a block (or new C# 8 using statement). Unfortunately, doing this, at least in web apps, is generally a bad idea. I work with a lot of clients who are migrating from .NET Framework to .NET Core and .NET 5. Some of them weren't using dependency injection in their legacy apps, or weren…


  • Little's Law

    Little's Law

    Date Published: 24 November 2020

    Little's Law was first described in 1954 and later proved by John Little in 1961. It is typically expressed as: L = λW L represents the "long term average" number of customers in a stationary system λ represents the "long term average effective arrival rate" of new customers W represents the average time a customer spends in the system It's important to recognize that Little's Law is used in the…


  • CAP Theorem, PACELC, and Microservices

    CAP Theorem, PACELC, and Microservices

    Date Published: 17 November 2020

    CAP Theorem (wikipedia) is a classic "given 3 choices, choose 2" topic. The three choices are Consistency, Availability, and Partition Tolerance. You can't have all three. Given distributed data or systems, the choice mostly comes up when there is a network partition, meaning two nodes of the system can't communicate immediately with one another. At that point there is a partition, and your…


  • GitHub Actions from CLI

    GitHub Actions from CLI

    Date Published: 11 November 2020

    Tim Heuer recently published an article showing how to create your own dotnet CLI templates for generating GitHub action YAML files. I thought I'd give it a try and see how it worked, so here's my experience with it. It works by adding a template to the list of available templates used with the command. Install the template To install custom templates, you run this command and specify a NuGet…


  • Estimates Are Necessary

    Estimates Are Necessary

    Date Published: 03 November 2020

    This is the fifth and last of the 5 Laws of Software Estimates. I expanded on the fourth law of software estimates in my previous article. Like all things, how you view estimates is heavily context-dependent. If you're a developer who wants to maximize the amount of value you provide by building software, estimates do little to support this directly. As already covered by the previous 4 laws of…


  • Solved - An attempt was made to access a socket in a way forbidden

    Solved - An attempt was made to access a socket in a way forbidden

    Date Published: 03 November 2020

    I'm assuming you're here because you are seeing this error and are wondering why: The reason is most likely due to a Windows Update that restricted access to certain ports on Windows machines. The details are here. You can view a list of which ports are excluded from your user by running this command: On my Windows 10 machine I get this output: Specifically, I had an ASP.NET Core web app that…


  • Shift Risk Left

    Shift Risk Left

    Date Published: 27 October 2020

    When planning, whether for a large project or a single feature, there will be risks. Identifying risks and planning appropriate mitigations or countermeasures is an important part of planning. The military does this constantly in its planning, and has many tools for identifying and calculating risks based on likelihood and severity, and requires that mitigations be put in place and proper…


  • Estimates Are Temporary

    Estimates Are Temporary

    Date Published: 14 October 2020

    This is the fourth of the 5 Laws of Software Estimates. I expanded on the third law of software estimates in my previous article. Estimates are made for a given point in time, when a certain set of information and assumptions are known and held. As time passes, new information becomes available and assumptions change. The older the estimate, the more likely it is to be stale. Since by definition…


  • Estimates Are Wrong

    Estimates Are Wrong

    Date Published: 07 October 2020

    This is the third of the 5 Laws of Software Estimates. I expanded on the second law of software estimates in my previous article. Nobody should be surprised when estimates are wrong, they should be surprised when they are right! If estimates were accurate, they'd be called exactimates. Think about weather forecasting. Even with all of the software modeling and vast arrays of sensors we have in the…


  • Estimates Are Non-Transferable

    Estimates Are Non-Transferable

    Date Published: 23 September 2020

    This is the second of the 5 Laws of Software Estimates. I expanded on the first law of software estimates in my previous article. Estimates generally cannot be transferred between individuals. If I ask five team members to estimate a given story, using whatever units they wish (time, points, etc.), I'm likely to get a range of answers that could vary by 200% or more! The hope may be that averaging…


  • Estimates Are Waste

    Estimates Are Waste

    Date Published: 16 September 2020

    This is the first of the 5 Laws of Software Estimates. It's all about context. In the context of software development, of delivering business value in the form of working software, estimates provide no value. In the context of choosing what software to build, there may certainly be value in estimates, but even there it's an ROI calculation, with the hope being that the estimates will provide more…


  • Postel's Law - The Robustness Principle

    Postel's Law - The Robustness Principle

    Date Published: 01 September 2020

    Postel's Law, also known as the robustness principle, states: Be conservative in what you do, be liberal in what you accept from others. Jon Postel wrote this in an early version of the TCP specification in 1980, and it has since been referred to as Postel's Law. Origin The main goal of this principle is to maximize the tolerance individual components of a system have for small incompatibilities…


  • Conway's Law, DDD, and Microservices

    Conway's Law, DDD, and Microservices

    Date Published: 26 August 2020

    Conway's Law states that "any organization that designs a system will produce a design whose structure is a copy of the organization's communication structure." This has significant impacts on how software is built, especially if microservices and/or Domain-Driven Design are adopted. Mel Conway observed that separate organizational units or teams within a larger organization, when working together…


  • Invest in Good User Stories

    Invest in Good User Stories

    Date Published: 05 August 2020

    User stories are a useful tool for describing requirements of software applications. User stories have been a part of agile methodologies like XP and Scrum for over twenty years. You can use the proven mnemonic INVEST to remember important principles of good stories. What is a User Story A user story is "a placeholder for a conversation." It's meant to describe high level requirements from an end…


  • Data Access Principles

    Data Access Principles

    Date Published: 21 July 2020

    What are some guiding principles that can be applied to data access in software applications and architecture? In preparing a workshop on evolving data access patterns, I've been considering the principles that are most important when it comes to data access in software applications. I collected the start of this list of data access principles in a twitter thread in which I asked for additional…


  • Design a No Duplicates Rule in your Domain Model?

    Design a No Duplicates Rule in your Domain Model?

    Date Published: 16 July 2020

    I'm streaming about open source software development most Fridays on Twitch - follow me to get notified when I go online. Recently I was working on building a new API for the eShopOnWeb reference application and one of the commenters wanted to see how to add validation. Not just simple model validation, but something requiring server-side work: verifying that a product name was unique in the…


  • Immediate Domain Event Salvation with MediatR

    Immediate Domain Event Salvation with MediatR

    Date Published: 08 July 2020

    Domain events are one of my favorite patterns and one Julie Lerman and I cover in our DDD Fundamentals course, on Pluralsight. I differentiate between two kinds of domain events: pre-persistence and post-persistence. You'll find a good implementation of post-persistence domain events (using MediatR) in my Clean Architecture solution template. However, until recently, I hadn't built an immediate…


  • The Singleton Design Pattern

    The Singleton Design Pattern

    Date Published: 17 June 2020

    The Singleton Design Pattern is a fairly simple creational pattern used to ensure that there is only ever a single instance of a class in an object-oriented language. It's useful for ensuring expensive class instances are only created once and to eliminate the need to try and orchestrate between multiple class instances that are each trying to access a single shared resource, such as a file or…


  • Stream Deck CPU Graph Buttons

    Stream Deck CPU Graph Buttons

    Date Published: 26 May 2020

    I've been using a Stream Deck (affiliate link) for a while now and I keep finding more and more uses for the device. Recently, I started looking for more active buttons to display common utilities like CPU, Graphics Processor, and Network I/O graphs. It's easy to configure a button to just show the current CPU percentage, but I wanted an actual CPU graph in a Stream Deck button, and that wasn't…


  • Never use the same value for two IDs (or other values) in your tests

    Never use the same value for two IDs (or other values) in your tests

    Date Published: 13 May 2020

    When you're writing automated tests, whether you're following TDD or not, you want to avoid the possibility of testing the wrong thing. This is surprisingly easy to do if you're not careful, I can say from personal experience! One way this can easily happen is if you're quickly writing a series of tests, and doing so using copy-paste programming, like you might see here: This is from one of my…


  • Configuring a Local Test Email Server

    Configuring a Local Test Email Server

    Date Published: 04 May 2020

    It’s been a few years since I wrote about using a tool like Smtp4Dev for local test emails (and that article has issues), so here’s an update. If you’re working with code that should send emails sometimes, it’s really helpful to be able to let that code still run, but not actually send emails. That’s where running a local test email server on your development machine comes in. Here are a few…


  • Integrate GitHub and Discord with Webhooks

    Integrate GitHub and Discord with Webhooks

    Date Published: 30 April 2020

    I've started using Discord more and more for things like my private group coaching program focused on software developers. It's worked quite well and is completely free for our needs. You can easily add bots and notifications from other systems, including your own ASP.NET web applications, using web hooks. One of the easier ways to configure notifications from things you care about as a developer…


  • Stored Procedures, ORMs, and GraphQL

    Stored Procedures, ORMs, and GraphQL

    Date Published: 26 April 2020

    GraphQL is the new ORM, and your API endpoint is the new stored procedure About fifteen years ago, a debate raged in the still-young .NET development world over how best to access data. On the one side were the traditionalists, among them database administrators (DBAs) and many experienced software developers with experience building efficient, performant applications. On the other were (mostly…


  • Configuring Logging in Azure App Services

    Configuring Logging in Azure App Services

    Date Published: 19 April 2020

    Azure App Services are a very easy and economical way to quickly deploy your ASP.NET/ASP.NET Core apps to the cloud. You can get started for free if you just want to try out something you're developing (without uptime considerations) and entry-level plans are pretty affordable: The docs for publishing to an Azure App Service are pretty good so I won't get into that here. I recommend configuring…


  • Are Boolean Flags on Methods a Code Smell?

    Are Boolean Flags on Methods a Code Smell?

    Date Published: 15 April 2020

    Recently I had one of my newsletter subscribers ask me a question about whether it was a good practice to use a boolean parameter to alter the behavior of a method. Martin Fowler describes (many of*) these as Flag Arguments. The topic is also covered in this StackExchange question. Clean Code also discusses it. On a slightly related note, the Flags Over Objects antipattern describes this same…


  • Add Discord Notifications to ASP.NET Core Apps

    Add Discord Notifications to ASP.NET Core Apps

    Date Published: 08 April 2020

    I'm continuing to have fun building out features for the devBetter site, which provides resources for my group coaching members. We meet weekly to answer questions, work through exercises together, and share progress, but we also have a very active Discord server where we do a lot of the same thing throughout the week. As I was working on integrating GitHub actions with deployments to Azure, I…


  • Adapter Design Pattern

    Adapter Design Pattern

    Date Published: 01 April 2020

    A couple of months ago I published a new, revised course called C# Design Patterns: Adapter on Pluralsight. It's one of my favorite patterns and its predecessor, the Design Patterns Library, remains one of the most popular courses of all time on Pluralsight. It's almost 16 hours long but I encourage you to get through it as an achievement if you can. Look for a revised learning path through the…


  • Streaming Checklist

    Streaming Checklist

    Date Published: 27 March 2020

    I'm a fan of checklists – they're an intermediate step before automating a process to ensure it's done correctly and consistently. You'll find a number of different checklists on this site. This one is about streaming, specifically for my twitch.tv/ardalis account. I've been meaning to blog about this forever, but it's just been sitting in my OneNote for the longest time while other things have…


  • GitHub Draft Pull Requests

    GitHub Draft Pull Requests

    Date Published: 25 March 2020

    A feature introduced last month by the GitHub team is called draft pull requests. When you create a Draft Pull Request, it cannot be merged until it is marked as ready for review. This is useful because often pull requests are used as conversations, often prior to the work being ready to merge. Common approaches to this in the past have included such classic approaches as: Adding “WIP” for “Work…


  • Getting Started with Architecture Decision Records

    Getting Started with Architecture Decision Records

    Date Published: 11 March 2020

    Have you ever been on a software team for a while, and then someone new joins the team and starts asking the usual questions about why this or that technology or pattern is being used on the project? And then a few months later, someone else joins and all the same questions come up again? Or maybe some team member, whether new or not, constantly wants to relitigate every choice, potentially to the…


  • Priorities of Work on a Board

    Priorities of Work on a Board

    Date Published: 04 March 2020

    This is obvious once you think about it but I’ve found many people haven’t thought about it so I’m going to lay it out here real quick. A lot of teams use some kind of task or kanban board today to track the status of work. This is typically part of some kind of agile or Scrum or kanban process. If you want to learn more about kanban, check out my short course on the fundamentals of kanban…


  • REST Commands and Queries in VS Code

    REST Commands and Queries in VS Code

    Date Published: 26 February 2020

    Recently in one of our great devBetter discussions, Rick Hodder (go follow him now) shared a cool extension for VS Code. Basically, it lets you turn VS Code into a REST client. Think of it like a combination of Postman and Azure Data Studio (or LinqPad or SSMS if you prefer). Now, I like Postman. It's a great and powerful tool. But it's a lot more effort to issue a request than, say, running a SQL…


  • Git Autocorrect

    Git Autocorrect

    Date Published: 12 February 2020

    I don’t know how I didn’t know about this before now, but apparently you can turn on autocorrect for your git command line, and it will accept (after a short delay in which you can cancel) commands that are close to but not exactly correct. Example: You probably meant: And it will go ahead and do that for you. Setting it up You can set this up in your git config, either globally or per repo. I don…


  • Encapsulation Boundaries Large and Small

    Encapsulation Boundaries Large and Small

    Date Published: 28 January 2020

    Writing any significantly complex software application involves the use of encapsulation boundaries and abstractions. Think about the smallest bit of executable code in your program: an expression or perhaps a statement. This typically maps roughly to a line of code. You can build entire applications using only this structure. If you do, they look something like this: A program made up of a…


  • 2019 Year in Review

    2019 Year in Review

    Date Published: 14 January 2020

    Yes, it’s that time again. Time for another recap of what happened last year. If you’re reading this, and you’re not me, you probably are mostly interested in the most popular articles from last year, in case you missed something others found interesting. So, I’ll start with those. If you’re looking for other years in review, or want a checklist to help with writing your own year in review article…


  • Codemash 2020 Recap and Cloud Design Patterns Talk

    Codemash 2020 Recap and Cloud Design Patterns Talk

    Date Published: 11 January 2020

    I'm home after surviving another great Codemash! I'm not sure how many Codemash events I've attended but I think it's [ALL OF THEM] - 2 (looks like the first one was in 2007 so if my math is right (takes off socks) that would be 14 total minus 2 is 12). I had to miss one year when my twins (now 5) were born, and I missed last year due to a work conflict. Here's my quick recap of the event, which…


  • Using Grep to Find Strings in Markdown .md Files on Windows

    Using Grep to Find Strings in Markdown .md Files on Windows

    Date Published: 11 December 2019

    I recently needed to find which of a bunch of markdown files had a particular string in them. My initial thought, since I'm on Windows, was to use Windows File Explorer's search dialog. No dice - it found no results when I knew there were some. I did a quick search for 'windows explorer search markdown files' which led me to a Super User thread that said I'd have to install a Markdown Preview to…


  • Domain-Driven Design with ASP.NET Core Workshop

    Domain-Driven Design with ASP.NET Core Workshop

    Date Published: 27 November 2019

    I first learned about Domain-Driven Design, or DDD, over ten years ago. Since then, I've given more workshops on the topic, both public and private on sites, than I can remember. Julie Lerman and I also published a very popular course, DDD Fundamentals, on Pluralsight, which I expect we will refresh in the coming year. (By the way, there's a 40% off sale for Black Friday going on now (as I write…


  • Moving from Controllers and Actions to Endpoints with MediatR

    Date Published: 20 November 2019

    (or Controllers are dinosaurs - it's time to embrace Endpoints) Update Feb 2020: I've started a GitHub repo and NuGet package to implement Endpoints in ASP.NET Core (without MediatR and with file linking in Visual Studio). Check it out after reading this and see what you think. Controllers are a key part of the MVC pattern. They're the entry point, responsible for interacting with one or more…


  • Sketch Themes for Prototypes

    Sketch Themes for Prototypes

    Date Published: 30 October 2019

    Last week during one of my devBetter coaching sessions, the conversation turned to spikes and Minimum Viable Products (and even not-so-viable products). Sometimes, in order to get rapid feedback, it's useful to throw together a prototype that has literally nothing going on in the backend, but lets the user get a sense of how the application would flow. The problem, of course, is that once users…


  • Be Humble and Kind

    Be Humble and Kind

    Date Published: 28 October 2019

    This originally went out just to my Weekly Dev Tips mailing list, but I got a lot of positive comments and requests to share it, so I’m publishing it here. Sign up for Weekly Dev Tipsto get a new tip in your inbox each Wednesday. I’m not a big fan of country music (my wife is, however) but Tim McGraw’s Humble and Kind has it right. Don’t let success get to your head. You don’t know everything – be…


  • Running Integration Tests in Build Pipelines with a Real Database

    Running Integration Tests in Build Pipelines with a Real Database

    Date Published: 16 October 2019

    A pain point for some organizations is figuring out how to run tests that involve databases. These are not unit tests, by most folks' definition (including my own: unit test or integration test and why you should care). Nonetheless, they're important and ideally they should run as part of your build pipeline. Recently I've come up with a technique that works quite well for this scenario that I'd…


  • Configure Different Implementations for Different Controllers in ConfigureServices

    Configure Different Implementations for Different Controllers in ConfigureServices

    Date Published: 09 October 2019

    You may find yourself in a position where you need to have two (or more) different implementations of the same interface within your ASP.NET Core application. This may be because your application is too big to allow you to fully replace one implementation with another all at once, so you're rolling out the updates one type at a time. Let's say the services in question relate to persistence, and…


  • dotnet-ef does not exist

    dotnet-ef does not exist

    Date Published: 09 October 2019

    If you're trying to run EF Core migrations using commands like or and you're getting errors like the one shown in the screenshot above, here's the fix. You need to install the dotnet-ef tool, ideally globally so you can run it from anywhere. To do so, run this script from a command prompt/terminal window: dotnet tool install --global dotnet-ef Once you've done so, you should be able to run your…


  • Attacking Technical Debt

    Attacking Technical Debt

    Date Published: 18 September 2019

    Technical Debt is a metaphor for shortcuts and hacks in software that make it more difficult to change and maintain than it could be with an optimal design. Many applications have accumulated a large amount of technical debt, and figuring out how to deal with it is a fairly common challenge for many developers, especially senior developers starting new contracts or jobs at companies that need help…


  • Enforce Developer Workflow Policies with Branch Protection

    Enforce Developer Workflow Policies with Branch Protection

    Date Published: 11 September 2019

    A frequent question I hear from clients is some variant of "Ok, Continuous Integration is great, but how do we get everybody on the team to pay attention to it?" This is obviously a bigger problem if the question is coming from a lone junior developer, as opposed to a technical manager. In the case of the junior developer, they may need some help convincing the rest of the team that CI is…


  • Git Graph Visualizes Branches in VS Code for Free

    Git Graph Visualizes Branches in VS Code for Free

    Date Published: 04 September 2019

    I recently discovered a very nice VS Code extension to use with git. You can view my full list of tools and extensions I use here if you're interested. In this case, I was working from a locked down laptop for a financial services company that's a client of mine (talk to me if you'd like help building better software), and I wanted to see a good visualization of the my branch in relation to other…


  • Which is more important, line coverage or branch coverage?

    Which is more important, line coverage or branch coverage?

    Date Published: 27 August 2019

    I've been setting up code coverage for some of my clients' projects and some of my own open source projects, like Clean Architecture and Specification (100%!) and Guard Clauses (99%...). I wrote up how to configure Azure DevOps to generate code coverage reports that properly merge the results from multiple test projects using ReportGenerator. When you look at a code coverage report, whether it's…


  • Configure Visual Studio to Name Private Fields with Underscore

    Configure Visual Studio to Name Private Fields with Underscore

    Date Published: 20 August 2019

    Most C# coding standards recommend using camelCase for local variables and _camelCase for private or internal (and I also say for protected, but that's just me) fields. Unfortunately, out of the box Visual Studio just uses camelCase for these fields, which makes typical dependency injection scenarios annoying in constructors: I much prefer this version: Fortunately, you can modify Visual Studio to…


  • Using Multiple Solutions in Visual Studio

    Using Multiple Solutions in Visual Studio

    Date Published: 14 August 2019

    I've given this advice quite a number of times so I figured it was time to put it into an online article. If you're a .NET developer you probably use or have used Visual Studio. Visual Studio has two kinds of project organization file formats: projects and solutions. Solutions are essentially groups of projects. Most software applications involve more than one project, and so virtually every…


  • Minimize new in Automated Tests

    Minimize new in Automated Tests

    Date Published: 07 August 2019

    Automated tests have gained a lot of acceptance in recent years. Not long ago, many organizations bristled at the notion of having their expensive developers spend time writing code that wasn't actually going to ship to production, but instead would just verify that the "real" code worked. Today, the idea that testing in many instances is something computers can do very effectively - and cost…


  • How to Grab a Pull Request Locally with Git Command Line

    How to Grab a Pull Request Locally with Git Command Line

    Date Published: 29 July 2019

    If you're working with git, especially with open source, sometimes you'll find that you want to work with a particular pull request, or PR, locally. Maybe you're reviewing the PR and instead of just eyeballing it in the browser you want to actually run the code and see what it does (novel idea, I know!). In any case, actually getting the code from a PR, especially one from a fork that isn't even…


  • Configuring Entities in EF Core

    Configuring Entities in EF Core

    Date Published: 23 July 2019

    I've worked with many clients who are upgrading from EF 6 to EF Core. Many of them are coming from EDMX files, and are wondering what the best approach is in EF Core to configure entities based on the database (or vice versa). Regardless of whether your C# entities are written first or the database is, somewhere you need to have mapping information to let Entity Framework know how it should store…


  • Generate Code Coverage Reports with ReportGenerator in Azure DevOps

    Generate Code Coverage Reports with ReportGenerator in Azure DevOps

    Date Published: 17 July 2019

    Recently I've been looking at different ways to generate code coverage reports during automated builds. I'm mostly working with Azure DevOps for builds these days, as they've come a long way since the early TFS days and the hosted version is now free for open source projects. This is really nice because I have a bunch of open source projects and I understand the value provided by a good build…


  • Testing Production API Endpoints with xUnit

    Testing Production API Endpoints with xUnit

    Date Published: 02 July 2019

    I'm a big fan of unit tests and integration tests and have written about them frequently. I also authored the original docs on writing integration tests in ASP.NET Core using TestHost and related types. However, sometimes it's worthwhile to be able to test actual, live API endpoints. This article will lay out a relatively simple way to do this in a configurable manner using xUnit. In the past, I…


  • Syncing a Fork of a GitHub Repository with Upstream

    Syncing a Fork of a GitHub Repository with Upstream

    Date Published: 07 June 2019

    Update May 2021 GitHub made this easier. You can still use the approach below, but also check out how you can Fetch Upstream directly in GitHub.com. I work on a few GitHub projects, like the Microsoft Docs, where I'm a relatively frequent contributor but I don't have commit rights. This means that I need to make a fork of their repository, do some work in my fork, and then send a pull request from…


  • Fixed Problem Connecting to Docker for Windows ASPNET App

    Fixed Problem Connecting to Docker for Windows ASPNET  App

    Date Published: 04 June 2019

    Recently I was working on some WinForms and classic MVC (not Core) apps built with ASP.NET and migrating them to Azure using containers. There's a repo with samples and an ebook on modernizing your .NET apps so they can take advantage of containers and cloud architecture. Check it out if this sounds like something you think you'll be doing. Anyway, while running these apps locally using Docker for…


  • Create Alias to Set Window Title in PowerShell

    Create Alias to Set Window Title in PowerShell

    Date Published: 30 May 2019

    I’ve written previously about how to set the window title in PowerShell. Unfortunately, it’s a little complicated. Recently on twitter, though, Greg MacLellan showed me how to create an alias so you can just type to set the window title. This involves editing your PowerShell profile, which you may not even have, so here are the steps to take to make this happen. First, determine if you have a…


  • Speaking and Presenting Last Minutes Checklist

    Speaking and Presenting Last Minutes Checklist

    Date Published: 29 May 2019

    You have a presentation to give. You’ve been asked to speak to a group of your peers. You’re giving a conference session. The previous presenter just finished – you’re up as the next speaker. You have fifteen minutes. What do you need to do? This isn’t the checklist for what to do after you’ve just found out you have a presentation to give, or you were just accepted to speak at a conference. There…


  • Automatically Detect Expiring HTTPS SSL Certificates

    Automatically Detect Expiring HTTPS SSL Certificates

    Date Published: 08 May 2019

    All too often we hear about a site going down or suffering problems because they've let their public x509 certificate expire. SSL certificates, which are required for HTTPS to work for secure connections using TLS to domains, expire after a number of years. Often, the team or individual who purchased and installed the initial HTTPS certificate is no longer in that role by the time the expiration…


  • How to Add Files to a GitHub Repo You Don’t Own

    How to Add Files to a GitHub Repo You Don’t Own

    Date Published: 03 May 2019

    There are a bunch of GitHub (and other git host) repositories that aren’t really for software projects, but rather are for documentation or other resources. For example, the ASP.NET Core docs, or various awesome lists, or the slides and materials from conferences like Stir Trek. Frequently, even as a non-developer, you may want to contribute to such repositories, maybe even just as simply as to…


  • Ultimate Developer Rig 2019

    Ultimate Developer Rig 2019

    Date Published: 30 April 2019

    I recently upgraded my desktop developer machine. My goal was to support more docker-based application development including ones that run multiple microservices at the same time, like the eShopOnContainers sample that I assist with (see also my own eShopOnWeb sample and eBook). My friend Bill Henning (of Actipro Software fame) came up with the initial parts list for his machine back in November…


  • Set up Reverse DNS (PTR) Record for Windows Azure

    Set up Reverse DNS (PTR) Record for Windows Azure

    Date Published: 14 April 2019

    Windows Azure offers support for RDNS (PTR) records, which are used to get a hostname from an IP address (the opposite of what DNS does, hence the name). Microsoft has an article that describes how to set RDNS up, but it assumes you've already installed the azure CLI tools. Since I'm going through the process from scratch, I thought I'd share the full process here. You'll need to have npm…


  • Add HTTPS To Any Site For Free

    Add HTTPS To Any Site For Free

    Date Published: 06 March 2019

    Back in the old days, adding HTTPS/SSL/TLS to secure a web site was a big deal. You had to spend hundreds of dollars for a certificate, then install it on the web server. It had to be specific to the subdomain you were using, or you had to shell out even more bucks for the wildcard cert. And they’d expire sometimes, and your site would go down, and that was never fun. Times have changed. Yes, you…


  • The More You Know The More You Realize You Don't Know

    The More You Know The More You Realize You Don't Know

    Date Published: 20 February 2019

    Aristotle famously wrote, "The more you know, the more you realize you don't know." In the image above, you can see the effect this has on confidence as one's experience grows. Initially, your confidence is low since you know you're inexperienced. However, after a short while, you start to "get it", and you get into a comfort zone. Depending on how demanding your environment is, you might stay…


  • How to Hide the Connection Bar in Remote Desktop Connection (RDP)

    How to Hide the Connection Bar in Remote Desktop Connection (RDP)

    Date Published: 03 February 2019

    Sometimes, like when you're trying to record a full screen video from a (virtual) machine you've connected to using remote desktop, you'd like to hide the blue connection bar that display at the top of the screen. In my case, I was recording how something installs on a fresh Windows 10 virtual machine that I was connecting to over RDP since it was hosted in Azure. The blue bar at the top of the…


  • Nuget Publication Checklist

    Nuget Publication Checklist

    Date Published: 24 January 2019

    I have a few Nuget packages that I maintain, and when I get a new PR or add a new feature or bugfix, I like to try and get the change out quickly. Unfortunately, this is a somewhat manual process for me currently, and I don't do it all that often, so I screw it up a high percentage of the time. Or I end up putting it off because it's not something I can just click a button to perform. This post…


  • 2018 Year in Review

    2018 Year in Review

    Date Published: 17 January 2019

    Now that 2018's been over for a few weeks, I've had a chance to compile some data from a variety of sources that I thought some people might find interesting, including future me. This post will include details on the traffic for my blog as well as other properties, how things are going with my podcast, where things are headed with devBetter, and a few other random bits. This Blog In 2018, I…


  • Load Testing and the Requests per Second Curve

    Load Testing and the Requests per Second Curve

    Date Published: 09 January 2019

    There are a few basic curves you look for when load testing. They're pretty much standard, but there's not a lot of information out there about them, specifically. In this post I'm going to just describe one such curve, and what it tells you. It's the Requests per Second (or RPS or R/S) curve. Some tools will show you Pages per Second (P/S) which generally has the same properties. This curve will…


  • Becoming a Developer Team Force Multiplier

    Becoming a Developer Team Force Multiplier

    Date Published: 02 January 2019

    I have clients who describe me and my team as a "force multiplier" for their development organization. What does this mean, and how can it apply to you? How can you become a force multiplier for your team or company? I talked about this topic briefly in a previous weekly dev tip email (subscribe): A force multiplier is anything that increases the capabilities of existing resources. The 'force…


  • Support for Value Objects in C#

    Support for Value Objects in C#

    Date Published: 13 December 2018

    As someone who uses many Domain-Driven Design patterns in my .NET code, I've long wanted to have built-in immutable value objects in C#. Value objects have a few characteristics: They're immutable. You can't change their state. Their state is fully set when they're created. Because, they're immutable once created. Two value objects are considered equal if all of their properties match; otherwise…


  • Analyzing 404s with Google Analytics

    Analyzing 404s with Google Analytics

    Date Published: 11 December 2018

    I've been wanting to analyze broken links coming into my site so that I could add 301 redirects if necessary. I figured I could probably use Google Analytics to analyze 404s and broken links on my site. With a bit of research I was able to get this working as a custom report. I initially tried importing a couple of custom reports I found in the gallery, but none of them worked so I created my own…


  • Double Dispatch in C# and DDD

    Double Dispatch in C# and DDD

    Date Published: 01 December 2018

    Double dispatch is a pattern you can use in C# to control how communication flows between two objects. A frequent use of the pattern is to pass "this" to a function on another class, allowing that class to communicate back to or manipulate the calling object instance. It can also be used to achieve polymorphic behavior. I have a GitHub sample you can browse or download that demonstrates some of…


  • The JavaScript npm event-stream Vulnerability

    Date Published: 28 November 2018

    A few months ago a clever attack was introduced in the event-stream npm package. It's been explained in detail here, but let me sum it up in TL;DR form here for anybody who hasn't been paying attention: 1. In September 2018 the attacker approached the maintainer of a fairly popular npm package and offered to take over maintenance duties - the maintainer agreed and gave the attacker rights to their…


  • Clean Architecture with ASP.NET Core

    Clean Architecture with ASP.NET Core

    Date Published: 15 November 2018

    I've been doing workshops showing teams how to properly architect ASP.NET Core applications using Clean Architecture for the last couple of years. The most recent one was a 4-day on site workshop I did a couple of weeks ago. This is just a quick recap of what we covered. Each team is different and has different needs, so the precise agenda varies to suit the needs of the team. Day One: Unit…


  • Fun Browser JavaScript Tricks and Hacks

    Fun Browser JavaScript Tricks and Hacks

    Date Published: 07 November 2018

    I occasionally present to school-age kids on software development, and an easy way to get them engaged is to show them how something already familiar to them - web sites - can easily be manipulated using tools they already have available. None of these are my own personal creation, but I'm listing them here for others to benefit from and for me to easily locate in the future, as some of the…


  • Easily Add Images to GitHub

    Easily Add Images to GitHub

    Date Published: 31 October 2018

    When working with GitHub on things like ReadMe.md files, it's often helpful to include pictures. Unfortunately, when editing markdown files online, there's no built-in capability to add images: Typically, this would mean you would need to create an image yourself and commit it into your repository somewhere so you could then reference it. It's much the same if you're working on your repository's…


  • A Retrospective Retro

    A Retrospective Retro

    Date Published: 18 October 2018

    At a client today I facilitated a retrospective for the dev team. I've done a few of these in the past, both for agile software teams and also After Action Reviews (AARs) in the US Army. For AARs, the usual format is to discuss what was supposed to happen, what really happened, what went well, and what didn't go well. Then, identify any changes or controls that should be added to improve for next…


  • Configure Sounds for Builds in Visual Studio

    Configure Sounds for Builds in Visual Studio

    Date Published: 15 October 2018

    Recently Jeff Fritz tweeted about setting up a sound for his twitch stream and Immo Landwerth suggested using it with Visual Studio. I thought this was a great idea and set it up myself in just a few minutes. Here's what you need to do in a few simple steps. Find Sounds There are plenty of sounds built into Windows that you can use, or you can search for free sounds online. I ended up using these…


  • Replace Logo with Icon on Smaller Screens

    Date Published: 13 October 2018

    I'm not a responsive design expert. Or even close. But I did recently figure out how to replace a full logo with a smaller square icon on a web site so when it's viewed on a phone the header is more compact. Here's how I did it so I can find it again, and to help others, and so smarter people can come by and tell me better ways to do it. The HTML The CSS icon { } logo { } /* Hide/rearrange for…


  • dev up Conference 2018 (and a small speaking hitch)

    dev up Conference 2018 (and a small speaking hitch)

    Date Published: 12 October 2018

    This week I was in St. Louis presenting at dev up, a "new" conference that's actually no so new, as it was previously the St. Louis Day(s) of .NET, which has been a thing for over a decade, I think. This was my first time at any of the St. Louis events, in any case. I got in Sunday pretty early and spent some time working and meeting up with a few friends. I had an all day workshop the next day…


  • Speaking at nopCommerce Days 2018

    Speaking at nopCommerce Days 2018

    Date Published: 02 October 2018

    Next month on 8-9 November I'll be joining many great speakers in Las Vegas for nopCommerce Days 2018. If you're unfamiliar with it, nopCommerce is an open source e-commerce solution with a large community of developers and store owners. This 2-day event will be the largest conference they've held, and will have over 700 attendees. I'll be speaking about architecting ASP.NET Core solutions using…


  • Building a CachedRepository in ASPNET Core

    Building a CachedRepository in ASPNET Core

    Date Published: 27 August 2018

    I'm a fan of proper use of design patterns, and you can get big gains from layering multiple patterns together. One prime example of this in web applications is the combination of the Strategy, Repository, and Proxy/Decorator patterns to create the CachedRepository pattern. This pattern separates caching responsibility from persistence responsibility and makes it simple to add caching to an…


  • What's New in ASP.NET Core 2.1

    What's New in ASP.NET Core 2.1

    Date Published: 19 August 2018

    My latest MSDN Magazine feature article covering What's New in ASP.NET Core 2.1 was published a few days ago: Microsoft recently released ASP.NET Core 2.1 along with .NET Core 2.1 and Entity Framework (EF) Core 2.1. Combined, these releases offer some great improvements in performance, as well as additional features for .NET Core developers. Microsoft is also offering Long-Term Support (LTS) with…


  • Measuring Aggregate Complexity in Software Applications

    Measuring Aggregate Complexity in Software Applications

    Date Published: 13 August 2018

    A variety of tools will let you measure the complexity of a given method in your .NET applications. If you have a high-end SKU of Visual Studio, it will calculate code metrics for your application, one of which is Cyclomatic Complexity (CC). You can also use tools like NDepend, which I highly recommend if you want to quickly gain deep insight into large, complex codebases. Cyclomatic complexity…


  • Moving ApplicationUser with Identity UI Library

    Moving ApplicationUser with Identity UI Library

    Date Published: 26 July 2018

    One of the new features in ASP.NET Core 2.1 is Razor Class Libraries, which let you compile razor files into NuGet packages. Another that builds on this is the ASP.NET Core Identity functionality as a Razor Class Library. Using this functionality, you can add Identity functionality to your application without having to add all the associated Razor views/pages. Having done that, if you then move…


  • Test Secure Web APIs with Visual Studio Web Tests

    Test Secure Web APIs with Visual Studio Web Tests

    Date Published: 24 July 2018

    A common approach to securing APIs is through the use of bearer tokens, like JWT. If you’re using JWT, you may find this site useful to easily examine JWT token contents. A common scenario when working with APIs secured by bearer tokens is to have to do something like this: Send credentials to token server to get a token (with some limited lifetime) Use the token from step 1 in the header of…


  • Calculate Code Metrics in VS2017 for Core and Standard Projects

    Calculate Code Metrics in VS2017 for Core and Standard Projects

    Date Published: 03 July 2018

    A feature I use quite a bit in Visual Studio is the Calculate Code Metrics tool, found under the Analyze menu. You can use it to get some nice information about your projects, including Cyclomatic Complexity, Depth of Inheritance, Class Coupling, and Lines of Code. Microsoft aggregates these into a Maintainability Index as well (which for some reason they color code Green even when it's abysmal…


  • Should I Add Caching to my Web Application?

    Should I Add Caching to my Web Application?

    Date Published: 27 April 2018

    I created a helpful flow chart to use when answering the question, Should I add caching to my web application (or, "Should I implement caching in my ASP.NET (Core) App")? Most web applications have at least some data that's used frequently by the site, but doesn't change frequently. There's no reason not to cache this data in most cases. If you use a pattern like the CachedRepository, it's…


  • Momentum Dev Conference and Design Patterns

    Date Published: 20 April 2018

    Yesterday I presented Design Pattern Mastery at Momentum Dev Con, a first-year regional developer conference held in Cincinnati, Ohio. The event opened up with a Women In Technology panel that was very well-received, and used 50-minute sessions with 10-minute breaks to pack a lot of sessions into the one day event. I thought the organizers did a fantastic job and from what I could see, everything…


  • WeeklyDevTips Podcast Checklist

    WeeklyDevTips Podcast Checklist

    Date Published: 15 April 2018

    I've been doing a podcast for a little over six months now, called Weekly Dev Tips. The episodes are just 5-10 minutes long and don't have a lot of extra fluff - they're just straight and to the point, describing a particular tip that some developers will find helpful. The idea is that you can binge on back episodes (ideally start at the beginning) and get a ton of actionable tips in the time you…


  • Positive Reinforcement in Code Reviews

    Positive Reinforcement in Code Reviews

    Date Published: 21 March 2018

    Many developers dread reviews of their code, and one reason for this is probably that most reviewers only offer criticism rather than encouragement. Remember as a code reviewer that you can reinforce the things you see that are done well, which can be every bit as important and effective as nitpicking every style guide violation or misplaced bracket. Here are some actual comments I've left…


  • Finding Things in Visual Studio 2017

    Finding Things in Visual Studio 2017

    Date Published: 14 March 2018

    I'm a proponent of small, single-purpose files for most things in software applications. This helps follow certain SOLID principles, like Single Responsibility and Interface Segregation. It also means my applications tend to have a large number of files. This isn't a problem unless you have a hard time working with lots of files. Fortunately, there are tools that make it easier to work with many…


  • How to Modify Visual Studio 2017 or Install Preview Versions

    How to Modify Visual Studio 2017 or Install Preview Versions

    Date Published: 09 March 2018

    When Visual Studio has updates available, you'll see a notification flag change color at the top of the screen: When you run the update, the installer will also show you if there are other versions available, such as previews. However, if you close the installer dialog it can be difficult to get back to it short of waiting for another update. The trick to finding it is to use Tools - Get Tools…


  • Improve Performance through Advance Preparation

    Improve Performance through Advance Preparation

    Date Published: 07 March 2018

    When looking at tuning application performance, a common principle to follow is this one: Maximize the amount of work not done. It's hard to make doing something faster than doing nothing, so do nothing whenever you can. A common way to do very little is to queue up work (in the form of a Command, typically) so that some other process can actually perform the work later. However, you can also…


  • API Feature Folders

    API Feature Folders

    Date Published: 28 February 2018

    I've written about feature folders for ASP.NET Core before, and how Razor Pages does a great job of solving this problem for page/view-based endpoints. However, I wanted to take a moment to address APIs, which are an increasingly important part of modern web applications. In ASP.NET Core (and unlike ASP.NET 5 / Web API 2), Web API controllers are just controllers. You don't need to inherit from a…


  • GitHub Octotree Chrome Extension

    Date Published: 21 February 2018

    If you use GitHub a lot, as I do, you may appreciate this great Chrome extension, Octotree. Octotree is a free extension that adds a treeview navigation control to GitHub (and GitLab Enterprise, according to their docs) repositories, making it much easier to navigate around larger projects. You can see it in action here: [caption id="attachment_1946" align="aligncenter" width="822"]github-octotree…


  • JavaScript let const and var

    JavaScript let const and var

    Date Published: 13 February 2018

    In the latest version of JavaScript, there are several ways to declare variables: let, const, and of course, var. If you've been using JavaScript for a while, you're familiar with var, which has been a part of the language from the start. The two new keywords added with EcmaScript 6 (ES6) are let and const, and they offer different scoping than var. I'll start with my recommendation on when to use…


  • Improve Tests with the Builder Pattern for Test Data

    Improve Tests with the Builder Pattern for Test Data

    Date Published: 02 February 2018

    I recently wrote about an example where I was able to apply the Builder Design Pattern to an Angular/TypeScript service. Another area where I've been finding the pattern helpful is in unit tests. Last year, I learned about this technique from Kenneth Truyers' blog post, and I've been using it to good effect for several months now on a few different projects. Check out his article for a good…


  • JavaScript ES6 LINQ Equivalents

    JavaScript ES6 LINQ Equivalents

    Date Published: 31 January 2018

    As I'm working with JavaScript and TypeScript more and more these days, I often find myself wishing for LINQ statements to use to easily work with collection data. Fortunately, there are equivalents for all of the most common LINQ statements, and with ES6 arrow functions the syntax is also very concise and familiar. You can see them in action in this fiddle, or just check out the code here…


  • Applying the Builder Pattern to Improve an Angular Service

    Applying the Builder Pattern to Improve an Angular Service

    Date Published: 30 January 2018

    Recently I was working on an Angular/Typescript service that was building up some navigation-related properties, driving the menu of a SPA application. The existing service had a helper method that took in two arrays full of potential validation issues on the SPA’s different tabs, and based on these it would return an appropriately-styled and configured Tab object. Initially, there were no tests…


  • Codemash Aftermash 2018

    Codemash Aftermash 2018

    Date Published: 15 January 2018

    I attended Codemash 2018 last week, and it was (as usual) a great conference. I enjoyed seeing many friends and colleagues and I gave two talks that were both well-attended (one standing room only) and well-received. Here’s a quick recap of the conference. I was fortunate to have a room at the Kalahari, and (better still) a room close to the convention center. I arrived on Tuesday and sat in on…


  • How to Get Involved with the Microsoft Developer Community

    How to Get Involved with the Microsoft Developer Community

    Date Published: 10 January 2018

    The other day, someone wrote me to ask: To cut to the chase, I was wondering if, given your experience, you had any recommendations or advice for landing an internship with Microsoft. I work a lot with .NET and Azure through my web development business and I am extremely interested in all things Microsoft. This particular question related to an internship, but I've often seen similar questions…


  • How to become master writing C# code

    How to become master writing C# code

    Date Published: 14 December 2017

    The other day, someone posted to a discussion list I’m on with this subject line: How to become master writing C# code The discussion that followed had a lot of great ideas and insights, from many well-respected and experienced C# developers. It would be a shame not to share some of the ideas that were offered. Since it’s a private list, I’m refraining from crediting ideas with those who presented…


  • Listing Strongly Typed Enum Options in C#

    Listing Strongly Typed Enum Options in C#

    Date Published: 28 November 2017

    In a previous article, I wrote about the Strongly Typed Enum Pattern in C#, which can be used in place of the built-in enum. Read that article to get a quick understanding of why you might not want to use enum types. Go ahead, this article will still be here. Ok, so in that example, I had a list of options (for instance, Roles) that I wanted to represent using objects instead of primitive enum…


  • Keep master and origin branches working if possible

    Keep master and origin branches working if possible

    Date Published: 22 November 2017

    Here are two tips that teams I work with have found useful when working with git for larger projects with many team members that I thought I would share: Only merge into master if code is working The first tip is that you should only merge (or commit, but that should be rare) into master if your code is working. That is, it compiles and all of its tests run, and not just on your own machine, but…


  • Displaying and Setting Current ASP.NET Assembly Version

    Displaying and Setting Current ASP.NET Assembly Version

    Date Published: 15 November 2017

    When you’re building web applications and you’re setting up continuous integration and delivery pipelines, it’s worthwhile to know which particular version of the application is deployed to a given environment. One of the easiest ways to share this information is from the application itself. Many sites will display build or version information in their footer or on a particular page. You can do…


  • Razor Pages Model NullReferenceException

    Razor Pages Model NullReferenceException

    Date Published: 14 November 2017

    Here’s a quick tip: If you’re adding a new Razor Page to an ASP.NET Core 2.0+ project, and you add a codebehind model class, but then when you try to use it you get a NullReferenceException, this might be why. First, specify the model correctly from the razor page (Index.cshtml): If you’re literally adding just one page to your project, you need to make sure you specify the full namespace of the…


  • Enforcing Model Validation Policy in Web APIs

    Enforcing Model Validation Policy in Web APIs

    Date Published: 09 November 2017

    If you’re exposing a Web API, one of the most basic things you should be doing on every request, and especially on those requests that mutate your system’s state, is ensuring that the data you’re accepting is valid. ASP.NET Core MVC (and Web API 2 and MVC 5, too!) supports model validation as part of the model binding process. You’re likely familiar with it and have seen it used in combination…


  • Encapsulation in Objects and Applications

    Encapsulation in Objects and Applications

    Date Published: 01 November 2017

    Encapsulation is a key principle of software development in general, and object-oriented design in particular. It refers to the ability for constructs (objects, functions, other things) to expose a public interface with which clients can interact, while keeping their internal implementation hidden. Encapsulation offers a host of benefits, most important being to allow the construct in question to…


  • Recent Talks and Interviews at DogfoodCon

    Recent Talks and Interviews at DogfoodCon

    Date Published: 26 October 2017

    Earlier this month I presented a couple of talks at DogfoodConin Columbus, Ohio. Sorry it’s taken me so long to share my presentations, but here they are, finally: Improving the Design of Existing Software from Steven Smith Introducing ASP.NET Core 2.0 from Steven Smith While at DogfoodCon I was also interviewed by DevCoaches for their podcast. You can listen to the episode here, where we talk…


  • ASPNET Core InMemoryDatabase Upgrade Breaking Change

    ASPNET Core InMemoryDatabase Upgrade Breaking Change

    Date Published: 05 October 2017

    There’s a minor breaking change in ASP.NET Core 2.0 that I’ve encountered while updating my Clean Architecture sample. In 1.x, you could configure EF Core to use an In Memory database, and when you did so, you could optionally specify a name: One of the most common scenarios for using an in memory database is for testing. Unfortunately, the state of the in memory database is not reset between test…


  • Your API and View Models Should Not Reference Domain Models

    Your API and View Models Should Not Reference Domain Models

    Date Published: 03 October 2017

    If you’re organizing your application following Clean Architecture and Domain-Driven Design, with your Core domain model in one project that is referenced by your UI and Infrastructure projects, you should be careful what you expose in your client-facing models. Client facing models typically reside in the UI layer as ViewModels or ApiModels, or they may be called DTOs (Data Transfer Objects). In…


  • Better Performance from Async Operations

    Better Performance from Async Operations

    Date Published: 25 September 2017

    The C# language has had support for the async and await keywords (and yet another new way to perform asynchronous operations) for a while now. They’re still confusing to many developers (including me sometimes!) and can be a source of many pitfalls. I mostly work in ASP.NET projects, and the default project templates have all been using async for some time. New developers often assume this is…


  • Weekly Dev Tips Podcast

    Weekly Dev Tips Podcast

    Date Published: 15 September 2017

    I started a weekly newsletter last year that's been going for over 70 weeks now sending a short, practical developer tip each week. You can subscribe to it here if you haven't already. Tips go out every Wednesday at 10am Eastern Time. In August 2017, I launched a podcast with a similar structure. Weekly Dev Tips just published its 5th episode, and each episode so far is under 10 minutes long. They…


  • Tracking Tasks in Visual Studio

    Tracking Tasks in Visual Studio

    Date Published: 12 September 2017

    I was recently mentoring a client remotely who was using Visual Studio. They were demonstrating some of the work they had done and design decisions they had made, and I was listening and asking questions. Occasionally I would make a suggestion. They would stop to take notes somewhere (I don’t recall if it was paper or in another app). I quickly asked if they were familiar with the built-in Task…


  • Working Through Roadblocks - A Guide for New Programmers

    Working Through Roadblocks - A Guide for New Programmers

    Date Published: 06 September 2017

    This is advice that I have given to many novice developers, and that I would like to have been able to give to myself when I just getting started (though some of the advice refers to resources that didn't exist then - alas). If you find it useful, please consider sharing it with someone you know who might also benefit from it. Roadblocks As a programmer or software developer, from time to time it…


  • ASPNET Core Razor Pages – Worth Checking Out?

    ASPNET Core Razor Pages – Worth Checking Out?

    Date Published: 31 August 2017

    You may have heard that in ASP.NET Core MVC 2.0, there is a new feature called Razor Pages. This feature allows you to create pages that don’t need to have a controller or action, and which can optionally have an associated PageModel class instead of a ViewModel. If you’ve been programming for a while, especially in the ASP.NET space, this may trigger some immediate reactions. Oh no! The return of…


  • Using MediatR in ASPNET Core Apps

    Date Published: 30 August 2017

    I've started looking at using MediatR for my domain events implementations. To that end, I created a quick sample project using ASP.NET Core 2.0. Overall things were pretty easy to get going. If you haven’t used MediatR before, or if you’re looking for a quick intro on how to set it up for ASP.NET Core, keep reading (if not, how did you get here? Was the title not clear?). Installing MediatR…


  • Breakpoint Labels in Visual Studio

    Breakpoint Labels in Visual Studio

    Date Published: 29 August 2017

    Breakpoints offer a great way to debug our software, letting us literally stop time during code execution and inspect what's going on at that moment. It's a bit like being a speedster like Quicksilver, who can almost stop time and manipulate the environment between moments in time: Unfortunately, in larger applications, we may find that we have quite a few places where we might want to stop and…


  • Troubleshooting Razor Pages and PageModel Classes

    Troubleshooting Razor Pages and PageModel Classes

    Date Published: 27 August 2017

    When using the new Razor Pages feature in ASP.NET Core 2.0, you can (and usually should) define a separate “codebehind” file for your PageModel class. If you’re using Visual Studio, this class will be associated with your Razor Page as a nested file in the Solution Explorer, making it easy to locate. The class will also be easier to unit test than if you were to put your functionality directly…


  • Debugging ASPNET Core Routes

    Debugging ASPNET Core Routes

    Date Published: 23 August 2017

    Routing in ASP.NET MVC apps has often presented challenges to developers, resulting in a bunch of different route debugging tools and nuget packages. In ASP.NET Core, there tends to be less routing confusion because of the emphasis on attribute routing, rather than the traditional routing tables. With ASP.NET Core 2.0 and Razor Pages, this trend continues since Razor Pages use convention-based…


  • Entity Framework Core String Interpolation FromSql

    Entity Framework Core String Interpolation FromSql

    Date Published: 22 August 2017

    String interpolation is one of my favorite features in C# 6. It lets us replace this kind of code: with this: In Entity Framework Core 1.x, you could use string interpolation for SQL queries, but it would just perform literal string interpolation. For example, consider this code: This will result in the literal SQL string: Running this on your database is likely to result in an error like this one…


  • Roslynator for VS 2017

    Roslynator for VS 2017

    Date Published: 15 August 2017

    Visual Studio 2017 15.3 was released this week, with support for .NET Core 2.0 (also released – download separately here). Over the years, Visual Studio has added more and more tools to increase productivity, slowly catching up to extensions like Resharper. With the availability of Roslyn, it’s never been easier to create your own custom code analyzers and refactorings. Roslynatoris an open source…


  • Logging and Monitoring are Requirements

    Logging and Monitoring are Requirements

    Date Published: 08 August 2017

    It’s common in many applications to see logging and monitoring added into the code as an afterthought. It’s rarely included in the specification for a feature or product, and it’s rarely tested. Thus, it’s often inconsistently implemented. One approach to addressing this is to use techniques like AOP to broadly and consistently add logging via rules. However, this often falls short and doesn’t…


  • Testing Logging in ASPNET Core

    Testing Logging in ASPNET Core

    Date Published: 08 August 2017

    When it’s important, logging should be considered a “real” requirement, not just a developer or operations afterthought. In many cases, especially diagnosis of production problems, logging has real business value. Thus, there are times when you’ll want to test that your logging works. Consider the following function: Let’s assume for a moment that when this exception occurs, it’s potentially…


  • Referencing Common Values Between Apps/Projects

    Referencing Common Values Between Apps/Projects

    Date Published: 23 July 2017

    A pretty common scenario in building real world business software is the need to share certain pieces of information between multiple projects or applications. Frequently these fall into the category of configuration settings, and might include things like: Resource or CDN URLs or base URLs Connection Strings Public/Private Keys and Tokens Some of these are more sensitive than others, obviously…


  • Switch Between git Branches Easily

    Switch Between git Branches Easily

    Date Published: 18 July 2017

    I recently ran across a great tip from Kevin Griffin for how to quickly switch from your current git branch to your previous one: Instead of typing out the full name of the branch when using git checkout, you can simply specify – (minus or dash) to refer to the previous branch. Now think about how you’re going to put all those saved keystrokes to good use.


  • Minimal ASPNET Core Web API

    Minimal ASPNET Core Web API

    Date Published: 12 July 2017

    Inspired by a StackOverflow question, I’ve created a minimal ASP.NET Core Web API app as a learning exercise and aid to troubleshooting web API development. The goal of this app is to demonstrate how little code and how few files are required to build simple web apps and APIs using ASP.NET Core. You can also quickly clone and run the minimal ASP.NET Core Web API app to verify that your…


  • Show All GitHub Issues Assigned to Me

    Show All GitHub Issues Assigned to Me

    Date Published: 04 July 2017

    I’m a big fan of GitHub and the workflow it provides. I find it to be very productive and collaborative, as well as lightweight. I work on quite a few different GitHub repositories, either for my own projects, for open source projects, or for clients. It’s especially helpful in any project with more than a few issues to be able to view just the issues that pertain to me. That might be issues I’ve…


  • Installing Additional App Templates for dotnet new

    Installing Additional App Templates for dotnet new

    Date Published: 28 June 2017

    When you install the.NET Core SDK, you get the dotnet CLI (command line interface), which can be used for ahostofdifferentthings, including creating new projects. You can see which templates are already installed by running By default the SDK installs about 8 templates, with support for C# and F# (and blank solution files). However, there are quite a few additional templates available, and…


  • Why Delete Old Git Branches?

    Why Delete Old Git Branches?

    Date Published: 20 June 2017

    It's a common housekeeping practice to delete git branches once they're no longer used, but this practice isn't necessarily universal, or universally understood. Why should you delete old branches from your git repositories? There are two main reasons: They're unnecessary. In most cases, branches, especially branches that were related to a pull request that has since been accepted, serve no…


  • Automate Testing and Running Apps with dotnet watch

    Automate Testing and Running Apps with dotnet watch

    Date Published: 14 June 2017

    If you’re using the dotnet CLI tools to develop your .NET Core apps, you’re probably very familiar with typing dotnet run and/or dotnet test every time you make a change to your app. This kind of manual process, even if you’re a quick typist (or just use up-arrow, enter), can add friction to your process. Friction is bad, and can bring you out of the zone when you’re trying to focus on improving…


  • An ASP.NET Core Quick Start

    An ASP.NET Core Quick Start

    Date Published: 12 June 2017

    Last month I published a short video course on ASP.NET Core that should help you or your team members get up to speed quickly on ASP.NET Core. This ASP.NET Core Quick Start demonstrates how to be productive using either Visual Studio or VS Code. I’ve been working on ASP.NET Core since the earliest days, and have been contributing to its official documentation for the last two years. My reason for…


  • Set cmd or PowerShell Window Title

    Set cmd or PowerShell Window Title

    Date Published: 07 June 2017

    As CLI tools become more and more popular, it's not unusual that I find I have more than one command, bash, or PowerShell window open. Often, each window is serving a specific purpose. While I really like that I can integrate a command shell right into Visual Studio Code, when I'm not doing that it's nice to be able to give each window a name that makes sense. Setting Window Title of Windows cmd…


  • How to remove untracked local files from git working tree?

    How to remove untracked local files from git working tree?

    Date Published: 31 May 2017

    There are two ways to get rid of untracked files from your git working tree. The first one, which many of us have done, is to simply go to a new folder (or delete the current one) and perform a fresh git clone operation. This “burn it to the ground and start from scratch” approach works, but there is a more elegant solution: git clean. To use git clean, it’s a good idea to first run it with the -n…


  • How do I Update a Nuget Package using dotnet CLI

    How do I Update a Nuget Package using dotnet CLI

    Date Published: 25 May 2017

    The current version of the dotnet command line interface provides features to add a nuget package, but doesn’t expose a separate command to update them. However, you can actually achieve this by simply running the dotnet add package command, for example: If you don’t provide a version flag, this will default to upgrading to the latest version. To specify a version, add the -v parameter: Here you…


  • Should I Use WebListener or Kestrel or IIS on Windows?

    Should I Use WebListener or Kestrel or IIS on Windows?

    Date Published: 24 May 2017

    Someone recently asked this question on GitHub, and I thought it was worth spreading this information more widely: I’ve been doing some research to figure out the best option to self host ASP.NET Web Api on Windows. Some articles recommend using WebListener for client facing services and other state that Kestrel is faster and can be used behind an IIS proxy. What is the better option? I understand…


  • Science of Great UI Reviewed

    Science of Great UI Reviewed

    Date Published: 22 May 2017

    I’m reviewing Mark Miller‘s online course, The Science of Great UI. This course is the first in a series, with the forthcoming Design Like a Pro as the second, and several more planned after that. Mark’s pace in the course is very measured, so even if English isn’t your first language, you should have no trouble following along. For me, I was able to adjust the player speed to 1.5x and still…


  • Group Your Constants and Enums

    Group Your Constants and Enums

    Date Published: 17 May 2017

    It's not unusual in applications to have a few constants defined for things you know are never going to change (so you don’t need to store them in the database, or if they are in the database, you don’t need to fetch them every time you need them). I usually like to keep these in a single file called Constants.cs in my .NET/.NET Core applications, so that anywhere I need a constant I can reference…


  • Developer Insights from StackOverflow 2017 Survey

    Developer Insights from StackOverflow 2017 Survey

    Date Published: 15 May 2017

    StackOverflow published the results of their 2017 Developer Survey. They been conducting this survey for some time now, and they obviously have access to a lot of data and developer demographics. 64,000 people took the survey, which makes it pretty accurate, statistically speaking. Here are a few insights I found interesting and worth sharing. Exponential Growth If you look at the section, Years…


  • ASPNET Core 2 Preview 1

    ASPNET Core 2 Preview 1

    Date Published: 12 May 2017

    This week a public preview of ASP.NET Core 2 was made available at Microsoft’s /BUILD event. You can install it side-by-side with your existing ASP.NET Core install, and you can also install Visual Studio 2017 update 3 to go with it. Download both here: .NET Core 2.0 Preview 1 SDK Visual Studio 2017 Preview Version 15.3 Download Highlights of What’s New Packages for the framework have been…


  • Prefer Custom Exceptions to Framework Exceptions

    Prefer Custom Exceptions to Framework Exceptions

    Date Published: 10 May 2017

    An easy way to make your software easier to work with, both for your users and for developers, is to use higher level custom exceptions. Low level exceptions like NullReferenceException or ArgumentNullException should rarely be returned from business-level classes, where most of your custom logic should reside. By using custom exceptions, you make it much more clear to everybody involved what the…


  • When Should You Upgrade to ASP.NET Core?

    When Should You Upgrade to ASP.NET Core?

    Date Published: 02 May 2017

    ASP.NET Core 1.0 shipped last summer. Then ASP.NET Core 1.1 shipped last fall. Overall, the framework and server-side components have been pretty solid, with few major bugs reported, and a bunch of nice features added to both ASP.NET and Entity Framework Core in the 1.1 release. However, the tooling story lagged for a while (as is typical), and while normally this wouldn’t be such a big barrier to…


  • Registering Open Generics in ASPNET Core Dependency Injection

    Registering Open Generics in ASPNET Core Dependency Injection

    Date Published: 30 April 2017

    If you have a generic interface and implementation that you want to configure for dependency injection in ASP.NET Core startup, there is a simple way to do so. If you only use the generic methods for adding services, such as: then you will not find a way to do it. You can’t do this: Instead, you need to use the non-generic overload of the method, and use the keyword to specify your open…


  • Are You a Profit Center or a Cost Center?

    Are You a Profit Center or a Cost Center?

    Date Published: 26 April 2017

    I recently was on a panel at the Hudson Ohio coworking space Tech Hub Hudson organized by the Akron Women in Technology group. There were four other panelists (I was a last minute addition) and the topic of the evening centered around advice for junior developers. There was a lot of great experience shared both by the panel and by audience members, and I'll probably draw on some of it again in…


  • A Year of Tips

    A Year of Tips

    Date Published: 19 April 2017

    I started my Developer Tips Weekly newsletter a year ago this week – today the 53rd tip is being sent. It hasn’t always been easy, even though often the tips are very short and simple. Publishing at exactly 10am every Wednesday without fail has taken some discipline. Along the way, I’ve learned a few things, which I thought I’d share. Numbering is Hard Apparently I’m not very good at incrementing…


  • Share What You Learn (even if you're not an expert)

    Share What You Learn (even if you're not an expert)

    Date Published: 12 April 2017

    A lot of people, myself included, suffer from imposter syndrome. That feeling that you're really not good enough to be doing whatever it is you're doing. Maybe it's writing a blog. Maybe it's public speaking. Maybe it's just answering a question in front of a group, team, or class. Imposter syndrome is a real thing, and it's incredibly common, so first off, realize that most people feel that way…


  • Avoid Lazy Loading Entities in ASP.NET Applications

    Avoid Lazy Loading Entities in ASP.NET Applications

    Date Published: 04 April 2017

    Lazy Loading is an Entity Framework feature that lets you worry less about the specific amount of data you need to fetch with a given query. Instead, you write simple queries, and Entity Framework (or other OR/M tools that support this feature) will load the minimal amount of data (which is a good thing), and then will only fetch additional data on an as-needed basis. That is, rather than eager…


  • How to Make Git Forget Tracked Files Now In gitignore

    How to Make Git Forget Tracked Files Now In gitignore

    Date Published: 28 March 2017

    When you set up a new git repository, if you don’t properly configure a .gitignore file at the start, it can bite you later if you’ve already committed and pushed files that you really wished you’d kept out of the repo. If you’re working with GitHub, and you’re starting the repository from GitHub (rather than locally), remember to choose an option from the Add .gitignore dropdown: If you do…


  • Cloud Messaging – Amazon or Azure?

    Cloud Messaging – Amazon or Azure?

    Date Published: 15 March 2017

    When architecting solutions that need to communicate between separate services or applications,messages queues and services buses become increasingly important. Both Microsoft Azure and Amazon AWS offer products that support these operations, essentially allowing you to efficiently send text-based messages from one application to another. There are many benefits to this approach over directly…


  • Live Unit Testing in Visual Studio 2017

    Live Unit Testing in Visual Studio 2017

    Date Published: 08 March 2017

    Visual Studio 2017 has a new feature called Live Unit Testing. It’s currently not> available for .NET Core projects, but you should see it as an option in your standard .NET projects. Live Unit Testing is currently only available in the Enterprise SKU (see feature comparison) – click here to grab a free trial if you want to check it out. Update: Live Unit Testing now works with .NET Core projects…


  • How to Start Multiple Projects in Visual Studio

    How to Start Multiple Projects in Visual Studio

    Date Published: 25 February 2017

    If you have multiple projects that need to interact with one another, you can configure Visual Studio to launch multiple projects whenever you press F5/ctrl+F5. To do so, right-click on the solution and go to Properties: By default the solution will typically be set to a Single startup project, such as if you were to right-click on a project and choose “Set as Startup Project”. However, from here…


  • Clean up unused git branches

    Clean up unused git branches

    Date Published: 22 February 2017

    If you’re using git and creating branches, then making pull requests, and ultimately merging them back into your main/master branch, you may end up with unused branches cluttering your repository. They don’t really hurt anything, but they can add some clutter and make it more difficult to find the branches that are actually in use. Wouldn’t it be nice if you could easily identify which ones were…


  • DDD with ASPNET Core Workshop at DevIntersections

    DDD with ASPNET Core Workshop at DevIntersections

    Date Published: 14 February 2017

    I’ll be teaching a one-day workshop at DevIntersections’ spring show on Domain-Driven Design with ASP.NET Core. I gave this workshop, which includes an interactive lab in which you’ll build a working app, in October to a sold-out crowd, so you may need to register early to make sure you get a spot (or to make sure they put me in a large enough room). When you register, at the bottom of the form…


  • GitHub Pull Request Checklist

    GitHub Pull Request Checklist

    Date Published: 14 February 2017

    I really like the workflow that GitHub Pull Requests allow. It’s great even in tiny projects to be able to get a code review for a given set of changes, and the UI for GitHub’s Pull Requests is better than any other source control system I’ve used (and doesn’t require buying an expensive tool or client software). However, if you’re new to pull requests, there are a few moving parts, so it can be…


  • How to Manage Solution Projects using dotnet CLI

    How to Manage Solution Projects using dotnet CLI

    Date Published: 08 February 2017

    You can use the latest version of the dotnet CLI (installed by default with the latest version of Visual Studio 2017, or available here) to manage the projects included in your solution file(s). The command line tool now exposes three new commands off of the ‘sln’ command: The command accepts the name of the solution file as an optional argument, but if it’s not specified it will use one from the…


  • How to add a Nuget Package Using dotnet add

    How to add a Nuget Package Using dotnet add

    Date Published: 01 February 2017

    A feature I’ve long wished for in .NET Core and its command line interface (CLI) is the ability to manage nuget references from the command line. This becomes increasingly important as the final version of the tooling for .NET Core (and Visual Studio 2017) moves from a JSON-based project file to an XML-based one (for compatibility with the hundreds of other projects Visual Studio supports in that…


  • What’s New in C# 6

    What’s New in C# 6

    Date Published: 01 February 2017

    Last month, Brendan Enrick published a short course on What’s New in C#6. He also presented a standing-room-only session on the subject at CodeMash (people were blocked from trying to get in from the hall, the room was so packed). Even though some of these features have been available for a while, a lot of developers aren’t yet familiar with all of them or haven’t yet upgraded to the latest…


  • Bus or Queue

    Bus or Queue

    Date Published: 25 January 2017

    A common question I encounter is, “what is the difference between a message bus (or service bus) and a message queue?” There has been some blurring of the lines between these two concepts, as some products now support features that previously belonged only to one or the other category (for instance Azure Service Bus supports both approaches). Message Queue A message queue receives messages from…


  • Force Nuget to Reinstall Packages without Updating

    Force Nuget to Reinstall Packages without Updating

    Date Published: 19 January 2017

    Occasionally I run into an issue where I’ll open a solution in Visual Studio, build it, and the build will fail because of dependent packages. I’ll try every way offered by Visual Studio to restore packages, but it will claim everything is up to date. Looking in Solution Explorer, you’ll see that some packages are clearly missing (icons on the packages showing they’re not there), but no amount of…


  • Encapsulated Collections in Entity Framework Core

    Encapsulated Collections in Entity Framework Core

    Date Published: 18 January 2017

    Starting with Entity Framework Core 1.1, you can now have properly encapsulated collections in your classes that rely on EF for persistence. Previous versions of EF have required collection properties to support ICollection, which means any user of the class can add or remove items from its properties (or even Clear it). If you’re writing good code that encapsulates business behavior in an entity…


  • xUnit Test Discovery Error with ASPNET Core 1.1

    xUnit Test Discovery Error with ASPNET Core 1.1

    Date Published: 17 January 2017

    If you run into an error with test discovery using xUnit and ASP.NET Core 1.1 where there is a FileNotFoundException looking for Microsoft.DotNet.Internal.Abstractions version 1.0.0.0, there is a fairly simple fix. The problem is that one of the dependent packages in ASP.NET Core requires this package but for some reason it’s not being pulled in. You can get around the issue by explicitly…


  • Use an Integrated Shell Console Terminal in VS Code

    Use an Integrated Shell Console Terminal in VS Code

    Date Published: 05 January 2017

    VS Code is a lightweight code editor available for free from Microsoft. It’s a great, open-source tool for quick edits, or even for all day coding. While I think most users of VS Code are comfortable having it open separately from their command line environment, you can also host an integrated shell (console or terminal) within VS Code itself. This can be nice if you want to use it in full screen…


  • Detect git Conflict Markers

    Detect git Conflict Markers

    Date Published: 04 January 2017

    This is post 2 of 2 in the series “Developer Tips” Check In Often Detect git Conflict Markers Tips for developers, archived from Dev Tips Weekly emails. If you’re using git, you’ve probably run into a problem at some point where you’ve had to perform a merge, and a merge conflict resulted. This happens when two different commits changed the same line in a file, and git can’t tell which commit…


  • Avoid Referencing Infrastructure in Visual Studio Solutions

    Avoid Referencing Infrastructure in Visual Studio Solutions

    Date Published: 14 December 2016

    The dependency inversion principle states that your application’s abstractions should not depend on implementation details, but rather implementation should depend on abstractions. In Clean DDD architected applications, you’ll typically have a class library called Core (or something similar) which houses the domain model, including the main abstractions. Your implementation libraries…


  • The Minimal ASPNET Core 1.1 App

    The Minimal ASPNET Core 1.1 App

    Date Published: 12 December 2016

    In a previous article, I described how to create the minimal ASP.NET Core 1.0 app. That is, what’s the smallest amount of code you could write to produce an ASP.NET Core application? In this article, I’ll demonstrate how to do the same for ASP.NET Core 1.1. The main difference is in the project file, which has moved from project.json to a .csproj format. If you’re just getting started with .NET…


  • Developer on Fire Interview

    Developer on Fire Interview

    Date Published: 08 December 2016

    I recently spoke with David Rael of the Developer on Fire podcast. We talked about a lot of things in our 40 minute conversation. Here are some of the highlights: How I got into software development What excites me about building software My entrepreneurial experience My involvement in ASP.NET Core and .NET Core Personal stories of success and failure Book recommendations Mentoring and Parenting…


  • Open Command or Powershell Window From Explorer

    Date Published: 07 December 2016

    Command line tools are becoming increasingly popular, so this tip may save you some time. On Windows, there are several ways to open up a command window. My typical method is to just hit the Start key and type 'cmd' and then enter. This will open a window in my user folder, which is exactly where I want to be precisely 0% of the time. From there, it's usually just a few dozen commands to change…


  • UseStatusCodePages Middleware Problem Resolved

    UseStatusCodePages Middleware Problem Resolved

    Date Published: 01 December 2016

    If you’re trying to get the ASP.NET Core Status Code Pages middleware to work, but it just is ignored no matter what, one thing to check is the rest of your middleware pipeline. If you have middleware that is writing anything to the response, it will cause the status code pages middleware to be ignored. For example, the following middleware: I had this set up in front of some other middleware to…


  • Be a Thankful Developer

    Be a Thankful Developer

    Date Published: 23 November 2016

    It doesn’t cost much to acknowledge those who have helped you, and it can be very rewarding. Regardless of where you are in your career as a software developer (or most other careers, but this is mainly directed at developers), show appreciation for those who make your job easier or who help you improve. This might be a peer or mentor who takes the time to guide you, it could be your boss or your…


  • Now Shipping 2017 Software Craftsmanship Calendars

    Now Shipping 2017 Software Craftsmanship Calendars

    Date Published: 15 November 2016

    DevIQ‘s annual software craftsmanship wall calendar’s 2017 edition has arrived from the printer and is shipping now. If you didn’t back the Kickstarter campaign, you can still order one while supplies last from store.deviq.com. You can also pick up adigital image pack (available December 2016), suitable for PowerPoint presentations and desktop backgrounds. If you’re not familiar with the idea of…


  • 4 Tips to Integrate TeamCity and GitHub

    4 Tips to Integrate TeamCity and GitHub

    Date Published: 06 November 2016

    TeamCity Logo I've been a fan of JetBrains TeamCity for many years now. It's a great continuous integration / build server product, with an extremely responsive web-based user interface that's great to work with. What's more, the basic version supports up to 20 projects for FREE, which is tough to beat. However, like peanut butter and chocolate, TeamCity gets even better when combined with GitHub…


  • Avoid Storing Database Credentials in Source Control

    Avoid Storing Database Credentials in Source Control

    Date Published: 19 October 2016

    Your application probably needs to communicate with a database of some kind. Naturally, that database isn’t open to the world – it needs to be protected and secured. The typical solution to this is to create a username and password combination (ideally, specific to each application or user that requires access) and configure the application with these credentials. In many cases, they’re simply…


  • DogFoodCon 2016 Sessions

    DogFoodCon 2016 Sessions

    Date Published: 06 October 2016

    I presented at DogFoodCon 2016 yesterday, which had 400+ attendees and wrapped up today. It’s a great 2-day event that’s been going strong for close to 10 years, and is just one of several developer conferences in Ohio that consistently offer great quality content for very reasonable prices, and which consequently sell out their venue (CodeMash and Stir Trek being two others). Thanks to everybody…


  • Your Recent Mentions on GitHub

    Your Recent Mentions on GitHub

    Date Published: 26 September 2016

    The other day I saw someone mention me in a pull request for a client’s GitHub repository (probably on my phone). When I had some time to look into the issue, I’d deleted the email notification, and I couldn’t remember which repository it was on (they have a few). So I checked my GitHub profile page, figuring it would show things that recently mentioned me. Unfortunately, not. I posted to twitter…


  • Configuring ASPNET Core Apps with WebHostBuilder

    Configuring ASPNET Core Apps with WebHostBuilder

    Date Published: 09 September 2016

    In ASP.NET Core apps, you typically configure the application in Startup. However, the application itself runs inside of a host, which is configured separately using a WebHostBuilder. Although it’s not the default, recommended case (and thus isn’t shown in the official docs), you can actually configure the application directly from WebHostBuilder and avoid using a Startup class entirely (or…


  • Specifying API Routes in ASPNET Core

    Specifying API Routes in ASPNET Core

    Date Published: 08 September 2016

    ASP.NET Core uses attribute routing to determine the behavior of web APIs. Its integrated support for MVC and Web API is one of my favorite features, since working with MVC 5 and Web API 2 was painful due to the similarities but separate implementations of the two stacks. When creating routes for your APIs, a common approach is to use something like this: When applied to a particular API…


  • Nuget Package Source Update Important

    Nuget Package Source Update Important

    Date Published: 07 September 2016

    Today a client reported an issue with their build server, which was failing to locate version 4.4 of StructureMap. The build worked fine, locally, on more than one machine. After some investigation, we discovered that the build server’s Nuget task was configured to use several sources, including an internal feed the client uses, and this one: https://www.nuget.org/api/v2/ This is obviously a…


  • MSDN – Feature Slices for ASPNET Core MVC

    MSDN – Feature Slices for ASPNET Core MVC

    Date Published: 02 September 2016

    My September article for MSDN Magazine is available online now. It’s on Feature Slices for ASPNET Core MVC, but also covers how to use the built-in Areas feature to achieve the same goal. Large Web apps require better organization than small ones. With large apps, the default organizational structure used by ASP.NET MVC (and Core MVC) starts to work against you. You can use two simple techniques…


  • Refactoring Static File System Access

    Refactoring Static File System Access

    Date Published: 16 August 2016

    Years ago, I was trying to test an application I’d written, but couldn’t figure out how to remove a dependency it had on the file system. At the time, I was familiar with unit testing, and had bought into its value both as a developer and as a business owner (this was software that was central to my business at that time), but I was stymied by some code that looked something like this: `public…


  • Refactoring Static System Clock Access

    Refactoring Static System Clock Access

    Date Published: 10 August 2016

    If you have logic that depends on dates and/or times, it can be difficult to test if it’s directly accessing the system clock (via DateTime.Now in .NET, for example). This is an example of an insidious dependency that can add unnecessary coupling to an application, making it harder to maintain. Fortunately, it’s pretty easy to refactor your code to address this issue. First, realize that you don’t…


  • Real World ASPNET Core MVC Filters

    Real World ASPNET Core MVC Filters

    Date Published: 08 August 2016

    Filters are a great, often underutilized feature of ASP.NET MVC and ASP.NET Core MVC. They provide a way to hook into the MVC action invocation pipeline, which makes them ideal for pulling common repetitive tasks out of your actions. Often, an app will have a standard policy that it applies to how it handles certain conditions, especially those that might generate particular HTTP status codes. Or…


  • Persisting the Type Safe Enum Pattern with EF 6

    Persisting the Type Safe Enum Pattern with EF 6

    Date Published: 04 August 2016

    I’ve written about Enum Alternatives in C#, and a common problem developers encounter when they try to use such an approach is persistence. By default, ORM tools like Entity Framework don’t know what to do with these custom types. However, you can add support to let EF map these types to database columns as you would expect without too much effort. Here’s a quick example you can try yourself with…


  • Refactoring Static Config Access

    Refactoring Static Config Access

    Date Published: 03 August 2016

    A common but insidious dependency in many .NET applications is their use of configuration, including appSettings. The main issue is static access to config for values that affect the behavior of the application (values that are simply displayed, or used for things like email servers or addresses, aren’t usually an issue). Imagine you have some code like this: Imagine this method is used to gather…


  • Use jQuery to Format Buttons Same Width

    Use jQuery to Format Buttons Same Width

    Date Published: 29 July 2016

    Some (many) user interfaces work best when buttons are sized identically, so that instead of this: or this: You have something like this: This is pretty easy to do in JavaScript, and jQuery make it simple to apply the logic to a set of buttons with a common class. You can create a function, widest(), that, when applied to a set of buttons, sets its width to the widest button in the set. This is…


  • Enum Alternatives in C#

    Enum Alternatives in C#

    Date Published: 27 July 2016

    Some time ago I wrote about Moving Beyond Enums and published an article on ASPAlliance by the same title. Unfortunately the latter article was largely screenshot-based, and those images seem to have disappeared, so I thought I’d revisit the topic here. Enums are simple value-type flags that provide very minimal protection from invalid values and no behavior. They’re helpful in that they’re an…


  • Logging and Using Services in Startup in ASPNET Core Apps

    Logging and Using Services in Startup in ASPNET Core Apps

    Date Published: 25 July 2016

    When you set up an ASP.NET Core app, most of the time you begin with the Startup.cs file, which provides essentially three places where you can add code: Constructor ConfigureServices Configure Naturally, the constructor fires first. Then, ConfigureServices is run, and finally the Configure method. You can learn more about this process in myApplication Startup Fundamentals article on docs.asp.net…


  • How to List All Services Available to an ASP.NET Core App

    How to List All Services Available to an ASP.NET Core App

    Date Published: 25 July 2016

    In a recent article, I showed how to configure logging for your Startup class in ASP.NET Core. With this configured, it’s easy to log all of the services that have been configured in ASP.NET Core services container. This can be very useful when diagnosing issues with ASP.NET Core’s support for dependency injection. Grab the code from the other post to get access to the logger in your…


  • The Minimal ASPNET Core App

    The Minimal ASPNET Core App

    Date Published: 21 July 2016

    Now updated for ASP.NET Core 1.1 here. There’s no upper limit on how large an ASP.NET Core app can get, but what about how small you can make it? With the new .NET Core framework, the answer is pretty small. Let’s see just how small. First, make sure you have the dotnet CLI tools installed. You can get them from dot.net. This sample will work on Windows as well as Mac and Unix. Next, open a…


  • Flexible Deployments Using TeamCity

    Flexible Deployments Using TeamCity

    Date Published: 12 July 2016

    I’m a big fan of JetBrains TeamCity for continuous integration (CI). It has a great web-based user interface, is extremely easy to set up and get running, and is also very flexible. What’s more, it’s free for up to 20 different build configurations, with multiple build agents (so your builds run in parallel). It’s an amazing deal and if you need more than 20 build configurations, you should be…


  • Check In Often

    Check In Often

    Date Published: 12 July 2016

    This is post 1 of 2 in the series “Developer Tips” Tips for developers, archived from Dev Tips Weekly emails. Check in your code. Often. It doesn’t matter if you’re using Team Foundation Server, Git, Subversion, or another form of source control, you should be sure to check in your code frequently. Right now, do you have code that you’re working on (or were working on) and which isn’t checked in…


  • Static Code Analysis and Quality Metrics

    Static Code Analysis and Quality Metrics

    Date Published: 08 July 2016

    This is post 1 of 1 in the series “Measuring and Managing Software Quality” Resources for measuring and assessing software quality. Assessing the quality of software can be a difficult, often subjective process. Having some heuristics and metrics that measure an application’s source code provides a useful starting point, and observing these metrics over time can identify important trends. Is the…


  • Multi-Term jQuery Table Filter

    Multi-Term jQuery Table Filter

    Date Published: 30 June 2016

    Recently I was mentoring a client who needed a simple filter for a table of data. In this case, they weren’t using a viewmodel-based framework, so it wasn’t an option to simply modify the collection to which the table was bound. We needed to use old school jQuery. Fortunately, a bit of searching yielded some code that mostly did the trick. We cleaned it up a bit and enhanced it. The source version…


  • Using Custom Middleware to Record and Fix 404s in ASPNET Core Apps

    Using Custom Middleware to Record and Fix 404s in ASPNET Core Apps

    Date Published: 14 June 2016

    My most recent article in MSDN Magazine is now available online: ASP.NET – Use Custom Middle Middleware to Detect and Fix 404s in ASP.NET Core Apps The article was written in the ASP.NET 5 RC1 timeframe, but the sample code has been updated to RC2 and is available on GitHub. From the introduction: If you’ve ever lost something at a school or an amusement park, you may have had the good fortune of…


  • Writing Clean Code in ASPNET Core with DI

    Writing Clean Code in ASPNET Core with DI

    Date Published: 27 May 2016

    I’ve started writing a series on ASP.NET Core for MSDN Magazine. If you’re not a subscriber to the dead trees version, you can read them online. My first article is on Writing Clean Code in ASP.NET Core with Dependency Injection, in the May 2016 issue. Here’s a brief intro: ASP.NET Core 1.0 is a complete rewrite of ASP.NET, and one of the main goals for this new framework is a more modular design…


  • How to Target netcoreapp and net461 from ASPNET Core

    How to Target netcoreapp and net461 from ASPNET Core

    Date Published: 24 May 2016

    The default templates for ASP.NET Core RC2 apps only target “netcoreapp1.0”. If you wish to have one app target multiple frameworks, you can do so by first adding the new framework to the list in project.json (e.g. “net461” for .NET Framework 4.6.1). However, once you do this you’ll get an error that Microsoft.NETCore.App is broken and perhaps an error like this one: error NU1002: The dependency…


  • How To Specify Framework When Running ASPNET Core Apps

    How To Specify Framework When Running ASPNET Core Apps

    Date Published: 23 May 2016

    In .NET Core, you can target multiple frameworks from the same application. Where there are incompatibilities, you can use precompiler directives, like so: `#if NET461 // access something that requires full .NET framework // like the Windows event log endif` However, if you have this in an application that also runs “netcoreapp1.0” it will probably run with that by default. To force it to run…


  • Upgrading from ASPNET Core RC1 to RC2 Guide

    Upgrading from ASPNET Core RC1 to RC2 Guide

    Date Published: 15 May 2016

    There are a number of breaking changes between ASP.NET Core RC1 and RC2. If you have existing apps targeting RC1, here are some things you should expect to change in order to upgrade the apps to RC2. Consider this an “unofficial” guide. Update: Theofficial docs have a bunch of great content on this as well – this was just my own personal notes that worked for my projects. NuGet Sources Make sure…


  • ASP.NET Core Training – June 2016

    ASP.NET Core Training – June 2016

    Date Published: 02 May 2016

    If you’ve been wondering when the time would come for you to start learning about ASP.NET Core, it’s quickly approaching. ASP.NET Core RC2 should be available some time in the next few weeks, and I’m going to be teaching a 2-day online class on ASP.NET Core June 14-15 2016. The first day will cover ASP.NET Core fundamentals; the second day will offer an overview of ASP.NET Core MVC. Both sessions…


  • Code Quality and Testing – DevIntersection Spring Presentations

    Code Quality and Testing – DevIntersection Spring Presentations

    Date Published: 22 April 2016

    This week I presented at the sold-out DevIntersection spring conference, held at the Disney Swan hotel in Orlando, Florida. Overall this was a great show with more attendees than expected (always a good problem to have), and of course it was great to see many of my friends and colleagues. On Monday I sat in on Damian Edwards’ workshop on ASP.NET Core, which went well but was a bit rough due to the…


  • Thread.Sleep in Tests Is Evil

    Thread.Sleep in Tests Is Evil

    Date Published: 22 April 2016

    Do you have calls to Thread.Sleep in your test code? If you’re not sure, you can easily find out by opening up the project in Visual Studio and running Find in Files (ctrl-shift F): Thread.Sleep will, not surprisingly, dramatically slow down your test suite. The primary reason is that it’s waiting longer than it has to, every time. Consider an example. You have an integration test that depends on…


  • ASP.NET Shared Authentication Problem Solved

    ASP.NET Shared Authentication Problem Solved

    Date Published: 12 April 2016

    Last week I worked with a client to solve an issue they were having with a new ASP.NET 4.x application they had created using Visual Studio 2015. Their site is set up so that all of the authentication occurs through a shared, single-sign on, web site. Individual web projects are then hosted as subdomains which share the authentication cookie. It looks something like this: admin.foo.com (root…


  • How to find all objects in a SQL Server Schema

    How to find all objects in a SQL Server Schema

    Date Published: 07 April 2016

    Today I’m migrating some databases from one server to another. Some of these applications are quite old, and user accounts that were created for them belong to people who have long since left the project. As I delete the users, SQL Management Studio asks me if I want to delete the associated schema. My thought process is “Yes… ? Wait, what will that delete, exactly?” Unfortunately, it doesn’t tell…


  • Logging Method Counts and Durations

    Logging Method Counts and Durations

    Date Published: 31 March 2016

    Remember the rules of optimization: Don’t do it! Don’t do it, yet. Avoid premature optmization. Profile before optimizing So, assuming you believe some optimization is warranted and you want to identify where it makes sense to do so, the important thing is to profile the current performance behavior of the application before you make any attempts at optimizing it. There are many tools available…


  • Custom Software Craftsmanship Workshop

    Custom Software Craftsmanship Workshop

    Date Published: 26 February 2016

    Last month I was invited to put on a customized workshop for one of my mentoring clients. The group included developers, testers, and technical management team members, totaling about a dozen people. I thought others might find some of what we discussed useful, so I’m posting some notes about the workshop here. If you think I could help your team or application improve, through remote mentoring or…


  • Configure NLog to Log Application-Specific Data

    Configure NLog to Log Application-Specific Data

    Date Published: 24 February 2016

    NLog is one of my favorite .NET loggers. It has a bunch of great features, is easy to configure via a config file or programmatically, and is very extensible. Recently I had a customer who wanted to improve the logging in their web-based application. They wanted to log to a database, since that was what they had been doing successfully, and they wanted to be able to easily store the associated…


  • Configure NLog with StructureMap

    Configure NLog with StructureMap

    Date Published: 22 February 2016

    In a couple of recent posts, I demonstratedhow to set up StructureMap 4 in a simple .NET console application, and how to configure NLog to capture and record some app-specific fields with each logged entry (well, to be able to do so if desired, anyway). If you’re using StructureMap already in your application, you may want to leverage it for your logging as well. Let’s consider that, and then show…


  • Using StructureMap 4 in a Console App

    Using StructureMap 4 in a Console App

    Date Published: 20 February 2016

    If you’re using an older version of StructureMap or want more of an introduction, please read A Gentle Introduction to StructureMap, which includes a console application for StructureMap 2.x. StructureMap 4 is currently the latest version (v4.0.1.318) and is what I’m using for this example. The old ObjectFactory type is no more; instead you create instances of Container as needed. For a simple…


  • Speed Up Visual Studio Build Times

    Speed Up Visual Studio Build Times

    Date Published: 04 February 2016

    Although compiling is still the #1 programmer excuse for slacking off, you still probably don’t want to spend more time on it than you absolutely have to. If your Visual Studio builds take longer than you would like, there are a couple of things you can do. First, if you’re still using a spinning-metal disk drive, upgrade to an SSD. You can get a 250GB SSD for under $100 these days on Amazon, and…


  • ASP.NET Core Naming History and Reaction

    ASP.NET Core Naming History and Reaction

    Date Published: 20 January 2016

    What was previously known as ASP.NET 5 will henceforth be called ASP.NET Core 1.0. You can read the official announcement for more details. Learn more about the platform itself. This is a very good thing because it will alleviate confusion about just what this version of Microsoft’s main server-side web framework is and how it relates to their previously released products – most importantly ASP…


  • ASP.NET 5 Migration to RC1 Notes

    ASP.NET 5 Migration to RC1 Notes

    Date Published: 16 December 2015

    I’ve been migrating a number of articles from docs.asp.net to RC1 from beta8 (and earlier) and these are some of my notes. You may also find the following links helpful: Eric Anderson Migration from Beta 8 to RC1 DamienBod Updating to Beta8 from Older Beta Versions Shawn Wildermuth Upgrading ASP.NET 5 Beta 8 to RC1 View All Breaking Changes from Beta8 to RC1 on GitHub Get Latest Version The first…


  • Accepting New Clients

    Accepting New Clients

    Date Published: 14 December 2015

    I’ve recently left my role as Chief Technology Officer at Falafel Software to focus more on what I really enjoy: mentoring teams and helping developers improve the quality of their skills and applications. Falafel is a great company and I continue to work with them, providing services to several clients, but I am now also making my services available directly (as well as working on several online…


  • The 5 Laws of Software Estimates

    The 5 Laws of Software Estimates

    Date Published: 24 November 2015

    Estimates are typically a necessary evil in software development. Unfortunately, people tend to assume that writing new software is like building a house or fixing a car, and that as such the contractor or mechanic involved should be perfectly capable of providing a reliable estimate for the work to be done in advance of the customer approving the work. This is pretty attainable by building…


  • BuiltWith Web Analytics

    BuiltWith Web Analytics

    Date Published: 09 November 2015

    If you’re looking for information on adoption of a given platform, framework, or JavaScript library,BuiltWithhas a nice site with tools and reports for that. You can view pie charts of current distribution: or view trends over the last year (or longer with a paid account). For instance,here’s the trend chart for ASP.NET. You can also use Builtwith to inspect how a given site is built, and what…


  • Troubleshooting Strongly Named Assembly Errors in ASP.NET Core

    Troubleshooting Strongly Named Assembly Errors in ASP.NET Core

    Date Published: 08 November 2015

    Last week I tried to work with the latest (beta 8) version of theMusic Store samplefor ASP.NET 5 (now ASP.NET Core). After pulling down the code via Git, I tried to build the solution the first time, and got a bunch of weird errors. I tried to troubleshoot the problem by rebuilding, cleaning, forcing Nuget to do an update, and trying to run the package restore and build from the command line, all…


  • Web Security Resources

    Web Security Resources

    Date Published: 07 November 2015

    Last month I attended a workshop put on by none other than Troy Hunt. Try had a ton of great security tips, as well as some online resources. I took notes, and have been meaning to post some of the links here for my (and your) future reference. To get the full scoop on these and other tools and resources, check out Troy Hunt’s Pluralsight Courses. NeedADebitCard First, there are a lot of people…


  • Contributing to ASP.NET Core Documentation

    Contributing to ASP.NET Core Documentation

    Date Published: 03 November 2015

    If you’re looking to learn ASP.NET 5, the best place to start today is the documentation site atdocs.asp.net. It’s hosted on ReadTheDocs and the source is all in GitHub (/aspnet/docs). Since it’s all open source, you can contribute to the documentation yourself, which is a great way to learn ASP.NET 5 and help your fellow developers. I’ve created a short video that walks you through the process…


  • Using Reverse Package Search in ASP.NET Core

    Using Reverse Package Search in ASP.NET Core

    Date Published: 02 November 2015

    ASP.NET 5 provides a much more granular way of specifying the dependencies your applications has. This is done in the project.json file, like so: But what happens if you can’t remember where some package is located? Maybe you’re building an ASP.NET 5 application and you want to add logging to it. You remember that Logging is located in the AspNet repository on GitHub, so naturally you figure it…


  • DevIntersection 2015 Sessions On Code Quality

    DevIntersection 2015 Sessions On Code Quality

    Date Published: 29 October 2015

    This week I’m presenting in Las Vegas at DevIntersection. My session yesterday was on Improving the Quality of Existing Software, and touched on refactoring techniques,SOLID,code smells, and a call to action for developers to build their skills to the point where they can write what they consider quality code faster than poor quality code, imagine what that would mean (both individually as well as…


  • Nulls Break Polymorphism

    Nulls Break Polymorphism

    Date Published: 26 October 2015

    Sir Charles Hoare has called it his “billion dollar mistake.” The .NET exception related to it is one of the most common, most hated, and often most useless exceptions the system provides (since the variable in question is never specified by the exception). Yes, I’m talking about null. One of the reasons null references are so problematic in object-oriented programming languages like C# is that…


  • Get Started With dnx-watch

    Get Started With dnx-watch

    Date Published: 16 October 2015

    With the release of ASP.NET 5 / DNX Beta 8, there is now a new command line tool, dnx-watch, that can be used to automatically re-run dnx commands in response to file changes. This can be useful when making quick updates to a web application or while practicing Test Driven Development. To get started, open a command prompt and first make sure you have dnvm, the .NET Version Manager utility…


  • Seamless Multi-Computer CPU Sharing

    Seamless Multi-Computer CPU Sharing

    Date Published: 29 June 2015

    Something I’d love to see in a future version of Windows is a seamless way to use some of the extra computers I always tend to have on my network, whether at home or at the office. For CPU-intensive activities like video rendering, whether it’s video I’m producing for Pluralsight or something similar, or ripping my DVD collection to Plex, these activities take significant time on a single machine…


  • Exposing Private Collection Properties to Entity Framework

    Exposing Private Collection Properties to Entity Framework

    Date Published: 25 June 2015

    When following good object-oriented design principles and domain-driven design fundamentals, one should avoid exposing collection properties directly from the domain model. This can be a difficult goal to achieve with Entity Framework 6.x, since its collection properties generally must be of type ICollection, which includes methods that can manipulate the collection without the knowledge of the…


  • Software Craftsmanship Calendars

    Software Craftsmanship Calendars

    Date Published: 15 June 2015

    Recently, Brendan, Michelle, and I launched a Kickstarter campaign to fund the creation of a 2016 Software Craftsmanship motivational wall calendar. Our funding goal is pretty aggressive, so I appreciate any support you can offer. I’d especially like you to share this project with your fellow software developers. Think of it like this: If someone gets you one of these, what are they trying to say…


  • Configuring ASP.NET Core Environment Variables

    Configuring ASP.NET Core Environment Variables

    Date Published: 20 May 2015

    Whether you’re developing on Windows or a Mac/Linux machine, you can control the behavior of your ASP.NET 5 application by setting environment variables. Learn more about how this works in the official docs on working with multiple environments in ASP.NET 5. The environment variable used to determine the application environment of an ASP.NET 5 application is . If you’re developing your application…


  • Developer User Group Tips

    Developer User Group Tips

    Date Published: 17 April 2015

    I've been a participant in a number of software developer user groups for many years, and an organizer of the Hudson Software Craftsmanship group since 2009. A few years ago, I was a member of the INETA Speaker Bureau, and would travel to a number of user groups around the country (and occasionally, the world - including Moscow in 2006). Recently I participated in a discussion about things to…


  • GitHub Spinoff Sites

    GitHub Spinoff Sites

    Date Published: 14 April 2015

    Recently I’ve started using a couple of GitHub-related sites for collaboration. These are made possible by GitHub’s open API, and demonstrate how shipping an API allows a community to develop around your product, which in turn makes it more difficult for a competitor to displace your users. I’m sure there are many other sites out there, but the two I’m using at the moment are Huboard and Gitter.im…


  • Configure Grunt in Visual Studio 2015

    Configure Grunt in Visual Studio 2015

    Date Published: 06 April 2015

    Configure Grunt in Visual Studio 2015 You can easily configure Grunt to perform client-side build tasks in Visual Studio 2015. Grunt is very similar to Gulp, and either one can be used with Visual Studio 2015 to perform a variety of tasks. Although it’s supported, you need to add it to the project as a dependency before you can start working with Grunt. In this example, we are going to configure…


  • Software Application Assessments

    Software Application Assessments

    Date Published: 04 February 2015

    I just completed a Software Application Assessment for one of our clients, and will be presenting the report to them this week. We identified many parts of the application that were well-designed and were working as they should, as well as a number of areas that had room for improvement. An assessment is a lot like a home inspection report. If you’ve ever bought a house or building, you can…


  • Find Debug Assemblies using Glimpse

    Find Debug Assemblies using Glimpse

    Date Published: 03 November 2014

    A new feature inGlimpse.AspNet1.9.2 will display whether each assembly in your web site’s bin folder was compiled in Debug or Release mode. At development time, Debug mode is fine, but you want to avoid shipping Debug assemblies to production since there are performance costs associated with these assemblies. You candetermine for yourself whether a given assembly was compiled in debug mode using…


  • DogFoodCon Session on DDD with ASP.NET MVC

    DogFoodCon Session on DDD with ASP.NET MVC

    Date Published: 30 September 2014

    Yesterday I presented atDogFoodCon, giving a slightly modified version of a talk I gave a week earlier atFalafelCONin San Francisco. The session provides those with little knowledge of Domain-Driven Design with a rapid overview of some key concepts and patterns used in DDD, and wraps up with a brief demo of a simple Guestbook application that begins as a monolithic everything-in-the-controller MVC…


  • Finding Copies of Images Online

    Finding Copies of Images Online

    Date Published: 10 September 2014

    Obviously it’s very easy to download and reuse images on the Internet. However, if your business depends on such intellectual property, you may need to take steps to prevent unauthorized usage of your images. There are many ways you can mark your images to later prove they are yours – that’s a topic for another day – but you may not know there is also a very easy way to find other images and where…


  • Logging in Entity Framework

    Logging in Entity Framework

    Date Published: 15 August 2014

    When working with any ORM tool, it can sometimes be helpful to see just what, exactly, is being sent to the underlying data store. This can help identify bugs as well as performance issues in how the query is being performed (or how many queries are being performed, in the case of SELECT N+1 problems). There are several existing tools available that provide assistance with this: SQL Server…


  • RGRC is the new Red Green Refactor for Test First Development

    RGRC is the new Red Green Refactor for Test First Development

    Date Published: 05 August 2014

    Test Driven Development (TDD), aka Test Driven Design, aka Test First Development, has long had a simple, virtuous cycle at the heart of its workflow: Write a failing test (run the test(s) – they should be RED) Make it pass in the simplest way possible (tests are GREEN) Now clean up the code (eliminate duplication and other code smells) (REFACTOR) When following this workflow, one can make steady…


  • Getting Started with Castle Windsor

    Getting Started with Castle Windsor

    Date Published: 31 July 2014

    My preferred IoC container is StructureMap, but I’m going to be working with a client who uses Castle Windsor as their standard container, so I decided to learn a bit about it this week. I created a simple console application and included some interfaces and implementations to see how things work. Registering individual interfaces and wiring them up to their implementations is pretty…


  • JavaScript Date Tips

    JavaScript Date Tips

    Date Published: 18 July 2014

    The other night at the Hudson Software Craftsmanship meeting at the Falafel Software training center in Hudson, Ohio, I did the Red Pencil Kata using JavaScript. Although I’ve run into it in the past, I was stuck for a little while (I was the odd man out without a pairing partner to help find these things faster) due to one of JavaScript’s “fun” date conventions. Being a C# developer primarily…


  • Where to Declare Variables in C# and JavaScript

    Where to Declare Variables in C# and JavaScript

    Date Published: 16 July 2014

    Both JavaScript and C# belong to the C family of languages. They share curly braces and semi-colons, and in fact there are many cases where the exact same code will execute (correctly, in most cases) as either language. However, there are certain best practices that are unique to each language, and where variables should be declared is one of them. Declaring Variables in C In C#, it’s generally…


  • Ensure You Are Not Adding To Global Scope in JavaScript

    Ensure You Are Not Adding To Global Scope in JavaScript

    Date Published: 15 July 2014

    A key best practice if you’re writing JavaScript code is to avoid adding objects to the global scope. There are several good reasons for this – globals add coupling, it makes it easier for disparate libraries to break one another, etc. A general rule of programming is to avoid global scope, in fact. Unfortunately, JavaScript makes adding things to global scope very easy. Consider this bit ofcode…


  • Resolving Dependencies in ASP.NET MVC 5 with StructureMap

    Resolving Dependencies in ASP.NET MVC 5 with StructureMap

    Date Published: 25 June 2014

    In a previous post I showed how to use StructureMap with ASP.NET MVC 3. It’s been a couple of years, so I figured it was time to update that article with the steps for getting StructureMap working in ASP.NET MVC 5. If you’re interested in learning more about how to develop applications in a loosely coupled fashion, I highly recommend my course on SOLID Principles of Object Oriented Design to learn…


  • How Do I Use StructureMap with ASP.NET MVC 3

    How Do I Use StructureMap with ASP.NET MVC 3

    Date Published: 25 June 2014

    Update: If you want to use StructureMap with ASP.NET MVC 5, I have a walkthrough on this now as well. As I write this, the best resource for official documentation on ASP.NET MVC 3 is of course MSDN. You can also learn more about ASP.NET MVC 3 here. However, neither of those mention how to properly set up an IOC Container (like StructureMap) with ASP.NET MVC 3. After some searching, I was able to…


  • Rename Elements in PowerPoint

    Rename Elements in PowerPoint

    Date Published: 14 June 2014

    In PowerPoint, especially if you’re working with a complex slide with a lot of animations, it can be difficult to easily determine which named element corresponds with which visual element on the slide. By default, when you add pictures and other assets to a slide, they get names like ‘Picture 5’. It would be great if there were an easy way to rename these elements, especially from the Animation…


  • Tip – Override ToString() in Objects

    Tip – Override ToString() in Objects

    Date Published: 12 June 2014

    Most of your domain objects should override ToString() for the simple reason that if you ever want to simply display the object’s state, you shouldn’t need to implement a custom formatter for it. Furthermore, it’s well-known that the default System.Object implementation of .ToString(), which outputs the type’s name, is useless 99% of the time. Thus, it’s generally a good idea to implement…


  • Stir Trek 2: Iron Man Edition

    Stir Trek 2: Iron Man Edition

    Date Published: 12 June 2014

    Next month (7 May 2010) I’ll be presenting at the second annual Stir Trek event in Columbus, Ohio. Stir Trek (so named because last year its themes mixed MIX and the opening of the Star Trek movie) is a very cool local event. It’s a lot of fun to present at and to attend, because of its unique venue: a movie theater. And what’s more, the cost of admission includes a private showing of a new movie…


  • How To: Automatically Remove www from a Domain in IIS7

    How To: Automatically Remove www from a Domain in IIS7

    Date Published: 12 June 2014

    I recently moved the DevMavens.com site from one server to another and needed to ensure that the www.devmavens.com domain correctly redirected to simply devmavens.com. This is important for SEO reasons (you don’t want multiple domains to refer to the same content) and it’s generally better to use the shorter URL (www is so 20th century) rather than wasting 4 characters for zero gain. My friend and…


  • Microsoft Version Number Integer Type

    Microsoft Version Number Integer Type

    Date Published: 11 June 2014

    Microsoft made some headlines a few years ago when they decided to skip Office 13 and jump straight from Office 12 to Office 14. Recently, they’ve announced Visual Studio “14” CTP, which appears to be doing the same thing: Current Version (Visual Studio 2013): Next Version: I actually wrote about Microsoft’s apparent triskaidekaphobia back in 2008 with the Office naming, and suggested that they…


  • Working with Kendo UI Templates

    Working with Kendo UI Templates

    Date Published: 20 February 2014

    I’m watching the Introduction to Kendo UI course by Keith Burnell on Pluralsight and decided to play around a little bit with templates, which are a pretty powerful feature. If you’re a server-side web developers, templates should seem pretty familiar to you. Any ASP or ASP.NET page can be thought of like a template, in which you mix markup and dynamic data expressions. In this case, the templates…


  • Passing Default Parameter Objects in JavaScript

    Passing Default Parameter Objects in JavaScript

    Date Published: 27 January 2014

    You can use the jQuery extend() functionto elegantly configure your functions to accept a single parameter object, while providing default behavior for any options that are not set. For instance, imagine you have a simple function that simply says “Hello, World”. You could code it like this: Now, if you want to start passing in parameters, you can easily do so by parameterizing the method, but…


  • When Should You Refactor

    When Should You Refactor

    Date Published: 03 January 2014

    A common question teams face is, when should we take the time to refactor our code? Refactoring is defined as improving the design or quality of code, without changing its external functionality. Most teams face constant pressure to release features and/or fix bugs as quickly as possible, so it’s not uncommon for problems discovered in the codebase to be put on the back burner to be fixed “later…


  • Configuring Performance Counters to Run Over Time

    Configuring Performance Counters to Run Over Time

    Date Published: 05 December 2013

    Whether you’re looking to diagnose performance problems, or just to keep an eye on the health of a server you rely on, knowing how to configure performance counters so they run constantly in the background can be a huge help. The first step in getting to performance counters is to run perfmon (just hit Start and type perfmon): Once you’re in Perfmon, you may have questions like: What should I…


  • Moores Law and the Hybrid Mobile Application

    Moores Law and the Hybrid Mobile Application

    Date Published: 05 December 2013

    If you’re building software today, you’ve probably faced the question of whether or not you need to build a mobile version of your application. In that case, or in the case where you’re decided from the outset you’re building a mobile app, the next question is, which mobile platform do you target? Here there are several options: Target Android. It’s got the biggest market share. (69% in 201…


  • Final Verdict on Haswell Ultrabook

    Date Published: 21 October 2013

    I’ve had a pre-release Intel Ultrabook with the new Haswell processor in it for about two months now, so it’s time for one last review of the device. You can read my previous reviews: First Impressions of the Intel Haswell Ultrabook Intel Haswell Ultrabook Preview Unit Experience Overview This device has met or exceeded my expectations for performance, power use, and overall fit and finish. The…


  • DevReach 2013 Recap and Slides

    DevReach 2013 Recap and Slides

    Date Published: 10 October 2013

    Last week I had the opportunity to visit Sofia, Bulgaria for the DevReach 2013 conference at which I was once more a presenter. DevReach is always one of my favorite conferences to speak at, because the food and culture of Bulgaria is great, the attendees come from diverse backgrounds, and the conference planning always goes above and beyond to take care of the speakers. I found this to be true my…


  • 3 Places You Should Deploy Your Important Web Site To

    3 Places You Should Deploy Your Important Web Site To

    Date Published: 25 September 2013

    You’ve got a web site, and you think it’s important. Or your boss does. Or your customers do. In any case, someone will notice when that thing goes down. So it’d be nice if that didn’t happen too often, especially during relatively mundane activities like deploying a simple update to the site. Let’s talk about the three places you should be deploying your site to in order to achieve this simple…


  • Wiring Up TimeAgo and ASPNET MVC

    Wiring Up TimeAgo and ASPNET MVC

    Date Published: 20 August 2013

    Imagine you want to display something on a page so that instead of raw dates, the user is shown something more relative to the current time. You’ve probably seen this in some of the applications you use. “Last Updated: A moment ago” or “about an hour ago”. There are a variety of ways you can implement this, and it’s been done inmanydifferentlanguages. In my case, which is an ASP.NET MVC C…


  • Refactoring with SOLID at FalafelCon

    Refactoring with SOLID at FalafelCon

    Date Published: 11 June 2013

    Yesterday I presented at the first ever FalafelCon conference in Mountain View, California. My session Refactoring with SOLID Principles is now available on SlideShare. I was a little pressed for time, so I had to cover some of the material quickly. For more information, I encourage you to check out my SOLID Principles of Object Oriented Design course. There were a couple of questions from the…


  • Moving a Site to Windows Azure in 5 Easy Steps

    Moving a Site to Windows Azure in 5 Easy Steps

    Date Published: 21 May 2013

    One of my sites is currently having issues where it’s currently hosted. They’re resolved by restarting the application, but that’s gotten tedious and I simply don’t have time to invest in troubleshooting this particular site. And, oh hey, those MSDN Windows Azure benefits keep looking shiny like I should play with them. So, I figure I’ll try moving the site to Azure and see if miraculously that…


  • Regional Differences

    Regional Differences

    Date Published: 21 May 2013

    A while ago I ran a poll on twitter asking how developers recommend regions be used. About 15% of the respondents chose Other and/or chose to leave a comment. The comments are useful because they often highlight answer categories that I overlooked when I set up the poll. In this case, there were a lot of comments, I think because there are a lot of different opinions about regions in general, some…


  • When To Comment Your Code

    When To Comment Your Code

    Date Published: 09 May 2013

    My opinions on comments in software code have evolved with my experience. When I was a teenager first learning to program for real, I rarely used comments unless the code was for an assignment, in which case it was a forced exercise every bit as much as teachers’ requests to “show your work” added verbosity to my math and science problems’ solutions. Of course, the programs themselves were quite…


  • Speaking at FalafelCon

    Speaking at FalafelCon

    Date Published: 06 May 2013

    Hey, California people, I’m coming your way. I’ll be speaking at FalafelCon 2013 next month about Refactoring with SOLID Principles. The event is taking place 10-11 June 2013 at Microsoft’s Silicon Valley campus. The speaker lineup looks pretty awesome, with keynotes from Scott Hanselman, Stephen Forte, Michele Bustamante, and Tim Huckaby, and tracks covering Web, Mobile, Sitefinity, and…


  • March 2013 Pluralsight Experiment

    March 2013 Pluralsight Experiment

    Date Published: 04 April 2013

    Update: Winner and Results The winner of the experiment’s prize is Martin Frey (@tinfrey). You can watch a video of the random drawing here (I’ll keep the file up until at least 1 May 2013). In terms of the results of the experiment, I would say they were somewhat inconclusive. I noted in the initial post below that my SOLID course averaged just 78 minutes per unique subscriber in February…


  • When Should You Arrive for an Interview

    When Should You Arrive for an Interview

    Date Published: 20 March 2013

    We’ve been doing a lot of interviewing as we grow our team in Hudson, Ohio for Telerik Services. We have a fairly small office in a suburban environment, where you can basically park right outside the building and walk right in – no elevators, reception area, parking decks, or other hassles you might find in a more urban location. As a result, we’ve learned that if we schedule an interview, we…


  • How To Contribute to ASPNET Yourself

    How To Contribute to ASPNET Yourself

    Date Published: 19 February 2013

    Recently I upgraded the Stir Trek conference site’s web code from ASP.NET MVC 2 to 4. When I did, I ran into an issue where the [OutputCache] attribute’s behavior changed for RenderAction code. Specifically, if you had code like this: it would stop working. You would get an error message like this: Now, this error will make no sense to you if, like me, it used to work just fine in MVC 2, and you…


  • Presenting at Telerik Software Pros Conference in New Delhi India

    Presenting at Telerik Software Pros Conference in New Delhi India

    Date Published: 12 January 2013

    Today I gave two sessions at the Telerik Software Professionals Conference in New Delhi, India. The event is still ongoing (Chris Sells is wrapping up a great talk on building Windows 8 apps with HTML5 and JavaScript), but I wanted to get my talks posted here for attendees to download and review. I’ve loaded them on Slideshare, so you should be able to view them here, or navigate to Slideshare to…


  • IntelliCommand and JustCode

    IntelliCommand and JustCode

    Date Published: 08 January 2013

    I’ve been using JustCode regularly, lately, but I’m still learning some of the keyboard shortcuts and features (and probably always will be). JustCode features a nice view showing all of the common commands that you can access at any time (from the menu, or via ctrl+shift+alt+/): And of course, you can also change these, or even jump to another common set of shortcuts, in the JustCode options…


  • Presenting in New Delhi, India

    Presenting in New Delhi, India

    Date Published: 08 January 2013

    This Saturday (12 January 2013), I’ll be presenting at theTelerik Developers’ Conferencein New Delhi, India. The event kicks off at 9am – here’s the current plan for the agenda: I’m giving two presentations in the afternoon. The abstracts are as follows: Refactoring Applications using SOLID Principles We’ve all heard about well-designed software projects, where things aren’t (yet) a big ball of…


  • Working with Ivy Bridge Ultrabook Sensors

    Working with Ivy Bridge Ultrabook Sensors

    Date Published: 05 December 2012

    I’ve had Intel’s preview Ivy Bridge Ultrabook for a little over two months now. It’s a preview device with a few pre-production quirks, but it’s also a powerful developer machine in a small, lightweight package, complete with a very responsive touch screen that works great with Windows 8. You can readmy first impressions of the device, as well as my first follow-up review. In this last write-up…


  • Dont Forget Block Selection Using Alt in Visual Studio

    Dont Forget Block Selection Using Alt in Visual Studio

    Date Published: 18 November 2012

    So do you ever find yourself wanting to try out some code you found on the Internet (via Copy Paste Programming, but in a spike or test project, naturally!), and unfortunately when you copy the code it includes a bunch of line numbers? Like the code from this sample on testing Entity Framework stuff? Of course, some code highlighting tools make this a little easier for you, and Scott Hanselman…


  • 2013 Software Craftsmanship Calendar

    2013 Software Craftsmanship Calendar

    Date Published: 16 November 2012

    It’s that time of year again when Software Craftsmanship wall calendars are shipping out of our Hudson office. A few things are different this year. The small NimblePros logo on the calendars has been replaced with a small Telerik logo. The boxes of calendars from the printer now come with 60 calendars per box, instead of 55. And the calendars themselves have an extra page in them (you’ll have to…


  • JavaScript The Good Parts Reviewed

    JavaScript The Good Parts Reviewed

    Date Published: 10 November 2012

    Finished up Douglas Crockford’s JavaScript: The Good Parts this week. It definitely helped me improve my understanding of JavaScript, which I’ve been using since it was new, but always like a C programmer, and only recently like a JavaScript programmer. I really appreciated Crockford’s honest, no-holds-barred analysis of JavaScript’s design and language choices. It had me chuckling more than once…


  • Limit SQL Server Memory Use on Dev Machine

    Limit SQL Server Memory Use on Dev Machine

    Date Published: 06 November 2012

    If you’re a developer running SQL Server locally, you may sometimes need to limit how much memory the database is consuming. Under normal conditions, SQL Server likes to use as much memory as it can get, since keeping results in memory improves the database’s performance. In typical production scenarios, this is the ideal behavior, but on a dev machine you probably want your RAM for other things…


  • JustCode JustRocks

    JustCode JustRocks

    Date Published: 26 October 2012

    I have been a ReSharper fanboy for a long, long time. I have recommended it in user group and conference talks and on my blog. It was one of my favorite tools for a long time, and it remains a great product. However, I’m happy to say with all honesty that I now prefer JustCode. This is fortunate, as I now work for the company that makes JustCode, but I’ve held off on endorsing it (or completely…


  • A Review of The Clean Coder

    A Review of The Clean Coder

    Date Published: 10 October 2012

    I’m generally a fan of Robert C. “Uncle Bob” Martin’s books, so realize I’m going into this book with something of a positive bias. While is previous books, Agile Principles, Patterns and Practices in C# and Clean Code, have been specifically about programming techniques, this latest title, The Clean Coder, is more philosophical in nature. It seeks to present Martin’s philosophy of how software…


  • DevReach 2012 Sessions

    DevReach 2012 Sessions

    Date Published: 06 October 2012

    Thanks to everybody who attended my DevReach sessions. I had two talks and two panels, and both of the talks were standing room only (in the smaller theater), which was great to see. The panels were both recorded on DotNetRocks and should be published later in October 2012. I also did a software craftsmanship hands-on workshop before DevReach began, which drew about 20 students who learned via…


  • The Art of Unit Testing Reviewed

    The Art of Unit Testing Reviewed

    Date Published: 30 September 2012

    I recently finished reading Roy Osherove’s The Art of Unit Testing. I was kind of splitting my time reading it and Growing Object Oriented Software Guided by Tests, which I just recently reviewed as well. One nice thing about this book is that it comes with an eBook once you register it with Manning. Overall, I think this is a great book on unit testing. Roy is certainly well-qualified to write…


  • Webs of Trust versus Certifications

    Webs of Trust versus Certifications

    Date Published: 29 September 2012

    In the software development industry, as in many others, it’s important or at least helpful to be able to identify individuals and companies who are competent at their craft. Finding those who are excellent is nice, too, but honestly I’m amazed at how many “professionals” out there don’t even measure up to the much lower bar of merely competent (to be fair, I find this to be true of accountants…


  • Unboxing and First Impressions of New Intel Ultrabook

    Unboxing and First Impressions of New Intel Ultrabook

    Date Published: 19 September 2012

    I recently received a preview-hardware next generation Ivy Bridge Ultrabook from Intel, optimized for and pre-installed with Windows 8. I suspect we’ll be seeing these available in stores and via online outlets soon. I’m a fan of the Ultrabook brand and concept – thin, sleek, and light, with powerful hardware capable of running developer tools. I’ve already happily switched away from much heavier…


  • Growing Object-Oriented Software Guided By Tests Book Review

    Growing Object-Oriented Software Guided By Tests Book Review

    Date Published: 12 September 2012

    I finished this book a while back and just haven’t had a chance to write about it until now. Growing Object-Oriented Software, Guided by Tests is a bit of a mouthful of a title, but it does describe the subject matter of the book pretty well. I noted a few points of interest as I read the book, as I tend to do, that I’d like to share here along with my overall thoughts. I’ve read quite a few books…


  • A Gentle Introduction to StructureMap

    A Gentle Introduction to StructureMap

    Date Published: 11 September 2012

    I found myself explaining inversion of control containers and their benefits to someone today, and so I created a very simple console application that makes use of StructureMap (my favorite such container). You can view the whole file in this Gist. Here I’ll just briefly explain what’s going on. The main benefit of a tool like StructureMap is to decouple your classes from their collaborators…


  • How To Disable ReSharper in Visual Studio

    How To Disable ReSharper in Visual Studio

    Date Published: 31 July 2012

    Something I’ve had to do from time to time is disable a plug-in in Visual Studio, either permanently or temporarily, such as ReSharper. Just now was one of those times, and as in the past I had to hunt through a variety of Visual Studio menus in order to find it. Personally, I think Visual Studio has some work to do on how many kinds of plug-ins, add-ons, and extensions it supports, which I hope I…


  • aspConf 2012 Sessions

    aspConf 2012 Sessions

    Date Published: 18 July 2012

    Yesterday I presented two sessions foraspConf 2012. The first was a new talk I haven’t given before on ASP.NET MVC Solution Best Practices (which I dubbed the Solution to the Solution Problem). The second one was a talk on Common ASP.NET Design Patterns, which is basically I talk I’ve given for at least a year now on Common Design Patterns, adapted slightly for ASP.NET (mainly MVC). The slides are…


  • Getting StructureMap to Work with MVC4 RC and Web API

    Getting StructureMap to Work with MVC4 RC and Web API

    Date Published: 17 July 2012

    At the moment (18 July 2012) if you install the NuGet package structuremap.MVC4, it will not compile due to breaking changes in the ASP.NET MVC4 RC distribution. You have to jump through some extra hoops to get this working. Here are two posts that help: Configuring MVC4 with StructureMap Using the Web API Dependency Resolver However, even with both of these getting things working wasn’t quite as…


  • How Can I View MSMQ Messages and Queues?

    How Can I View MSMQ Messages and Queues?

    Date Published: 17 June 2012

    I’m working with NServiceBus to send messages to and from different parts of my application. NServiceBus is a mature tool that sits on top of MSMQ and provides a great developer experience for working with a number of different scenarios. One thing that’s challenging when working with queues is figuring out where a message went when it doesn’t show up at the other end of the message bus. Where did…


  • Windows Azure June 2012 Update Required Reading

    Windows Azure June 2012 Update Required Reading

    Date Published: 06 June 2012

    Today (right now as I type this) Microsoft has unveiled a TON of new features that are launching as part of Windows Azure. If you’d like to learn more about these announcements and services, here’s the short list of blog posts you’ll want to read/skim: Scott Hanselman – Windows Azure – No Kidding Scott Guthrie – Meet the New Windows Azure Bill Laing – Announcing New Windows Azure Services to…


  • View Network Status and Listening Ports on Windows with Netstat

    View Network Status and Listening Ports on Windows with Netstat

    Date Published: 06 June 2012

    There are plenty of times when you may need to know which applications are running on which ports on your machine. Some examples of questions this might answer include: How can I see which port my application is running on, so I can forward or open that port in my firewall? How can I see which applications are actively using my network connection? How can I see where applications on my machine are…


  • Favor Privileges over Role Checks

    Favor Privileges over Role Checks

    Date Published: 02 June 2012

    A very common practice in web applications, especially those written using the ASP.NET built-in Role provider (circa ASP.NET 2.0 / 2005), is to perform role checks throughout the code to determine whether a user should have access to a particular page or control or command. For instance, you might see something like this: The problems with the maintainability of this approach become apparent after…


  • Economics of Software Quality

    Economics of Software Quality

    Date Published: 01 June 2012

    When we talk about the quality of software, we must refine the discussion to make it clear whether we are talking about internal or external quality. External quality refers to the software’s presentation and behavior from a user or customer’s perspective. Internal quality refers to how the software was constructed, and how easy it might be to maintain or extend. External quality is often under…


  • Telerik Hudson Office Signs

    Telerik Hudson Office Signs

    Date Published: 23 May 2012

    The new signs went in earlier this week, replacing the NimblePros signage with Telerik in the new Hudson office location. You’ll find our office at the corner of Stoney Hill Drive and Darrow Road (SR 91) in Hudson, Ohio. This is the second company Michelle and I have run at this office location and later sold, and it feels good to have the transition mostly behind us. Telerik’s Hudson office…


  • Common Design Patterns Presentations

    Common Design Patterns Presentations

    Date Published: 16 May 2012

    This month I presented on Common Design Patterns at two regional events. I’ve given this talk a few times before, and it continues to evolve. The first one was on 4 May at Stir Trek, as a replacement talk for a cancellation. I only had about 24 hours’ notice so I didn’t spend much time updating the talk, and in fact I had to rip out a bunch of stuff that was specific to the last event I gave it at…


  • Joining Telerik

    Joining Telerik

    Date Published: 26 April 2012

    Earlier this year, I wrapped up my work with The Code Project and Lake Quincy Media and returned to NimblePros, the consulting company Michelle and I started a few years ago and which she’s run quite successfully the last few years. NimblePros has been doing some great things the last couple of years, with revenues in 2011 doubling those of 2010. At the same time, we’ve been watching Telerik…


  • Principles of Product Development Flow Book Review

    Principles of Product Development Flow Book Review

    Date Published: 25 April 2012

    One of the more advanced books I’ve read relating to the subjects of Software Development and Lean is The Principles of Product Development Flow: Second Generation Lean Product Development by Donald G. Reinertsen. I recently published a Pluralsight course on Kanban Fundamentals, and as part of my research for that introductory-level course I read a few related titles, including this one. I…


  • Modifying and Disabling Hyperlinks using jQuery

    Modifying and Disabling Hyperlinks using jQuery

    Date Published: 13 April 2012

    I have a simple menu in an ASP.NET MVC application allows a user to take one of several actions after first selecting a resource to work with from a drop down list / select box or textbox. In the case where the user hasn’t yet selected anything (or entered any text), I want the links to be disabled, as I’d rather let the user know the issue on the current dashboard page than have them go to a page…


  • New is Glue

    New is Glue

    Date Published: 13 April 2012

    When you’re working in a strongly typed language like C# or Visual Basic, instantiating an object is done with the new keyword. It’s important that we recognize the significance of using this keyword in our code, because I would venture to say that well over 90% of developers don’t give it a second thought. Most developers have, at one time or another, heard the practice of building software…


  • Beyond Role Based Authorization in ASPNET MVC

    Beyond Role Based Authorization in ASPNET MVC

    Date Published: 11 April 2012

    A fairly frequent requirement in applications is to check for authorization to perform an action. At the most basic level, this might just involve seeing if the user is authenticated (at all) or checking a flag to see if they are an Admin. However, more complex requirements frequently include a variety of roles, and it’s quite common for the notion of ownership to be involved as well, with some…


  • Configuring Web Apps To Behave Like Native Apps on iOS

    Configuring Web Apps To Behave Like Native Apps on iOS

    Date Published: 27 March 2012

    There are a number of things you can do with your web-based application to have it behave like a native iOS application. One of these I mentioned previously, which is to disable the user’s ability to zoom in and out using pinch gestures. In addition, you can hide the Safari user interface “chrome” so that the user is unaware they’re in a browser. You can also add splash screens and customize the…


  • Asus Zen Ultrabook Revisited

    Asus Zen Ultrabook Revisited

    Date Published: 27 March 2012

    A couple of months ago I got an Asus Zen ultrabook, which I posted about when I first got it, and a month or so later. Now that I’ve had it a while, I thought I’d post one more time with how it’s continued to work for me. I’m still very happy with its look, feel, and speed. It’s very responsive both while up and running and when waking up or shutting down. One thing I wish it came with is an HDMI…


  • How Do I Disable Zoom in an iPad iPhone Mobile Web App?

    How Do I Disable Zoom in an iPad iPhone Mobile Web App?

    Date Published: 26 March 2012

    If you’re building web-based applications for mobile devices like the iPad/iPhone and you want to mimic native applications’ look and feel and experience, one thing you may want to do is disable the pinch zoom gesture. Most native applications don’t offer support for this, but of course most mobile browsers currently do, so a sure way for users to tell that they’re actually viewing a web page is…


  • Getting Started with Single Page Applications in ASP.NET

    Getting Started with Single Page Applications in ASP.NET

    Date Published: 16 March 2012

    One of the new features in ASP.NET MVC 4 (Beta) is a new project template for Single Page Applications (SPA). You can download the latest version of MVC4 from http://asp.net/mvc/mvc4. Once you have that installed, get started by creating a new ASP.NET MVC 4 project: You’ll immediately be asked another question about exactly what kind of project you’re looking to create. This is only asked on…


  • Make IIS Express the Default for VS2010 Web Projects

    Make IIS Express the Default for VS2010 Web Projects

    Date Published: 16 March 2012

    Here’s a quick tip that will help you leave Cassini in the past where it belongs. If you’re using VS2010 SP1, you can configure your IDE so that it will automatically choose IIS Express out of the box for new web sites and projects. There are a lot of good reasons why you should be using IIS Express instead of Cassini / WebDevServer – you can learn more about IIS Express here. Unfortunately…


  • How to use System.Web in a Console Application

    How to use System.Web in a Console Application

    Date Published: 16 March 2012

    I’ve been bitten by this and have seen others run into it enough times that I thought I’d blog about it. Let’s say you’re creating a new Console, WPF, or Windows Forms application in .NET 4. You’re using Visual Studio 2010, and everything is going great until you get to the part where you wanted to make an HTTP request. You know you can do this, you’ve done it before, heck, you might even be…


  • Kanban Book Review

    Date Published: 16 March 2012

    While researching material for my Kanban Fundamentals video training course on Pluralsight, I read Kanban: Successful Evolutionary Change for Your Technology Business, by David J. Anderson. I’ve previously reviewed a couple of other related books, including Personal Kanban and Scrumban, if you’re interested in learning more about this topic. I would recommend Personal Kanban as the most…


  • Personal Kanban Book Review

    Personal Kanban Book Review

    Date Published: 09 March 2012

    Not long ago, while preparing my Kanban Fundamentals video training class for Pluralsight, I read Personal Kanban, by Jim Benson and Tonianne DeMaria Barry. If you’re new to the concept of kanban, this book is a good place to get started (along with my course, which is about 90 minutes long, and shorter if you speed it up). I read the kindle edition of Personal Kanban, even though I don’t own a…


  • How to Give Feedback on Microsoft Developer Products

    How to Give Feedback on Microsoft Developer Products

    Date Published: 09 March 2012

    In the last few years, a number of Microsoft dev teams have started using online tools to manage how the community can offer feedback. If you’re a Microsoft developer, and especially if you’re a web developer, you should know about these tools and offer your feedback through these channels if you’d like Microsoft to respond to your needs. There are several ways you can offer this feedback, and…


  • Sending Email from a Sitefinity Module with Attachments

    Sending Email from a Sitefinity Module with Attachments

    Date Published: 24 February 2012

    A fairly common use case in web applications is the need to send an email, and applications built on top of Telerik Sitefinity are no different. Since modules are simply .NET DLLs, you’re free to write whatever code you like, so it’s certainly possible for you to write a module that sends emails in a way that knows nothing about Sitefinity. However, if you want to interact with Sitefinity, for…


  • Reviewing Scrumban the Book

    Reviewing Scrumban the Book

    Date Published: 24 February 2012

    I’ve been reading a bunch of kanban and lean books recently as I work on my Pluralsight course on Introducing Kanban. The most recent one I’ve finished is Scrumban, Essays on Kanban Systems for Lean Software Development, by Corey Ladas (I’m doing the reviews in LIFO order). I made a bunch of notes while reading this book, and it has a great deal of useful information. I read David Anderson’s…


  • Excel Cumulative Flow Diagram

    Excel Cumulative Flow Diagram

    Date Published: 12 February 2012

    I’m working on a Kanban Fundamentals course that should go live soon on Pluralsight. One of the topics I’m touching on is Cumulative Flow Diagrams, and how these can be used to analyze flow of a process. Some electronic kanban tools like AgileZen have some built-in support for CFD-style reports, but for instructional purposes it’s nice to be able to create one on-the-fly with whatever data one…


  • Fixing Floating Rectangles in ASP.NET StackedBar Chart

    Fixing Floating Rectangles in ASP.NET StackedBar Chart

    Date Published: 09 February 2012

    In working on a client’s reporting system, I ran across some StackedBar charts that were using the System.Web.DataVisualization.Chart control that were having some problems. The biggest one was that the rendered bars had gaps and floating rectangles in it. This turned out to take about an hour to solve, using my best Google-fu, so I’m posting my solution and notes here, in case I run into it again…


  • Team Workspace Reflections

    Team Workspace Reflections

    Date Published: 08 February 2012

    We’ve been fans of team rooms and collaborative work environments at NimblePros for some time. In building out our new building, we took care to create several large open spaces to be used as team rooms, with plenty of room in the middle for workstations (configured for pair programming) and lots of open wall space around the outside for whiteboards and information radiators. You can see one of…


  • Code Review Singleton Pattern Issues

    Code Review Singleton Pattern Issues

    Date Published: 02 February 2012

    One of my applications relies on a singleton pattern to create a single instance of a server which processes requests from many different ASP.NET handlers. It is created using pretty much standard Singleton code: Recently, this server needed to be made aware of whether requests were coming into it via SSL or standard HTTP. The solution that was checked in (and which worked and passes local tests…


  • DevReach Online 2010 – Software Fundamentals

    DevReach Online 2010 – Software Fundamentals

    Date Published: 02 February 2012

    I just finished my DevReach Online presentation, A Whirlwind Tour of Software Development Fundamentals. In this 45-minute talk, I covered what I consider to be fundamental principles, patterns, and practices of software development, with a little bit of time for a demo at the end. The session was recorded and will be available on the DevReach Online web site soon. You can get my slides and demos…


  • Learning To Code with the Azure SDK Ndash Show Me The Code

    Learning To Code with the Azure SDK Ndash Show Me The Code

    Date Published: 02 February 2012

    I’ve been working with Azure off and on since last summer, and like any new API or platform, there are hurdles involved with the learning curve. This is especially true for pre-release software that is rapidly changing and of course has neither official documentation nor much in the way of info on blogs or developer community sites like ASPAlliance.com. One of the ways I like to learn about…


  • Stories Too Big – Vertical Slices

    Stories Too Big – Vertical Slices

    Date Published: 02 February 2012

    I have a client who lists as one of the key challenges with implementing agile practices with their teams as managing to define user stories that are valuable but not too big.This is actually a very common challenge, and one that we run into frequently ourselves at Lake Quincy Media and with other clients of NimblePros. Naturally there are many books available on the subjects of extreme…


  • Laptop Rebuild - Essential Apps

    Laptop Rebuild - Essential Apps

    Date Published: 02 February 2012

    When we last saw our hero, he had fallen victim to an evil plot to disable his computer’s ability to boot up. After great efforts at recovery, eventually he was forced to concede defeat to Vista and reinstall everything from scratch. Let’s return now to see what’s in store in the next chapter of our story, already in progress… So, day 2 after my issue with Vista and I’m now at least able to use my…


  • Unit Test or Integration Test and Why You Should Care

    Unit Test or Integration Test and Why You Should Care

    Date Published: 19 January 2012

    There remains a fair bit of confusion about what constitutes which kind of test. Many developers are fairly new to testing, and tend to call any tests of their code “unit tests” even when they’re dealing with something substantially larger than a unit. The tools don’t really help much here, since the various test runner frameworks all call themselves unit test frameworks, and the various test…


  • Run Your Unit Tests in Parallel to Maximize Performance

    Run Your Unit Tests in Parallel to Maximize Performance

    Date Published: 19 January 2012

    If you’re at all serious about testing, at some point you’re going to have a rather large suite of tests that need to run, and you’ll find that your builds are taking longer than you would like because of how long the tests run. For example, consider this suite of 24 tests, each one of which looks like this one: If you run 24 of these, it’s going to take about 24 seconds, by default: Now of…


  • CodeMash 2012 Sessions

    CodeMash 2012 Sessions

    Date Published: 16 January 2012

    Last week I presented two half-day workshops at CodeMash’s PreCompiler on Wednesday (with Brendan Enrick), and a session on ASP.NET MVC 4 on Thursday. CodeMash 2012 was an amazing conference and I’d like to personally thank the organizers as well as the attendees of my own events for making it such a great event. I’ll post a separate write-up with my experiences shortly – for now I just need to…


  • Silverlight 5

    Silverlight 5

    Date Published: 09 December 2011

    “The reports of my death have been greatly exaggerated.” – Mark Twain Today, Silverlight 5 is released and available for download! The Release Candidate has been around for some time, and many of us were expecting the release in November. Well, here it is, November 39th, and it’s here! Here are some of the things that are New or Improved in Silverlight 5: Binding Improvements, including…


  • Getting Started with Kanban

    Getting Started with Kanban

    Date Published: 29 November 2011

    Kanban can mean a number of things. In Japanese, the literal translation is “signboard,” but it also refers to a system of lean manufacturing, or in fact to a process for eliminating waste from a production system of any kind. In this article, I’ll quickly describe how kanban cards are used, and how the Kanban with a capital K system can be used to improve existing systems. Examples of Kanban If…


  • Represent Behavior with Classes not Flags

    Represent Behavior with Classes not Flags

    Date Published: 11 November 2011

    In any non-trivial software applications, there will be different kinds of behavior attributed to different kinds of objects. For instance, maybe a discount is only applied to some products, but not others. Or a validation rule is applied in most cases, but not for this particular class of item. Perhaps an email-sending application should perform some checks to insure it has certain elements…


  • Handy EnumerableExtensions

    Handy EnumerableExtensions

    Date Published: 10 November 2011

    There’s a great site for finding extension methods, ExtensionMethod.net. I don’t believe either of these came from there, and I’ve not (yet) submitted them there, but here are a couple of extensions on IEnumerable that I’ve found useful recently. ForEach The first one is simply a method that allows you to easily iterate over a sequence and perform an action on it. This is a pretty commonly useful…


  • Get MSMQ Queue Counts in C#

    Get MSMQ Queue Counts in C#

    Date Published: 08 November 2011

    I’m working with NServiceBus and MSMQ for one of my projects, and I wanted to be able to show a simple dashboard with the numbers of messages in each of the relevant queues for the application. Unfortunately, there isn’t a simple ".Count()” method or property in the built-in System.Messaging namespace for MSMQ queues, so if you want to get the message count there are a few ways to go about it…


  • Inner Fields and Lazy Initialization in C#

    Inner Fields and Lazy Initialization in C#

    Date Published: 29 October 2011

    Using lazy initialization in C#, a class’s state is set up such that each property’s get method performs a check to see if the underlying field is null. If it is, then it calculates or populates the field before returning it. This is a very simple and common approach, but it requires that the class follows a convention of only accessing the field via the property. Unfortunately, there are no…


  • RazorEngine Performance and Template Caching

    RazorEngine Performance and Template Caching

    Date Published: 26 October 2011

    I’ve been using RazorEngine on a project and have been impressed with its simplicity and ease-of-use. However, the performance of the application isn’t quite where I need it to be, and I was pretty sure the issue was with how I was using RazorEngine, especially since I could anecdotally see that the processor consumption on the machine running the app was quite high, and looking at the running…


  • Install Application as Service on Windows Server 2008

    Install Application as Service on Windows Server 2008

    Date Published: 25 October 2011

    You can use the sc.exe command to install an EXE as a service on Windows Server 2008. There’s a good article on creating an application that can easily run as either a console app or as a service here. From an administrator command prompt, the syntax is something like this: scservernamecreate MyService.ServiceName binpath= d:servicesFooFoo.exe displayname= MyService.ServiceName Note that for this…


  • Getting Started with WebMatrix 2

    Getting Started with WebMatrix 2

    Date Published: 25 October 2011

    Note: WebMatrix was discontinued after its final release in 2013. Introduction WebMatrix is a lightweight, easy-to-use tool for creating web applications. In this article, we'll look at where to find the latest version and how to get started with using the tool. Installing WebMatrix To get started, you just need to go to http://www.microsoft.com/web/webmatrix/next/ to download the latest version…


  • Working with Lazy Loading in Entity Framework Code First

    Working with Lazy Loading in Entity Framework Code First

    Date Published: 02 October 2011

    Entity Framework 4 has Lazy Loading built-in and enabled by default. Here’s a quick bit of code to show you how to work with this feature. To get started with this, simply create a new Console Application and in nuget (Package Manager Console), run this command: install-package EntityFramework.Sample This will install a simple blog post example. Copy and paste the following into your Program.cs…


  • 3 Tips to Improve Your Connection Strings

    3 Tips to Improve Your Connection Strings

    Date Published: 30 September 2011

    Due to some database moves, I’ve recently been touching a lot of connection strings, which has me thinking about the topic. In fact, I put togethera short surveyon twitter, and invited a bunch of developers and DBAs to share their thoughts, both on twitter and in the survey, on some issues relating to connection strings. Here are three tips you should know about that, if you’re not already using…


  • Cleveland 2011 Software Engineering 101

    Cleveland 2011 Software Engineering 101

    Date Published: 30 September 2011

    Next Friday, 7 October 2011, Microsoft in Cleveland is hosting a free one-day event focused on the basics of Software Engineering. There are a handful of seats left before the event sells out. You can learn more and RSVP for Software Engineering 101 here (until tickets run out). The event is being held at the Microsoft office here: Microsoft Corporation\ 6050 Oak Tree Blvd Independence, OH 4413…


  • Speaking at DevReach 2011

    Speaking at DevReach 2011

    Date Published: 30 September 2011

    ’m very pleased to be speaking again at DevReach in Sofia, Bulgaria next month. As usual, the conference has an amazing list of speakers (which I’m still somewhat amazed includes me), with Scott Hanselman making the trip out this year to give several sessions. If you have the opportunity to attend, I highly recommend it. There’s certainly no other conference in Eastern Europe that comes close…


  • Set JsonRequestBehavior to AllowGet

    Set JsonRequestBehavior to AllowGet

    Date Published: 23 September 2011

    If you’re working with ASP.NET MVC and JsonResult, you may encounter this error: This request has been blocked because sensitive information could be disclosed to third party web sites when this is used in a GET request. To allow GET requests, set JsonRequestBehavior to AllowGet. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack…


  • Wiring up an AutoCompleteBox to a JSON Service in Silverlight

    Wiring up an AutoCompleteBox to a JSON Service in Silverlight

    Date Published: 23 September 2011

    I’m currently building an internal application for The Code Project that needs to be able to transfer the contents of some potentially very large files over the wire. After considering various ways to get the data from point A to point B, we decided the easiest thing would be to process the text file on the client, and send batches of rows up to the server for processing. Initially we looked at…


  • Bidirectional Entity Foreign Key Names in EF Code First

    Bidirectional Entity Foreign Key Names in EF Code First

    Date Published: 22 September 2011

    Ran into a small problem today, where I had two classes referring to one another using EF 4.1 Code First. Let’s say I had a class Item and another class ItemHistory. ItemHistory has a property of type Item that refers to the Item class. Item, in turn, has an ICollection Histories property: In my DbContext OnModelCreating() I have some code like this to set the foreign key names according to the…


  • WinRT and the Paradox of Choice

    WinRT and the Paradox of Choice

    Date Published: 22 September 2011

    In my recent analysis of the Windows 8 / WinRT options for building Metro style Apps, I mentioned the many choices Microsoft is offering for building these applications. While I agree with Microsoft’s decision to support C++, .NET, and HTML5/JS developers when building these applications, it does still represent a Paradox of Choice for many developers, myself included. If we consider only native…


  • Analyzing Windows 8 and WinRT

    Analyzing Windows 8 and WinRT

    Date Published: 19 September 2011

    Last week at BUILD, Microsoft introduced their vision for the next generation of Windows devices with announcements and previews of Windows 8, Metro style applications, and WinRT. The BUILD conference was the most secretive event I’ve ever known Microsoft to hold, with very few leaks prior to the keynotes that began on Tuesday, September 13th. Now that the event has come and gone, you can watch…


  • Moving Beyond Enums

    Moving Beyond Enums

    Date Published: 30 August 2011

    I just published an article on ASPAlliance on Moving Beyond Enums, describing when and how to move from enums to classes in your code when you start demanding more from your enums than they were designed to give. Check it out and let me know what you think. I also thought I’d post an alternate LINQ-ified version of the DisplayFriendlyNames() method I used in the article. Original, non-LINQ version…


  • Working with SimpleMembership outside of ASP.NET

    Working with SimpleMembership outside of ASP.NET

    Date Published: 24 August 2011

    I’m using SimpleMembership, from WebMatrix’s distribution(WebMatrix.WebData), with an ASP.NET MVC 3 application. You can find the NuGet Package for SimpleMembership.Mvc3 here, and installing it is just a matter of running “Install-Package SimpleMembership.Mvc3” from the Package Manager Console in Visual Studio. Unlike the built-in Membership and Role providers for ASP.NET, SimpleMembership doesn’t…


  • Validating Emails for System.Net.Mail

    Validating Emails for System.Net.Mail

    Date Published: 12 August 2011

    If you’ve worked with the System.Net.Mail API to send out messages, you may have run into the fact that when you add an email address to a message, it will sometimes throw an exception if the email doesn’t appear to be valid: Result: FormatException – The specified string is not in the form required for an e-mail address. This is handy since it’s usually better to fail early rather than wait until…


  • Installing Visual Studio Load Test Agents and Controllers

    Installing Visual Studio Load Test Agents and Controllers

    Date Published: 19 July 2011

    Visual Studio includes support for distributed load testing through the use of Test Agents and Controllers. For reference, there are a couple of MSDN Walkthroughs on Installing and Configuring Visual Studio Agents and Test and Build Controllers and Using a Test Controller and Test Agents in a Load Test. However, they lack pretty pictures, so if a screenshot walkthrough is more your speed, read on…


  • Common Design Patterns Resources

    Common Design Patterns Resources

    Date Published: 13 July 2011

    Last night I gave a presentation at the Cleveland .NET SIG on Common Design Patterns. The turnout was great, so much so that the group ran out of pizza and chairs, so thanks to everyone for taking the time to come out! Thankfully the A/C held up pretty well (in years’ past, it’s been an issue there), and I hope everybody enjoyed the topic and discussion. I promised that I would post the slides and…


  • How to Find Conference and User Group Presenters

    Date Published: 13 July 2011

    5451873949_d43dbb8c2dIf you’re a user group leader or event organizer and are looking for quality presenters for your event, here are some resources that should help get you started.  This is not meant to be an all-inclusive or exhaustive list, of course, and to that end I fully expect that there will be great resources left as an exercise for you, the reader, to add via the comments.  Thanks for…


  • Working with Value Objects

    Working with Value Objects

    Date Published: 12 July 2011

    Introduction A Value Object is an object that has no unique identity, but rather represents a characteristic of something else. For instance, the integer 7 can be used anywhere and always means the same thing - we don't think about this or that particular instance of the integer 7. Likewise, a given date like 11 July 2011 (GMT) is the same everywhere - it has no additional identity. In…


  • How to Reset a SQL Server SA Password

    How to Reset a SQL Server SA Password

    Date Published: 28 June 2011

    Introduction If you need to reset the SA (system administrator) password on a MS SQL Server database because you've lost or forgotten the old password or you've change your active directory domain, you can do so provided that you can access the server with an account that has local administrator permissions. This article describes the steps required to do so. Step by Step First off, you need to…


  • Everything You Need to Get Started with SpecFlow and WatiN

    Everything You Need to Get Started with SpecFlow and WatiN

    Date Published: 24 June 2011

    I’m adding SpecFlow to an application I’m working on so that I can add some acceptance tests that actually exercise the user interface. I’ve only spent a couple of hours on it thus far, but I have it working with a single specification running through the tests via WatiN. I found the following resources helpful as I was going through this exercise: Getting Started with SpecFlow and ASP.NET BDD…


  • Dayton .NET User Group Talk on Anti-Patterns and Worst Practices

    Dayton .NET User Group Talk on Anti-Patterns and Worst Practices

    Date Published: 23 June 2011

    Last night I spoke at the Dayton .NET User Group on the topic of Anti-Patterns and Worst Practices. It was a pretty good-sized group, albeit rather subdued. You’ll find some of the inspiration for the talk in my Principles, Patterns, and Practices of Mediocre Programming post, and others in the 97 Things Every Programmer Should Know book(or onlinehere). The slides and demos are available for…


  • Copy a Table with data in SQL Server

    Copy a Table with data in SQL Server

    Date Published: 20 June 2011

    Sometimes when you’re about to do some major surgery on your database, you want the comfort of knowing that you can always rollback if there’s a problem. And it’s not always the case that you’ll immediately know there was a problem. Sometimes, you just want a copy of the original data so that you can go back to it, or use it to analyze where you went wrong. Of course, you can backup the whole…


  • How Developers Are Using var in C#

    How Developers Are Using var in C#

    Date Published: 14 June 2011

    The var keyword was introduced in C# 3.0, and has since gained quite a bit of popularity. There is also a fair bit of contention over how it should be used, with posts like this one (with which I happen to agree) being not uncommon. Over the last week I posted a couple of polls on twitter that asked about specific scenarios in which one might use var, trying to address the two scenarios outlined…


  • Creating a SOLID Visual Studio Solution

    Creating a SOLID Visual Studio Solution

    Date Published: 14 June 2011

    Introduction The SOLID acronym describes five object-oriented design principles that, when followed, produce code that is cleaner and more maintainable. The last principle, the Dependency Inversion Principle, suggests that details depend upon abstractions. Unfortunately, typical project relationships in .NET applications can make this principle difficult to follow. In this article, I'll…


  • On the Usefulness of Xml Summary Comments with Poll Results

    On the Usefulness of Xml Summary Comments with Poll Results

    Date Published: 13 June 2011

    Last week I hosted a quick poll on Twitter about how useful a particular XML comment was for a particular class. The code looked like this: The poll actually got 355 votes, which is pretty impressive. In hindsight I should have added an option relating to generating documentation, or updated the “necessary evil” option to include documentation as a valid reason for having these, since a large…


  • Entity Framework Error – Model compatibility cannot be checked

    Entity Framework Error – Model compatibility cannot be checked

    Date Published: 03 June 2011

    If you’re using Entity Framework Code First and you have everything working with, for instance, a SQL CE database, but then you want to move to a full SQL Server database, you may encounter this message if you don’t do things in the right order. In my case, what I did was open SQL Management Studio, Create my new database, then popped into Visual Studio, Server Manager, added a connection to it…


  • Record Visual Studio Web Test Using Fiddler

    Record Visual Studio Web Test Using Fiddler

    Date Published: 29 May 2011

    Fiddler is a great tool for examining and working with HTTP requests. If you’re a web developer, it’s one of those tools that you should definitely be at least aware of. The most recent version has some nice new features, like being able to very easily isolate which window or process it’s recording, so you don’t end up with a lot of noise from messengers and other background HTTP requests. The…


  • Log Method Name Helper

    Log Method Name Helper

    Date Published: 29 May 2011

    Sometimes it’s handy to see the order in which methods are firing, or how long they’re taking, without having to attach a debugger. Typically, you might write some code like this: This of course gets tedious after a while. There are all kinds of things wrong with this approach. It isn’tDRY. It includes magic strings. You’d almost never need it if you were following TDD. Etc. If you really need…


  • Run Batch File as Scheduled Task

    Run Batch File as Scheduled Task

    Date Published: 28 May 2011

    I’ve had problems running batch files as scheduled tasks. I’m not alone – over the past couple of weeks, while I’ve been trying to get a scheduled job to work on a new server (when it worked fine on the old one), I’ve done a fair bit of searching on this topic. I’ve found long threads on how some folks cannot run batch file as a scheduled task, with suggestions such as using full UNC paths for all…


  • The 4 Stages of Learning Design Patterns

    The 4 Stages of Learning Design Patterns

    Date Published: 13 May 2011

    Design patterns are general, reusable solutions that occur in software design, which can usually be adapted to fit into a number of different situations and applications. Recently, I recorded a screencast interview with Carl Franklin on Commonly Used Design Patterns for dnrTV, and one of the things we discussed was the stages of learning design patterns. I noted that, at least for myself, I’d…


  • Deploy and Test an Azure App with Platform Ready

    Deploy and Test an Azure App with Platform Ready

    Date Published: 10 May 2011

    Introduction Microsoft Platform Ready provides technical and marketing resources for companies building applications for the Microsoft platform. Currently they are working with The Code Project on a promotion that will pay $250 USD to companies for their FIRST Windows Azure Application that is verified compatible using the Microsoft Platform Ready testing tools. The contest is valid only through…


  • Binding Data to Web Performance Tests

    Binding Data to Web Performance Tests

    Date Published: 03 May 2011

    Introduction Visual Studio's Web Performance Tests can be used to test whether web pages return the correct results and/or whether they respond quickly enough. You can record these tests manually, but if you have a large number of scenarios you need to test for using the same set of pages, it's much more efficient to use the built in data source and data binding tools to do so. This article…


  • Fixing MaxItemsInObjectGraph quota Error in WCF Service

    Fixing MaxItemsInObjectGraph quota Error in WCF Service

    Date Published: 28 April 2011

    I have a WCF Service that occasionally yields a message like this one: Maximum number of items that can be serialized or deserialized in an object graph is ‘65536’. Change the object graph or increase the MaxItemsInObjectGraph quota. Today isn’t the first time I’ve run into this message – I’ve fixed this issue before – but since this is the 2nd or more time I’ve run into it, I thought I’d post a…


  • Exporting Blog Content from Community Server

    Exporting Blog Content from Community Server

    Date Published: 27 April 2011

    I have some old blog content scattered around a few different sites, and it’s on my list for the near future to consolidate it as much as possible onto a single blog engine and domain – one blog to rule them all – at least for my own stuff. I wasn’t sure how to get my content out of http://weblogs.asp.net/ but a quick email got me the answer, which I thought I’d share. To export your content from…


  • ASP.NET MVC 3 Scaffolding Quick Start

    ASP.NET MVC 3 Scaffolding Quick Start

    Date Published: 26 April 2011

    Introduction One of the new features in ASP.NET MVC 3 is its scaffolding feature, which basically lets you very quickly produce data entry controllers and views based on a particular model, even if you don't yet have a database in place. This can let you very quickly produce a proof-of-concept, or iterate through some design options, without the need to go through a big process of setting up a…


  • Optimizing Data Feeds for Stir Trek

    Optimizing Data Feeds for Stir Trek

    Date Published: 22 April 2011

    I wrote a couple of weeks ago about using Visual Studio 2010’s Performance and Load Testing tools to analyze and correct some performance concerns with the Stir Trek Conference web site (which, by the way, is 2 weeks from today!). I realized, though, that there are a bunch of mobile applications that are set up to use the site’s XML and JSON data feeds, and I hadn’t measured or tuned these at all…


  • Configuring a WCF Service to Run Via HTTPS

    Configuring a WCF Service to Run Via HTTPS

    Date Published: 22 April 2011

    Yesterday I wrote about how to wire up jQuery UI’s AutoComplete add-in to a WCF Service to create an autocomplete search/navigation control. Today I deployed the resulting code to production but initially had some trouble getting things to work. The only real difference between the two environments is that in production everything goes through HTTPS/SSL, so I figured that had to be the culprit. A…


  • Creating an Autocomplete Redirect Navigation Control using jQuery UI

    Creating an Autocomplete Redirect Navigation Control using jQuery UI

    Date Published: 21 April 2011

    On an application I’m working on, there’s was an ASP.NET DropDownList used for jumping to a particular account. This, when enhanced with the AJAX Control Toolkit’s ListSearchExtender, provided an awesome user experience for quickly navigating to a particular account. Just click the control, and either scroll, or better, type in the first few characters of the name of the account, and it was…


  • Creating a Simple ASP.NET Report with Export to Excel

    Creating a Simple ASP.NET Report with Export to Excel

    Date Published: 19 April 2011

    Introduction One of my very first articles was on exporting reports to Excel using Active Server Pages, and this article still gets over a thousand views per month. Today I had to create a quick report for internal use and I thought it would be helpful for the user to be able to quickly export the results to Excel. Thus I found myself, over a decade later, going through much the same process as…


  • Creating a Bot for the Rock Paper Azure Contest

    Creating a Bot for the Rock Paper Azure Contest

    Date Published: 18 April 2011

    The Windows Azure team is holding a contest, and The Code Project is helping to support it. As part of this contest, you can get free Azure compute time by signing up with the code CP001 here. The contest is simple – Rock, Paper, Scissors, with bots, and with 2 new moves: Dynamite, which beats Rock, Paper, or Scissors, and Water Balloon, which beats Dynamite. The catch: you only have a limited…


  • Create a Windows Service in .NET That Can Also Run as Console Application

    Create a Windows Service in .NET That Can Also Run as Console Application

    Date Published: 13 April 2011

    I’m creating a simple windows service using Visual Studio 2010 and .NET 4. I want to be able to easily test it by simply running the resulting exe without the need to install the service. I did some research on this topic and found three helpful articles: HybridService: Easily Switch between Console Application and Service (on CodeProject) Run Windows Service as a console program Creating a…


  • Installing ASP.NET MVC 3 Tools Update

    Installing ASP.NET MVC 3 Tools Update

    Date Published: 13 April 2011

    Phil Haack has a post introducing the ASP.NET MVC 3 Tools Update that you probably should read. This is my own experience installing the update and upgrading an existing MVC 3 project to use the new tooling. First, you’ll want to install the MVC 3 Tools Update, using one of these options: Web Platform Installer for ASP.NET MVC 3 Tools Update Download Page for ASP.NET MVC 3 Tools Update And then…


  • Real World Performance and the Stir Trek Web Site

    Real World Performance and the Stir Trek Web Site

    Date Published: 10 April 2011

    I recently joined the board responsible for organizing the Stir Trek conference in Columbus, Ohio. This is a great conference I’ve spoken at the last couple of years that’s held in a movie theater on opening day of a new great movie. The first one, two years ago, was held for the opening day of Star Trek (hence the name), and last year was Iron Man II. This year’s movie is Thor, which looks to be…


  • Introducing Pair Programming at Cinci Day Of Agile

    Introducing Pair Programming at Cinci Day Of Agile

    Date Published: 30 March 2011

    Last weekend I presented at the Cincinnati Day of Agile event on Introducing Pair Programming (see on slideshare).  The event was nearly sold out with about 240 people in attendance, a mix of devs and PMs.  The content and (other) speakers I thought were great – Phil and his team did a great job.  I took a few pictures during the event, which you can see below: Phil and Joel Semeniuk DSC_001…


  • Installing Orchard Content Management System

    Installing Orchard Content Management System

    Date Published: 29 March 2011

    Introduction Orchard is a free, open source, community-focused content management system built on the ASP.NET platform. It uses ASP.NET MVC 3, the Razor view engine, and is an Outercurve Foundation project. In this article, we'll look at how to get started with Orchard 1.0 by installing it. Installing Orchard There are a few different ways you can install Orchard. Probably the simplest if you…


  • How To Fix Visual Studio File Templates

    How To Fix Visual Studio File Templates

    Date Published: 25 March 2011

    When you create a new project in Visual Studio, it will usually include some files as part of the project. Most of the time, these are pretty useless, but if it’s your first time working with said template, they may help you get going. In VS2010, the Test Project, for example, has been improved over prior versions by eliminating a useless text file describing tests and a useless Manual Test file…


  • Handling Errors with ASP.NET MVC

    Handling Errors with ASP.NET MVC

    Date Published: 22 March 2011

    Introduction Nobody likes to talk about it, but sometimes your web application is going to fail. When it does, you want to make sure your users still get the best possible experience, and ideally that you as the developer get what you need to fix the problem. In this article, you'll learn how to configure error handling in your ASP.NET MVC 3 applications. In the beginning... When you first…


  • Visual Studio 2010 Unlimited Load Test Virtual Users

    Visual Studio 2010 Unlimited Load Test Virtual Users

    Date Published: 21 March 2011

    You may have heard the recent announcement that Visual Studio 2010 Ultimate and MSDN subscribers now have access to the Visual Studio 2010 Load Test Feature Pack, which enables load testing of applications with unlimited virtual users. Unfortunately, it’s not entirely clear at first, at least to me, how to get this to work if you’ve simply installed VS2010 Ultimate and now want to take advantage…


  • Code Analysis Using Atomiq

    Code Analysis Using Atomiq

    Date Published: 08 March 2011

    Introduction Atomiq is a code analysis tool that quickly locates duplicate code within software applications by analyzing the source code. It works at the source, not binary, level, and so can be applied to applications written in a variety of languages. Although it doesn't support auto-correction or refactoring within the application, it can quickly locate problems which can then be addressed…


  • Complex Technical Demos Using Local Source Control

    Complex Technical Demos Using Local Source Control

    Date Published: 01 March 2011

    Last summer at the Software Engineering 101 event put on by NimblePros in Cleveland, I saw Kevin Kuebler do a demo using git or Mercurial to iterate from phase of the project he was building to the next. It worked amazingly well and I thought I would document how to set this up yourself, so that when you’re giving a technical presentation that involves a somewhat complex set of changes to a…


  • Avoid Exposing Collections Directly as Properties

    Avoid Exposing Collections Directly as Properties

    Date Published: 22 February 2011

    Introduction Sometimes your domain objects have one-to-many or many-to-many relationships with other objects. For instance, your Customers might have collections of Orders associated with them. The simplest way to model this is to expose a field or property off of your Customer class. Unfortunately, this has a number of negative consequences because of how it breaks encapsulation. Fortunately…


  • ASP.NET Tips and Tricks on dnrTV

    ASP.NET Tips and Tricks on dnrTV

    Date Published: 20 February 2011

    I recently did a show with Carl Franklin on ASP.NET Tips and Tricks, recorded for dnrTV.com. In it, I go through a bunch of ASP.NET tips, from the oldies but goodies like Tracing and Caching, to some new ones like optimizing the performance of your ASP.NET MVC 3 applications. The samples from the presentation are available for download here.


  • What are you working on? (What Test Are You Trying To Make Pass)

    What are you working on? (What Test Are You Trying To Make Pass)

    Date Published: 16 February 2011

    If you ask a newly-hired developer this question while they are busy coding away on something, you’ll usually get an answer like “the Acme project.” If that’s too obvious (after all, maybe that’s the only project this dev works on), then the answer might be “the new xyz feature” or “that abc bug.” All of these are more-or-less valid responses, and depending on the scope of the response, they might…


  • Building a CachedRepository via Strategy Pattern

    Building a CachedRepository via Strategy Pattern

    Date Published: 15 February 2011

    In part one of this series, I introduced the CachedRepository pattern, and demonstrated how it can be applied through the use of simple inheritance to an existing Repository class. This allows us to easily configure whether or not we want to use caching at the repository level through the use of an IOC Container like StructureMap. However, using inheritance to achieve the behavior isn’t always…


  • Introducing the CachedRepository Pattern

    Introducing the CachedRepository Pattern

    Date Published: 14 February 2011

    In this first part of a series on adding support for caching to the Repository Pattern, I’d like to show how to very simply control whether or not caching is performed on a per-repository basis through the use of an Inversion of Control Container. In this case, I’ll be using StructureMap with ASP.NET MVC 3. One of the primary goals of this implementation is to follow principles of object oriented…


  • Improving ASP.NET MVC Application Performance at MVCConf

    Improving ASP.NET MVC Application Performance at MVCConf

    Date Published: 09 February 2011

    Yesterday I gave a presentation to a little over 300 attendees of MVCConf on Improving ASP.NET MVC Application Performance. There were some great responses on twitter and generally the ratings on SpeakerRate were positive, which was great because I was a bit worried going into the presentation, since I’d only committed to giving a talk at the conference a few day earlier. I’m uploading the…


  • List Services Running on Remote Servers

    List Services Running on Remote Servers

    Date Published: 06 February 2011

    As I wrote earlier, Lake Quincy Media’s AdSignia ad platform is utilizing services and a message-based architecture to decouple the system from the database and improve performance and reliability of the servers. It’s proven useful to quickly work with the services across multiple nodes in the web cluster, and PowerShell is the obvious choice for automating some of these tasks. When building up a…


  • Starting and Stopping Services on Remote Servers using PowerShell

    Starting and Stopping Services on Remote Servers using PowerShell

    Date Published: 06 February 2011

    This wraps up my mini-series on using PowerShell to help manage services running on multiple remote servers. In my case, these scripts exist to make it easy for me to globally start and stop services on a number of web servers that are part of Lake Quincy Media’s AdSignia ad platform – you can read more about the message-based architecture we’re using here. I learned the basics of starting and…


  • Pass Results from One PowerShell Script To Another

    Pass Results from One PowerShell Script To Another

    Date Published: 06 February 2011

    If you’re using PowerShell but want to keep your scripts DRY, you may want to factor common functions into their own scripts, and then call these scripts from multiple other scripts. This is pretty easy to do. For instance, if you have an array of values that you want to use as inputs for several scripts, you could create a file like this one: Colors.ps1 Now, to use this in another PowerShell…


  • Message-Based Architecture Goodness

    Message-Based Architecture Goodness

    Date Published: 06 February 2011

    Recently at Lake Quincy Media we upgraded our logging system for the AdSignia ad platform so that it uses messaging rather than direct SQL database access. This allows us to log much more detailed data, which we can then analyze, and also improves the performance of every ad request, since it eliminates a database call and replaces it with a local queue operation, which is much faster and less…


  • MSBuild Invalid Character in Connection String with dbproj

    MSBuild Invalid Character in Connection String with dbproj

    Date Published: 03 February 2011

    If you get this error: error MSB5016: The name “Intitial Catalog” contains an invalid character “ “. or something similar when trying to specify a connection string within an MSBuild task, like this one: The issue is with the semicolons in the querystring. If you replace them with %3B then the error goes away: Hope this helps! You can also escape the spaces with but I don’t believe that’s required…


  • If Writing An Object That Is IDisposable, Dont Fail During Construction

    If Writing An Object That Is IDisposable, Dont Fail During Construction

    Date Published: 02 February 2011

    There’s a great pattern for ensuring that unmanaged resources are cleaned up in the .NET world. It’s called the Disposable pattern and it applies to any resource that implements the IDisposable interface. If you are writing an object that directly deals with unmanaged resources, such as files, database connections, network sockets, fonts, etc., then you are well advised to implement IDisposable…


  • Getting Next Month in MSBuild

    Getting Next Month in MSBuild

    Date Published: 01 February 2011

    I’m working on an application that needs to deploy a new database each month, in order to manage the large amount of data involved. We’d like to automate this as much as possible, and since we already have the database schema in a Visual Studio 2010 database project, we figured the simplest thing would be to create an MSBuild task to do this, and then schedule it as part of our build server. The…


  • ViewBag does not exist in current context

    ViewBag does not exist in current context

    Date Published: 30 January 2011

    If you’re working with the ASP.NET MVC 3 MvcMusicStore demo and you run into the error message: The name ‘ViewBag’ does not exist in the current context It’s probably a sign that you are running on an older version of ASP.NET MVC (or a pre-release of MVC 3). You can download the latest version of ASP.NET MVC 3 here. This will install the Web Platform Installer (version 3) and will install ASP.NET…


  • Database cannot be opened – version 655

    Database cannot be opened – version 655

    Date Published: 30 January 2011

    I’m working with the new MvcMusicStore sample application, and immediately I’m having trouble with the database. When I try and open the .mdf file that’s in my App_Data, I’m presented with this error message: The database ‘C:DEVSCRATCHMVCMUSICSTORE-V2.0MVCMUSICSTORE-COMPLETEDMVCMUSICSTOREAPPDATAMVCMUSICSTORE.MDF’ cannot be opened because it is version 655. This server supports version 612 and…


  • Entity Framework Invalid Object Name dbo.Albums

    Entity Framework Invalid Object Name dbo.Albums

    Date Published: 30 January 2011

    Continuing in working with the MVC Music Store sample application, the next thing I ran into after installing the SQL database by hand, was an error on the home page saying: Invalid object name ‘dbo.Albums’. Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the…


  • Creating a WHERE NOT EXISTS or WHERE NOT IN Query Using LLBLGen

    Creating a WHERE NOT EXISTS or WHERE NOT IN Query Using LLBLGen

    Date Published: 27 January 2011

    Consider a scenario where you have a many-to-many relationship, but it’s nullable. For instance, maybe you have Articles and Categories (or Tags), and an Article can have 0 to N Categories/Tags. Now, you want to pull in a set of Articles that are uncategorized. Using SQL, you might write a query like this: If you needed to do this using LLBLGen, and you didn’t know a better way, you could achieve…


  • Lessons Learned Performing Harry Potter Book Kata

    Lessons Learned Performing Harry Potter Book Kata

    Date Published: 18 January 2011

    Last week at CodeMash I went through the Harry Potter Book Kata with Steve (@underwhelmed). This is an interesting kata because it pretty much starts out very straightforward and things progress very quickly, and then you are faced with a brick wall in terms of how to proceed with the algorithm. I recommend you give the exercise a try yourself before reading my tips, since they may be something of…


  • How do I Change Where MSMQ Messages are Stored or Persisted?

    How do I Change Where MSMQ Messages are Stored or Persisted?

    Date Published: 18 January 2011

    If you are using MSMQ, either directly or with the help of a package like NServiceBus, you may encounter errors if your server becomes overloaded with messages either due to high load or as a result of a failure in your message handling process. If this happens, you may see exceptions like this one (ask me how I know this…): The Insufficient resources to perform operation MessageQueueException…


  • Introducing Command Query Responsibility Separation (CQRS)

    Introducing Command Query Responsibility Separation (CQRS)

    Date Published: 11 January 2011

    Introduction The Command Query Responsibility Separation (CQRS) pattern is an enterprise pattern that can be used to increase the performance, scalability, and reliability of distributed applications that may experience heavy load. It is especially effective in situations where an immediate response is not required, or often even expected, by the user, or to offload processing that need not occur…


  • Unit Test Naming Convention

    Unit Test Naming Convention

    Date Published: 10 January 2011

    I’ve been writing tests and unit tests for quite a while, and naturally my personal preference for naming them has evolved somewhat with time. Initially, I didn’t really know what I was doing and the default organization tended to be something like “given a class, Customer, all of the tests will go into a class called CustomerTests.” This turned out, for me at least, to be less than ideal. Later I…


  • Type was not registered in the serializer exception with NServiceBus

    Type was not registered in the serializer exception with NServiceBus

    Date Published: 07 January 2011

    If you encounter this error in your ASP.NET application after updating it while using NServiceBus: Server Error in ‘/’ Application. Type DataPump.Infrastructure.Messages.MyMessage was not registered in the serializer. Check that it appears in the list of configured assemblies/types to scan. Description: An unhandled exception occurred during the execution of the current web request. Please review…


  • Attempt was made to load an assembly from a network location

    Attempt was made to load an assembly from a network location

    Date Published: 05 January 2011

    If you see this bug while running an application that is referencing some third-party DLLs that you recently downloaded, your first thought should be “I need to Unblock the assembly I’m referencing!” …an attempt was made to load an assembly from a network location… Windows, while trying to be helpful, will block downloaded files, causing .NET to fail when trying to load such DLLs. The best way to…


  • Abstract to Privileges rather than to Roles in ASP.NET Applications

    Abstract to Privileges rather than to Roles in ASP.NET Applications

    Date Published: 14 December 2010

    The Problem If you've written much ASP.NET code since 2005, you've probably used the built-in role provider, or rolled your own, and written code that checks whether the current user belongs to a particular role. For instance, for an article site like ASPAlliance.com, you might choose to show an Edit link to editors with some code like this: Of course, it might also be true that authors should be…


  • Singleton Pattern

    Singleton Pattern

    Date Published: 07 December 2010

    I recently published an article on Alternatives to the Singleton Design Pattern on AspAlliance.com. If you’re a fan of the Singleton pattern, I would encourage you to have a read and feel free to comment (here or there) if you agree or disagree with my position. You can also learn more about the Singleton in the Patterns Library at Pluralsight. Finally, if you haven’t read it, I definitely…


  • Get the Batch Files Path in a Batch File

    Date Published: 07 December 2010

    I’m a huge fan of build automation, and all of my dev projects include scripts to build, test, deploy, run etc.  Sometimes these use PowerShell and quite often they use MSBuild (or occasionally NAnt) but batch files remain a very simple and powerful way to take care of automation business.  Today I’m trying to wrap up my use of NServiceBus on a project that’s going live with some CQRS goodness…


  • Alternatives to the Singleton Design Pattern

    Alternatives to the Singleton Design Pattern

    Date Published: 23 November 2010

    Introduction The Singleton Design Pattern is one of the simplest design patterns in software development, yet one of the easiest to misuse as well. In this article, we'll examine some alternatives to the Singleton pattern in its most naïve implementation, as well as consider an alternative to making classes themselves responsible for managing their instances. The Singleton Pattern The Singleton…


  • 9 Ways Contract Lawyers are Like Software Developers

    9 Ways Contract Lawyers are Like Software Developers

    Date Published: 22 November 2010

    Lawyers. We love to hate them. But they’ve been writing code since long before Ada Lovelace wrote the first computer program. Here are 9 ways that Contract Lawyers are like Software Developers. Reason One: They Use a Language That Barely Resembles English Let’s face it, most attorneys writing contracts use language that one would be hard-pressed to find used anywhere on the planet in the last 10…


  • Software Craftsmanship 2011 Calendar

    Software Craftsmanship 2011 Calendar

    Date Published: 19 November 2010

    The folks at NimblePros have put together a pretty sweet 2011 calendar showcasing principles of software craftsmanship and agile software development. The calendars are arriving from the printer today and should start shipping out over the next week or so to those who have pre-ordered them (or won them in the twitter contest, which lasts until 8 December 2010). Here’s my review of the calendar…


  • Zen and the Art of Software Craftsmanship

    Zen and the Art of Software Craftsmanship

    Date Published: 12 November 2010

    Not long ago, I (finally) read Zen and the Art of Motorcycle Maintenance, which I’d had recommended to me since I was a teenager. It’s a very interesting book and one I would certainly recommend to anyone, but especially to anyone with an interest in quality. Quality is one of the recurring themes of the book, and there are a number of sections of the book that resonate with me as a software…


  • Verify a List of URLs in C# Asynchronously

    Verify a List of URLs in C# Asynchronously

    Date Published: 11 November 2010

    Recently I wanted to test a bunch of URLs to see whether they were broken/valid. In my scenario, I was checking on URLs for advertisements that are served by Lake Quincy Media’s ad server (LQM is the largest Microsoft developer focused advertising network/agency). However, this kind of thing is an extremely common task that should be very easy for any web developer or even just website…


  • On Software Quality at Cleveland .NET SIG

    On Software Quality at Cleveland .NET SIG

    Date Published: 10 November 2010

    Last night I led a discussion on software quality at the Cleveland area .NET SIG. Thanks to everyone who came and especially to those of you who shared your thoughts and opinions. I enjoyed the discussion and I hope you did as well. This was the first time I’ve done such a talk at this style of group, which typically just has a speaker lecturing for 90 minutes or so, and I thought it went well but…


  • Time Spent Green

    Time Spent Green

    Date Published: 29 October 2010

    I’ve been a fan of continuous integration for what seems like forever. It’s an amazing way to boost the quality of your code and ensure that what gets checked into your repository is working code. It also does a great job of eliminating the “it works on my machine” syndrome that is so common without such a tool. If nothing else, having a separate machine run your build directly from what’s in…


  • Use Interfaces for Metadata and Comments

    Use Interfaces for Metadata and Comments

    Date Published: 27 October 2010

    If you’re using XML Comments for intellisense purposes, or are making heavy use of attribute-based metadata in your classes, you’ve likely found that these have a tendency to bloat your code and make it more difficult to follow. For example, consider this simple configuration section handler: This is an example of a custom configuration section handler which I’ve written about previously. I highly…


  • DevReach 2010

    DevReach 2010

    Date Published: 23 October 2010

    This past week I had the good fortune of traveling to Sofia, Bulgaria to speak at DevReach for the second time (the first was 2 years ago in 2008). This is a great conference and was held for the second year in a row at a movie theater, which worked very well (similar to StirTrek in Ohio each year). The event included a great list of speakers, including Scott Stanfield, Beth Massie, Andrew Brust…


  • SQL Table Cleanup Job

    SQL Table Cleanup Job

    Date Published: 23 October 2010

    It’s pretty straightforward to create a job in SQL Server that will clean up a table. For instance, for AspAlliance.com I use ELMAH to record errors, and it’s set up to go to a database table (called ELMAH_Error – see image at right). While doing some maintenance, I noticed that this table had several months’ worth of data in it and over 400k records (many of which were simply 404s). This was…


  • The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON

    The CHECK_POLICY and CHECK_EXPIRATION options cannot be turned OFF when MUST_CHANGE is ON

    Date Published: 22 October 2010

    In addition to the dreaded SQL Server Error: User Group or Role Already Exists in the Current Database error, you may also get this error when creating new logins after a database move: Alter failed for login ‘somelogin’. An exception occurred while executing a Transact-SQL statement or batch. The CHECKPOLICY and CHECKEXPIRATION options cannot be turned OFF when MUST_CHANGE is ON. (Microsoft SQL…


  • LINQ Range Variable Problem

    LINQ Range Variable Problem

    Date Published: 05 October 2010

    Ran into this issue last night and just figured it out. I have this code for a demo: Now, in Visual Studio, it looks like this: image Hovering over freightSummary in the above LINQ query would reveal just (range variable) ? freightSummary image A bunch of searching later didn’t much help, although this thread did put me on the right track just a moment ago. The trick, it turns out, is that I didn…


  • Build Automation for your Application using MSBuild

    Build Automation for your Application using MSBuild

    Date Published: 29 September 2010

    Over the past few years, I’ve established something of a standard for how I like to organize my projects, and this includes having a one-click build-and-test script for each project. This is a quick description of my current thoughts on this, along with some details of how to get the MSBuild scripts working for your project as well. The ultimate goal is that you, a new developer who just pulled…


  • The Check In Dance

    The Check In Dance

    Date Published: 29 September 2010

    When developing software and working with a build or integration server, there are certain conventions that one should follow when making updates to the shared codebase. Somewhere I picked up the term “the check in dance” (not to be confused with “the chicken dance”) for this process, which is very straightforward and, if followed, can ensure that build failures on the continuous integration (CI…


  • Real World Monitoring and Tuning ASP.NET Caching Part 2

    Real World Monitoring and Tuning ASP.NET Caching Part 2

    Date Published: 21 September 2010

    In Real World Monitoring and Tuning ASP.NET Caching Part 1, I showed the behavior of a certain ASP.NET application under load. We resolved the issue today, which turned out to be a result of two related issues that, thankfully in our case, were limited to a single class in our application that was responsible for interacting with our cache. Here’s the old behavior: The new version of the same…


  • How Do I Save Performance Counters in Windows Server 2008 or Windows 7

    How Do I Save Performance Counters in Windows Server 2008 or Windows 7

    Date Published: 21 September 2010

    If you’re writing multi-user applications like just about any ASP.NET application, it’s probably worth your time to get familiar with performance counters. Performance Monitor, or perfmon for short, is the tool you use to view these counters on your computer or server. You can add it to an MMC instance (run MMC and add the performance snap-in) or you can just run perfmon. (Sidenote – I once got…


  • ASP.NET Custom Errors Security Flaw

    ASP.NET Custom Errors Security Flaw

    Date Published: 18 September 2010

    Updated 5 October 2010: There is now a patch available via Windows Update. Read more about it here, and ensure all ASP.NET web servers have been patched ASAP. Microsoft just released some details on a security flaw that was publicized a few hours ago. On this post, you can learn more about the ASP.NET vulnerability and how to detect whether your web sites might be affected by them. This is a…


  • Using Dynamic Parameters in a WebTest or LoadTest

    Using Dynamic Parameters in a WebTest or LoadTest

    Date Published: 17 September 2010

    Using Visual Studio 2010 (and some earlier versions), it’s very easy to create a WebTest by recording one or more web requests to the system under test (SUT). To get started, open Visual Studio 2010 and create a New Project. Then select Test Project like so: Next, add a Web Test to the project, and hit the URL you want to test (the one that accepts multiple different parameters that you want to…


  • An IIS Crash Analysis Story

    An IIS Crash Analysis Story

    Date Published: 17 September 2010

    Last week I attempted to update a high-traffic production ASP.NET application to ASP.NET 4. In the course of doing so, I was surprised, despite having tested everything thoroughly in a staging environment, to find that under production loads, the system was erratic and slow to respond to requests. Further inspection revealed that IIS was actually crashing under load, leaving a cryptic message in…


  • Principles of Software Design

    Principles of Software Design

    Date Published: 16 September 2010

    Recently I did a webcast on Principles of Software Design in which I very quickly covered several important principles, as well as a few patterns and practices, that lead to better software quality. If you’re interested, you canview a recording of the webcast(click the wmv link beside the 16 Sep 2010 webcast), ordownload the slides and demos.


  • Real World Monitoring and Tuning ASP.NET Caching

    Real World Monitoring and Tuning ASP.NET Caching

    Date Published: 08 September 2010

    First off, let me direct you to a great article on monitoring your ASP.NET cache API behavior. Go read that first, then come back here. Done? Good, so let’s make the advice from Simon’s blog a bit more concrete with some real-world examples. Consider this fairly high-traffic web server’s behavior (avg. 55 ASP.NET requests/sec, 110 max, at the moment): Notice how the RAM sort of falls off a cliff…


  • Perform Rolling Upgrade of Web Farm using Windows Network Load Balancer

    Perform Rolling Upgrade of Web Farm using Windows Network Load Balancer

    Date Published: 07 September 2010

    Once you’ve set up a web farm / cluster using Windows Network Load Balancing, one of the benefits you have is the ability to perform a rolling upgrade. A rolling upgrade is a process by which you perform updates to individual servers within the cluster while they are not actively serving requests. This process is repeated so that eventually all servers have been updated, but users have not…


  • Applying Interface Segregation to Configuration Files

    Applying Interface Segregation to Configuration Files

    Date Published: 31 August 2010

    In .NET, it’s very easy to set up custom configuration section handlers to handle your application or component’s configuration needs. As my previous post shows, it’s also very easy to configure these with attributes that enforce required fields and other validation. However, over time it’s very easy to create fairly large configuration sections that violate the Interface Segregation Principle…


  • System.Core in VS2010 Projects

    System.Core in VS2010 Projects

    Date Published: 24 August 2010

    I just ran into an odd issue with a VS2010 project. In my case it was an MVC 2 application I was upgrading from VS2008. One of the built-in controllers (ProfileController) was failing to compile because it could not resolve the Linq extension method symbols Single() and Matches(). These are located in the System.Core assembly. I checked my project references in Solution Explorer, and System.Core…


  • Using CCTray with JetBrains TeamCity

    Using CCTray with JetBrains TeamCity

    Date Published: 23 August 2010

    TeamCity is a great build server tool from JetBrains (makers of the awesome Visual Studio add-in, ReSharper). The user-interface and features of the TeamCity web front-end are wonderful and are leaps and bounds easier to use for new users than my previous favorite, CruiseControl.Net, which required much XMLness to configure. However, one of my favorite tools from CruiseControl, CCTray, still has…


  • Code Analysis Techniques

    Code Analysis Techniques

    Date Published: 17 August 2010

    There are a number of code analysis tools available for .NET developers, including some stats that are built into the pricier SKUs of Visual Studio. Recently, I’ve been playing with a relatively new product (released earlier this year by Microsoft agile consulting shop NimblePros.com) called Nitriq. Nitriq is a bit like LINQPad for your code. If you’re not familiar with it, go download LINQPad now…


  • Getting Started with Code Contracts in VS2010

    Getting Started with Code Contracts in VS2010

    Date Published: 17 August 2010

    The idea of Design By Contract has been around for quite a while, and Microsoft Research has had a project focused on this topic for several years now, called Spec#. With Visual Studio 2010, there is now support for Code Contracts which are a DevLabs project based on the Spec# project. You can read more about and download Code Contracts for VS2010 here. Once you’ve downloaded and installed Code…


  • Working with Application Pool Identities

    Working with Application Pool Identities

    Date Published: 07 July 2010

    There a new feature of IIS called Application Pool Identities that was apparently introduced with SP2 of Windows Server 2008. There's a nice overview of Application Pool Identities here, which is the basis for this post, which is just my notes on the feature. If you're setting up new web sites and application pools in IIS on Windows Server 2008, it's likely they'll default to…


  • Set Up Build Agents By Project in TeamCity

    Set Up Build Agents By Project in TeamCity

    Date Published: 06 July 2010

    We’re using TeamCity to manage our continous integration builds for CodeProject.com and LakeQuincy.com. Before TeamCity, I was using CruiseControl.net, and TeamCity is much easier to get working (and requires far less XML manipulation). I do miss CCTray, which I found to be much nicer than the TeamCity tray notifier (which if you click on it never shows anything immediately – it has to go and get…


  • How Can I Determine The Current Controller or Action in an Html Helper

    How Can I Determine The Current Controller or Action in an Html Helper

    Date Published: 02 July 2010

    If you’re writing an HTML Helper for ASP.NET MVC you may want to do something different based on whether the page that is to be rendered was arrived at via a particular controller or controller action. I found the following code which does just this in one of the ASP.NET MVC Themes available from the www.asp.net web site (the Dark theme, I believe it’s called). Note that I’ve already modified this…


  • Tagging Releases in Source Control

    Tagging Releases in Source Control

    Date Published: 22 June 2010

    A best practice when you're using source control is to tag your releases. What does this mean, exactly? If you're following the relatively standard non-distributed source control repository folder structure of having root folders for: branches tags trunk then it means simply making a copy of the current state of the system when you did your release. Here's how to do it using Subversion (SVN) and…


  • Great Uses of Using Statement in C#

    Great Uses of Using Statement in C#

    Date Published: 18 June 2010

    In my last post about testing emails in .NET, I noted the use of the using statement to ensure safe usage of the IDisposable SmtpClient and MailMessage objects. This is the typical usage of the using statement, but you can take advantage of this statement’s behavior for other scenarios as well, resulting in cleaner code. Consider the scenario where you want to perform some kind of pre- and post…


  • Moving a Certificate Between Web Servers

    Moving a Certificate Between Web Servers

    Date Published: 18 June 2010

    I'm in the process of moving Lake Quincy Media's web site from one server to another, and since it uses SSL to secure users' data, I had to move the certificate to the new server as part of the server move. Fortunately, this process is quite painless. First, you need to export the certificate to a .pfx file and give it a password, using these steps: Start, Run, MMC (I did it as administrator) Go…


  • Testing Email Sending

    Testing Email Sending

    Date Published: 17 June 2010

    Recently I learned a couple of interesting things related to sending emails. One doesn't relate to .NET at all, so if you're a developer and you want to easily be able to test whether or not emails are working correctly in your application without actually sending them and/or installing a real SMTP server on your machine, pay attention. You can grab the smtp4dev application from codeplex, which…


  • Dont Throw Duplicate Exceptions

    Dont Throw Duplicate Exceptions

    Date Published: 17 May 2010

    In your code, you’ll sometimes have write code that validates input using a variety of checks. Assuming you haven’t embraced AOP and done everything with attributes, it’s likely that your defensive coding is going to look something like this: Do you see a problem here? Here’s the deal – Exceptions should be meaningful. They have value at a number of levels: In the code, throwing an exception lets…


  • Sql Table Refactoring Challenge

    Sql Table Refactoring Challenge

    Date Published: 28 April 2010

    I've been working a bit on cleaning up a large table to make it more efficient. I pretty much know what I need to do at this point, but I figured I'd offer up a challenge for my readers, to see if they can catch everything I have as well as to see if I've missed anything. So to that end, I give you my table: And now some assumptions and additional information: The table has 200,000,000 rows…


  • Sql Server Prevent Saving Changes That Require Table to be Re-created

    Sql Server Prevent Saving Changes That Require Table to be Re-created

    Date Published: 27 April 2010

    When working with SQL Server Management studio, if you use the Design view of a table and attempt to make a change that will require the table to be dropped and re-added, you may receive an error message like this one: Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re…


  • VS2010 Launch Presentations

    VS2010 Launch Presentations

    Date Published: 18 April 2010

    Last week I was in Vegas to present at the DevConnections/ VS2010 Launch event. The show was well-attended and everybody I spoke to agreed it was educational and enjoyable. My three talks were all on Wednesday, 14 April 2010, including one at 8am for which I was impressed to see a large turnout in attendance. Pragmatic ASP.NET Tips, Tricks, and Tools My first session was on tips, tricks, and…


  • Fix: Cant Change or Remove Visual Studio 2008 from DVD

    Fix: Cant Change or Remove Visual Studio 2008 from DVD

    Date Published: 08 March 2010

    If you installed Visual Studio 2008 on a 64-bit operating system, you may have trouble when you try ad add or remove functionality by inserting the disk (or remounting the ISO image). I believe this is because of the path used to install the 32-bit Visual Studio program. When you run the setup.exe off of the disk, you get this: Clicking on Change or Remove Visual Studio 2008 brings up this dialog…


  • Open Visual Studio Files As Administrator

    Open Visual Studio Files As Administrator

    Date Published: 03 March 2010

    Working with IIS as your web server, or working with Azure projects, are two examples of situations in which Visual Studio (2008+) needs to be running as Administrator (on Windows Vista or Windows 7). If you don't run it as such, you may be faced with a dialog like this one (for Azure): Now of course if you have Visual Studio pinned to your taskbar or start menu, you can launch it as admin by…


  • Eliminate Repetition with Action<T>

    Eliminate Repetition with Action<T>

    Date Published: 02 March 2010

    Yesterday I was looking at some old code and refactoring it to clean it up (in this case I wasn’t the original author, but I’ve written code just like this). The application in question was a simple process that had to run once per month, on demand, and so was coded up as an EXE application. As it ran, it provided updates on its progress, so it looked something like this: In reviewing this simple…


  • Tight Coupling, Legos, and Super Glue

    Tight Coupling, Legos, and Super Glue

    Date Published: 07 February 2010

    Building software applications is sometimes compared with building structures out of smaller components. The children's toys, Legos (and their generic brethren), come to mind and in fact make for a good analogy. Given a set of components with varying characteristics (shape, color, etc, or in the case of software, objects with different behavior and state), it is possible to connect the components…


  • Prevent Resharper From Adding Regions

    Prevent Resharper From Adding Regions

    Date Published: 03 February 2010

    A couple of days ago I was annoyed that Resharper was insisting on turning my abstract base NUnit test class with nothing in it but a shared [SetUp] method into a one line class with a collapsed Setup / Teardown region in it. While I didn't always feel this way, my experience has taught me that regions are a smell in your code. They are a way to hide things you don't want to deal with or look at…


  • Windows Azure Pricing and Shared Hosting

    Windows Azure Pricing and Shared Hosting

    Date Published: 20 January 2010

    Windows Azure, Microsoft's cloud computing platform, has recently gone into production and will begin charging customers next month. You can keep up on Azure news and blogs at AzureFeeds.com, a community moderated resource. One of the promises of Azure is to treat application hosting like a utility service, through which one pays for what one uses, just as with electricity or telephone usage. In…


  • Most Popular 2009 Posts

    Most Popular 2009 Posts

    Date Published: 08 January 2010

    If you're one of my subscribers, you're probably a software developer, or perhaps someone I know personally. You might be surprised to find that many of the most popular posts on my blog in 2009 were not particularly developer-oriented. According to Google Analytics, my blog had the following stats for 2009: 1.Codebehind Files in ASP.NET MVC Are Evil (8,320 page views) – Yes, I know it's a cheap…


  • View Binary Encoded WCF Messages

    View Binary Encoded WCF Messages

    Date Published: 19 December 2009

    If you’re doing any work with WCF (and perhaps Silverlight, for example, but any client will do) and you’d like to maximize the performance of your messages, you’re probably using binary encoding as it’s much less verbose than other options. However, this makes tools like Fiddler much less useful when it comes to debugging why the thing isn’t doing what you thought it was doing, because by default…


  • Why not Classic (Legacy) ASP?

    Why not Classic (Legacy) ASP?

    Date Published: 07 October 2009

    Yesterday I got the following email, which I thought raised some good points that I thought were worth addressing here in my blog in addition to the reply I sent directly. Hi Steve, I’ve been following your blog (as well as Rob C. and Scott H.) as I look into dipping my toes into MVC. I just read you "How I Got Started in Software Development" and your description of the joys of lightweight ASP…


  • Conways Life in WPF

    Conways Life in WPF

    Date Published: 26 August 2009

    The“Game of Life” was invented in 1970 by John Conway, a British mathematician. The rules of the game are simple, but the resulting behavior of the system that results is often surprising and in any event difficult to predict. There’s a great deal of information available online relating to this game and many implementations of it exist. I found an article called Life with XAML from 3 years ago by…


  • Review - The Art of Agile Development

    Review - The Art of Agile Development

    Date Published: 04 August 2009

    Summary This book provides an excellent field manual for implementing agile software techniques. It includes practical advice with extensive cross referencing to theory and principles that are core to agile methodologies. I would recommend it to individuals in the agile team lead/coach role, or senior developers in general interested in agile in practice. Its primary focus is on Extreme…


  • TechEd 2010 Back In New Orleans

    TechEd 2010 Back In New Orleans

    Date Published: 30 April 2009

    As previously announced, it's official! TechEd 2010 will (finally) be back in New Orleans! The dates are June 7-11, 2010. It's been several years since I've been to New Orleans, but I always have a great time there and I'm very much looking forward to returning. The food, music, and atmosphere are wonderful. I hope to see you there!


  • GeekFest 2009 at TechEd

    GeekFest 2009 at TechEd

    Date Published: 13 April 2009

    Developer Tools Marketing at Microsoft is hosting a party at TechEd in Los Angeles once again this year. Here are the details: Let’s face it, going to a technical conference is good for your career but it’s not a whole lot of fun. You need an outlet. You need to have fun. Cheap beer and lousy pizza. We are bringing back GeekFest! Join us at Lucky Strikefor a night of pizza, beer, and bowling…


  • Speaking Wednesday at Space Coast .NET User Group

    Speaking Wednesday at Space Coast .NET User Group

    Date Published: 13 April 2009

    This Wednesday I'll be in Florida presenting on ASP.NET MVC and Robert Martin's SOLID principles of software development. The Space Coast Dot Net User Group is hosting me, and INETA is sponsoring the talk. If you're in the area, please stop by to join in the event. More details: When: 630pm, 15 April 2009 Where: Space Coast Credit Union Corporate Headquarters 8045 N. Wickham Road Melbourne…


  • Where Are The Developer Machines?

    Where Are The Developer Machines?

    Date Published: 06 April 2009

    I'm really tired of the fact that computer manufacturers in general have yet to recognize developers as a separate demographic. If you do a search for "developer workstation" in Google, there are no links to any computer manufacturer on the first page (sponsored or otherwise). Search for "gaming computer" and suddenly there are all kinds of links: And no, Live Search isn't any better: Search…


  • Brief Response to Corey on Software Craftsmanship

    Brief Response to Corey on Software Craftsmanship

    Date Published: 24 February 2009

    Corey’s blog’s comment box is failing, so posting my response here. Read his response to my post for context. Below is simply cut-and-pasted from a comment I was trying to leave on his blog: Hey Corey, thanks for the well thought out comments. Let me consider my response and most likely post it on my blog, but while I’m writing here I’d like to describe a very real scenario I’m faced with right…


  • Head First Design Patterns

    Head First Design Patterns

    Date Published: 05 December 2008

    I picked up Head First Design Patterns a couple of months ago and read it last month. I have to say that this book is totally different from any other software development book I’ve read in the past. Most software books, you probably know, follow a fairly predictable pattern with each chapter covering some piece of technology through large amounts of text interspersed with code blocks and…


  • Programming is Just Typing

    Programming is Just Typing

    Date Published: 18 November 2008

    Well, OK, it's not just typing, but fundamentally, typing has a lot to do with it. In fact, it wouldn't be too great a stretch of the imagination for someone watching a room full of programmers to mistake them for a room full of writers, typists, dictation takers, or similar clerical staff. What we do to produce software is type it in, one word at a time. Jeff Atwood writes We Are Typists First…


  • Check if Unique Constraint will be violated before Insert with LLBLGen

    Check if Unique Constraint will be violated before Insert with LLBLGen

    Date Published: 30 October 2008

    I needed to determine if a unique constraint would be violated so that I could programmatically update the Name of a business object to make it unique today. I use LLBLGen for this project’s database layer, and I have a unique constraint (actually a unique index) set on the database. In this case it covers two columns, an integer ID and a string Name, but the nice thing about LLBLGen is that it…


  • Range Errors Not Just In Software

    Range Errors Not Just In Software

    Date Published: 22 October 2008

    A common area to test in software are ranges of values and off-by-one errors. But this problem certainly isn't limited to programmer code. I just wrapped up a survey by TNS for customer satisfaction that ended with this question. Note that I have 10 employees in my company (trying to pick the invisible radio button between the first and second one didn't work). [


  • Graffiti History Widget

    Graffiti History Widget

    Date Published: 22 October 2008

    Graffiti CMS doesn’t ship with an archive/history widget to display the number of posts published by month, as is common in many other blog engines. I’ve been looking for such a widget for several months and Keyvan pointed me to one a few days ago that I got up and running in just a few moments today. You’ll find it linked from this forum thread, which I’m quoting the relevant post below to make…


  • Search Trends October 2008

    Search Trends October 2008

    Date Published: 06 October 2008

    PDC is fast approaching and Cloud Computing is the theme – and all the rage for everyone else in the Industry media. Amazon recently announced they'll be extending their compute cloud to support Windows and real databases. Here's a look at some recent trends in the tech industry, using Google Trends. Daylight Savings Time The topic of DST is likely of at least marginal interest to most software…


  • P3P Trouble with Internet Explorer

    P3P Trouble with Internet Explorer

    Date Published: 12 September 2008

    Recently I've had some customers request that some third party scripts Lake Quincy Media provides avoid the evil eye of death that IE6+ likes to show if such scripts even think about using cookies. In our case, we are testing to see if the browser has Flash installed, and save the result in a cookie since it is a relatively expensive operation and we do not want to have to repeat it. The source…


  • Client Side Client Detection

    Client Side Client Detection

    Date Published: 10 September 2008

    I just heard about a new flavor of the top of the line client detection component, BrowserHawk, that is being branded as “BrowserHawk To-Go (BHTG).” What’s interesting about this (to me) is that it’s following a SaaS model and a pay-as-you-go scheme for pricing. This makes the software very affordable for startup sites and simplifies the installation requirements. Implementation in this case is…


  • Speaking at DevReach in Bulgaria

    Speaking at DevReach in Bulgaria

    Date Published: 28 August 2008

    I'm very excited to be speaking at the DevReach conference in Bulgaria in October. It will be my first international conference speaking experience (though I spoke to a user group in Moscow last year – my first international talk). I'm told this show is great, with a lot of good content and a lot of fun. I know most of the speakers, and I have to say that (with the possible exception of me) it's a…


  • Client Cache Headers

    Client Cache Headers

    Date Published: 08 August 2008

    Anybody who’s talked to me about web programming in the last 5 years or so knows that I’m a big fan of caching. However, in most of my presentations on ASP.NET caching, I don’t get into the client side of things. Mainly this is because ASP.NET is a server-side technology and there’s plenty of cool stuff to talk about on the server with regard to caching, and I truly think that’s where the biggest…


  • SQL Server 2008 Ships

    SQL Server 2008 Ships

    Date Published: 06 August 2008

    Microsoft has released SQL Server 2008 officially, according to this press release. The software is currently available to MSDN and TechNet subscribers: SQL Server 2008 is now available to MSDN and TechNet subscribers and will be available for evaluation download on Aug. 7, 2008. SQL Server 2008 Express and SQL Server Compact editions are available for free download today at http://www.microsoft…


  • VS Tip – Incremental Search in Visual Studio

    VS Tip – Incremental Search in Visual Studio

    Date Published: 22 July 2008

    [ If you're looking to navigate through the current file in Visual Studio, the typical approach is ctrl-F, which is the shortcut for Find and brings up a dialog like the one at right to locate instance of a string. Bertrand just let me know about another shortcut, ctrl-I, which does Incremental Search. The nice thing about this is that it's faster (there is a measurable delay before ctrl-F loads…


  • Getting Started with TDD

    Getting Started with TDD

    Date Published: 14 July 2008

    RecentlyDannyTwrote on the altdotnet list: On our next project I really want to nail unit testing and possibly even test driven development. My issue however is none of our team has any experience of either so we will be starting totally green. … *My question however is, with a goal of wanting to adopt TDD eventually, are we better off starting this next project by writing some unit tests and…


  • Getting RSS Right

    Getting RSS Right

    Date Published: 08 July 2008

    Just made some updates to the aggregate RSS feed on DevMavens.com so that it’s more correct. We weren’t displaying the author correctly before (and we’re still not complying with the RFC that wants to contain an email address, but I see no reason to increase the spam these folks get as it is). I also noticed that our dates weren’t formatted correctly, though I had thought originally they were…


  • Unit Testing Time

    Unit Testing Time

    Date Published: 07 July 2008

    Oren has a post showing how he deals with time sensitive code in his unit tests. One thing that’s interesting is that, like my previous post, deals with the System.Func construct introduced in .NET 3.5. I see this convention more and more and it’s really growing on me. I’ve dealt with timing issues in my own code using a convention similar to the one Ayende demonstrates, which is to create a…


  • Implementing a Session Timeout Page in ASP.NET

    Implementing a Session Timeout Page in ASP.NET

    Date Published: 02 April 2008

    Introduction In many applications, an authenticated user's session expires after a set amount of time, after which the user must log back into the system to continue using the application. Often, the user may begin entering data into a large form, switch to some other more pressing task, then return to complete the form only to find that his session has expired and he has wasted his time. One way…


  • Review - eXtreme.NET by Dr. Neil Roodyn

    Review - eXtreme.NET by Dr. Neil Roodyn

    Date Published: 06 March 2008

    Review eXtreme .NET by Dr. Neil Roodyn provides a good introduction to Extreme Programming (XP) to .NET developers. The book's examples are in C# and include common XP tasks such as refactoring and writing unit tests. The book also includes exercises for the reader, which provide opportunities to gain practical experience, and which also may make the book appropriate for use in a classroom…


  • Review - Money for Content and Your Clicks For Free

    Review - Money for Content and Your Clicks For Free

    Date Published: 26 February 2008

    Overview "Money for Content and Your Clicks for Free" is by cartoonist JD Frazer, aka Iliad, author of the popular computer geek cartoon series, User Friendly. Right away, this should tell you that this book is not going to be boring to read and dry like many advertising and economics books can be. What is more, JD Frazer had direct experience building up an online community site driven by…


  • CIO Magazine on Agile Development

    CIO Magazine on Agile Development

    Date Published: 08 February 2008

    The latest issue of CIO Magazine has a featured article on Getting Clueful: 7 Things CIOs Should Know About Agile Development. It includes quotes from a bunch of developers, including some names you’ll surely recognize if you follow Agile discussions at all, like Scott Ambler. In addition to gurus like Scott, there’s also yours truly in there, talking up the value of well-tested code as a long…


  • Extending the DropDownList to Support Enums

    Extending the DropDownList to Support Enums

    Date Published: 04 December 2007

    Introduction A fairly common task in some of the applications I work with is to provide a user with a DropDownList of options that is populated by an enum. This can easily be done with a little bit of code to bind a stock DropDownList control to the enum, but this kind of thing quickly starts to violate the DRY (Don't Repeat Yourself) principle, so I created a simple derived DropDownList control…


  • CCNET with MSBuild and AssemblyInfoTask

    CCNET with MSBuild and AssemblyInfoTask

    Date Published: 17 January 2007

    This afternoon I embarked on a quick (hah!) task to fix a problem with my CC.NETimplementation. I’m using CC.NET running on my Team Foundation Server machine. It checks my TFS source control to see when anything in my project has changed, and if it has, it kicks off a build using an MSBuild task pointing at a solution (.sln) file which it grabs from source control. The problem I’m encountering is…


  • Review - Instant C# and Instant VB Code Conversion Utilities

    Review - Instant C# and Instant VB Code Conversion Utilities

    Date Published: 15 January 2007

    Introduction Since the introduction of .NET, the Common Language Runtime, and C#, developers with a preference for C# or Visual Basic have been faced with the task of converting source code written in one language to the other. Whether to get an online sample working, to integrate some code developed by another team, or just to try and learn the ins and outs of the other language, converting from…


  • Review - Locate Web Visitors With CountryHawk

    Review - Locate Web Visitors With CountryHawk

    Date Published: 05 October 2006

    Bottom Line Up Front I've been using CountryHawk for almost a year now and have been very pleased with its accuracy and performance for my needs. I had previously evaluated some free geotargeting software I found via searching the 'net, but I was not impressed with the results, and there was still a charge for updated data files. With CountryHawk, I receive monthly updates which require one step…


  • Debugging Tips and VS 2005 Code Snippets

    Debugging Tips and VS 2005 Code Snippets

    Date Published: 05 June 2006

    Last week I published two new articles on ASPAlliance.com: Visual Studio Debugging Tips and Tricks – which shows how to use some attributes to make your debugging experience much easier with Visual Studio. Using Visual Studio 2005 Code Snippets to Write Better Code Faster – which demonstrates the new code snippets features in VS 2005, which allows simple keywords to be used to generate code, from…


  • Announcing Visual Studio Team Edition for Database Professionals

    Announcing Visual Studio Team Edition for Database Professionals

    Date Published: 02 June 2006

    This morning (09:00 PST, Wednesday May 31st 2006) the Visual Studio Team System team announced the availability of a brand product in the Team System family. Visual Studio Team Edition for Database Professionals delivers a market-shifting database development product designed to manage database change, improve software quality through database testing and bring the benefits of Visual Studio Team…


  • Using Visual Studio 2005 Code Snippets to Write Better Code Faster

    Using Visual Studio 2005 Code Snippets to Write Better Code Faster

    Date Published: 29 May 2006

    Introduction In my accompanying article, Visual Studio Debugger Tips and Tricks, I showed a number of ways that properties and classes could be customized with attributes in order to make debugging such classes simpler and more streamlined. The end result of those attributes was something like the class shown in Listing 1. Listing 1 Clearly there is a lot more code here than before we started…


  • Visual Studio Debugger Tips and Tricks

    Visual Studio Debugger Tips and Tricks

    Date Published: 29 May 2006

    Introduction Visual Studio 2005 provides a powerful debugger which makes stepping through your code to find problems a breeze. However, sometimes it offers too much information, and it can become tedious to find just what you are looking for amidst all of the extra noise. Fortunately, the debugger can be customized using a few simple techniques. TMI! Too Much Information Many times the debugger…


  • Expression Web Designer Is Here

    Expression Web Designer Is Here

    Date Published: 15 May 2006

    CTP 1 of Expression Web Designer is now available for download. Please see the announcement from Devindra Chainani, Group Program Manager, Expression Web Designer, for more details and download links. Expression Web Designer is a new Microsoft tool for creating professional looking web sites which is compatible with ASP.NET.


  • Practical .NET2 and C#2

    Practical .NET2 and C#2

    Date Published: 12 May 2006

    I recently had the opportunity to skim-read Practical .NET2 and C#2 by Microsoft MVP Patrick Smacchia. You’ll find the book’s table of contents and examples online at its website (linked from title), along with an impressive list of testimonials. I would have to agree with what many other reviewers have noted – this is a very good comprehensive look at C# 2.0 and how to use it to work with the…


  • Get Date From DateTime In SQL

    Get Date From DateTime In SQL

    Date Published: 24 March 2006

    Something I need to do from time to time is get just the date part of a datetime value in SQL. I found a cool way to do it on SQLJunkies today. select convert(varchar,DateColumn,101) The 101 means “mm/dd/yyyy” format, but there are a bunch of other codes you can use. 108 will return just the time “hh:mm:ss” for instance. Update: 101 includes 4 digit year ‘yyyy’. A code of 1 would apparently be “mm…


  • VSTS Overview Talk at Wayne State University

    VSTS Overview Talk at Wayne State University

    Date Published: 23 February 2006

    I gave a presentation on Visual Studio Team System last night to about 30 students at Wayne State University in Detroit. I don’t think it was one of my better presentations, for a number of reasons, which I’ll lament here and attempt to improve in the future. First off, this was an earlier presentation than most of the INETA talks I give, and was scheduled to start at 5pm. I scheduled my flight…


  • AxoSoft Social Marketing Experiment – OnTime BugTracker At 99 Percent OffAxoSoft Social Marketing Experiment – OnTime BugTracker At 99 Percent Off

    AxoSoft Social Marketing Experiment – OnTime BugTracker At 99 Percent OffAxoSoft Social Marketing Experiment – OnTime BugTracker At 99 Percent Off

    Date Published: 23 February 2006

    Axosoftis doing a social marketing experiment (blogs, Digg, etc.) where they’re selling a $500 copy of their OnTime Small Team (5 users) bug tracker and project management tool for just $5 and donating the proceeds to the American Red Cross. The experiment expires Friday Feb. 24th. http://www.axosoft.com/Products/ontime.aspx?cn=otm_stepromo


  • Cool AJAX Implementation

    Cool AJAX Implementation

    Date Published: 10 February 2006

    I’ve recently been talking with the folks at FarPoint Technologies and took a look at their AJAX implementation of a web-based spreadsheet. It’s very cool! It’s essentially like having Excel embedded in your browser, complete with forumulas, and you can bind the whole thing to a database (and persist it back with the click of a button, too). Have a look at the demo.


  • Review - PeterBlum.com Validation and More Controls

    Review - PeterBlum.com Validation and More Controls

    Date Published: 22 December 2005

    Overview Validation controls have been one of my favorite features of ASP.NET since I first saw it previewed (back when it was still ASP+). Coming from an ASP background, where integration of client- and server-side validation was, to be kind, tedious, I was eager to put these controls to the test. Initially, I was very pleased with the controls, but with time it became clear that they were "a…


  • Caching Presentation – Fort Worth

    Caching Presentation – Fort Worth

    Date Published: 27 October 2005

    Flew out and spoke to the Fort Worth .NET User Group, led by Stephen Swienton, last week. There was a pretty good turnout and I thought it went quite well. I only had one demo that didn’t go off as planned and that was a result of my having switched from a Beta 2 VPC to an RTM VPC at sort of the last minute. The slides and demos should be available on the Fort Worth website at some point, but I…


  • PDC: Atlas Hands-On Lab

    PDC: Atlas Hands-On Lab

    Date Published: 16 September 2005

    I just completed the ASP.NET “Atlas” hands-on lab. It was very well put-together considering how completely new Atlas is. I imagine a few members of the ASP.NET team probably lost some sleep the week prior to PDC getting all of this put together in time. You can complete the lab yourself — it’s available from the Atlas website. At the moment it requires the Beta 2 version of ASP.NET, but a new lab…


  • More SqlDependency Gotchas

    More SqlDependency Gotchas

    Date Published: 15 September 2005

    I wrote about some issues with SqlDependency in the latest interim build last week, but I forgot to mention one other gotcha that we ran into, which Scott Hanselman was struggling with yesterday. The necessary trick, which is only for that build so if you’re reading this post-release of ASP.NET 2.0 this shouldn’t be an issue, is to modify the SQL Server database settings for the database in…


  • Anders on C# 3.0 and LINQ

    Anders on C# 3.0 and LINQ

    Date Published: 14 September 2005

    Just came from Anders Hejlsberg’s talk on C# 3.0 and LINQ. You can actually download a LINQ tech previewfrom MSDN, here: http://msdn.microsoft.com/netframework/future/linq/ The language features that had to go into place to allow for LINQ are quite impressive, and I’ll have to play around with them myself to really wrap my brain around them since many of them involve rethinking how I think about…


  • PDC – I'm Here

    PDC – I'm Here

    Date Published: 13 September 2005

    Flew in last night. I was supposed to stay at the New Otani but they oversold their rooms, so at 1am local time they finally found me (and about 8 other PDC-goers) rooms back at the airport (45 min away). They paid for everything, as well they should, but I’m rather short on sleep now as a result. So far PDC has been pretty cool — I’m about to blog about the keynote and some other cool news, then…


  • PDC – Bill Gates Keynote

    PDC – Bill Gates Keynote

    Date Published: 13 September 2005

    Bill Gates gave this morning’s first keynote at PDC 05. As is customary, he had a video to augment his presentation. These are usually very funny, but this one didn’t do much for me (it was about Bill as a recruiter or something, but I didn’t think they pulled it off well). However, he did make a great comment that brought laughter from the crowd. Yesterday, there was a significant power outage in…


  • PDC – Jim Allchin's Keynote

    PDC – Jim Allchin's Keynote

    Date Published: 13 September 2005

    Jim Allchin gave the second keynote, which included many demos from a variety of Microsoft teams and a couple of partners. Most of it centered around new features that will be available in Vista. For example, their virtual memory system will be able to take advantage of external memory, such as from USB drives. They showed off a feature called SuperFetch, but unfortunately I was dozing off for…


  • Old Databases and Sql Query Notifications (cache invalidation)

    Old Databases and Sql Query Notifications (cache invalidation)

    Date Published: 07 September 2005

    Julie and I were having issues with getting Sql Query Notifications to work for ASP.NET cache dependencies (for our DevConnections talks). The trick was this: sp_dbcmptlevel yourdatabasename,90 Julie did most of the research on this one, with help from Sushil Chordia and Leonid Tsybert from Microsoft. She has more on her blog, but I’m noting here so I might remember this next time.


  • Register Controls via Web.Config

    Register Controls via Web.Config

    Date Published: 27 August 2005

    I had a conversation with ScottW about this about a year ago (almost exactly, from Iraq, no less), and yet I still keep forgetting this technique every time I need it. So I’m blogging it myself this time just to try to keep it in my (online) memory bank. NOTE TO SELF: IF YOU WANT TO USE CONTROLS FROM APP_CODE IN A PAGE YOU NEED TO DEFINE THE REFERENCE IN WEB.CONFIG, NOT IN A <%@ Register %>BLOCK…


  • Working on Caching Presentation

    Working on Caching Presentation

    Date Published: 26 August 2005

    I’m working on my caching presentation for Fall ASP.NET Connections and a few user group presentations. Those few who read my blog can enjoy some early looks at my research, which I’ll detail here for my own future reference (and yours!). First of all I only recently found a great article on Query Notifications in ADO.NET 2.0 which goes into depth about how Query Notifications work in SQL Server…


  • Looking for ConfigurationManager?

    Looking for ConfigurationManager?

    Date Published: 26 August 2005

    In .NET 2.0 there is a new configuration class called ConfigurationManager. It supercedes the ConfigurationSettings class that most .NET developers are familiar with today. When you create a website in VS2005 the ConfigurationManager class should be available because by default the necessary reference is included in the website’s compile settings. However, other types of projects don’t have this…


  • More on SQL Server Query Notifications

    More on SQL Server Query Notifications

    Date Published: 26 August 2005

    I found this post by Rushi Desai on Invalidating cached result sets using SQL Server Query Notification. It’s from March so it’s a bit out of date, but it has some working ASP.NET sample code (well, working in Beta 2, I presume, but pretty close for RTM).


  • ASP.NET 2.0 Sample Themes

    ASP.NET 2.0 Sample Themes

    Date Published: 26 August 2005

    DotNetTreats has a collection of sample themes for ASP.NET 2.0, along with some tips on how to work with themes.


  • Scott Guthrie explains why web project files go away in 2.0

    Scott Guthrie explains why web project files go away in 2.0

    Date Published: 26 August 2005

    ScottGuwrite about the lack of web project files in VS2005: VS 2005 Web Project System: What is it and why did we do it? There have been some threads lately on other blogs about whether this helps or hurts enterprise developers, with the main counter-point from Scott being that most of the pain points being reported around ASP.NET 2.0 Beta 2 are in fact Beta2 issues, not ASP.NET 2.0 issues, and…


  • VS2005 RC, TFS Beta 3 Coming in September

    VS2005 RC, TFS Beta 3 Coming in September

    Date Published: 22 August 2005

    Soma announces Visual Studio 2005 RC1 and Visual Studio 2005 Team Foundation Server (TFS) Beta 3 will be released in September. The Beta 3 will feature a Go Live license, so organizations can immediately begin using the Team System features. Release of TFS is slated for the first quarter of 2006, and all data in the Beta 3 edition will (in theory) migrate seamlessly to the final version of TFS…


  • Hidden Network Cards

    Hidden Network Cards

    Date Published: 20 August 2005

    I just moved a server and switched it from using a wireless card to a 10/100 Ethernet port and I kept getting this kind of message when I set it back up with its IP addresses: The IP address you have entered for this network adapter is already assigned to another adapter . is hidden from the network and Dial-up Connections folder because it is not physically in the computer or is a legacy…


  • Windows Vista Screenshots

    Windows Vista Screenshots

    Date Published: 19 August 2005

    Jason Gaylord has uploaded some Windows Vista Screenshots on WindowsAdvice.com.


  • C# a Total Failure with no Future… ?

    C# a Total Failure with no Future… ?

    Date Published: 19 August 2005

    According to Calvin Austin, writing in JDJ (which, as a dead trees publication, you would expect to have better, more accurate information than some uninformed blogger or /.er, but not this time) has a recent column titled C#: Is the Party Over? In it, he makes a number of statements which, while humorous to those of us with a clue, serve to further mis-inform the (presumably dozens or more…


  • Konfabulator

    Konfabulator

    Date Published: 04 August 2005

    Cindy pointed me to Konfabulator last week, and I had a chance to download it and set it up a couple of days ago. It’s pretty slick. They were recently bought by Yahoo! and now the whole thing is free (I guess it used to cost $40 or something). Basically it’s a framework for widgets that live on your Windows or Mac desktop. There are a bunch of widgets that come with it, and several hundred…


  • ASP.NET 2.0 Provider Toolkit Available

    ASP.NET 2.0 Provider Toolkit Available

    Date Published: 04 August 2005

    ScottGu announced the availability of the ASP.NET 2.0 Provider Toolkit a couple of days ago — I just saw it. The toolkit provides a full source code implementation of how to build your own providers for Membership, Role Management, Health Monitoring, and Personalization features. Definitely going to grab that immediately…


  • Review - Dart PowerWEB LiveControls 1.1.3

    Review - Dart PowerWEB LiveControls 1.1.3

    Date Published: 04 August 2005

    Overview I’ve recently had the opportunity to work with Dart’s PowerWEB LiveControls suite at a client who was building a call center application using ASP.NET architecture. One requirement of the application was that incoming calls and work items needed to be visible to all users with up-to-the-second frequency. Using Dart’s controls, and most importantly their LiveDataGrid control, this…


  • ASP.NET Development Helper Browser Plugin

    ASP.NET Development Helper Browser Plugin

    Date Published: 01 August 2005

    I’m a bit late, but I just discovered Nikhil’s ASP.NET Development Helper Browser Plugin (with screenshots). Downloading it and will have to play with it next chance I get. From the screenshots it looks very cool, especially the ability to view the current page’s ViewState (both encoded, and decoded with value pairs). Check it out.


  • ASP.NET Validation Controls – Common Problems and Fixes

    ASP.NET Validation Controls – Common Problems and Fixes

    Date Published: 01 August 2005

    Peter Blum has an article today on AspAlliance.com that addresses some common problems with the built-in ASP.NET validation controls. It’s definitely worth a read if you’re using these controls, or want to learn more about them: Solving the Challenges of ASP.NET Validation


  • More Official Names Announced

    More Official Names Announced

    Date Published: 28 July 2005

    Today, in addition to launching Windows Vista Beta 1, Microsoft also has announced the final names for several key technologies which they have been talking about for several years. A new presentation layer technology, code-named “Avalon”, is now officially known as Windows Presentation Foundation. The new communications layer technology, code-named “Indigo”, is now officially known as Windows…


  • Sending Emails with aspNetEmail and RapidMailer

    Sending Emails with aspNetEmail and RapidMailer

    Date Published: 28 July 2005

    I had to send out a bunch of emails to some partners I work with and the easiest way for me to generate the list was via an SQL query of my database. It wasn’t a huge list, just 30 or so emails, but enough that I didn’t want to go and type them all into Outlook as BCC entries. My first thought was to check with Dave Wanta, god of all things email in the .NET space. Dave wasn’t around, so instead…


  • Upgrading and Migrating to ASP.NET 2.0

    Upgrading and Migrating to ASP.NET 2.0

    Date Published: 27 July 2005

    There is an Upgrade Center available on MSDNnow for customers seeking to move from ASP.NET 1.x to ASP.NET 2.0. It includes a white paper describing lessons learned, best practices, and valuable techniques that will help developers upgrade their applications. If you have existing ASP.NET applications that you will eventually upgrade to 2.0, you may want to look at some of this information sooner…


  • Escape Yesterworld!

    Escape Yesterworld!

    Date Published: 27 July 2005

    Here’s a fun site to check out if you have a few minutes. Basically a look back at how software development used to be, before we had all the great tools and processes we (developers) have now… http://www.escapeyesterworld.com/


  • "Longhorn" is now Windows Vista – Beta Soon

    "Longhorn" is now Windows Vista – Beta Soon

    Date Published: 22 July 2005

    Microsoft has announced that “Longhorn” will be named Windows Vista, and the first beta will be available August 3rd. Find out more at the Windows Vista website, and discuss what’s new and what’s coming on the Windows Vista forumsonWindowsAdvice.com.


  • Going to PDC

    Going to PDC

    Date Published: 20 July 2005

    I haven’t officially registered for PDC yet, but I’m buying my plane tickets right now (not bad, less than $300 non stop from Cleveland). So, I’m pretty much going to be there. If you’ll be there and want to talk, look me up (email me or something via my contact form if we’ve not met). Should be fun, although the timing so close to the MVP Summit means a lot of the folks I usually see won’t be…


  • More Team System Class Notes

    More Team System Class Notes

    Date Published: 04 July 2005

    See Day One. Didn’t get a chance to post my notes for days two and three until now. We spent some time looking at testing in general, and the theory of why to test and how testing relates to quality. Briefly mentioned TDD and other related disciplines. In VSTS, tests are code and are versioned along with the code. The tool can auto-generate tests per method or class. The skeleton is generated…


  • VSTSOffSite Opportunity

    VSTSOffSite Opportunity

    Date Published: 30 June 2005

    Ok, so I just finished a 3-day Ascend class on VSTS and one thing I’m disappointed by is the fact that I most likely won’t be able to use VSTS to replace SourceGear Vault immediately, since I collaborate with developers over the Internet all over the world, and VSTS does a lot of stuff via AD or direct network access. The only solution for over-the-internet work is a VPN, which at the moment I don…


  • Preventing Duplicate Record Insertion on Page Refresh

    Preventing Duplicate Record Insertion on Page Refresh

    Date Published: 29 June 2005

    Terri Morton has a new article this week on preventing duplicate records from being inserted when a user refreshes a page that does a form POST. Here’s the abstract: A common concern of ASP.NET developers is, “How do I prevent previously submitted form data from being reinserted into the database when the user presses the browser’s Refresh button?” This article outlines some possible solutions to…


  • Visual Studio Team System Class Notes

    Visual Studio Team System Class Notes

    Date Published: 29 June 2005

    I’m taking a VSTS class this week at Microsoft in Columbus, Ohio. The course is being taught by Chris Menegay, a Microsoft Regional Director and principal consultant with Notion Solutions, Inc. Chris developed the course material and works closely with the VSTS team, and seems to really know VSTS. I took some notes today but I figured they’d be more useful in electronic format, and I figured while…


  • Scott Guthrie announces future plans for async callback story (AJAX-style stuff)

    Scott Guthrie announces future plans for async callback story (AJAX-style stuff)

    Date Published: 28 June 2005

    Scottwrites: What we’ve set out to do is to make it dramatically easier for anyone to build AJAX-style web applications that deliver rich, interactive, and personalized experiences. Developers should be able to build these applications without great expertise in client scripting; they should be able to integrate their browser UI seamlessly with the rest of their applications; and they should be…


  • WebCasts and LunchTime Learning

    WebCasts and LunchTime Learning

    Date Published: 23 June 2005

    Cindy Brucato has begun an interesting lunchtime learning program at her workplace, which she’s dubbed The Brown Bag Initiative (or Brown Bagging It) — BBI. Yesterday she updated this with a list of good webcasts to watch during these events, and since most of them looked interesting to me, I’m blogging it so I can find the links later.


  • Free Beer at Microsoft in Atlanta this Friday!

    Free Beer at Microsoft in Atlanta this Friday!

    Date Published: 19 June 2005

    Kirk Allen Evans reports: This Friday (May 20th) come to the Microsoft Alpharetta office for the .NET Experience Expo! This is a free event where you can come hear all about some of the hottest topics for developers and architects. This is a huge opportunity to learn more about what Microsoft is doing for developers (and it’s a great chance to win an Xbox!) All attendees will receive a free copy…


  • May 12th GC.NUG Meeting

    May 12th GC.NUG Meeting

    Date Published: 16 June 2005

    Last Thursday I spoke to the GC.NUG group in Charleston. Charleston seems like a really nice place, and I’d like to visit there again some time when I have more time to look around. I’ve always liked South Carolina ever since my first experience there coming from Army basic training in Ft Sill (not fun) to Columbia and a much more pleasant experience of AIT at Ft. Jackson (10 years ago). Chris…


  • Caching: Automatically Renew Stale Items

    Caching: Automatically Renew Stale Items

    Date Published: 16 June 2005

    I’m working on a new library for Caching that has been an interest of mine for some time, but which I only took the time to implement last week (on the plane home from Charleston). Basically the problem is that for many of the things that are ideal candidates for caching, it would be nice if there were an easy way to keep these in the cache forever while still ensuring the cached values are…


  • Custom Cache Dependencies

    Custom Cache Dependencies

    Date Published: 16 June 2005

    I’m looking to write a custom cache dependency but I’m having a very hard time thinking of a useful one that doesn’t involve a database (SqlCacheDependency is already taken, and I don’t know any other database system well enough to attempt to duplicate the SqlCacheDependency). If anybody has any ideas for CacheDependencies they’d like to see created, comment to this post and perhaps I’ll build one…


  • Book Review – Pragmatic Unit Testing in C# with NUnit

    Book Review – Pragmatic Unit Testing in C# with NUnit

    Date Published: 15 June 2005

    I recently finished reading Pragmatic Unit Testing in C# with NUnit. It’s a good overview of unit testing and I picked up a few things from it. I’ve previously read several of the books referenced in this one, including Kent Beck’s XP book (Extreme Programming Explained). I also have Pragmatic Version Control, which I haven’t had a chance to look at yet. I learned a few new acronyms from this book…


  • Visual Studio 2005 DevCon – Detroit, Michigan

    Visual Studio 2005 DevCon – Detroit, Michigan

    Date Published: 13 June 2005

    If you’re in the greater Detroit area, and aren’t doing anything more interesting this Thursday (June 16th), I strongly recommend attending the Visual Studio 2005 DevCon being put on by Microsoft and including a bunch of local subject matter experts. I’ll be giving the first session in the ASP.NET track, What’s New in ASP.NET 2.0. All attendees will receive a copy of Visual Studio Team System Beta…


  • More TechEd Thoughts

    More TechEd Thoughts

    Date Published: 12 June 2005

    Sorry, I got busy and didn’t post any more daily missives during Tech Ed. Here’s my ‘summary’ blog post on it. Wednesday I ended up sleeping through my alarm, so I missed ScottGu’sfirst session on what’s new with 2.0, but I made it to his second session which was very popular and probably the better of the two, since he said it was much more demo-heavy whereas the first one had a lot more slides…


  • Seth Godin and Viral Marketing

    Seth Godin and Viral Marketing

    Date Published: 08 June 2005

    Seth Godin (Seth’s blog) has written several books on a term I believed he coined, ‘viral marketing’. I was talking to some folks at TechEd this week about ways to generate buzz for their products, and two topics dominated my advice: blogs and viral marketing. If you’re reading this then I probably don’t have to explain why I think blogs are an important way to spread the word about something, but…


  • Tech Ed Day 1 (summary)

    Tech Ed Day 1 (summary)

    Date Published: 07 June 2005

    Got up early, which was an accomplishment considering how late I was out with Doug, Stephen, Scott, and Amy Sunday night, and made it to the keynote at 0900. Steve Ballmer was presenting, assisted by Samantha Bee (from the Daily Show, I think) and a few MS employees. The keynote was definitely entertaining with some pretty cool demos. The main focus of the demos was on mobile technology and server…


  • Tech Ed Day 2 Keynote

    Tech Ed Day 2 Keynote

    Date Published: 07 June 2005

    Paul Flessner’s keynote, still under way, has been about how much connectivity there is today. Samantha Bee is here again today and helps lighten the presentations significantly. One of the demos involved RFID (Radio Frequency IDentification) tags, which all attendees got on registration. The demo first showed how they were actually using these here at the show, for instance they were able to see…


  • Tech Ed Day -1

    Tech Ed Day -1

    Date Published: 05 June 2005

    Today started off well. Got up on time, got some breakfast, things were looking good. Then things started to go wrong. The garage door opener had shorted out and wouldn’t open/close. I noticed that my flight actually arrived at the connection at 10 something, rather than departing at 10 something as I had thought. So, there was a bit of panic there. However, made it to the airport shortly after my…


  • Tech Ed Day 0

    Tech Ed Day 0

    Date Published: 05 June 2005

    I spent today at an INETA User Group Leader summit, which was pretty interesting but more so for (not surprising) user group leaders than folks like me (who speak at user groups, but don’t organize them). It was good to meet a lot of people either for the first time or whom I haven’t seen in a long time. I registered today and the lines were not bad. Got a nice bag full of stuff that I haven’t…


  • Google Maps has Satellite Imagery!

    Google Maps has Satellite Imagery!

    Date Published: 04 June 2005

    Ambrose pointed this out to me. Check it out! You can get down to like 1m resolution. And I really like the interface — you can click and drag the image (or map) around at will, without postback. This isn’t immediately obvious, but it’s much nicer than continually clicking on arrows. Check it out


  • Party with Palermo pre-TechEd

    Party with Palermo pre-TechEd

    Date Published: 04 June 2005

    Jeffrey Palermo is organizing a get together for folks coming to Tech Ed, Saturday night before the conference. Details


  • Getting Ready for Tech Ed

    Getting Ready for Tech Ed

    Date Published: 03 June 2005

    Haven’t blogged much in a while, sorry. Tonight I have to pack for Tech Ed. Going to be my first conference since getting back home in January, so I’m looking forward to seeing a lot of people I haven’t seen in over a year. If you’re going to be there and want to meet up, I’m going to be at the Web Cabana most of the week (helping staff it). If I’m not there, somebody there will know when I’ll be…


  • AspAlliance Ideas

    AspAlliance Ideas

    Date Published: 03 June 2005

    One cool thing about blogs is that you can brainstorm ideas and send them to the entire world to see who likes them. Of course, in my case, the entire world is limited to the three of you reading this, but in theory there could be more. Something I haven’t done much of in the past is solicit feedback from the general public about ideas I have for AspAlliance.com’s direction or features. I usually…


  • Review - Iron Speed Designer

    Review - Iron Speed Designer

    Date Published: 01 June 2005

    Introduction Iron Speed Designer is a Rapid Application Development (RAD) tool developed by Iron Speed Inc. Unlike many similar products I’ve encountered and worked with, Iron Speed Designer has immense breadth and depth of coverage and details. It’s been my experience that a particular tool might be good at generating a data access layer, or providing some simple UI for managing the contents of a…


  • Remove ASP.NET Page Output Cache Entries

    Remove ASP.NET Page Output Cache Entries

    Date Published: 02 May 2005

    Sample Code Programmatic Output Cache Entry Removal Introduction A frequently asked question I get when I present or write about ASP.NET’s caching features is, “How do I programmatically remove a page from the output cache?” For a long time now I’ve been unsure of the answer to this. I finally broke down and learned that yes, you can do this, and discovered two methods for implementing the…


  • Programmatically Expire ASP.NET Pages From Output Cache

    Programmatically Expire ASP.NET Pages From Output Cache

    Date Published: 01 May 2005

    This was something I’d been wondering about for a while, and finally learned how to do yesterday. It seems significant enough to merit an actual article – read about it here: Remove ASP.NET Page Output Cache Entries


  • Caching Talk in Columbus

    Caching Talk in Columbus

    Date Published: 28 April 2005

    Gave my first presentation since over a year ago this evening to the .NET Developers Group in Central Ohio. Seemed well-received. It was in Columbus, Ohio, just 2 hours south of my home, and where I used to work and go to school. Thanks to Drew and Dave and Nate for having me down, and to INETA for organizing it. I think there were like 50 or so people but I’m not a great judge. There were a few…


  • Data Access Application Block (Enterprise Library)

    Data Access Application Block (Enterprise Library)

    Date Published: 19 April 2005

    I used to be a big fan of the Data Access Application Block. It used to be nice, simple. It would save me a lot of repetitive code. It was a standalone library with basically one class I needed to learn. It just worked. Enter the Enterprise Library. This thing is aptly named, in that its complexity is something only an Enterprise would really want to deal with. In addition to the DAAB, the other…


  • Whidbey Beta 2 (ASP.NET 2.0) Goes Live

    Whidbey Beta 2 (ASP.NET 2.0) Goes Live

    Date Published: 17 April 2005

    Big news! ASP.NET Beta 2 is now live! You can view the Go Live license here: http://lab.msdn.microsoft.com/vs2005/golive/license/default.aspx The ASP.NET Quickstart tutorials have been completely updated for this release as well. View thousands of samples here: http://beta.aspalliance.com/Quickstart/ As part of this release, there are several new starter kit applications. They include a Personal…


  • Unit Testing with Ordered Tests

    Unit Testing with Ordered Tests

    Date Published: 11 April 2005

    On the NUnit mailing list there’s a discussion going on about whether or not it would be useful and/or advisable to be able to specify the order in which unit tests are run by a test harness (in this case, NUnit). I have to say that I would be strongly in favor of such a feature, and I have some thoughts on how to easily implement it in such a way that it would not greatly disturb anybody who…


  • Unit Testing with Ordered Tests

    Unit Testing with Ordered Tests

    Date Published: 11 April 2005

    On the NUnit mailing list there’s a discussion going on about whether or not it would be useful and/or advisable to be able to specify the order in which unit tests are run by a test harness (in this case, NUnit). I have to say that I would be strongly in favor of such a feature, and I have some thoughts on how to easily implement it in such a way that it would not greatly disturb anybody who…


  • Review - Peter's Date Package 1.1

    Review - Peter's Date Package 1.1

    Date Published: 08 April 2005

    Introduction I have been meaning to do a review of Peter’s Date Package for quite some time, and finally got around to it a few weeks ago. I had figured on the review only taking me a relatively short amount of time, because I needed to use some date selection controls in an application I was building. I figured I’d use Peter's controls, write what I thought about them, and kill two birds with one…


  • Use Write Caching to Optimize High Volume Data Driven Applications

    Use Write Caching to Optimize High Volume Data Driven Applications

    Date Published: 04 April 2005

    Scenario For the past several years, I’ve been running a small online advertising network which, as I write this, serves about 50 million ads per month. A requirement of this application is that impressions and clicks be tracked so that my customers can evaluate the results of their campaigns. My system uses a SQL Server database that is located on a dedicated server on the same network as my…


  • Use Write Caching to Optimize High Volume Data Driven Applications

    Use Write Caching to Optimize High Volume Data Driven Applications

    Date Published: 03 April 2005

    Today I published another caching-related article on AspAlliance.com. This time I’m looking at caching from another angle — caching write data rather than read data. Another term for this is batch updating, and it can have a significant impact on performance for applications that do a lot of writing. Abstract: The typical use of caching applies to read caching, or caching data in the application…


  • June Events

    June Events

    Date Published: 28 March 2005

    In addition to these speaking engagements, I’ve also got the following plans for June 2005: Tech Ed 5-10 June 2005 Orlando, FL I won’t be speaking but I’ll likely be one of their volunteer experts, doing stuff with MVPs, ASPInsiders, INETA, CodeWise/CodeZone, etc. I’m looking forward to seeing many of my .NET community friends there, most of whom I haven’t seen in over a year. Visual Studio 200…


  • Wilson UIMapper and CodeSmith Tip

    Wilson UIMapper and CodeSmith Tip

    Date Published: 23 March 2005

    I’m sure this is documented as being a requirement, but if you miss that part and just get the error, you’ll have a hard time associating the error with the requirement that corrects things. In my case, I was trying to use the Wilson UIMapper package to build the UI config files for some assemblies I had built using Paul Welter’s LoreSoft WilsonORMapper CodeSmith Templates. Everything was going…


  • Speaking at Fall ASP.NET Connections

    Speaking at Fall ASP.NET Connections

    Date Published: 23 March 2005

    I found out a few days ago that I’ll be speaking at the Fall ASP.NET Connections show. I didn’t make it to last Fall’s, which I was also scheduled to speak at, which really depressed me. It was going to be my first time in Vegas, and my birthday. But it looks like perhaps I’ll still get my chance, since it’s still in Vegas, and it’s once again spanning my birthday. You can view the full list of…


  • Upcoming Speaking Engagements

    Upcoming Speaking Engagements

    Date Published: 23 March 2005

    I missed ASP.NET Connections this week, but I have been slowly getting back into my speaking and training schedule. I have two INETA engagements coming up in the next couple months: 28 April 2005 .NET Developers Group in Central Ohio Topic: Caching Best Practices in ASP.NET 6pm at Microsoft Polaris Building 12 May 2005 Greater Charleston .NET User GroupTopic: Caching Best Practices in ASP.NET 6pm…


  • ZaneBug – an enhancement to NUnit

    ZaneBug – an enhancement to NUnit

    Date Published: 22 March 2005

    Scott Watermasysk just pointed me to ZaneBug, which I immediately downloaded and started playing with (about 10 minutes ago). From first impressions, it’s pretty impressive. It feels a little bit slower than NUnit, but I haven’t had a chance to do any qualitative analysis of performance. However, that’s a very minor point. It worked out of the box, and claims to be compatible with NUnit 2.1 and…


  • Visual Studio Could not write to output file annoyance

    Visual Studio Could not write to output file annoyance

    Date Published: 21 March 2005

    Every now and then my VS.NET solutions will fail to build because of an error like: Could not write to outputfile (filepath in /obj/ folder). The file is being used by another process. There is a KB article describing this bug: BUG: Could Not Copy Temporary Files to the Output Directory But to be honest, that has never helped me one bit. In my case, I’m not using a shared output folder, I am using…


  • Internet Access from VirtualPC with Windows Server 2003

    Internet Access from VirtualPC with Windows Server 2003

    Date Published: 18 March 2005

    Decided to install a fresh VPC for development, which is why I justified getting so much RAM in my latest laptop (the graphics card, on the other hand, was purely for CounterStrike / HalfLife 2). Got it up and running in short order, but it didn’t want to talk to the Internet. I knew I’d seen this before but it took me about half an hour of googling to find the quick fix here: http://blogs.msdn…


  • VirtualPC Memory Limit — Nero InCD

    VirtualPC Memory Limit — Nero InCD

    Date Published: 18 March 2005

    Chris Wille pointed me to Nero InCD as the culprit when my VirtualPC machine wouldn’t let me use more than 256mb of my 2GB of RAM. He says now that this is fixed in the latest version. Ben Armstrong also covers the issue of Nero InCD and VirtualPC, recommending uninstalling. What I’ve found works for me is to simply open up Windows Task Manager, go to the Processes tab, sort by Image Name, select…


  • Sql Tip: Update Fields on Tables across several Databases, at once

    Sql Tip: Update Fields on Tables across several Databases, at once

    Date Published: 11 March 2005

    There was a good thread on the SqlAdvice.com Stored Procedure list today which included several solutions for this problem. The latest and ostensibly best one so far can be found in the sql archives here. That list, and the other lists on SqlAdvice, are great places to ask questions about anything database and SQL related.


  • Working with Wilson ORMapper / UIMapper

    Working with Wilson ORMapper / UIMapper

    Date Published: 08 March 2005

    I’ve been trying to get Paul Wilson’s ORMapper and UIMapper to work for a small application I’ve been working on. First, let me vent a bit. The lack of documentation for these tools is very frustrating. I would love to see at least a user-documentation area like the wiki that is set up at http://docs.communityserver.org/ so that Paul’s users could help build up the documentation themselves. I…


  • More Fun With Wilson UIMapper

    More Fun With Wilson UIMapper

    Date Published: 08 March 2005

    I’ve now gotten a fair bit further along, and have created my first custom widget for the UIMapper. There is a sweet filepicker control (which also handles file uploading) called AWS FilePicker. It’s also FREE! Anyway, I now have a FilePickerWidget working with the Wilson UIMapper. It was actually pretty straightforward to get working. Given that the AWS control is free, maybe Paul would bundle…


  • Multiple Root Webs on XP Pro

    Multiple Root Webs on XP Pro

    Date Published: 04 March 2005

    Steven Cohn has anice hack for supporting multiple root websites on Windows XP Pro. You can’t do multiple simultaneous sites, but between this and the HOSTS file you can simulate any live site on your XP Pro box, which is a lot handier than having to remote into a Server install or use a virtual machine. (and of course, the reason this is an issue at all is that developing a site that resides in a…


  • List Options using CSS (e.g. avoiding HTML tables)

    List Options using CSS (e.g. avoiding HTML tables)

    Date Published: 03 March 2005

    I’ve recently been converted to the “kill all unnecessary tags used for layout” camp. I’ve been working for the last couple of months on usability and structural improvements to AspAlliance.com and have reduced the total size of each page significantly. The site flies now compared to a few months ago. However, it still uses a lot of TABLE tags for the main body, since I’ve thus far only had time…


  • Bill Gates Knighted

    Bill Gates Knighted

    Date Published: 02 March 2005

    Bill Gates was knighted by Queen Elizabeth II today. Gates will become a Knight Commander of the Most Excellent Order of the British Empire, an honor said to date back to 1917.** Gates was recognized for his contributions to improving health and reducing poverty in parts of the Commonwealth and elsewhere in the developing world, and for his contribution to enterprise, employment, education, and…


  • Convert TivoToGo Files to Normal MPG for DVD Recording

    Convert TivoToGo Files to Normal MPG for DVD Recording

    Date Published: 01 March 2005

    I’ve had a TiVo for a couple of years now and just recently installed the TiVo Desktop and TivoToGo software. I immediately ran into the problem that it’s impossible for me to burn shows to DVD without using Sonic’s software (I already have Nero so why should I buy something else?). Thankfully, there’s a lot of stuff available on Google including this popular article on TivoToGo MPEG2 Descrypting…


  • Community Server Source Available

    Community Server Source Available

    Date Published: 26 February 2005

    Rob Howard announces that Community Server, which was released last week, now hassource available as well.


  • Spec Writing

    Spec Writing

    Date Published: 23 February 2005

    I’m taking all my paper notes that I’ve accumulated over the last year (or two) on what the next version of my Internet advertisement server application will look like, and putting them into an electronic specification document. Not wanting to start from scratch, I did a bit of Googling to see what the latest and greatest wisdom is on writing functional specifications. Google yielded two notable…


  • More Updates To AspAlliance

    More Updates To AspAlliance

    Date Published: 22 February 2005

    Last week I built some RSS consuming pieces for AspAlliance.com. I decided late in the week that I wanted to go ahead and add a listing of blog entries made by any AspAlliance Author, but although I had all the code to merge the many RSS feeds, I didn’t have a handy way to do so in an async fashion (that is, without causing a page to time out whenever the time came to go load up dozens of separate…


  • Rules to Live By

    Rules to Live By

    Date Published: 18 February 2005

    Bob Parsons, owner and founder of GoDaddy.com, has published his rules for survival, "Robert, they can't eat you!". It's definitely a good read.


  • Merging Multiple RSS Feeds

    Merging Multiple RSS Feeds

    Date Published: 17 February 2005

    I’ve been working on a feature for the AspAlliance.com home page that would show some news and articles from a variety of sources in a single listing. So for the last day or two I’ve been building a couple of classes and methods and unit tests, etc. to handle the combining of multiple RSS feeds. Naturally it was only tonight as I’m almost done that I stumble upon Kent Sharkey‘s article, E…


  • Wireless Dropping Problem (and Solution)

    Wireless Dropping Problem (and Solution)

    Date Published: 17 February 2005

    On one of the AspAdvice mailing lists somebody was asking for help with their wireless card that kept dropping and re-connecting to the wireless network. The solution seems to be described in this ArsTechnica article, Ask Ars: routinely dropping WiFi connectivity.


  • An Interesting Prediction/Critique of Microsoft's .NET Platform

    An Interesting Prediction/Critique of Microsoft's .NET Platform

    Date Published: 17 February 2005

    Richard Grimes, a very recognized author and speaker on .NET topics, addresses what he considers as some missteps in the development of .NET and offers words of warning about the future of the platform. I have to say that some of his predictions, while certainly not what I would like to hear, seem to be pretty feasible given the course Microsoft has taken these last few years. I also tend to agree…


  • Data Access Performance Comparison

    Data Access Performance Comparison

    Date Published: 16 February 2005

    My article on Data Access Performance Comparison with .NET, ASP.NET and ADO.NET was published today on AspAlliance.com. In it, I compare the performance of several common data access techniques, including using DataReaders vs using DataTable or DataSet constructs. The one big surprise I ran into was just how much an open DataReader can cost on a busy site. The words instant death come to mind. One…


  • .NET Data Access Performance Comparison

    .NET Data Access Performance Comparison

    Date Published: 16 February 2005

    Download Sample Files Introduction and Background In .NET, there are several ways to extract data from a data source. The two most common techniques using ADO.NET involve the use of the DataReader or the filling of a DataSet or DataTable with a DataAdapter. In this article, a very easy-to-reproduce set of tests is analyzed to determine which techniques performs the fastest. Further, additional…


  • Big Update To AspAlliance

    Big Update To AspAlliance

    Date Published: 12 February 2005

    I’m getting ready to push a big update of AspAlliance.com tonight. I’ve implemented a number of Scott Mitchell’s articles/samples into the site now, including his UrlRewrite article (which someone referred me to when I was asking about resources on the topic, and ironically this was a topic I felt comfortable enough with a year ago that I almost co-authored with Scott for the MSDN piece. Guess I’m…


  • Update Completed

    Update Completed

    Date Published: 12 February 2005

    Updated the AspAlliance.com a few minutes ago. The new site looks like this: New AspAlliance Home Page First off, it won’t look anything like this if your CSS file is cached. So if it looks goofy to you, hit CTRL-F5 to refresh all files including the new CSS. I ran into one problem that threw me for a loop when I deployed. I started getting Site is Invalid errors, which I tracked down to my…


  • CodeSmith – Improved Sproc Generation Templates

    CodeSmith – Improved Sproc Generation Templates

    Date Published: 27 January 2005

    I edited my first CodeSmith templates today and found it to be quite straightforward, and a very powerful tool. I think I’m going to be hooked. Anyway, I was using it to generate some CRUD sprocs for a couple of tables I need in a small project I’m working on now for AspAlliance.com, and I decided that the default templates that shipped with it didn’t fit my needs because my tables have prefixes…


  • Shuffle an ArrayList

    Shuffle an ArrayList

    Date Published: 27 January 2005

    I have a need to randomly order the contents of a collection which has as its underlying container an ArrayList. Googling took more effort than I expected to come up with anything useful, but did yield this link. Working from there, I came up with this method, which differs in a few ways: The main improvements are these: The original used ArrayList.Length which wasn’t defined, so I converted to…


  • Getting Back Into Coding

    Getting Back Into Coding

    Date Published: 25 January 2005

    I’ve been back from Iraq for almost a month now, and back home in Ohio for almost 2 weeks. I have a new Alienware laptop that came last week and I’ve been trying to get it set up so that I can get some work done on it. It always surprises me how much *stuff* I have to install before I feel like my environment is ready to go. Here’s a quick list off the top of my head for this box: Windows XP Pro…


  • ASP.NET Developer's Cookbook Featured on .NET Book Club

    ASP.NET Developer's Cookbook Featured on .NET Book Club

    Date Published: 02 October 2004

    The ASP.NET Developer’s Cookbookis the featured book for October on the .NET Book Clubsite. Check it outhere.


  • Making DataReaders Less Evil

    Making DataReaders Less Evil

    Date Published: 17 September 2004

    I admit it, I’ve never been a big fan of the DataReader. There are two main reasons for this. Firstly, I’m a big fan of caching, and DataReaders cannot be cached. Thus, even if they are, say, 2x as fast as a DataTable the first time, the cached DataTable is 10x faster whenever it’s read from the cached (these numbers are made up just like 87% of all statistics). Another reason I’ve shied away from…


  • Writing a Days of the Week Selector Control

    Writing a Days of the Week Selector Control

    Date Published: 13 September 2004

    No Control Required Download Code My first stab at this, keeping things as simple as possible, was just to do it on a web form without the added complication of creating a custom control. I'm storing the resulting selection in a database as in integer bitmask, where Sunday is 1 and Saturday is 64 (so values between 0000000 and 1111111 binary or 0 and 127 decimal are allowed). To do this, all…


  • Ten Ways to Make Your Code More Testable

    Ten Ways to Make Your Code More Testable

    Date Published: 03 September 2004

    I recently found this awesome article on TheServerSide.NET– I recommend it to anybody interested in TDD/Agile methodologies. 10 Ways to Make Your Code More Testable by Justin Gehtland


  • Bitmask Helper Function

    Bitmask Helper Function

    Date Published: 31 August 2004

    I had a need recently to be able to determine if a given position of an integer bitmask was set or not (for example, given the bitmask 0101 which is 5 in decimal, how would you check if the 4 position is set? — this is less obvious for, say decimal 75 — is 16 set?). Here’s the method I came up with, which could be done in one line but is broken into several for clarity and ease of debugging…


  • Outlook Search Plugin Lookout!

    Outlook Search Plugin Lookout!

    Date Published: 26 August 2004

    http://www.microsoft.com/downloads/details.aspx?FamilyID=09b835ee-16e5-4961-91b8-2200ba31ea37&displaylang=en Note to self – download this and try it out ASAP.


  • Changes Coming in Whidbey B2

    Changes Coming in Whidbey B2

    Date Published: 17 August 2004

    In case you’ve been in Iraq or something and haven’t already seen this, here’s a post from Shankuabout upcoming changes to ASP.NET coming in Beta 2 (mostly features that won’t make the cut). http://weblogs.asp.net/ShankuN/archive/2004/08/16/215487.aspx Somehow, despite my being in Iraq at the moment, this blog still gets way more readers than my current one at ArmySteve.com. I guess that’s a good…


  • Visual Web Developer Express Edition (Whidbey) Beta 1 Released 2

    Visual Web Developer Express Edition (Whidbey) Beta 1 Released 2

    Date Published: 29 June 2004

    From www.asp.net: Visual Web Developer Express Edition 2005 Beta 1 Released! Microsoft is pleased to announce Visual Web Developer Express Edition 2005 Beta 1, a lightweight, easy to learn development tool focused exclusively on Web development. Inside you will find everything you need to begin building exciting, dynamic Web applications with ASP.NET 2.0. Visit http://lab.msdn.microsoft.com…


  • Visual Web Developer Express Edition (Whidbey) Beta 1 Released!

    Visual Web Developer Express Edition (Whidbey) Beta 1 Released!

    Date Published: 29 June 2004

    From www.asp.net: Visual Web Developer Express Edition 2005 Beta 1 Released! Microsoft is pleased to announce Visual Web Developer Express Edition 2005 Beta 1, a lightweight, easy to learn development tool focused exclusively on Web development. Inside you will find everything you need to begin building exciting, dynamic Web applications with ASP.NET 2.0. Visit http://lab.msdn.microsoft.com…


  • RSS Aggregator Info

    RSS Aggregator Info

    Date Published: 14 June 2004

    If you’re someone who’s interested in some content on a particular site, especially a blog, and you find yourself constantly checking the site to see if any new information has been posted, then you probably would benefit from using an aggregator. Almost every blog engine supports a standard called RSS, which is the de facto aggregation standard. What RSS does is provide a standard format…


  • MSDN Article: Portals and Personalization in ASP.NET 2.0

    MSDN Article: Portals and Personalization in ASP.NET 2.0

    Date Published: 08 June 2004

    My MSDN Article was published a few weeks ago – here’s a link to the online version. http://msdn.microsoft.com/msdnmag/issues/04/06/ASPNET20Portals/default.aspx


  • 3DFTP Client >> WS_FTP(lite) Client

    3DFTP Client >> WS_FTP(lite) Client

    Date Published: 08 June 2004

    I’ve been using WSFTP for a LONG time (the free/lite version) and recently I had the need to download something with resume capability (my ‘net access is intermittent at best here at Ft. Leonardwood, Missouri). So I did a quick search and found 3dFTP, which I downloaded and have been very happy with. It’s multi-threaded, so it will download several files concurrently. Somehow, that makes for a…


  • Micro Caching Article Published

    Micro Caching Article Published

    Date Published: 04 May 2004

    Those of you interested in caching should read my article on AspAlliance about what I’ve termed micro-caching. Basically, the idea is that even a very short-term cache can make a big difference in site performance for a high-volume application or resource. I’d known about this in theory for some time, but I finally demo’d it to a class I was teaching at Ohio Savings Bank in April to get some hard…


  • ASP.NET Micro Caching - Benefits of a One-Second Cache

    ASP.NET Micro Caching - Benefits of a One-Second Cache

    Date Published: 03 May 2004

    Introduction I fell in love with caching when I first started playing with it in the early versions of the ASP.NET alphas. I was aware of caching before that, but I'd never really gone to the effort to seriously implement a cache engine in an ASP app, and with ASP.NET, I didn't have to. The thing that attracts me to caching is its impact on performance without requirements (usually) for major re…


  • Properties? Universally good or not?

    Properties? Universally good or not?

    Date Published: 29 April 2004

    jaybazMS writes about Properties? Not my bag baby(http://weblogs.asp.net/jaybazMS/archive/2004/04/29/123333.aspx) and makes some excellent points. I’m at a public connection right now so I don’t have time to take up his challenge of writing a generic cached property class, but perhaps when I have some time at home I will (and this post will remind me).


  • MVP Summit Pics

    MVP Summit Pics

    Date Published: 20 April 2004

    I’ve posted some of my pics from the MVP Summit.


  • ASP.NET Connections Pictures

    ASP.NET Connections Pictures

    Date Published: 20 April 2004

    I’m at ASP.NET Connections in Orlando this week, promoting DevAdvice with my wife Michelle, our daughter Ilyana, and David Gottlieb, who has been doing a lot of dev work for the site. I’ve uploaded the first couple of days’ pictures to a gallery here. Update: David Gottlieb has some more pictures here. I’ll be adding more to my gallery, perhaps today, as well.


  • ASP.NET Feature Request

    ASP.NET Feature Request

    Date Published: 10 April 2004

    If you’re not aware, a great feature coming in ASP.NET 2.0 allows user profile data to be stored based on a simple config section, with strong typing and design time Intellisense. Thus, you can modify the pieces of information you wish to store about a user, and immediately get Intellisense, strong typing, etc. However, the Roles feature continues to use string literals to describe roles, such as…


  • More Breaking Changes for Whidbey – Personalization/Profile

    More Breaking Changes for Whidbey – Personalization/Profile

    Date Published: 04 April 2004

    Personalization as a keyword/namespace has been replaced with Profile. The namespace, the config section, etc. Also, the provider model for personalization has changed between the PDC Whidbey and the March04Preview Whidbey, such that now providers must inherit from System.Web.Profile.ProfileProvider, rather than implementing a couple of (now non-existent) interfaces. An example config section…


  • Tech Ed Meet The Technologist Sessions

    Tech Ed Meet The Technologist Sessions

    Date Published: 03 April 2004

    I’m presenting two ‘Meet the Technologist’ Sessions at TechEd04. These sessions are similar to breakout sessions and run at the same time as the breakouts and for the same length of time. The only difference is they are smaller and more intimate, with the largest ones seating about 40 people. They are located in the Developer Tools and Technology community area. The first one I’m presenting is on…


  • Visual Studio IDE Settings – Remember Mine!

    Visual Studio IDE Settings – Remember Mine!

    Date Published: 02 April 2004

    TimSull writes about a new feature coming in Whidbey/VS2K5 that will allow developers to export and import their Visual Studio customization settings to and from files. This is a feature I’ve had an interest in for some time, but I want to take it a step further. I’ve mentioned this on several occasions to members of the VS.NET team, but I don’t think they’re going for it, so please comment on…


  • Weird Caching Error? You're probably not using the right cache access pattern…

    Weird Caching Error? You're probably not using the right cache access pattern…

    Date Published: 02 April 2004

    Scott Cate, who runs kbAlertz.com, among other things, writes about an intermittent error he was getting on his site last fall. Shortly before this, I had written an article on msdn about Caching Best Practices, in which I described a caching pattern that should be followed to ensure proper behavior (e.g. no null reference exceptions). Scott was getting intermittent errors about 1 every 50,00…


  • AspAdvice Facelift

    AspAdvice Facelift

    Date Published: 01 April 2004

    We’ve updated the look of AspAdvice, thanks to Ken Schaefer. Jeff Julianwas nice enough to implement the look on the AspAdvice Blogs home page, too, and hopefully we’ll have the new design applied to all of our DevAdvice sites.


  • New Version of FxCop Released (1.30)

    New Version of FxCop Released (1.30)

    Date Published: 30 March 2004

    Jeffrey van Gogh announces a new version of FxCop. Version 1.30 finally stops locking assemblies it’s analyzing! Yay! And it’s got a few other new features, too… http://www.gotdotnet.com/team/fxcop/


  • Avoiding the Global Assembly Cache

    Avoiding the Global Assembly Cache

    Date Published: 29 March 2004

    Chris Sells writes about reasons why we should avoid using the Global Assembly Cache, or GAC (pronounced “gack!”). I have to say that I definitely agree with his sentiments. Ted Neward disagrees with some points here. One counter-argument Ted makes against Chris’ original statement is this: First and foremost, I’ve never heard of the idea that the GAC is there to save hard drive space; anybody who…


  • Speaking in Redmond about Whidbey

    Speaking in Redmond about Whidbey

    Date Published: 29 March 2004

    Carl Prothman invited me to speak at the .NET Developers Association meeting in April next week about Whidbey features. Hopefully I’ll have all of my demos working with the new March04 Preview build that just came available last week. Full details of the meeting, which takes place the week of the MVP summit in the evening (so hopefully I’ll get some of my fellow MVPs there), are available here…


  • Got ASP.NET Email Questions?

    Got ASP.NET Email Questions?

    Date Published: 29 March 2004

    Dave Wanta, who also sells the great email component AspNetEmail, has created a great resource for learning about and troubleshooting (and there’s often trouble to shoot) sending emails using System.Web.Mail (aka CDONTS). This resource is aptly named SystemWebMail.com.


  • ASP.NET Whidbey Overview

    ASP.NET Whidbey Overview

    Date Published: 29 March 2004

    Introduction ASP.NET was first previewed at PDC in July of 2000. The first beta followed about a year later and the actual RTM of ASP.NET 1.0 came in February of 2002. ASP.NET 1.1 and Visual Studio 2003 came about a year after that, but did not include many feature updates. ASP.NET 2.0 / Visual Studio 2005, collectively code-named 'Whidbey', have been in development since before ASP.NET 1.0 was…


  • Mounting ISO Images as Drives

    Mounting ISO Images as Drives

    Date Published: 28 March 2004

    I tried using Isobuster to extract the ISO of the VS2005 DVD image that I just downloaded off of MSDN but after burning it, I got a “Please insert VS Disk 1” midway through the install (I don’t know if that was user error, an Isobuster issue, or a DVD-burning issue — probly user error). So, that DVD is now a coaster. Did a quick search since I knew that it should be possible to mount an ISO as a…


  • Deloittes AdServe

    Deloittes AdServe

    Date Published: 28 March 2004

    I’ve been looking for some ad serving software for DevAdvice this year, and the best one around for purchase that I’ve found is deloittes.NET AdServe. I have their full-source license, which comes with VB and has thus far been pretty easy to customize with a few of my own requirements. I was really impressed with the overall professional look of the user interface and the reporting capabilities…


  • VS 2005 Breaking Changes (from PDC Bits)

    VS 2005 Breaking Changes (from PDC Bits)

    Date Published: 28 March 2004

    As I mentioned in an earlier post, I’ve just installed VS 2005 and am now ready to start reporting on it. Some folks like Rick have reported stability issues with this build but I haven’t had any such problems thus far, and it is working much better than an interim build I had installed about a month ago. One of the first things I’m doing is looking for breaking changes from the previous alpha, of…


  • More Breaking Changes in ASP.NET (March 2004 Preview Build)

    More Breaking Changes in ASP.NET (March 2004 Preview Build)

    Date Published: 28 March 2004

    Found some more breaking changes: System.Web.Personalization no longer exists. I believe it’s been renamed to System.Web.Profile but I haven’t 100% confirmed this yet. System.Configuration.Settings no longer exists. I can’t find its replacement. I’m looking for where IProvider and ISettingsProvider are defined now. I can’t find these either, so I’m thinking they may no longer exist. I’m not sure…


  • DevDays Aftermath (a bit late)

    DevDays Aftermath (a bit late)

    Date Published: 25 March 2004

    I’ve been awfully busy, so I apologize to the two of you who actually read my blog. I spoke at DevDaysin Cleveland a few weeks ago. Overall the event went pretty well. There were over 200 people there. I saw a bunch of folks I’ve worked with before at various clients in the Cleveland area, including Gregg, John, Mike, Dan, and others. I was surprised what a ‘small world’ Cleveland is as far as the…


  • Visual Studio 2005 Community Technology Preview March 2004 – Full DVD Image (English)

    Visual Studio 2005 Community Technology Preview March 2004 – Full DVD Image (English)

    Date Published: 25 March 2004

    If you’re an MSDN Universal subscriber, you can now download VS 2005 from https://msdn.one.microsoft.com/Subscriber/1033/Default.asp. I believe VSLive attendees are getting the DVDs this week as well. I’ve got quite a few hours to go on my download, but once I have it and install it, I’ll be sure to blog about what’s new.


  • Going to TechEd

    Going to TechEd

    Date Published: 25 March 2004

    I registered for TechEd today, so I’m definitely going. I’m staying at the Holiday Inn Harbor View from Sunday night through Thursday night and leaving Friday. I haven’t booked a flight yet. I’m not speaking this time around but I’ll probably do some Ask The Experts, Birds of a Feather, or other breakout session(s). Hope to see you there!


  • Whidbey and Yukon Final Names (and latest ship date estimates) Announced

    Whidbey and Yukon Final Names (and latest ship date estimates) Announced

    Date Published: 11 March 2004

    In this eWeek article, Microsoft confirms that the final names for Whidbey and Yukon will be Visual Studio 2005 and Microsoft SQL Server 2005. Both are expected to ship in the first half of 2005 (my own predictions of a Whidbey ship date of 2004Q5 may yet be realized…)


  • Provider Design Pattern Explained

    Provider Design Pattern Explained

    Date Published: 03 March 2004

    Rob Howard goes into detail explaining how the Provider Design Pattern works, where it came from, why you should use it, and how to write your own providers, both today and once Whidbey is released. Check it out in the resurrected Nothin’ But ASP.NET column on MSDN online. Provider Model Design Pattern and Specification, Part 1


  • New Resource For Crystal Reports Users

    New Resource For Crystal Reports Users

    Date Published: 01 March 2004

    There is now a Crystal Reports -dedicated community on AspAlliance.com, run by CR guru Eric Landes. If you’re in need of assistance with a CR problem or just want to get up to speed, check it out. http://aspalliance.com/crystal


  • Vault Thoughts

    Vault Thoughts

    Date Published: 26 February 2004

    Xander Sherry has a new blog and is wondering why people like Vault. Here’s my $.03. It’s all .NET. I know that shouldn’t really matter to me as long as it does what it says it does, but i like that. It’s DB-based, so it won’t get corrupted or have issues with file locks like VSS does. It works over the Internet – VSS doesn’t. It’s alive and thriving. VSS has been on 6.0x for the last decade…


  • InfoPath 2003 Hacking Change XSN Location; DB Source

    InfoPath 2003 Hacking Change XSN Location; DB Source

    Date Published: 26 February 2004

    I built a handy InfoPath form to do some data entry for the AspAlliance Ad Network back when it was still in beta over the summer of 2003. In December, I moved my database server to a dedicated box (with new connection string settings), and around that same time I rebuilt my file server and renamed it as well. Thus, the next time I went to use my handy InfoPath form, it informed me that the XSN…


  • I love InfoPath, but it doesn't use .NET… until now

    I love InfoPath, but it doesn't use .NET… until now

    Date Published: 25 February 2004

    Check it out — the InfoPath 2003 Toolkit for VS.NET was released a few days ago. My biggest gripe about InfoPath is that it relies on VBScript/JavaScript and ADO for its customization (e.g. anything outside the norm you want it to do). Well, according to the download page, the new toolkit: provides integration features and documentation that enable you to use Visual Studio .NET to create, debug…


  • Book Review - O'Reilly C# Cookbook

    Book Review - O'Reilly C# Cookbook

    Date Published: 25 February 2004

    Overview O'Reilly's C# Cookbook, by Stephen Teilhet & Jay Hilyard (not to be confused with the MS Press C# Programmer's Cookbook or the SAMS Visual C# .NET 2003 Developers' Cookbook), retails for $49.95 and is about 800 pages. It's about $35 from Amazon at the moment. The book uses the 'cookbook' format that is becoming quite popular as evidenced by the two other C# cookbooks on the market, not…


  • Outlook 2003 Calendar Living In The Past

    Outlook 2003 Calendar Living In The Past

    Date Published: 24 February 2004

    There’s probably a way to fix this – I’m hoping someone will tell me. I have Outlook 2003. I have the calendar set up to default to Month view. However, it seems to always want to show me a lot of stuff in the past. It might just be that it is showing me the whole current month, but halfway through the month I really don’t care about the first half of the month, I’m much more concerned with the…


  • Latest TDD Tool in the NFoo series: NCover

    Latest TDD Tool in the NFoo series: NCover

    Date Published: 22 February 2004

    Everybody’s talking about it, it seems (Jonathan Cogley, Jeff Key, hey, that’s everybody, right?). NCover (GDN, SF) is a new tool that analyzes source code and unit tests to provide information about test coverage — that is, how much of your code is actually being tested by your tests. One nice feature it supports already (the SF version is 0.7 — I haven’t tried the GDN version which I just now…


  • Paired Programming Analysis by the Menlo Software Factory

    Paired Programming Analysis by the Menlo Software Factory

    Date Published: 21 February 2004

    Finally subscribed to Jonathan Cogley’s blog and found this gem on Paired Programming: http://www.menloinstitute.com/freestuff/whitepapers/pairedprogramming_qanda.htm As JC notes, view the PDF not just the HTML, since it includes some pictures of how the work environment is laid out.


  • ASP.NET Resource Kit Available

    ASP.NET Resource Kit Available

    Date Published: 18 February 2004

    Download the ASP.NET Resource Kit and check it out. It’s 131MB (you can also order the CD, which I imagine will probably come with MSDN or something at some point). It’s only become available for download within the hour and I’m at 5% as I write this, so obviously I haven’t had time to really play with it. It comes with a bunch of sample web apps, code samples, step-by-step guides, training videos…


  • Whidbey Overview Talk in South Bend Went Pretty Well

    Whidbey Overview Talk in South Bend Went Pretty Well

    Date Published: 17 February 2004

    I spoke to about a dozen folks at the MADNUG user group this evening about Whidbey. Borrowing heavily from Scott Guthrie’s slide/demo pack that he has shown on several occasions, I did a ‘whirlwind tour’ of the new features that are coming. Some of the highlights included Master Pages, Authentication Controls, built-in portal features, GridView/DetailsView, dynamic image generation support…


  • Speaking in South Bend, IN

    Speaking in South Bend, IN

    Date Published: 14 February 2004

    I’ll be speaking at the Michiana Area .NET Users Group (MADNUG) this Tuesday, February 17th, about Whidbey (ASP.NET / VS.NET v2). The presentation will essentially be a ‘whirlwind tour’ of many of the most exciting new features in Whidbey, with the general format being slide, demo, slide, demo. If you haven’t seen Whidbey yet, or had a chance to use the tech preview (released at PDC to attendees…


  • Auto-Updating Cache Entries

    Auto-Updating Cache Entries

    Date Published: 14 February 2004

    As I posted here, I’m interested in a feature of the ASP.NET Cache engine that isn’t there today, and it sounds like won’t be there in Whidbey. To wit, I’d like to be able to throw something in the cache and have it periodically update itself in an offline process, rather than simply expire and force a user request to sit and wait while the data is retrieved. I’ve come up with a workaround/hack…


  • Speaking in Redmond April 5th

    Speaking in Redmond April 5th

    Date Published: 14 February 2004

    I’ll be speaking in Redmond on April 5th at the .NET Developers Association user group, on Microsoft campus. Thanks to Carl Prothman for organizing the event and inviting me. I’ll be in town for Microsoft’s MVP Summit, which should be a lot of fun. I’m speaking on Whidbey (ASP.NET/VS.NET v2) features, providing a ‘whirlwind tour’ of the new features in this upcoming release. Carl and I are hoping…


  • SourceGear Vault 2.0 Released – And Price Reduced!

    SourceGear Vault 2.0 Released – And Price Reduced!

    Date Published: 13 February 2004

    http://software.ericsink.com/vault2_pricing.html Eric Sink of SourceGear talks about why they’ve opted to drop their prices – mostly they’ve adopted a very reasonable volume licensing scheme which I like a lot better than their previous $400/user no-matter-how-many model. I must admit I was one of the many whiners about their old pricing model, and it’s nice to see that SourceGear as a company…


  • Switching Primary Blog Locations to Blogs.AspAdvice.com

    Switching Primary Blog Locations to Blogs.AspAdvice.com

    Date Published: 12 February 2004

    I’m going to be doing most of my blogging over at http://aspadvice.com/blogs/ from now (well, actually a couple of weeks ago) on. If you’re subscribed to this, you should subscribe to http://aspadvice.com/blogs/ssmith/rss.aspx instead/as well. Thanks! Steve Update: Updated URLs. Also, get $5 for signing up for a new PayPal-like service I blogged about here(until end of Feb 06).


  • Home From Vermont and Montreal

    Home From Vermont and Montreal

    Date Published: 11 February 2004

    Today was my first day back home from my trip to Vermont and Montreal to speak at user groups. I’ve posted a few pictures in my gallery. I flew in and out of Burlington, VT, which is a tiny little international airport. I got in Saturday, saw some of downtown Burlington with Julia Lerman, my host, and her husband Richard. They live up in the mountains about 45 minutes south of Burlington. On…


  • Paul Vick Top 10 Rules of Performance

    Paul Vick Top 10 Rules of Performance

    Date Published: 09 February 2004

    I was just referred to this by Darren Neimke. It’s a great top 10 list of things to do/not to do when you’re trying to increase the performance of an application. Being a scalability and performance kind of guy, I really enjoyed the read, and must blog about it so that I can find it in the future. Top 10 Rules of Performance


  • Code Katas

    Code Katas

    Date Published: 03 February 2004

    I found an interesting page I haven’t had a chance to really play with yet, but I’m posting it here so I can find it later. I’ll comment more when I have a chance to actually go through some of these katas. PragDave’s Code Kata


  • ASP.NET Whidbey Caching Features – Where's the Self-Renewing Feature?

    ASP.NET Whidbey Caching Features – Where's the Self-Renewing Feature?

    Date Published: 01 February 2004

    One new feature Whidbey supports is custom CacheDependencies. Simply inherit from CacheDependency and NotifyDependencyChanged() whenever you want the cache to be invalidated — very simple. An old feature that has been around since 1.0 is the CacheItemRemovedCallback. For those unfamiliar, this (still sealed) callback is executed immediately after a cache entry is invalidated. Unfortunately, it is…


  • VS.NET: ASP.NET Projects as Class Library Projects

    VS.NET: ASP.NET Projects as Class Library Projects

    Date Published: 01 February 2004

    http://staff.develop.com/onion/Samples/aspdotnet_without_web_projects.htm Excerpt: The Web Project wizard in Visual Studio .NET is convenient for creating quick ASP.NET applications on your local machine, but in an effort to simplify your life, it also makes many decisions for you that are difficult to change if you need more flexibility. My biggest pet peeve with Web Projects is that you cannot…


  • Cleveland DevDays – I'll Be There

    Cleveland DevDays – I'll Be There

    Date Published: 01 February 2004

    If you’re in the Cleveland area, I encourage you to sign up now for the Cleveland DevDays event, happening on Wednesday, March 10th. I’ll be presenting there on some of the fundamentals of web-application security (in the Web Development track, obviously), and there will be a bunch of other presentations as well. In addition to the content, one of the biggest reasons why you shouldn’t miss this…


  • Speaking in Vermont

    Speaking in Vermont

    Date Published: 01 February 2004

    I’ll be speaking at the Vermont .NET User Group on Caching in ASP.NET next Monday night, February 9th, 2004. If you’re in the area, stop by and say hi.


  • Speaking in Montreal, Canada

    Speaking in Montreal, Canada

    Date Published: 01 February 2004

    I’ll be speaking at the Montreal .NET User Group hosted by Guy Barrette next Tuesday February 10th on ASP.NET Caching. Stop by if you’re in the area. It will be downtown at the IBM building on the 19th floor, and starts at 6:30pm.


  • Jamaica Pictures Posted

    Jamaica Pictures Posted

    Date Published: 29 January 2004

    Trying out the Gallery feature of .Text, I’ve added a bunch of pictures from my recent family vacation to Jamaica. You’ll find the pictures here. I got my SCUBA Open Water certification while I was there; the pictures are from my second and third dives for the certification with Andrew my instructor and two fellow vacationers, Jim and Kevin. We were in Jamaica from January 14th to the 19th.


  • Blogs Have Come To AspAdvice

    Blogs Have Come To AspAdvice

    Date Published: 26 January 2004

    More changes are coming soon to AspAdvice. Look for better searching of the lists, community member blogs, forums (perhaps integrated with the mailing lists), and more!


  • Production Database Migration

    Production Database Migration

    Date Published: 13 December 2003

    I thought I’d share my experience with moving a heavily used production database for a live website from one server to another this weekend. The database in question is used to support AspAlliance.com, but since it has been around for a long time, and since getting additional databases has not always been easy or free, there are several other sites that rely on this same database. Additionally, on…


  • Evolving Custom Web Controls

    Evolving Custom Web Controls

    Date Published: 12 December 2003

    Although sometimes you start out knowing you need a custom control, what more often happens is you find that you’re using the same functionality in more than one place, so you start packaging it up into a control in order to remove duplication and improve reusability. This article takes a look at when and how you should do such things by taking a fairly simple piece of ASP.NET functionality and…


  • Newsgator Activation

    Newsgator Activation

    Date Published: 10 December 2003

    Ok, so I got newsgator last week (http://weblogs.asp.net/ssmith/posts/41415.aspx) and today was the first day since then that I actually rebooted my machine and got the nag prompt to activate it when I started Outlook. So, having become enthralled with the product, I decided what the heck and spent the $29 to buy it. Got my activation key in an email a few minutes later, life was good, I clicked…


  • AspAlliance.com RSS Is Back

    AspAlliance.com RSS Is Back

    Date Published: 04 December 2003

    After a couple of months of downtime, AspAlliance.com‘s RSS Feed has returned and is better than ever. Thanks to Scott Mitchell for his cool MSDN article on building an RSS feed. http://aspalliance.com/rss.aspx


  • Newsgator 1.3

    Newsgator 1.3

    Date Published: 04 December 2003

    I’ve never used Newsgator before but since I just redid the RSS feed on AspAlliance.com I thought I should give it a shot and see how it works (I’ve also only recently gone to Outlook from Outlook Express (see past archives for my thoughts on the switch)). I have to say I really like it and am starting to subscribe to a bunch of blogs that previously I would manually periodically check with my…


  • PDC Sessions

    PDC Sessions

    Date Published: 22 November 2003

    In addition to the powerpoints available at http://www.asp.net/whidbey/ you can also watch the presentations, including demos, in MS Producer format at http://microsoft.sitestream.com/PDC2003/Default.htm.Others have noted this – I mention it here so I can find the link later…


  • SYS-CON Radio Interview (PDC 2003)

    SYS-CON Radio Interview (PDC 2003)

    Date Published: 16 November 2003

    My SYS-CON Radio Interview from PDC has recently been published on their website (along with a great many other more important people’s interviews). Check them out and download them in MP3 format. http://www.sys-con.com/dotnet/radio2003/interviews.cfm


  • Speaking At Memphis DNUG

    Speaking At Memphis DNUG

    Date Published: 14 November 2003

    I’ll be speaking at the Memphis .NET User Groupon Tuesday, 11/18. I’m going to be giving an overview of ASP.NET Whidbey, which of course has recently been made public at the Microsoft Professional Developers’ Conference 2003 in late October. For more information and directions to the event, see the MNUG website.


  • Regex To The Rescue For Shorter URLs

    Regex To The Rescue For Shorter URLs

    Date Published: 05 November 2003

    I’ve been redesigning AspAlliance.com off and on for the last several months, and I made a few more changes this morning. The big one that is noticeable to the general public is the URLs. Instead of having to link to articles via a viewer ASPX page and a series of querystring values, it is now sufficient to simply append the article ID to the end of the domain name (after a slash), like so: http…


  • Touchgraph GoogleBrowser

    Touchgraph GoogleBrowser

    Date Published: 30 October 2003

    Check out this cool tool to map out where your website is in the Internet space, according to Google. TouchGraph GoogleBrowser


  • ASP.NET Caching Tips from PDC 2003

    ASP.NET Caching Tips from PDC 2003

    Date Published: 30 October 2003

    Caching Tips I hosted a Birds of a Feather Session at PDC 2003 which was attended by about 30 people, including Rob Howard from the ASP.NET team. During the course of the event, a number of tips and resources for caching in .NET were revealed. The highlights are listed here. Output caching, even for just a couple of seconds, can dramatically reduce database load if pages are being hit several…


  • PDC ASP.NET Panel Discussion – Non-Postback Callbacks to Pages

    PDC ASP.NET Panel Discussion – Non-Postback Callbacks to Pages

    Date Published: 29 October 2003

    A new feature in Whidbey will allow controls to make calls directly back to page methods without making full postbacks. This features uses XMLHTTP behind the scenes and allows controls to talk to the server in an optimized fashion without requiring a full postback. In the 1.x timeframe, a solution for this which you can use today (and which actually may be simpler to implement based on what I’ve…


  • PDC 2003: Caching Birds of a Feather : Summary of Tips

    PDC 2003: Caching Birds of a Feather : Summary of Tips

    Date Published: 29 October 2003

    I hosted a Birds of a Feather Tuesday night at PDC 2003 and we had about 25 or 30 people attend, including Rob Howard of the ASP.NET team (responsible for the caching featureset). I’ve published a summary of the tips along with some resource links we discussed at the meeting on AspAlliance.com: Caching Tips from PDC 2003


  • ASP.NET Whidbey Discussion Lists Launched

    ASP.NET Whidbey Discussion Lists Launched

    Date Published: 28 October 2003

    AspAdvice.com now has about a dozen lists set up for the discussion of ASP.NET Whidbey. If you’ve got the PDC bits, this is a great place to look for help if you get stuck with something. Many of the members of these lists will be folks who have had access to the bits for some time and of course Microsoft employees themselves. You’ll find the full list of signups here: AspAdvice Whidbey Lists…


  • Tuesday at PDC

    Tuesday at PDC

    Date Published: 27 October 2003

    Managed to get to some sessions today, including the morning’s keynote, which was lucky since I was out pretty late with a bunch of Codewise community members and Microsofties. The keynote was pretty cool, and included an excellent demo by Scott Guthrie as well as a fun demo of mobile control support by Batman. I spent most of the middle of the day in the expo hall talking to various vendors about…


  • Review - Vault Source Control

    Review - Vault Source Control

    Date Published: 27 October 2003

    Introduction - What is Vault? SourceGear Vault (Version 1.2.2 as of this writing) is a version control system for Windows developers. If you've used Visual SourceSafe, Vault is a similar (but much better) product. It is built entirely on the .NET Framework with a SQL Server 2000 backend storage system (as compared to VSS's file system storage system). A key feature of Vault is its backward…


  • ASP.NET Whidbey Caching Overview

    ASP.NET Whidbey Caching Overview

    Date Published: 27 October 2003

    Caching in 1.x... ASP.NET Caching in 1.x is very powerful and includes three pieces: output caching, fragment caching, and the cache API. The simplest form, output caching, simply caches the output of a page. Fragment caching is a bit more granular, and caches the output of a user control. Finally, the most powerful caching functionality is achieved using the cache API, and allows any…


  • Hope LAX Is Open For me…

    Hope LAX Is Open For me…

    Date Published: 26 October 2003

    Well, I’m leaving Ohio in about 4.5 hours for Atlanta, then getting into LAX (in theory) at 10am local time. Hopefully the airport won’t be burned down or closed or anything. See everyone in PDC if I make it there.


  • SourceGear Vault Review Published

    SourceGear Vault Review Published

    Date Published: 26 October 2003

    I’ve been using SourceGear Vault for a while now and have been pretty happy with the product. I’ve published a review on AspAlliance.com. Review: SourceGear Vault


  • PDC2003: 1623 on Day One

    PDC2003: 1623 on Day One

    Date Published: 26 October 2003

    Ok, this post will be of little use to most people – I apologize. I got in at 10am or so, one of the few people unaffected by the airport delays caused by all the fires. Managed to get checked in at hotel and to the convention center by noon, just in time for lunch. Met Scott Swanson and Serge from VbCity for lunch, then hit the expo hall for a while. Talked to a bunch of vendors, saw Andrew…


  • 34 Hours to Departure for PDC 2003

    34 Hours to Departure for PDC 2003

    Date Published: 25 October 2003

    My flight leaves at 0535 Monday morning from Akron-Canton, getting me into Los Angeles at 0951. I figure I’ll probably make it to the hotel by 11am and the convention center by noon, which means I’ll miss the keynotes. I’m looking forward to meeting a ton of folks at PDC this year. I think I’ve got more meetings set up than sessions to attend, so I guess I’d better order the DVD with the slides…


  • 34 Hours to Departure for PDC 2003

    34 Hours to Departure for PDC 2003

    Date Published: 24 October 2003

    My flight leaves at 0535 Monday morning from Akron-Canton, getting me into Los Angeles at 0951. I figure I’ll probably make it to the hotel by 11am and the convention center by noon, which means I’ll miss the keynotes. I’m looking forward to meeting a ton of folks at PDC this year. I think I’ve got more meetings set up than sessions to attend, so I guess I’d better order the DVD with the slides…


  • Outlook 2003 + Spam Bayes Rocks!

    Outlook 2003 + Spam Bayes Rocks!

    Date Published: 16 October 2003

    I’m still on the Beta of Outlook 2003 – I’ll upgrade to the release version at some point. But I just installed SpamBayes and I have to say that so far I’m very happy with it. It’s not totally “trained” yet (it’s only been about 8 hours, but I get about 100 spam in that time), but it’s only categorized 2 things I wanted to have as possible spam (and they were automated emails), and nothing has…


  • PDC Countdown: Come to My BOF Session on Caching

    PDC Countdown: Come to My BOF Session on Caching

    Date Published: 16 October 2003

    I’m hosting a Birds of a Feather session on ASP.NET Caching techniques and strategies on Tuesday 10/28 at 9pm – 10pm. Please join me if you’re interested. You can find a complete schedule of the Birds of a Feather sessions atJeffrey McManus’ Blog.


  • NUnit Article Published (for real this time)

    NUnit Article Published (for real this time)

    Date Published: 15 October 2003

    http://msdn.microsoft.com/asp.net/?pull=/library/en-us/dnaspp/html/aspnet-testwithnunit.asp This is my latest MSDN article, an introduction to NUnit as well as some lessons learned for unit testing a data access layer. I don’t claim to be a unit testing expert, but these techniques have definitely helped me when I have had the discipline to apply them. Hopefully it will help a few folks to avoid…


  • Enums and Lookup Tables

    Enums and Lookup Tables

    Date Published: 22 September 2003

    Everyone knows (or would know if they’d read Code Complete) that ‘magic numbers’ are a bad thing in your code. Enumerated types, or Enums in .NET, are a great way to avoid such magic numbers. For instance, let’s say I have a content management system which has articles whose state can vary between Draft, Editing, and Production. I could simply use 1, 2, and 3 for these states and remember what…


  • Dynamic Excel Reports with ASP

    Dynamic Excel Reports with ASP

    Date Published: 20 September 2003

    Technique There are many situations in which you may wish to convert table data into an Excel spreadsheet format for the user. There are several methods available for doing this; I will describe in this article one of the simplest ones. It basically tricks the user's browser into thinking the HTML it is downloading is actually an Excel document, and then Excel does the rest of the work by parsing…


  • Cache Configuration Helper Class Article Published

    Cache Configuration Helper Class Article Published

    Date Published: 11 September 2003

    In a follow-up to my caching best practices article, this one shows how to encapsulate the best practices into a helper class. Creating a Cache Configuration Object for ASP.NET Summary: Learn how the CacheConfig helper class can improve caching policies across an ASP.NET application, improve reuse of cached data, and significantly reduce lines-of-code to implement caching using best practices…


  • NUnit 2.1 Final Release Available

    NUnit 2.1 Final Release Available

    Date Published: 01 September 2003

    From Charlie Poole on the TDD List: The final release of NUnit 2.1 is now available for download at http://nunit.sourceforge.net. This release has a number of improvements, most notably that it will run under version 1.0 of the .NET framework as installed. It includes separate configuration files for use with .NET versions 1.0 and 1.1. Both configs are copied and the correct version for the…


  • Object Must Implement IConvertible with MS Data Access Application Block

    Object Must Implement IConvertible with MS Data Access Application Block

    Date Published: 18 August 2003

    Ran into this bug today. I’m not the first, as a quick google search found: Google group thread. Ted Graham also wrote about it, specifically for Access. I think I’m close to finding the actual bug in the C# version of the DAAB, but I don’t have time to totally fix it just yet. However, I did find a workaround that I hope will help some folks. I was calling a stored procedure like so: All I did to…


  • Databinding Server Controls – Learned Something New

    Databinding Server Controls – Learned Something New

    Date Published: 16 August 2003

    I was running into an issue databinding an ImageButton’s ImageUrl property to a string comprised partly of literal text and partly of a string I was pulling from my ConfigurationSettings.AppSettings collection. I was using the standard <%# … %> syntax for the databinding, but the result kept showing my databinding syntax in the button’s URL, rather than the actual value. It seems that while you…


  • unexpected error creating debug information

    unexpected error creating debug information

    Date Published: 11 August 2003

    I keep running into this issue in my multi-project VS.NET solutions. For some reason, something is locking the dll(s) in the /obj/ folder of library components. The fix that I have at the moment is as follows: Shut down VS.NET Browse to the project in windows explorer Delete the /obj/ folder. Delete the project outputs (.dll and .pdb) from /bin (not sure this step is necessary) (can’t hurt, might…


  • .TEST Tool

    .TEST Tool

    Date Published: 07 August 2003

    James Avery wrote about .TEST, so I checked out their video demo. It looks really very nice. The automatic generation of white box tests, ability to add black box tests without resorting to code, and notification of violations of best practices all were very compelling. The speaker in the movie needed to enunciate a bit better at times, and the UI looks like it could use some improvements, mainly…


  • InfoPath Tidbit

    InfoPath Tidbit

    Date Published: 07 August 2003

    InfoPath forms can only be viewed and filled out by folks who have InfoPath installed… or can they? As it turns out, InfoPath .xdr files are really just CAB files. This means you can use the ‘expand’ utility (in Windows 2000 and later, I believe) to pull out the pieces of the XDR file, one of which contains a definition of the form (actually, one .xsl file per form). With a little search-and…


  • Caching Best Practices Article on MSDN website

    Caching Best Practices Article on MSDN website

    Date Published: 07 August 2003

    My first MSDN online article was published this week: ASP.NET Caching: Techniques and Best Practices. The first half is pretty much well-known info about caching in ASP.NET (at least, it should be well-known to anybody writing ASP.NET applications). The tips and the best practice pattern are the real valuable parts here for everyone who already knows the caching capabilities of ASP.NET, since…


  • Dundas Chart Review

    Dundas Chart Review

    Date Published: 28 July 2003

    I’ve posted a brief review of Dundas Chart 3.5 based on what I’ve used it for (no rocket science, but stuff that most of us probably could use for our apps, imho). You may read it here: http://aspalliance.com/stevesmith/articles/dundaschart35.asp


  • FTC Offers Guidelines to Reduce SPAM

    FTC Offers Guidelines to Reduce SPAM

    Date Published: 27 July 2003

    If you run any servers, even at home, you should probably read this and/or forward it on to anybody you know who manages servers. As anybody with a clue can attest, SPAM is quickly clogging up not just our individual inboxes, but also the networks that make the Internet work. Most of these messages are being sent by unsuspecting individuals’ computers, not from the spammers’ own machines. Do your…


  • Review - Dundas Chart 3.5

    Review - Dundas Chart 3.5

    Date Published: 27 July 2003

    Installation Dundas Chart 3.5 (in beta at time of publication) is the latest version of Dundas' Charting component for ASP.NET. I've had the opportunity to use it for some simple real-world applications I've been building, and I thought I'd share my experiences here. Detected and uninstalled previous version - no problem. Installed in about 5 minutes with no errors or problems. My configuration…


  • RSS for Events

    RSS for Events

    Date Published: 25 July 2003

    RSS = Real Simple Syndication, I learned recently. I’ve been wanting to implement something similar for events (of the calendar variety) for some time. There are several formats in use today to describe events, but none are as pervasive and as widely used as RSS is for blogging and articles. I have an event calendar on my website. It’s hard to keep it updated, though, since there is today no…


  • MS Passport – What are they thinking?

    MS Passport – What are they thinking?

    Date Published: 24 July 2003

    Note – this is a rant I’ve had for a long time, not a response to anything new. You can learn more about Passport here and here. To get right to the chase, here’s the part I think is ludicrous and detrimental to Passport ever getting any market share: There are two fees for licensing .NET Passport: a periodic compliance testing fee of US$1,500 per URL and a yearly provisioning fee of US$10,000 per…


  • The Caching Pattern

    The Caching Pattern

    Date Published: 20 June 2003

    Here’s a little something that I term “the caching pattern” for using the ASP.NET cache object: The as keyword will try to cast Cache[key] to DataTable and if unsuccessful it will return null. If it is null, it will return null. The rest of it is pretty straightforward. This is the best practice way to get something from the cache, but look at it! It’s huge! I’m trying to come up with a helper…


  • DotNetBips Interview

    DotNetBips Interview

    Date Published: 17 June 2003

    Bipin Joshi interviewed me (virtually) for his website, DotNetBips.com. You may read the interview here if you’re interested: DotNetBips Inteviews Steve Smith


  • Caching Application Block Released

    Caching Application Block Released

    Date Published: 17 June 2003

    News if you haven’t heard, another application block has been released (actually a couple): Caching Application Block (the other one is Aggregation) I’ve read over the docs for the Caching block and at first glance it looks like it doesn’t offer anything to ASP.NET developers that the built-in Cache API doesn’t have, unless you’re looking to store your cached data in a database (and suffer big…


  • Hosting

    Hosting

    Date Published: 16 June 2003

    I’ve had enough people ask me for hosting advice lately to write up my thoughts in an article. You can read about my experience with the people who make up ORCSWeb in this ASPAlliance article: Hosting Review: ORCSWeb.com Listening To: Saliva – Rest In Pieces


  • Handy Tracing Utility

    Handy Tracing Utility

    Date Published: 11 June 2003

    There are three features I wish ASP.NET tracing had out of the box: Check for a null context and gracefully disable if context is null (e.g. at design time) If I don’t specify a category, default to the name of the method in which the trace is being called. Automatically compile out of production code via the Conditional(“DEBUG”) attribute or something similar. Today, Trace routines carry overhead…


  • NUnit 2.0 And .NET 1.1 Together

    NUnit 2.0 And .NET 1.1 Together

    Date Published: 10 June 2003

    I spoke at the Wisconsin .NET User Group last night and had a good time. A small part of my talk was on using NUnit to do unit testing and an introduction to Test Driven Development(TDD). In the course of preparing my samples I upgrade to VS.NET 2003 from VS.NET 2002 and thus from .NET v1.0 to v1.1. Unfortunately, I had a heck of a time getting NUnit to work after doing this, and was getting a…


  • Easier ADO.NET Parameters using Enums and Attributes

    Easier ADO.NET Parameters using Enums and Attributes

    Date Published: 06 June 2003

    DonXML has a cool article I just read on how to use Attributes to extend Enums to create strongly typed parameter objects for ADO.NET commands. You can read the whole article here: http://www.donxml.com/FunwithAttributeBasedProgramming.htm The article is cool for two reasons: It makes it so that adding a parameter is a very simple one line of code (not 2-3 with a bunch of parameters to mess with…


  • SCSI Information

    SCSI Information

    Date Published: 04 June 2003

    Aaron Seet posted a link to this very long and very detailed analysis of SCSI vs. IDE hard drives, which I’m posting here for others to reference and also so I know where the link is so I can finish this long article. http://scsi.radified.com/


  • ASP.NET Developer's Cookbook Released

    ASP.NET Developer's Cookbook Released

    Date Published: 30 May 2003

    My new book, the ASP.NET Developer’s Cookbook, is now available. I just checked Amazon and it’s still just accepting pre-orders, but I know it’s done because I have a copy in my hands! This book was written as a combined effort between myself, Rob Howard of the ASP.NET Team, and about 20 columnists from ASPAlliance.com. It contains over 200 task-oriented recipes aimed at solving common problems…


  • What's an ASPInsider?

    What's an ASPInsider?

    Date Published: 30 May 2003

    Some of you have heard of a new group, the ASPInsiders. Lately, I’ve been getting a lot of questions about this group such as who are they, are they a replacement for (insert another group here), how do I get in, etc. Thankfully, the group has created an FAQ to answer these exact questions. You can find the answers to these questions and more here.


  • Regular Expressions and ASP.NET Connections

    Regular Expressions and ASP.NET Connections

    Date Published: 07 May 2003

    I completed my Regular Expression Cheat sheet a couple of days ago, so that I can hand it out this week at my session on regular expressions at ASP.NET Connections in New Orleans. It’s intended to be printable (thus it’s not a complete reference – only the simple beginner stuff that fits on one page), so that someone could tack it up to the wall of their cubicle or tape it next to their monitor if…


  • Caching and Callbacks

    Caching and Callbacks

    Date Published: 24 April 2003

    I gave my second presentation to a user group for INETA this evening (well, last evening – it’s late). I spoke to about 70 members of the Philadelphia .NET user group, Philly .NET, about ASP.NET Performance Tips and Tricks and the Caching support in ASP.NET. While I was discussing callbacks and the CacheItemRemovedCallback delegate that can be specified when an object is inserted into the cache…


  • Review - MaxiVista Desktop Sharing Software

    Review - MaxiVista Desktop Sharing Software

    Date Published: 19 April 2003

    Review Let me preface this review by saying that I'm one of those people who never has enough desktop space. I've got a laptop with a WUXGA screen that I run at 1920x1200 and it's still not enough room. A large part of the reason for this is that I typically have open Outlook 2003, Visual Studio .NET 2003, a few IE6 windows, and a few instant messenger windows. Since I like to be able to keep…


  • Test Driven Development Article

    Test Driven Development Article

    Date Published: 10 April 2003

    Eric Gunnerson at Microsoft has published an article on Unit Testing and Test Driven Development (he calls it Test First Development). It does a good job of introdcuing the concept of TDD and showing how to use NUnit to perform unit testing of a class before and during its construction. Another good resource I’ve found for TDD is the TDD Yahoo Group. I’m hoping to write a few articles on the use…


  • Windows Server 2003 Notes

    Windows Server 2003 Notes

    Date Published: 09 April 2003

    I set up Win2K3 Server on a box at home a few days ago and here are some of the things I’ve learned. The first thing I’d like to point out is that there is a pretty good Unofficial FAQ maintained by Windows XP MVP Larry Samuels. The machine I installed on is a Dell Dimension 4100, P3-1GHz with 512MB ram. It has a DVD player that was flaking out under XP Pro for some reason (no sound during movies…


  • When is it OK to use a DataReader?

    When is it OK to use a DataReader?

    Date Published: 07 April 2003

    I just responded to a discussion on this topic on the ASP.NET Forums… There is a good article on the actual performance characteristics of DataReaders vs. DataSets on MSDN here. In it, you will find that DataSets are not always slower than DataReaders, especially when there is any significant latency between the web server and the database server or when there are a limited number of connections…


  • San Francisco and Custom Paging

    San Francisco and Custom Paging

    Date Published: 27 March 2003

    Well, I’m out in San Francisco this week to teach ASP.NET with C# to half a dozen students, and that’s going quite well. I had the opportunity to see Alan Shalloway speak at the Bay Area User Group on Tuesday night, and met up with ASPAlliance columnist Steve Sharrock there for the first time as well. We had dinner the next night, and he mentioned something he had used for a solution for a client…


  • Unit Testing

    Unit Testing

    Date Published: 17 March 2003

    I’m really getting more and more into unit testing and testing frameworks. At the moment I’m using NUnit 2.0 for my test purposes as I redesign ASPAlliance.com‘s content management system for integration into the Microsoft Codewise Community standard specification for Federated Search. I’m working with a friend and fellow columnist, Jonathan Cogley, who suggested a this resource on Unit Testing…


  • BuildIt From Microsoft

    BuildIt From Microsoft

    Date Published: 06 March 2003

    Microsoft has a Team Development Build Tool called BuildIt which you can download here. From their site: “BuildIt.NET is designed to jump-start the build process used for development of .NET distributed applications. This download provides full source code and comprehensive documentation for the Microsoft Visual C#® development tool and Microsoft Visual Basic® .NET development system.”


  • ASP.NET Cookbook

    ASP.NET Cookbook

    Date Published: 28 February 2003

    The ASP.NET Cookbook is finally 100% complete and submitted to the publisher, SAMS (as of 2/26/03). This has been quite an undertaking, and having completed the longest and hardest phase of the book writing process (author review remains, but is not nearly as arduous), I must once again say that I never want to write another book. Of course, I said that after writing ASP.NET By Example, too… So…


  • Blogs R Kewl

    Blogs R Kewl

    Date Published: 18 February 2003

    I just thought I’d write something quick to tell Scott Watermasysk that he has a pretty cool thing going here with these blogs. Having thus buttered him up, I thought I’d also rant a bit about the fact that even though I tell the login to remember me, it doesn’t, and that there is thus no way for me to find the link to the Admin section for my blog except to remember it and type in the URL. When…


  • Idiots at the Mic – More news from the MVP Summit

    Idiots at the Mic – More news from the MVP Summit

    Date Published: 18 February 2003

    Since I’m in a foul mood and I am procrastinating finishing my book, I just thought I’d write a quick note to express my disapproval for the MVPs at last week’s summit who thought that the opportunity to ask questions of Microsoft executives was actually an opportunity for them to look impressive (or perhaps just stupid) to their peers. The first such idiot, who was a frequent attendant to the mic…


  • MVP Summit Aftermath

    MVP Summit Aftermath

    Date Published: 16 February 2003

    I had a good time at the MVP Summit last week; it was my first. I have some pictures to upload but they’re still on my camera at the moment. However, I wanted to reference a few other folks met and spent time with during the event. Christian Weyer, a web services guy who was very nice. Apparently, he also has joined the growing ranks of people who have been kicked out of AspElite, too, through no…


  • Regular Expressions

    Regular Expressions

    Date Published: 06 February 2003

    Regular expressions are very powerful, and are one of my favorite tools to use because they are so flexible and they can be used regardless of whether one is a .NET developer or a Unix shell scripter or a Java developer or whatever. As I started getting into regular expressions for validation controls, I noticed that there wasn’t any online library for these expressions, which of course meant that…


  • First Post!

    First Post!

    Date Published: 05 February 2003

    This would be my obligatory first post to Scottw’s awesome new DotNetWebLogs site! I hope to return and add more content once I finish up my *$#&#@# second ASP.NET book. By the way, if you ever hear me say that I’m writing another ASP.NET book, smack some sense into me. Please


  • Basic ADO and SQL Tutorial

    Basic ADO and SQL Tutorial

    Date Published: 25 September 2000

    Introduction Author's note: This was originally published in September 2000. It has been only slightly revised and republished in March 2005. Also, if you're just learning ASP, I strongly recommend you jump to ASP.NET instead. Return to this site often with your questions about data access in ASP. If you have specific questions, please email them to me. The purpose of this tutorial is to give…


  • Cookies With ASP

    Cookies With ASP

    Date Published: 25 September 2000

    Mmmmm, cookies... Cookies can be a good method for passing data between pages and especially for retaining data between sessions. Today, it's pretty safe to assume that anyone who is using your site can use cookies, since nearly every site that is non-static makes use of them(including all ASP sites that use sessions). It is also possible to set and read cookies using client-side code, but it is a…


  • Using Server Side Include Files

    Using Server Side Include Files

    Date Published: 25 September 2000

    Include Files Server Side Includes (SSI) are a powerful tool for code re-use and to make site maintenance easier. Include files can themsevles include other files, allowing for cascading include files. This can make it much easier for the developer to maintain a consistent site. One of the most popular uses for SSIs is to create uniform headers and footers, often with menu items. On a previous…


Browse all categories


Ardalis

Copyright © 2021