mostlylucid

Yes, yes I know! Jul 03

Blog, I have not abandoned you! I'm in a 'quiet' phase right now...be back soon (when work settles down a bit).

Ok, time to get serious... Jun 06

This site is increasing in subscriber numbers (literally doubled in a single day on the feedburner feed...not sure why!).I've also finally gotten my act together and got my old domain pointing back here again (only took me umm...a year). I guess it's time I got more serious abut this site again.
I've held off posting any more articles for a long time (read the blog, I suffer from a chronic lack of self confidence) but I guess it's time to get back on the bike. What I do want to post about is the more basic stuff, especially around how to best design and build an ASP.NET site. Oh, and I just realized...for those who don't know who the hell I am, I'm a Program Manager on the ASP.NET team at Microsoft...one of my responsibilities for vNext of ASP.NET is to 'own' (MS term...basically means 'be responsible')  the ASP.NET Page Framework. I was an ASP.NET developer for a long time before this and I'm passionate about our technology.
I think a theme of my posts / articles will increasingly be wading through all the new stuff we're coming out with all the time...I want to focus on the practical side of building software, e.g. LINQ is fantastic...but how does it fit into a security model / n-tier architecture, should you abandon Web Forms (a.k.a., the classic ASP.NET pages) and use MVC instead (for some things frankly, yes...), where does Dynamic Data fit in. I'm not an evangelist and I recognize that some platforms are just better than ours right now for a lot of applications.

So, a question...what would you like to see me write about...what don't you know that you wish you did, what do other people write about that you just don't grok (I still remember a long night just not getting the ASP.NET page lifecycle for example). Tell me, if I don't know I work in the right place to find out the answers to the questions!

Anniversaries make me sad...to the last best chance Jun 04

It's been ten years K...I know you still read this blog on occasion. This is for you...my last best chance...

Visual Studio 2008 PowerCommands May 31

I keep losing these, the Visual Studio 2008 PowerCommands, these are one of my essential installs for VS 2008, from the site:

Below is a list of the included in PowerCommands for Visual Studio 2008 version 1.1. Refer to the Readme document for additional command details and screenshots.
Enable/Disable PowerCommands in Options dialog
This feature allows you to select which commands to enable in the Visual Studio IDE. Point to the Tools menu, then click Options. Expand the PowerCommands options, then click Commands. Check the commands you would like to enable.
Note: All power commands are initially defaulted Enabled.
Format document on save / Remove and Sort Usings on save
The Format document on save option formats the tabs, spaces, and so on of the document being saved. It is equivalent to pointing to the Edit menu, clicking Advanced, and then clicking Format Document. The Remove and sort usings option removes unused using statements and sorts the remaining using statements in the document being saved.
Note: The Remove and sort usings option is only available for C# documents.
Note: Format document on save and Remove and sort usings both are initially defaulted OFF.
Clear All Panes
This command clears all output panes. It can be executed from the button on the toolbar of the Output window.
Copy Path
This command copies the full path of the currently selected item to the clipboard. It can be executed by right-clicking one of these nodes in the Solution Explorer:
The solution node; A project node; Any project item node; Any folder.
Email CodeSnippet
To email the lines of text you select in the code editor, right-click anywhere in the editor and then click Email CodeSnippet.
Insert Guid Attribute
This command adds a Guid attribute to a selected class. From the code editor, right-click anywhere within the class definition, then click Insert Guid Attribute.
Show All Files
This command shows the hidden files in all projects displayed in the Solution Explorer when the solution node is selected. It enhances the Show All Files button, which normally shows only the hidden files in the selected project node.
Undo Close
This command reopens a closed document , returning the cursor to its last position. To reopen the most recently closed document, point to the Edit menu, then click Undo Close. Alternately, you can use the CtrlShiftZ shortcut.
To reopen any other recently closed document, point to the View menu, click Other Windows, and then click Undo Close Window. The Undo Close window appears, typically next to the Output window. Double-click any document in the list to reopen it.
Collapse Projects
This command collapses a project or projects in the Solution Explorer starting from the root selected node. Collapsing a project can increase the readability of the solution. This command can be executed from three different places: solution, solution folders and project nodes respectively.
Copy Class
This command copies a selected class entire content to the clipboard, renaming the class. This command is normally followed by a Paste Class command, which renames the class to avoid a compilation error. It can be executed from a single project item or a project item with dependent sub items.
Paste Class
This command pastes a class entire content from the clipboard, renaming the class to avoid a compilation error. This command is normally preceded by a Copy Class command. It can be executed from a project or folder node.
Copy References
This command copies a reference or set of references to the clipboard. It can be executed from the references node, a single reference node or set of reference nodes.
Paste References
This command pastes a reference or set of references from the clipboard. It can be executed from different places depending on the type of project. For CSharp projects it can be executed from the references node. For Visual Basic and Website projects it can be executed from the project node.
Copy As Project Reference
This command copies a project as a project reference to the clipboard. It can be executed from a project node.
Edit Project File
This command opens the MSBuild project file for a selected project inside Visual Studio. It combines the existing Unload Project and Edit Project commands.
Open Containing Folder
This command opens a Windows Explorer window pointing to the physical path of a selected item. It can be executed from a project item node
Open Command Prompt
This command opens a Visual Studio command prompt pointing to the physical path of a selected item. It can be executed from four different places: solution, project, folder and project item nodes respectively.
Unload Projects
This command unloads all projects in a solution. This can be useful in MSBuild scenarios when multiple projects are being edited. This command can be executed from the solution node.
Reload Projects
This command reloads all unloaded projects in a solution. It can be executed from the solution node.
Remove and Sort Usings
This command removes and sort using statements for all classes given a project. It is useful, for example, in removing or organizing the using statements generated by a wizard. This command can be executed from a solution node or a single project node.
Extract Constant
This command creates a constant definition statement for a selected text. Extracting a constant effectively names a literal value, which can improve readability. This command can be executed from the code editor by right-clicking selected text.
Clear Recent File List
This command clears the Visual Studio recent file list. The Clear Recent File List command brings up a Clear File dialog which allows any or all recent files to be selected.
Clear Recent Project List
This command clears the Visual Studio recent project list. The Clear Recent Project List command brings up a Clear File dialog which allows any or all recent projects to be selected.
Transform Templates
This command executes a custom tool with associated text templates items. It can be executed from a DSL project node or a DSL folder node.
Close All
This command closes all documents. It can be executed from a document tab.

Scott Galloway: 70+ large(ish) projects, 4 application frameworks (in 3 languages) May 31

I was reading Hanselman's latest post about (paraphrashing) defining the level of 'expertise'. This got me to thinking, I've been a 'professional' developer since ~1997, and for most of the time I've worked in web agencies...this seems pretty unusual. Web Agencies are essentially companies which build bespoke websites for customers, over varying levels of complexity. What I got used to over the years was a process which became known as 'agile', these projects had VERY quick turnarounds (around 3 months max from starting the design to deploying the site), usually only involved a couple of devs + designers and were very competitive in nature little vendor lock-in, much of the business was based on the quality of the previous site...) .
When I left full time development 3 or so years ago I was at an extremely high level of expertise with ASP.NET ;this was actually part of the reason I left...I'd really stopped learning and was getting a bit bored. The reason I bring this up is that this is an issue with many of the 'experts' out there...unless you have your head deep into the types of problems customers face every day then your skills quickly start to erode, you lose touch with what's actually going on in the development world. I also (tangentially) wrote about this in an earlier post, in essence what seems most important at any particular time is the 'new and shiny', development is as much a victim of the whims of fashion as anything else. I've been following Karl Seguin's 'Foundations of Programing' post series over the past few weeks and it's one of the best treatments of this subject that I've seen recently, it gets to the real meat of good practice.
Anyway, back to the point of the post...what's an expert...one definition is simple:

'a person with special knowledge or ability who performs skillfully'

Therein lies a problem, when I was a full time developer, I collected 'tips', I never found one source who was an expert in exactly the type of stuff I worked on every day (integrating graphic design, working with customers, adapting to change, cranking out error free, high performance code, designing and building DBs, deploying and maintaining sites etc...). I never put much faith in the whole 'letters after the name thing' (if you're interested, I'm 'BSc (Hons), DClinPsych, MSC', nice letters but of no relevance to my current job, they're clinical psychology qualifications).
Here's a scoop, even MS people aren't 'experts' in the stuff 'regular' developers work on every day, most of us don't write the type of apps that you do any more (most haven't for years). My only advice is to treat everything you read for self-professed 'experts' with a grain of salt, if you're just starting out in the development world you'll be looking for guidance on how to be a developer...but don't blindly follow what you read in the 'big new book' or from some populist blogger, collect and process information into a framework that helps you do your job better. There's only one expert of any real relevance to your particular context..it's you.

To quote a great song by Orbital (and a mediocre TV Show):

"You, are becoming Gods. There's a new master of creation, and it's you! Unraveled DNA, and at the same time you're cultivating bacteria strong enough to kill every living thing! Do you think you are ready for that much power? You lot? You lot? Cheeky bastards. You're running around science like kids with guns, creating a new world, while the world you've got is stinking, but, hands up, hands up anyone who thinks you've got it right. Yeah, there's always one. I can see you. If you want the position of God then take the responsibility. "

You are creating novel works in the code you write, ultimately you are responsible for what you create! Mind you take this advice with a pinch of salt, I'm no expert in this :-)

Sysinternals kickin' it old skool! May 28

I am so tragically unhip...I know! Anyway I thought this was remarkably useful, a simple way to download the Sysinternals tools without having to trudge through a webpage...a retweet from Jon (no relation) GallowayZoomit is worth the price of admission alone for presenters!

UPDATE: What I didn't know is that in Win2008 / Vista you can do this:

\\live.sysinternals.com\tools\procexp.exe and run the tool directly from the web...now that's useful!

The best URL Shortener...is.gd May 26

Another in an endless series of posts; as I'm reengaging with the developer world I'm starting to find more and more great software.
I've been Twittering a fair bit (both in the literal and figurative senses, you can follow me here) and needed to find a good URL shortening service (as Twitter posts are limited to 140 characters) and have been using the Twhirl client to do this. Twhirl includes some URL Shortening functionality within the client and by virtue of being the shortest and fastest to respond my favorite is is.gd.

Better than Darkroom...Q10 battle of the minimalist text editors May 25

There's been a bit of a meme flying around over the past little while about minimalist text editors, starting with the Mac app Writeroom. The concept of these applications is that when you're writing you need as little distraction as possible...I've totally hooked into this concept as I find myself spending more time fighting with Word than actually writing anything (paragraph formatting, fonts, text colors, margins...all distractions). The most popular of this genere of programs for PC is Darkroom, written in .NET 2.0 and well, it does the job. Personally I found it a bit slow and it just felt klunky to me...so I've been on a hunt for an alternative. For a while the most promising challenger was jDarkroom which, as the name suggests, is a port of Darkroom in Java...it's pretty nice...but it requires an install of Java and for me it occasionally 'forgets' settings.

Anyway, long story short I came across Q10, no idea what technology it uses, but it's fast, low footprint and works flawlessly (it also has a spellchecker version and the  option of a small infobar at the bottom of the screen). It's perfect...and is now my editor of choice.

Random .NET Links...result of a wasted weekend. May 25

Below is the result of a wasted Saturday night, I'll clean this up later but right now it's just the export of the favorites from IE and not much else. This is a very random list right now, but there's some real gems in there!

.NET slave - A state aware generic list
.NET slave - The method you didn’t know you needed
Alvin Ashcraft's Morning Dew - Part 13
amazon.com CSS Mastery Advanced Web Standards Solutions Andy Budd, Simon Collison, Cameron Moll Books
Amazon.com Enterprise Service Bus David Chappell Books
Amazon.com Head First HTML with CSS & XHTML Eric Freeman, Elisabeth Freeman Books
Amazon.com Professional Team Foundation Server Jean-Luc David, Mickey Gousset, Erik Gunvaldson Books
Anonymous Delegate ThreadPool calls
Best VS Fonts - Colors EVER
BOOK ASP.NET Data Presentation Controls
Boost ASP.NET performance with deferred content loading Encosia
Building an N-Layer ASP.NET Application with LINQ, Lambdas and Stored Procedures (Updated) - Dan Wahlin's WebLog
C# singleton snippet
Capturing the Screen Contents in .NET 2.0 BlackWasp Software Development
codeproject 10 ASP.NET Performance and Scalability Secrets. Free source code and programming help
codeproject Simple way to pack your .NET code into single executable. Free source code and programming help
Coding time Subversion visually explained in 30 sec
Cognitive Coding Hidden Gem Singleton Factory in C#
Daniel Cazzulino's Blog Linq to Mock MoQ is born
Day-to-day with Subversion - Fear and Loathing
Digging into the Linq "let" keyword
dotnetopenid - Google Code
Download details C# Code Samples for the Live Search API
Download details Windows Live ID Web Authentication SDK
Generics and the Session State
HOW TO EXPOSE YOUR COLLECTIONS SAFELY Dev102.com
How to get detailed info about all online visitors that are currently browsing your ASP.NET website
i like ellipses…
iridescence.no A Set of Useful Extension Methods for DateTime
It's common sense, stupid Programming Is All About Passion
Jesse Liberty - Silverlight Geek
Lazy instantiation one-liner of instance fields with the coalesce operator realfiction
Linq Expressions - Access private fields « Roger Alsing Weblog
LINQ query operators lose that foreach already! - GrabBagT
LINQ to JSON beta - James Newton-King
Michael C. Kennedy's Weblog - Email Something Huge Introducing the Big Mailer Utility
Michael C. Kennedy's Weblog - Top 5 Favorite CodePlex Projects
Mole v4.2 For Visual Studio « Karl On WPF - .Net
More (Really) Stunning Desktop Wallpapers Graphics Smashing Magazine
Ozzie Rules Blogging Better Project Management with Team Foundation Server
peterkellner.net » Multi Level ASP.NET Menu with CSS Friendly Control AdaptersBuilding the New Code Camp Web Site (Part II)
Rachel Appel Blog - Book Review ASP.NET Ajax in Action [5 Stars]
Sam Gentile's Inessential List of Tools - Sam Gentile
Script# Events-Delegates in an Atlas-MS Ajax style script
Shout!
sourceforge.net The Regulator
Super4Utils - Home
Taming Trees Building Branching Structures
The importance of learning Expression Blend « Josh Smith on WPF
The Linq SelectMany Operator
Timeline .NET - Rob Chartier ~ Contemplation...
TRULY Understanding ViewState - Infinities Loop
Tutorial Encoding screen recordings for Silverlight in VC-1 with Expression Encoder 2 Ben Waggoner Channel 10
Using NHibernate (years after I should have been)
Visual Studio 2008 New Multi-Threaded Debugging Feature
VON# - Most Useful VS Feature No One Knows About
WebSlices can help popularize feed syndication « Jon Udell
Why do SOA projects succeed Why do some fail
WPZOOM ›› 32 Unique RSS Icons usage

Desperately seeking a project to play with... May 23

As I posted previously, I've decided to abandon my plans to port to BlogEngine.net; mainly due to some scalability issues with the platform.

As a result I'm trying to work out a project I can build to achieve three things; get more familiar with all of my team's new technologies, get into the mindset of developers again and well, to have fun! Here's my requirements;

  • CSS based page design (I'll explain why at a later date)
  • NOT a Twitter clone or blog (way too many people already doing these!)
  • Uses lots of AJAX functionality

My current thinking is a CMS system ala Grafitti, I've written one of these before and learned a few lessons about how to do it right (that site for example dynamically builds it's admin layer based on the type of content it's pages contain). What do you think? Oh, and I will host this on Codeplex, it will be totally open source etc...once I get it past a critical mass. What this won't be is a masterclass, I was a very strong ASP.NET 1.1 dev but I've been out of the full time developer game for about 3 years so I need to catch up (guess I'm in the right team to do it!)

Oh, and came across this:

Locations of visitors to this page