Posts

Showing posts from 2011

RIF Notes #12

"That which can be asserted without evidence, can be dismissed without evidence.” - Christopher Hitchens Free MVC 3 Razor eBook The upper bounds to quality - Alan cooper discusses new thinking about quality 12 Cool HTML5 Geolocation Ideas New Bundling and Minification Support (ASP.NET 4.5 Series) Guide to Freeing up Disk Space under Windows 7 White Paper: Assessing the Windows 8 Development Platform - Magenic addresses some of the swirling information about WinRT Sql Test Unit Test add-in for SMSS ASP.NET 4 ClientIDMode Property Explained - One more feature of ASP.NET 4 for us to consider DOOM in JavaScript and HTML5, Playable in Your Browser - In case you haven't see this already Introducing CSSCop - FxCop for stylesheets Required or Not - An interesting discussion about the definition of requirements Windows 7 - Seamless Apps in Windows Virtual PC (Virtual XP) and Application Compatibility YSlow for Chrome Free intellisense for SSMS "Don’t p

What else went wrong with the distributed cache?

When we last left this story I was contemplating turning on the distributed caching after the Black Friday/Cyber Monday crush had passed.  However, shortly after my last post I had a conversation with Alachisoft that lead us to reconfigure our cache to use NCache’s in-process clientcache feature.  This feature allows for a in-process in-memory copy of the cache to be kept in sync with the out-of-process NCache server.  In theory, it’s the best of both worlds, providing near ASP.NET in-memory cache performance with all the benefits of distributed caching.  It seemed like in the 11th hour we had finally arrived at a working solution.  As it turns out we did, kinda… Blyber Fronday Our web farm, with distributed caching enabled, sailed through the full week beginning Thanksgiving day.  The site scaled and performed extremely well, and there were no incidents of any kind.  We saw between 2-4 times normal load during those days and never skipped a beat.  A vindication of our distributed c

RIF Notes #11

“Self-defense is not about winning fights with aggressive men who probably have less to lose than you do” – Sam Harris Four Destructive Myths Most Companies Still Live By – Some good points by the harvard business review. You only control 1/3 of your Page Load Performance! – dynatrace shows that third party content, even big players like facebook and google can be costing you on page load times. Clean up after Visual Studio - Just in case this is useful Silverlight 6 doesn't matter – Rocky provides some clarity around the fate of silverlight in regard to WinRT. Sharding vs. Having multiple databases - Ayende makes  a nice distinction regarding what sharding is and isn’t. 15 Pragmatic JavaScript Tips for ASP.NET Developers Scalable JavaScript Application Architecture Implementing 5 important principles of REST using WCF Services – Nice introduction to REST for WCF. Make a distinction: Errors vs. Alerts – This one hits close to home.  We have a lot of logging, excep

What went wrong with the distributed cache?

The basic purpose of the distribute cache was to address the following conditions: We moved from one webserver, to two webservers, with the intention of having the flexibility to move to N webservers.  The one webserver is utilizing the ASP.NET Cache (in-memory) for heavily utilized read-only objects (Category, ProductClass, Product).  Moving to two webservers meant a doubling of database queries for cached objects.  Each webserver having its own copy of the ASP.NET cache that it needs to load. The ASP.NET cache competes for memory with the application itself, as well as the outputcache.  An increase in memory pressure caused by any one of them causes cache trimming (items to be evicted from the cache).  This results in more database traffic to re-load the evicted items. Application restarts (application pool recycles, etc.) cause the cache to be flushed and reloaded. The database is the mostly likely bottleneck and is the most difficult to scale.  We can add more webservers, but

RIF Notes #10

“Everyone takes the limits of his own vision for the limits of the world.” —ARTHUR SCHOPENHAUER The pipeline to your corporate soul –  Short little piece with particularly insightful relevance. “The behavior of your software indicates what is really valuable, what is truly important to your company, and there is really no way to hide.” 5 ways to keep your rockstar employees happy – Not that this applies to anyone I work with. Appraisals and Agile Don't Play Nicely Mobile/Html5 Build a Better Mobile Browsing Experience How To: Add Mobile Pages to Your ASP.NET Web Forms / MVC Application Building Apps with HTML5: What You Need to Know Browser and Feature Detection Strongly Typed Data Controls (ASP.NET vNext Series) – Scott Gu talks about a marginally interesting upcoming feature JavaScript Jargon – Terms and jargon used in the javascript world translated for us C# developers. Social Power And The Coming Corporate Revolution – Forbes article about how the power

I’m going to crash Microsoft’s performance database, who’s with me?

Image
On a recent Hanselminutes podcast I heard about PerfWatson .  PerfWatson is a tool that monitors Visual Studio performance and then captures periods of unresponsiveness and sends that data back to Microsoft.  There, they have a huge database that analyzes all of the captured performance data.  Well I’ve been running PerfWatson, and its companion the PerfWatson Monitor for about 2 days, and its constantly in the red. The monitor shows a little graphical response time indicator in the bottom right of the screen, and any action that takes more than 2 seconds shows up in red (and is captured by the tool).  Its red so often on  even the most basic of tasks (right clicking context menus, saving files, etc.) that if its actually capturing all that data they’re gonna need a bigger boat. I’d encourage anybody who finds Visual Studio Performance as painful as I do to install it.  Maybe, if we don’t get blacklisted, or exceed our own bandwidth, we’ll provide enough performance data to inspire

Lazy Cache

One thing I’m finding, and I may have mentioned this before, is that lazy loading and distributed caching don’t play nice.  Over the past few months I’ve been identifying heavily accessed objects in our application that seldom change and introducing caching. Up until recently that caching has been accomplished using the built-in ASP.NET in-memory cache .  In tandem with this caching effort we’ve grown our website from a one node webserver to a N node web farm.  With that comes the need for a distributed cache to keep the various node’s caches in sync. To accomplish distributed caching we’ve been using NCache , which is a great tool, very cool.  However, one of the major differences between in-memory caches and distributed caches, is that in-memory caches are direct memory references to the object, while distributed caches work with serialized copies of the objects.  If you’re not already familiar with the problem you’re probably starting to see why that’s an issue for lazy loading. 

RIF Notes #9

“Inventing is a lot like surfing: you have to anticipate and catch the wave at just the right moment” - Ray Kurzweil Free Tools ScrumWorks – A scrum project management tool InTune - Simplify PC Management Microsoft Deployment Toolkit (MDT) 2010 Update 1 -supports deployment of Windows 7, Office 2010, and Windows Server 2008 R2 in addition to deployment of Windows Vista, Windows Server 2008, Windows Server 2003, and Windows XP Free Stuff – 30 free tools from Telerik Rommana – Application Lifecycle Management tool SlowCheetah - Web.config Transformation Syntax now generalized for any XML configuration file Catel - WPF, Silverlight and Windows Phone 7 MVVM toolkit 51Degrees.mobi – Mobile Device Detection and Redirection Tools Windows Azure App Fabric Access Control Service – This is kind of an interesting service provided by Azure. You can leverage a centralized authentication mechanism in the cloud. Force.com – Salesforce.com’s cloud development platform. Microsof

RIF Notes #8

“When you want to learn how to do something yourself, most people won't understand. They'll assume the only reason we do anything is to get it done, and doing it yourself is not the most efficient way. But that's forgetting about the joy of learning and doing. Yes, it may take longer. Yes, it may be inefficient. Yes, it may even cost you millions of dollars in lost opportunities because your business is growing slower because you're insisting on doing something yourself. But the whole point of doing anything is because it makes you happy! That's it! You might get bigger faster and make millions if you outsourced everything to the experts. But what's the point of getting bigger and making millions? To be happy, right? In the end, it's about what you want to be, not what you want to have.” – Derek Sivers Speed up Visual Studio Builds – Some tips for speeding up visual studio builds for solutions that contains lots of projects.  Interesting suggestion about

RIF Notes #7

Image
"The president of the United States has claimed, on more than one occasion, to be in dialogue with God. If he said that he was talking to God through his hairdryer, this would precipitate a national emergency. I fail to see how the addition of a hairdryer makes the claim more ridiculous or offensive."  - Sam Harris The last minute (a case against brinksmanship) MVVM and jQuery: Designing Maintainable, Fast and Versatile Sites – Looks like an alternate similar implementation to knockout.js. Announcing the Web Standards Update - HTML5 Support for the Visual Studio 2010 Editor – HTML5 Support within Visual Studio Performance is a feature -Good discussion of the importance of site performance. Understanding the N+1 Problem – So it seems one of our major performance issues finally has a name (well it always had a name I just didn’t realize it). This is a post basically explaining the N+1 problem, which should sound familiar. IIS 7 Compression. Good? Bad? How much? – Us

Apple products are for people who like to play it safe

  In the tablet/smartphone space I’ve generally been of the opinion that the number of apps is a bogus metric.  I can’t possibly use more than a handful, and generally the most often used ones, email, calendar, etc. they all have.  But I recently I read the post-counter-post by David and Jason of 37Signals which opened my eyes. The following excerpt sums it all up: Now you could argue that they could do all these things if the platform only had 50,000, 10,000, 5,000 apps. And maybe they could. You could do a lot on your Mac in the 90s, but a shitload of people bought Windows machines instead because there was more software available on Windows. They wanted to know that if they walked into the computer store, just about anything they bought would work on their Windows machine. Rational or not, people buy into safety. That’s why 200,000 apps matter. It’s the safety of knowing whatever app you might eventually want will be available to you, even if you never buy it.  That’s what ma

RIF Notes #6

A little lite on links but I make up for it on quotes on this post, a few inspired during my recent vacation. “When we consider a project, we really study it--not just the surface idea, but everything about it. And when we go into that new project, we believe in it all the way. We have confidence in our ability to do it right. And we work hard to do the best possible job” – Walt Disney “We are not trying to entertain the critics. I'll take my chances with the public” – Walt Disney “On the other hand, when you do your work on someone else's schedule, your productivity plummets, because you are responding to the urgent, not the important, and your rhythm is shot.” – Seth Godin Windows 8 Is Gorgeous, But Is It More Than Just A Shell? – For anyone who hasn’t seen windows 8 yet, this is a nice short demo. Shows Windows 8 sporting a Windows Phone like Metro touch interface, as well as the ability to run on tablets. Demystifying Entity Framework Strategies: Loading Related Data

Lack of communication, back off

Over the past couple of years I’ve acquired a number of different devices, each with its strengths and weaknesses. Each of them had or has a certain gadgety coolness factor, but each is more remarkable for its incompleteness and lack of interoperability with the others, which is how I ended up with a so many of them. Samsung BD-P1500 Blu-Ray I forget which device came first but I’ll start with the Blu-Ray player.  I have the Samsung BD-P1500, which was one of the early models that played DVD, Blu-Ray and also offered Netflix and Pandora.  This was a pretty good start on integration, getting Netflix streaming without needing another device is ideal.  The only real complaint is that it doesn’t allow you to search for movies from the Blu-Ray interface, you have to queue them up using the website. Directv HR24 But what about all my music, videos and pictures on my PC can I access those from by TV?  Not with my Blu-Ray player, but the Directv HR24 HD DVR is capable of streaming music, v

RIF Notes #5

“Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius—and a lot of courage—to move in the opposite direction” - Einstein Knockout.js 1.2.0 released Wanted: Painter Managers – Yet another post that compares development to craftsmanship and helps me justify my lack of aspirations to become a manager. CSS Zen Garden - A demonstration of what can be accomplished visually through CSS -based design. Select any style sheet from the list to load it into this page. The Ultimate List of Freely Available .NET Libraries Working with the Chaos Monkey – This is a great coding horror post about how Netflix has built a fault tolerate architecture by using a Chaos monkey to constantly randomly kill processes.  Real time vs. slow time – and a defense of sane work hours – More about meetings, interruption and working efficiently rather than excessively. Lunch – Joel comes out of retirement to talk about the value of team lunches.  And I cou

NuGet what NuGet and Nu don’t get upset.

I followed the steps from this post: Baby steps to create a NuGet package and created a NuGet package for EasyCache .NET .  I just wanted to see what was involved, and it turned out to be fairly simple.  So now anyone not interested in the project on codeplex can be equally uninterested in the package .

RIF Notes #4

“It is better to be feared than loved, if you cannot be both” – Machiavelli “A well-stated problem is half-solved” – John Dewey jsFiddle - Cool javascript testing tool Modernizr - Modernizr is a small and simple JavaScript library that helps you take advantage of emerging web technologies (CSS3, HTML 5) while still maintaining a fine level of control over older browsers that may not yet support these new technologies. Why We’re Going With HTML(5) Instead Of Silverlight – More on the debate between Silverlight and HTML5.  A year ago I would have said Silverlight, hands down, for LOB development, now its not quite as clear.  At least not if your users need to access your apps from their iPads and Droids. Bootstrapped, Profitable, & Proud: Braintree – Braintree Payment Technologies was the first company I contacted when I first started investigating credit card tokenization a few years back.  Remote Desktop Protocol (RDP) -- Technical Analysis - Matt found this article, for an

Javascript is here, its jQueer, get used to it

I’m way late to the javascript bandwagon.  I’ve long held the opinion that heavy use of client-side javascript in web applications made them messy.  No compiler checking, no type safety, excessively verbose DOM manipulation syntax, fragile browser specific nuances, duplication of logic already written on the server, and so on.  I, for one, always appreciated that ASP.NET server-controls and later ASP.NET Ajax largely hid that from me.  The framework would generate and inject the messy javascript required to make things work.  But the days of the framework being able to do this in a way that supports the rich interactivity that web application development requires, have long since been over.  It’s increasingly apparent to me (maybe I’m the last person to realize this) that getting by with only a sprinkle of javascript, and cursory knowledge of the language and its libraries, is like burying my head in the sand.  Libraries like jQuery have largely solved the DOM manipulation, messine

I am Dungeon Master, your guide in the realm of Dungeons and Dragons

I’m not quite that geeky, although I did just quote the intro to the 80’s cartoon , so maybe I am. A few years ago a book series was recommended to me, described as a grittier more adult version of the Lord of the Rings.  Not typically the kind of thing I’d read, although Excalibur and Conan the Barbarian are among my favorite movies.  All I could think of was all the ‘adults’ fawning over Harry Potter books a few years earlier.  Nevertheless, I read A Game of Thrones and in rapid succession the rest of the A Song of and Fire series.  They may be the best books I’ve ever read.  The story intricate, dark, violent, and unpredictable.  Not like anything else, good guys don’t always win, perception of who the heroes and villains are shifts, seemingly central characters are abruptly dismissed, very sophisticated.  The reason I mention this is that HBO has turned it into a mini-series, which will air pretty soon.  I’m eagerly looking forward too it and hope they do it justice.  After al

Data, there are times that I envy you

Last week I attended a Data warehousing course taught by the Kimball Group .  It was a great course.  Going into it I had only the most superficial of understandings of data warehousing concepts, specifically regarding dimensional modeling, but now feel that I have a pretty workable understanding. I highly recommend the course to anyone interested in the topic, not that Ralph Kimball needs a recommendation from me. In addition to learning about dimensional modeling, I made another tangential observation.  It felt like data warehousing/business intelligence is largely figured out.  In that course we must’ve reviewed dozens of case studies ranging from straightforward to complex across a range of industries, but all the solutions seemed to break down in to a few well established ‘types’ and patterns, patterns that have existed (evolving) for decades.  My observation may be a bit starry-eyed and I’m not at all suggesting that implementing a DW/BI system isn’t complex and challenging. 

Behold, Nappi Sight

When I started the blog I called it “Architecting after the fact”.  It wasn’t a great title but I thought it captured a sentiment.  Whatever business insight, cool tool, new pattern or novel approach came along it would face the reality that it was after the fact.  And being after the fact brings with it a whole slew of considerations beyond whether its “architecturally” good.  But over time I’ve found this topic to be too narrow, and therefore the title a bit restrictive.  Not all my posts are necessarily about wrestling with retrofitting. Although I do a great deal of that.  Nevertheless, having the luxury of almost no readership makes it as good a time as any to change it. I toyed with silly titles like “Bloggie Down Productions”, that while its appealing to my nostalgic view of 80s hip-hop, expresses no particular point of view and provides no insight into the content.  I also considered “Lessen Learned”, which at first I thought to be a somewhat cleverish play on words, belittling

For easy access, baby

I just made my first (perhaps long over due) contribution to open source.  I created a project on Codeplex called EasyCache.NET .  I wasn’t quite sure what I was doing when I created the project, so I can’t be sure I followed the proper open source etiquette, nevertheless its now available.  EasyCache.NET is a project with the rather modest goal of slightly improving the manner in which developers can interact with the ASP.NET Cache object.  It grew out of some similar code I had written to simplify a lot of repetitive boilerplate caching code sprinkled around our codebase.  I realized afterwards that it wouldn’t take much effort to genericize it a bit further for general consumption. The best way to explain what its all about is with the following typical sample, and show how EasyCache simplifies it. public DataTable GetCustomers() { string cacheKey = "CustomersDataTable" ; object cacheItem = Cache[cacheKey] as DataTable; if (cacheItem == null ) { cacheItem = GetCustom

RIF Notes #3

“Unit tests tell you that you built your application right, acceptance testing tells you you built the right application” The 5 types of programmers Logging your application for fun and profit part 1.aspx - The DebugViewer tool I’ve never heard of before. You can't change the game if you don't understand the players – A recent post inspired some interesting responses regarding the dilemma of involving users in application design. It is deeply and importantly true that you should not build what your users ask for (or put another way, you should not ask your users what to build). At Cooper we call that “automating the misery.” If users could lead innovation, they wouldn't be users - Alan Cooper weighs in. 5 Ways That Postsharp Can SOLIDify Your Code: Caching – Interesting application of Aspect Oriented Programming to handle caching. Asynchronous Programming for C# and Visual Basic – A very, very cool library of language extensions that simplify writing asynchrono

RIF Notes #2

“These are the pale deaths that men miscall their lives” Making meetings more expensive...might actually make them cost less VS 2010 SP1 (Beta) and IIS Express Open ID Is A Nightmare - Rob Conery offers a counter point to recent post by Jeff Atwood. Effective Clustered Indexes – Nice overview of how indexes work. Origins of 10X – How Valid is the Underlying Research? – Steve McConnell about 10x 10x Productivity Myths: Where’s the 10x Difference in Compensation? HTML5 "standards" – Rocky expresses reservations about the promise of HTML5 Shifting testing strategies away from mocks – This post is a little tough to follow but sounds like he’s wrestling with mocking that parallel my own reservations.  Other than the performance benefit, I could never quite get my head around the advantage of testing that methods get called as opposed to testing they actually work. “This cuts down on mock setups that don’t actually match what can happen in production – if you use the

The collected works of others

This is an assortment of links to articles and posts that I found interesting at one point or another. I’ve collected these over the past couple of years in various places for various reasons.  Now they’re all in one place in no particular order so you’ll have to just read them all.  Enjoy. “Anxiety is nothing but repeatedly re-experiencing failure in advance” – Seth Godin Scaling Up vs. Scaling Out: Hidden Costs Software Engineering:An Idea Whose Time Has Come and Gone? –Tony DeMarco’s about-face regarding tightly controlling software engineering projects My version of Agile – Alan Cooper OS Evolution – Rocky Lhotka Teach for America founder on the pointlessness of planning, the importance of saying no, etc Booting from a VHD Promiscuous title #1: Vice president Beware managers with free time What does it cost to become PCI Compliant? The Duct Tape Programmer – Joel Spolsky Using the New Microsoft Ajax Minifier Figuring out what your company is all about – Jo

Poor man’s Entity Framework profiler

We recently added the ability to trace the Sql statements being executed by an EF query.   This is a companion to the code that was added long ago to the Enterprise Library to do the same thing.  In the case of the Enterprise Library we customized the library itself to trace the Sql before being executed.  This has been useful numerous times for troubleshooting performance issues.  In those cases its been very handy be able to see all the Sql being executed, to know which queries are taking the longest and/or called the most in a given context.  However, our move to EF had left gaps in this tracing, reducing our visibility into what was was being called and how often.  EF, because it generates its Sql, also reduced our visibility into the Sql itself.  While troubleshooting performance problems in our poor performing “Customer View” page we had need to add EF tracing in order to get the full performance picture. In our case we are essentially only using two methods that cause EF queri

RIF Notes #1

"If it is fast and ugly, they will use it and curse you; if it is slow, they will not use it." - David Cheriton in _The Art of Computer Systems Performance Analysis “The basic advice regarding response times has been about the same for thirty years [Miller 1968; Card et al. 1991]: •0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result. •1.0 second is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data. •10 seconds is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback i