Visual Studio Hacks
Jim Holmes writes "Microsoft's Visual Studio is an elephant of an IDE. It's got tremendous power and adaptability, but it's difficult to dig through all the less-than-helpful documentation. It's also very tough to figure out which of the many available add-on tools are worthwhile to add. Visual Studio Hacks by James Avery is a terrific reference for helping get the most out of Visual Studio." Read on for the rest of Holmes' review.
Visual Studio Hacks
author
James Avery
pages
512
publisher
O'Reilly
rating
Outstanding
reviewer
Jim Holmes
ISBN
0596008473
summary
Get the most out of Microsoft's Visual Studio
Disclaimer: James is a friend who's helped me with starting a developers group, and I'm also working on an open source project with him. The possibility exists that I may work on a paying project with him at some time in the future; however, I haven't had any financial dealings with him so far. (Other than I still owe him a beer for coming to speak at one of our group's meetings.) For what it's worth, I spent my own money to buy this book from Amazon. End Disclaimer.
Avery's book is great both for new users of Visual Studio as well as the more experienced developer. Also, readers won't have to worry about buying a book which will be outdated when Microsoft releases its next version of Visual Studio in November. Tips and tricks are included for Visual Studio versions 2002, 2003, and 2005.
VS Hacks spreads 100 "hacks" across 13 sensibly delineated chapters. Each hack is clearly marked with its number in a blue box at the upper, outer corner of each page. Hacks are also marked with a thermometer icon representing the hack's relative complexity. One of my few complaints about the book is that the moderate and expert icons look too similar - but frankly I ignore these icons anyway, so the criticism's most likely wasted.
The introductory chapters on projects and solutions, navigation, and editor usage aren't introductory in skill level. Avery covers these topics in great depth, diving down to some useful, but less-than-obvious settings in VS's environment. Examples of this would include Hack #2: Master Assembly and Project References, where Avery shows how to add additional assemblies to the Add Reference dialog's list of .NET assemblies. This is a timesaver if you've got custom libraries you make frequent use of; adding the assemblies to the default list saves having to use the Browse button to search for the files every time you need to add them.
Some of the most uninteresting drudgework in development involves writing code for basic software elements such as business entities or data access layers. It's repetitive, it's template-like material, and it's boring. Documenting such work is every bit as tedious.
Hack #50 covers using CodeSmith to generate code via templates. Other hacks detail tying UML into the development process. Hack #81 covers using Visio for Enterprise Architects to generate code from UML diagrams. Hack #82 covers the opposite of that process: generating class diagrams via Visio's reverse engineering support. (UML's capable of much, much more than the simple drudgework of business entities or data access layers, and these hacks shouldn't be confused with anything more than a cursory introduction of how to tie UML via Visio into Visual Studio.)
One of the most useful sections is Chapter 5: "Debugging." This chapter focuses on getting the most out of Visual Studio's debugger capabilities. These hacks are critical helpers to good developers effectively use Visual Studio's debugger.
Avery covers the basics of setting up breakpoints, diving down to various options such as setting how often to break on specific break points, or setting conditional break points. He then moves on to troubleshooting breakpoints in Hack #37, and there's also great coverage on using Visual Studio to debug scripting code inside a browser session, working with SQL server, and attaching to a running process or one that's just about to crash.
I found the best content of this book in hacks focusing on making the most of tools both inside and out of Visual Studio. Hack #79 is a great section detailing how to stress test web applications using Visual Studio Enterprise Architect's Application Center Test. This hack makes it easy for readers to understand how to get detailed stress testing on a web application. Along this same line, Hack #80 shows how to make use of the Dotfuscator tool to obfuscate .NET assemblies to protect them from modest efforts at reverse engineering. (Like Java, .NET assemblies can be disassembled, revealing all your hard work and intellectual property.)
Other gems in this same arena include tools for running and debugging unit tests inside Visual Studio (#93), testing regular expressions (#100), and using tools which automatically generate documentation based on naming conventions in the source code (#69).
The mechanics of this book are great. The Table of Contents breaks down each chapter by its individual hacks, and the index is very detailed and clear. I also like how hacks are listed on the top of each page, making it quick to find something if you know the hack's number or name and don't want to fuss with the table of contents.
My sole complaint about the book (aside from the annoying thermometer icons I've already mentioned) is that it's not always clear which add on tools work with which version of Visual Studio.
The author maintains a website specifically for this book, complete with code and tool downloads. RSS feeds are also available to monitor any updates the author makes.
This book is a critical addition to the bookshelf for any developer who spends any amount of time working in Visual Studio. You'll become much more productive by using tips in the book, and you'll find tips to help you decide which add-on tools you'll want to make use of. More importantly, you'll understand how to get the most out of Visual Studio's capabilities.
You can purchase Visual Studio Hacks from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Disclaimer: James is a friend who's helped me with starting a developers group, and I'm also working on an open source project with him. The possibility exists that I may work on a paying project with him at some time in the future; however, I haven't had any financial dealings with him so far. (Other than I still owe him a beer for coming to speak at one of our group's meetings.) For what it's worth, I spent my own money to buy this book from Amazon. End Disclaimer.
Avery's book is great both for new users of Visual Studio as well as the more experienced developer. Also, readers won't have to worry about buying a book which will be outdated when Microsoft releases its next version of Visual Studio in November. Tips and tricks are included for Visual Studio versions 2002, 2003, and 2005.
VS Hacks spreads 100 "hacks" across 13 sensibly delineated chapters. Each hack is clearly marked with its number in a blue box at the upper, outer corner of each page. Hacks are also marked with a thermometer icon representing the hack's relative complexity. One of my few complaints about the book is that the moderate and expert icons look too similar - but frankly I ignore these icons anyway, so the criticism's most likely wasted.
The introductory chapters on projects and solutions, navigation, and editor usage aren't introductory in skill level. Avery covers these topics in great depth, diving down to some useful, but less-than-obvious settings in VS's environment. Examples of this would include Hack #2: Master Assembly and Project References, where Avery shows how to add additional assemblies to the Add Reference dialog's list of .NET assemblies. This is a timesaver if you've got custom libraries you make frequent use of; adding the assemblies to the default list saves having to use the Browse button to search for the files every time you need to add them.
Some of the most uninteresting drudgework in development involves writing code for basic software elements such as business entities or data access layers. It's repetitive, it's template-like material, and it's boring. Documenting such work is every bit as tedious.
Hack #50 covers using CodeSmith to generate code via templates. Other hacks detail tying UML into the development process. Hack #81 covers using Visio for Enterprise Architects to generate code from UML diagrams. Hack #82 covers the opposite of that process: generating class diagrams via Visio's reverse engineering support. (UML's capable of much, much more than the simple drudgework of business entities or data access layers, and these hacks shouldn't be confused with anything more than a cursory introduction of how to tie UML via Visio into Visual Studio.)
One of the most useful sections is Chapter 5: "Debugging." This chapter focuses on getting the most out of Visual Studio's debugger capabilities. These hacks are critical helpers to good developers effectively use Visual Studio's debugger.
Avery covers the basics of setting up breakpoints, diving down to various options such as setting how often to break on specific break points, or setting conditional break points. He then moves on to troubleshooting breakpoints in Hack #37, and there's also great coverage on using Visual Studio to debug scripting code inside a browser session, working with SQL server, and attaching to a running process or one that's just about to crash.
I found the best content of this book in hacks focusing on making the most of tools both inside and out of Visual Studio. Hack #79 is a great section detailing how to stress test web applications using Visual Studio Enterprise Architect's Application Center Test. This hack makes it easy for readers to understand how to get detailed stress testing on a web application. Along this same line, Hack #80 shows how to make use of the Dotfuscator tool to obfuscate .NET assemblies to protect them from modest efforts at reverse engineering. (Like Java, .NET assemblies can be disassembled, revealing all your hard work and intellectual property.)
Other gems in this same arena include tools for running and debugging unit tests inside Visual Studio (#93), testing regular expressions (#100), and using tools which automatically generate documentation based on naming conventions in the source code (#69).
The mechanics of this book are great. The Table of Contents breaks down each chapter by its individual hacks, and the index is very detailed and clear. I also like how hacks are listed on the top of each page, making it quick to find something if you know the hack's number or name and don't want to fuss with the table of contents.
My sole complaint about the book (aside from the annoying thermometer icons I've already mentioned) is that it's not always clear which add on tools work with which version of Visual Studio.
The author maintains a website specifically for this book, complete with code and tool downloads. RSS feeds are also available to monitor any updates the author makes.
This book is a critical addition to the bookshelf for any developer who spends any amount of time working in Visual Studio. You'll become much more productive by using tips in the book, and you'll find tips to help you decide which add-on tools you'll want to make use of. More importantly, you'll understand how to get the most out of Visual Studio's capabilities.
You can purchase Visual Studio Hacks from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
although it does mention most of these hacks won't work when the new Visual Studio comes out.
But informative none the less.
-- Tigger warning: This post may contain tiggers! --
MS Visual Studio is Microsoft's ultimate killer app. It's just the single best tool for software development. I use it even when developing for Linux.
Until Linux gets an IDE at least 75% as good as MSDev, top-notch large scale applications for Linux will remain few and far between.
I found Source Insight. Beats anything I've tried including slickedit, multiedit, and understand for c++. And don't judge the editor by website screenshots alone, it looks like the color scheme and font styles were put together by a disgruntled employee.
The ONLY gripe about Source Insight is the lack of vim compatible keybindings. I'm hoping the next version of vim will make it even easier for IDE vendors to integrate vi functionality.
BTW, the Visual Studio 2003 IDE is different from prior versions and the 2005 version will be different yet again. Something to keep in mind before investing a lot of time learning it. But the C++ compiler is a vast improvement over VC++ 6.0.
I highly recommend
.NET
Best Kept Secrets in
by Deborah Kurata
This has plenty of good tricks for visual studio:
Chapter 1 - Hidden Treasures in Visual Studio
Chapter 2 - Doing Windows Forms
Chapter 3 - Code Tricks
Chapter 4 - Much ADO
Chapter 5 - Defensive Development
Have you Meta Moderated t
Four letters. MSDN. Now show me something comparable in the OS world.
Do not try to read the dupe, thats impossible. Instead, only try to realize the truth
What truth?
There is no dupe
I remember when I programmed in Visual Studio there was a good add on called Visual Assist, the company is Whole Tomato I used like 3 years ago and it was quite nice, it adds some features to the IDE that make coding easier.
Ubuntu is an African word meaning 'I can't configure Debian'
A also agree that it is annoying, but in most cases the documentation is near identical for the CE version. I just use the CE docs unless I have reason to think they are different for some particular function.
Karma: -2147483648 (Mostly affected by integer overflow)
If Visual Studio isn't your bag, but you still like Visual C++, then grab the Visual C++ 2003 toolkit (just the compiler, free) and stick Code::Blocks on top of it.
[o]_O
WTF are you talking about? have you even *LOOKED* at the msdn documentation? hell, just the .Net sdk docs are more consistant, and organized than *ANY* api docs for any other platform I've seen.
Michael J. Ryan - tracker1.info
Open the .dsp file. Near the top you will find something like:
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
Change "cl.exe" to your favorite C++ compiler.
Sadly you have to be a MSDN subscriber to get Visual Studio 2005 Beta, but the Express editions are available free of charge for everybody. They are basically the same as Visual Studio, but only implement one language (i.e. Visual C++ Express, Visual C# Express, Visual J# Express, etc). They are in beta, so there are a few bugs here and there. Overall they are pretty damn good.
http://www.vbrad.com/Reviews/books/brVisualStudioH acks.htm
I've been on a few teams here at MS, and I must say that the source isn't that hard to get too. Now getting WRITE permissions too it is a pain, but right now I can see all the source to SQL, most of the source to the CLR and VS, some of office, some Windows, and I'm sure anything else could be gotten by just asking. (if it exists... I was looking for diamond.exe source a couple weeks ago to fix an AV we keep getting and apparently no one has compiled that thing since '96 and we couldn't find it.)
I've used Studio 2003 new for the last year and a half. Overall I like it alot and wish I had a linux equivilent (monodevelop has SOOOOOOOO far to go). The only thing I hate hate hate hate (x1000) is it's lousy integration with source safe when it comes to ASP.net projects. Ever try moving a web project from one location to another? Or try to get a un-source controlled copy of your project. Good luck, it's possible but excruciatingly painful.
Just my $1 and 2 cents.
Blender And Linux Fan
Tightly integrated that is with SQL Server for example. Need to debug a stored procedure? Set a break point in it using VS and step through it, adding watches and such like if you were debugging C# code for example. Now that is the shiztnizz.
Oh how I wish my company would upgrade both VS and SQL Server, guess I'm stuck with VS 2003 for a while. Sigh... ;)
Part of the problem for VE is that Java doesn't have a simple XY layout model
Actually it does. Set the layout manager to null and you can put components at any location you want and set the size to anything you want. Of course, if you've got the ability to change font sizes (e.g. to support people with visual difficulties, which is a legal requirement in some places) then absolute layouts suck horribly...
"Little does he know, but there is no 'I' in 'Idiot'!"