Latest Microsoft Blogs

Browse by Tags

Related Posts

  • Hanselminutes Podcast 116 - Distributed Caching with Microsoft's Velocity

    My one-hundred-and-sixteenth podcast is up . One of the big announcements coming out of TechEd this week was Microsoft' "Velocity" product, a distributed in-memory cache. I sit down with two of the architects of the project and try to get the real story. Check out Dare's excellent analysis of Velocity as well as the MSDN Page for Velocity where you can download the CTP1 and try it on your sites today. Also check out memcached ( Win32 port ) and the unofficial memcached .net library as well as the ASP.NET providers for memcached as well as the providers on CodePlex . Hopefully we'll see some detailed benchmarks soon comparing Velocity and memcached. I'll also personally be looking at the Velocity APIs giving my feedback...


  • A Smarter (or Pure Evil) ToString with Extension Methods

    Three years ago I postulated about a ToString implementation for C# that seemed useful to me and a few days later I threw it out on the blog . We used in at my old company for a number of things. Just now I realized that it'd be even more useful (or more evil) with Extension Methods , so I opened up the old project, threw in some MbUnit tests and changed my implementation to use extension methods. So, like bad take-out food, here it is again, updated as ToString() overloads: [Test] public void MakeSimplePersonFormattedStringWithDoubleFormatted() { Person p = new Person(); string foo = p.ToString("{Money:C} {LastName}, {ScottName} {BirthDate}"); Assert.AreEqual("$3.43 Hanselman, {ScottName} 1/22/1974 12:00:00 AM", foo...


  • Hack: Parallel MSBuilds from within the Visual Studio IDE

    There were a number of interesting comments from my post on Faster Builds with MSBuild using Parallel Builds and Multicore CPUs . Here's a few good ones, and some answers. First, Is the developer that sits inside of VS all day debugging able to take advantage of the same build performance improvements? Yes, I think. This post is about my own hack to make it work. @Scott, there are still people using VS2005 and .Net 2.0 (our employers are either too cheap to upgrade or we work in non-profit[my case]) So it would be nice for posts like this to clearly denote that these are things only available in the 3.0/3.5+ world. Or should I just assume that .Net 2.0 is dead? Certainly 2.0 is not dead, considering that 3.5 is still built on the the 2.0...


  • Faster Builds with MSBuild using Parallel Builds and Multicore CPUs

    Jeff asked the question " Should All Developers Have Manycore CPUs? " this week. There are number of things in his post I disagree with. First, " dual-core CPUs protect you from badly written software " is just a specious statement as it's the OS's job to protect you, it shouldn't matter how many cores there are. Second, " In my opinion, quad-core CPUs are still a waste of electricity unless you're putting them in a server" is also silly. Considering that modern CPUs slow down when not being used, and use minimal electricity when compared to your desk lamp and monitors, I can't see not buying the best (and most) processors) that I can afford. The same goes with memory. Buy as much as you can...


  • ALT.NET Geek Code: Should you care about these ALT.NET guys?

    I was at the ALT.NET Open Spaces Conference in Seattle last week. I LOVE Open Spaces conferences, my first was Foo Camp , and I've been to two ALT.NET Conferences. When Open Spaces is done right, it's a brilliant self-organizing thing of beauty. If you want to hire an Open Spaces Facilitator for your own conference, you might consider Steven "Doc" List . He did a fantastic job keeping us on track and keeping the energy level both high and positive. These are the four Open Spaces principles: Whoever comes are the right people Whatever happens is the only thing that could have Whenever it starts is the right time When it's over, it's over if it sounds a little meta-physical, it is, but it works. Anyone can convene a space...


  • The Weekly Source Code 24 - Extensibility Edition - PlugIns, Providers, Attributes, AddIns and Modules in .NET

    I've been getting more and more interested in how folks extend their applications using plugins and things. In my new ongoing quest to read source code to be a better developer , Dear Reader, I present to you twenty-fourth in a infinite number of posts of " The Weekly Source Code ." There's a lot of ways to "extend" an application or framework. Probably dozens of patterns. You can learn about the Gang of Four Patterns using C# over here . I was looking and three chunks of code this week that extend things or are extensible. The first was xUnit.NET , the new Unit Testing Framework on the block (until I finally go File|New Project and bang out "HanselTest2000" ;) ) and the second was some source that Miguel...


  • The Weekly Source Code 22 - C# and VB .NET Libraries to Digg, Flickr, Facebook, YouTube, Twitter, Live Services, Google and other Web 2.0 APIs

    Someone emailed me recently saying that they couldn’t find enough examples in .NET for talking to the recent proliferation of “Web 2.0 APIs” so I thought I’d put together a list and look at some source. I think that a nice API wrapper is usually a useful thing, but since these APIs are so transparent and basic, there's not really a huge need given LINQ to XML but I understand the knee-jerk reaction to hunt for a wrapper when faced with the word "API." One thing to point out is that 99.9% of these APIs are calling HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri); under the covers the doing something with the resulting string. Some hide the URL creation, some use XmlDocuments, others use XmlSerialization. When you...


  • The Weekly Source Code 21 - ASP.NET MVC Preview 2 Source Code

    And so, Dear Reader, I present to you twenty-first in a infinite number of posts of " The Weekly Source Code ." I'm doubling up this week, but the ASP.NET MVC Source was released today and I wanted to share more thoughts. I would also encourage you to check out TWSC 17 on Community ASP.NET MVC code . Read the Comments When you're reading source, look for words like "TODO," "HACK," "REVIEW," etc, to find parts of the code that the writers are concerned about. In the SelectBuilder.cs, there's a comment that says: // TODO: Should these be HTML encoded or HTML attribute encoded? Need to review all helper methods that call this. string thisText = HttpUtility.HtmlEncode(listData[key].ToString());...


  • ASP.NET MVC Source Code Available

    My boss's boss has blogged about what's been going on this week : The ASP.NET MVC Source is up on CodePlex at http://www.codeplex.com/aspnet . You can download, read and compile it now. The goal is to start releasing drops really often. If you're into it, then watch the source code tab , if not, that's cool too, you can wait until it releases later. You can enter bugs in the issue tracker or complain in the forums and watch the roadmap as it evolves . You can see how to compile it (unzip and build) as well. Related Links MVCContrib : A Codeplex project to add functionality to ASP.NET MVC. This project is run by others in the community, and not the ASP.NET team. ASP.NET MVC Framework Road-Map Update Thoughts on ASP.NET MVC Preview...


  • I'm Just a Caveman - The Hanselman Corollary to the Clarke/Wheeler Laws

    Any problem in computer science can be solved with one additional layer of indirection. - David Wheeler Any sufficiently advanced technology is indistinguishable from magic. - Arthur C. Clarke. These are two classic truisms. Recently while staring at some code trying to figure out what the heck was going on, I realized the obvious. One additional layer of indirection is indistinguishable from magic. - Scott Hanselman, this morning in a rare moment of clarity while hopped up on Diet Coke. In recent talk at Mix on ASP.NET MVC (there's video there also ) I mentioned that a certain line of code was magic : public void Update(int id) { try { viewData.Product = db.Products.Single(p => p.ProductID == id); //MAGIC STARTS HERE Binding.UpdateFrom...


Page 1 of 5 (50 items) 1 2 3 4 5 Next >
Microsoft Communities