Latest Microsoft Blogs

Browse by Tags

Related Posts

  • The ABCs of Alpha, Beta, CTP

    A commenter to my last post asks the following question, What is the difference between a beta, a CTP, a fully-supported out of band release, an RTM feature, and a service pack? The answer you get will differ based on who you ask, but I’ll give you my two cents on what these terms mean. Beta Let’s start with Beta. A great starting point is this post by Jeff Atwood entitled Alpha, Beta, and Sometimes Gamma . The software is complete enough for external testing -- that is, by groups outside the organization or community that developed the software. Beta software is usually feature complete, but may have known limitations or bugs. Betas are either closed (private) and limited to a specific set of users, or they can be open to the general public...


  • What Integrated Circuits Say About Testing Your Code

    A while back I talked about how testable code helps manage complexity . In that post, I mentioned one common rebuttal to certain design decisions made in code in order to make it more testable. Why would I want to do XYZ just do improve testability? Recently, I heard one variation of this comment in the comments to my post on unit test boundaries . Several people suggested that it’s fine to have unit tests access the database, after all, the code relies on data from the database, it should be tested. Implicit in this statement is the question, “ Why would I want to abstract away the data access just to improve testability? ” Keep in mind, I never said you shouldn’t test your code’s interaction with the database. You absolutely should. I merely...


  • How I Got Started In Software Development

    It’s a quiet friday afternoon with all of our devs in training today, so I figured I’d take a breather and respond to this meme I’ve been tagged with by Keyvan and others. How Old Were You When You Started Programming? Have I even started really programming yet? I guess I got my first taste when I was around eight with my first computer, a TRS-80 Color Computer . That sucker could display 9 colors, all at once, believe it or not. My programming experience back then was pretty minimal. My dad and I mostly spent hours typing in program listings from books, complete with pages of DATA lines consisting entirely of 0s and 1s. Pretty much typing by hand the equivalent of binary resources. I also wrote simple programs that would draw pictures and my...


  • Unit Test Boundaries

    One principle to follow when writing a unit test is that a unit test should ideally not cross boundaries . Michael Feathers takes a harder stance in saying… A test is not a unit test if: It talks to the database It communicates across the network It touches the file system It can’t run at the same time as any of your other unit tests You have to do special things to your environment (such as editing config files) to run it Tests that do these things aren’t bad. Often they are worth writing, and they can be written in a unit test harness. However, it is important to be able to separate them from true unit tests so that we can keep a set of tests that we can run fast whenever we make our changes. Speed isn’t the only benefit of following these...


  • IronRuby With ASP.NET MVC Working Prototype

    In June, John Lam wrote about a demo he gave at Tech-Ed 2008 where he showed IronRuby running on ASP.NET MVC. He posted the code for the demo online, but it relied on an unreleased version of MVC, so the code didn’t actually work. Now that Preview 4 is out, I revisited the prototype and got it working again. I use the term working loosely here. Yeah, it works, but it is really rough around the edges. As in, get a bunch of splinters rough. At least it looks better as I did take a moment to use a CSS layout from Free CSS Templates slightly tweaked by me. Getting the Prototype Up And Running The IronRuby assemblies are based on an internal build, so they aren’t the same version as the publicly available ones. As such, they are not fully signed...


  • User Input In Sheep’s Clothing

    We all know that it is bad bad bad to trust user input. I don’t care if your users are all ascetic monks in a remote monastery, do not trust their input. However, user input often likes to put on sheep’s clothing and disguise itself as something else entirely, such as the case with ViewState . Another example of this is highlighted in the latest entry of his excellent series of ASP.NET MVC tips. In this post, Stephen Walther writes about how cookie values and server variables can be passed as parameters to action methods. Immediately, commenters understably asked whether this was safe or not. One person went so far as to call this a security hole in controller actions. However, to be extremely nitpicky, the security implication isn't in...


  • HttpModule For Timing Requests

    Yesterday, I wrote a quick and dirty ASP.NET HttpModule for displaying the time that a request takes to process. Note that by turning on trace output for a page , you can get timing information for that page. But as far as I understand, and I need to double check this, this only applies to the page lifecycle, which might not have all the information you want in the context of ASP.NET MVC. Not to mention, I just wanted to see a simple number at the end of the page and not have to wade through all that trace output. Also keep in mind that this number only applies to the time spent in the ASP.NET pipeline. It obviously doesn’t tell you the full time of the request from browser sending the request to the browser rendering the response. For that...


  • Security Tip: Blocking Access to ASP.NET MVC Views Using Alternative View Engines

    When you create a new ASP.NET MVC project using our default templates, one of the things you might notice is that there is a web.config file within the Views directory. This file is there specifically to block direct access to a view. Let’s look at the relevant sections. For IIS 6 (and Cassini) < add path ="*.aspx" verb ="*" type ="System.Web.HttpNotFoundHandler" /> For IIS 7 < add name ="BlockViewHandler" path ="*.aspx" verb ="*" preCondition ="integratedMode" type ="System.Web.HttpNotFoundHandler" /> What these sections do is block all access to any file with the .aspx extension within the Views directory (or subdirectories). Note that access is blocked...


  • VS2008 Web Server Here Shell Extension

    One of the most useful registry hacks I use on a regular basis is one Robert McLaws wrote, the “ASP.NET 2.0 Web Server Here” Shell Extension . This shell extension adds a right click menu on any folder that will start WebDev.WebServer.exe (aka Cassini) pointing to that directory. I recently had to repave my work machine and I couldn’t find the .reg file I created that would recreate this shell extension. When I brought up Robert’s page, I noticed that the settings he has are out of date for Visual Studio 2008. Here is the updated registry settings for VS2008 (note, edit the registry at your own risk and this only has the works on my machine seal of approval ). 32 bit (x86) Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes...


  • Visual Studio Smart Tag Expansion Tip

    I used to find the smart tag really annoying in Visual Studio because it is such a small target to hit with the mouse. Silly me, trying to expand a smart tag with a mouse. When you highlight the tag with your mouse, it tells you that the keyboard combination of ALT + SHIFT + F10 will expand the menu. What it doesn’t tell you is that there’s a two key combination that will also expand it. I learned this one from Karen Liu of the C# IDE team who also happens to have a blog post with a nice collection of other tips and tricks written last year. Just hit the CTRL key plus the period key (CTRL + .) I really like this approach when performing renames within Visual Studio because it’s totally contextual. Rather than starting with a rename refactoring...


Page 1 of 6 (56 items) 1 2 3 4 5 Next > ... Last »
Microsoft Communities