Saturday, May 31, 2008 #

Visual Studio 2008 PowerCommands

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.

posted @ Saturday, May 31, 2008 10:49 PM | Feedback (0)

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

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 :-)

posted @ Saturday, May 31, 2008 1:40 PM | Feedback (0)

Wednesday, May 28, 2008 #

Sysinternals kickin' it old skool!

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!

posted @ Thursday, May 29, 2008 2:41 PM | Feedback (0)

Monday, May 26, 2008 #

The best URL Shortener...is.gd

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.

posted @ Monday, May 26, 2008 12:24 PM | Feedback (0)

Sunday, May 25, 2008 #

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

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.

posted @ Sunday, May 25, 2008 8:01 PM | Feedback (0)

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

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

posted @ Sunday, May 25, 2008 4:46 PM | Feedback (0)

Friday, May 23, 2008 #

Desperately seeking a project to play with...

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

posted @ Friday, May 23, 2008 8:56 AM | Feedback (0)

Tuesday, May 20, 2008 #

My experimental blog...

 

UPDATE: I'm not moving to BlogEngine.net...I've spent a couple of days working through the code and to get the level of performance I want would take a significant amount of rework. The most serious issue is how BlogEngine loads in posts...it loads them all into memory at first page load and holds them there...great if you have 20 or so posts, but I have >800 with hundreds more comments...this is a significant issue IMHO! It's an elegant little engine but it just doesn't scale at a pretty fundamental level.
I'm now a proud member of
Phil's SubText Project, vNext of Subtext addresses a lot of the concerns I had with the current SubText...and frankly I can use my time better helping with that than with BlogEngine.

My poor little server which lives under my desk at home is being put to use once more to host what will eventually replace this blog. It's currently a vanilla install of BlogEngine.net but I plan (and have already begun) to chop stuff around a bit to try out some ideas I'm playing with. One big thing will be to get a redirection engine working on it (most likely based on the WebFormRouting stuff which Phil put together). One of the big challenge is going to be making the changes I want whilst retaining the ability to use the existing Themes and Extensions which play a huge part in making BlogEngine.net so interesting. Anyway, that's the plan...my 'play' site will continue to be experimental until I can get something which   allows current links to continue to work correctly. Priorities are:

  1. Get a decent redirection engine plugged in and working to preserve my existing links
  2. Scratch a few itches I've found in the Blogengine.net code; URL handling is pretty basic, clean up some Singleton handling, get rid of Viewstate, more agressive caching...
  3. Get a design back on track, I've let this slip severely with the current blog site, I have a few ideas I'm playing with and can use it as an opportunity to brush up on my CSS skills...
  4. Play with some more AJAX / Silverlight stuff...basically any client side interaction should never require postback...and this will help me clean up the look of the main page (AJAX Control Toolkit will help a LOT!)
  5. If I get a chance, integrate some additional functionality ideas...

posted @ Thursday, May 22, 2008 9:55 PM | Feedback (0)

Wednesday, May 14, 2008 #

RSS Feed Moved to Feedburner

Ramping this thing up for a big change...working on a translation piece between a (heavily modified) BlogEngine.net and the current platform SubText...new feed is here: Rss. Planning to spend the weekend whipping this thing into shape...

posted @ Wednesday, May 14, 2008 11:27 PM | Feedback (0)

Dumb little recursive, generic FindControl method...

Doing some app building and I needed to use FindControl to manipulate a control in the OnItemCreated event in a Repeater...well, to save a bit of typing I came up with this extension method:

 

namespace Presentation

{

    public static class ControlHelper

    {

        public static T FindControl<T>(this System.Web.UI.Control root, string controlId, bool recursive) where T: System.Web.UI.Control

        {

            if(root.Controls!=null && root.Controls.Count>0 && root.FindControl(controlId) != null)

            {

                return root.FindControl(controlId) as T;

            }

            else if(recursive)

            {

                return FindControl<T>(root, controlId, recursive);

            }

            return null;

        }

    }

}

 

Pretty simple but it lets me do the following :

       var link = e.Row.FindControl<HyperLink>("MenuLink", true);

        if(link!=null) link.NavigateUrl="http://www.mostlylucid.net";

Not a HUGE time-saver but it just makes my code a bit tidier...

posted @ Wednesday, May 14, 2008 4:11 PM | Feedback (0)

Copyright © Scott Galloway

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski