bling.github.io

This blog has relocated to bling.github.io.
Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Thursday, June 23, 2011

Tools I Use To Do What I Do

It’s been a while since I last blogged, but I want to get back into it….I just haven’t thought about what I wanna blog about yet.  I’m thinking of doing some sort of multi-part series on a topic but haven’t decided on what yet.  Nonetheless, just to get the ball rolling again here’s a quick blog post on some of the tools I use to do my every day job that’s in addition to your typical .NET developer tool chain.

General

StrokeIt:  Funny name aside, on any clean install of Windows this is the first thing I install.  I load up IE and I download this, followed by Chrome/Firefox.  It is a mouse gesture program that affects all of Windows.  By holding down the right mouse button, and making gestures you can do common tasks like minimize (drag SW), maximize (drag NE), close (draw a C), and others.  It’s much faster than clicking the minimize/maximize buttons.  For web browsing, creating and close tabs are drag SE and drag NW respectively.  Back is W.  Forward is E.  Working this way is faster than any keyboard shortcut.

Console2:  It’s not a necessity, but it’s nice to be able to use a console with a better looking font.  You can easily customize to run another shell, and in my case I have Powershell as the shell.

VirtuaWin:  Ironically I don’t use any virtual desktops, but this app creates a nice middle click on any window that lets you mark it as ‘always on top’.

Vim:  It was an awful, painful 2 weeks to learn this thing but I’m sure glad I did.

Development/Visual Studio

Resharper:  This one doesn’t need much mentioning as anyone serious about programming in .NET has either heard of it, use it, or use one of its competitors like CodeRush.

AllMargins:  This hidden gem is an awesome extension has brings a bunch of very useful features to the editor.  It brings structural highlighting, highlighting matching words under caret, and RockScroll inspired scroll bar, and it does it all with little to no cost in performance.

Productivity Power Tools:  There’s only 2 that I use here: document tabs, and moving lines.  All the rest are either eye candy, negligible enhancements, or just plain too slow to be any use in large solutions (solution navigator I’m looking at you!!).

XAML Intellisense Presenter:  This is a must-have for anyone who works with XAML in VS regularly.  Resharper 6 may soon make this obsolete, however…

ILSpy/dotPeek:  Decompilers.  ‘nuff said.

Snoop:  Staple tool for WPF developers to inspect the visual/logical tree.  There’s also WPF Inspector which has a much nicer UI, but unfortunately doesn’t perform as fast.

Profiling

ANTS/dotTrace/YourKit/etc:  I’ve used many performance/memory profilers, and those 3 are the ones I like the most.  Unfortunately, they all do things the others don’t, and all these things are very useful, so you still end up needing to use all of them to fix the particular problem you’re working on.

WinDbg: It isn’t every day I use this, but I’m sure glad to know that such a thing exists and the amount of power it gives me.

Scripting

PowerGUI:  Best tool I found for editing PowerShell.  The intellisense is great and has all the things you were expect when debugging through scripts.

Miscellaneous

BareTail:  Amazing program which watches log files in real time and can highlight rows based on a search pattern.

PowerShell/Cygwin/MSYS:  I used to be a Cygwin/MSYS user because back in the day I liked to install a different Linux distribution every week so I learned some basic Bash commands and that carried over to Windows.  Since PowerShell now exists, we have a real shell in Windows, so I’ve switched over to learn it, since as a Windows developer it’s more applicable to the kind of work I do.

 

And there’s more but that’s enough for now!

Thursday, March 10, 2011

That Commenting Thing

I’m working on a project right now that has near 99% of its code commented.  Wow, that’s impressive!  Actually, it’s more scary…even some of the private fields are commented….

At one point, someone decided that it was a good idea to impose some kind of standard rather than none, so they recommended StyleCop with all of its default settings, including requiring comments on everything.

This seemed like a good idea, and it probably was, until someone found GhostDoc.  The plugin definitely gives off that “cool” factor the first time you use it.  Wow, with a single key stroke it automagically documented all of my code!!!  The problem, and it’s a pretty big one, is that it generates documentation based on the name of the properties, names, and class.  Surely if it can do that, you, a much more sophisticated machine, can do that!

Alas, the code base ended up getting GhostDocced to death all over the place to the point where I was driven mad and insane that I spent the time to write a VS2010 extension to purposely hide these comments.  I’m talking about comments like this:

image

The comments add absolutely no value and IMO makes it harder to read, and has the added deficit that if for whatever reason someone changes the name property, chances are they will forget to update the comments.  It gets worse with WCF service contracts with many parameters.

So yes, it frustrated me enough that I took some spare time to write an extension to shrink those damn XML comments to such a small size it doesn’t bother me anymore, like this:

image

You can grab the code off GitHub.

Saturday, November 7, 2009

Fixing ReSharper 5 EAP Missing Colors

I think anyone’s who has used ReSharper for an extended period of time has experienced the colors disappearing all of a sudden from Fonts & Colors.  This is excruciatingly annoying when I have a dark color scheme set up and the colors disappear on me.

In the case of RS5, it seems even more flakey than RS4, and installing/uninstalling other addins have a pretty high probability of losing the colors, and this time, repairing the installation doesn’t fix the problem (nor does the registry restore trick).

For me, to fix the problem I had to:

a) Uninstall RS5.
b) Install RS4.5
c) Open VS!!!  Go into settings, and verify all the colors are in Fonts & Colors.
d) Upgrade to RS5.

If you skip (c), it will not restore colors…at least it didn’t when I tried it.  Following the above fixed it for me in 2 occasions already.  If Jetbrains sees this blog post, PLEASE fix this extremely annoying bug.

Sunday, September 27, 2009

Dark Color Refresh

There you have it!  I started with Visual Studio’s default settings and configured each and every color one by one.  3 hours later I was finished and satisfied with what I have…but I think it was time well spent considering this is what I’m looking at for >= 8 hours a day.

This was a complete re-do of my previous dark theme.  This one is even more colorful than the previous, mainly because Resharper does an amazing job of detecting additional code elements like mutable vs unmutable, or unused code, in additional to many other things.

By the way, you should definitely spend the time to configure your own colors rather than using someone else’s template.  The reason being is that each and every person is different, and obviously will have preferences towards different colors.  I go through different moods and I’ll tweak the theme to be “blue” or “red” for a period of time.

Another reason why you configure it manually is that it drills into your brain more of what each color represents.  If you just used my template you would probably never notice that orange means input parameter, and green is a local variable.

However, one thing you can and should take from this blog post is not to use pure black or pure white as your background (did you notice my current line indicator is darker than my background?).  Set your background to (10,10,10) or (245,245,245).  Your eyes will thank me.