Visual Assist is why I still use Visual Studio for C++
Posted by James on Saturday Feb 14, 2009 Under UncategorizedNothing earns you geek points more than using an editor like Vim or Emacs. Frankly the contrary is also true if you stoop as low as using Visual Studio. I work with a number of people who look down their nose when they see me using VS. With green text on black trying to look all retro, smug in the knowledge they are so much cooler than me.
Ok I know, I’m probably fighting a losing battle here. As the likes of Vim and Emacs run on every platform known to man and they are very extenible. Everyone loves to hate M$ etc.
To give you a bit of background; I used emacs for 14 months while working exclusively on HP Spark / Dec alpha machines in good old fashion UNIX. I wrote a few Lisp scripts for emacs, but nothing special. I did learn to love it and I found using VS afterwards almost like playing with a toy. No developer worth anything would ever consider using VS. You’d be laughed at by any level of unix / level programmer and quite rightly so.
Anyway, that was 8 years ago and things have changed. I still do a lot of C++ development, but I also do .NET languages such as C#.
Now the reason I can’t leave VS is ultimately Visual-Assist. I love it! To be without it I now feel disabled as a programmer.
Visual-Assist for all that don’t know is essentially ‘intelisense’ on steroids. It’s made by WholeTomatoe software and it’s fantastic.
I often sit there being asked by my trendy friends where various code lives. They’ll have a class name, and simply want to look up the definition. I’d forgotten how brilliant Visual assist is with symbols. ALT+G on a symbol and it jumps straight to the code definition. Watching my Vim buddies work… well it’s regular expression followed by, calling grep or something like that. Vim doesn’t do any symbol parsing or anything, so if you’re looking for horribly generic fuction like Update(), you’d have a hell of a time finding it.
This having the symbols correctly parsed is so handy for refactoring too. Want to rename a class, no problem. It correctly scopes all changes so it’s infinitely better than a blind and brutal a reg-exp. Change a functions params? Visual Assist will change all calls to this and replace them correctly.
I have become so reliant on it, it shapes my want to learn other languages. Looking up APIs is a waste of time and is frankly tedious.
So is this a bad thing? Have I become simply lazy in my reliance on this tool? Or has my productivity increased so much that anything else seems like a waste? Maybe so.
Now I know I’ll be told that there exists a VIM plugin for visual studio, so I can have the best of both worlds. Well perhaps… But I guess that’s not my point. My point is without realising it, I’ve become so reliant on a tool that I can’t contunue without it. I draw a parrallel with mobile phones here as I belive it’s a good analogy.
Do you remember all your phone numbers now? No? Well of course mobiles phones remember them all for you. Has that made you worse as a telphonist? Perhaps? Would you feel crippled if you were faced with a phone with no numbers? Or have you accepted that it’s a the future and embrace being lazy and use the phones memory. Well I believe this is exactly the same as learning an API back to front. Relying on the compiler to find your syntax errors is simply way too old school now.
Anyway, I hope this generates some discussion. Please let me know your feelings on the matter I will be quite interested to hear peoples oppinions.
February 19th, 2009 at 12:04 am
> Vim doesn’t do any symbol parsing or anything, so if you’re looking for horribly generic fuction like Update(), you’d have a hell of a time finding it.
You’re right that Vim doesn’t do any symbol parsing – it doesn’t need to, as it interfaces really nicely with ctags. It’s not too hard to set up a tagfile which gives you very similar functionality to your beloved Alt+G. Don’t assume that just because you don’t know how to do something, it can’t be done.
One other point – it’s only languages like C# and C++ which are so horrifically verbose that they mandate the use of these fancy autocompletion tools – try writing a small C# app, then knock up the equivalent code in, say, Python, Ruby or Scheme – I guarantee(*) the code will be about 1/3rd of the size.
(Not to mention that Vim does handle autocompletion too, but in a slightly more generic way which works across any programming language which you care to edit, without needing to know anything about the semantics of the code.)
THERE IS NOTHING THAT VIM CANNOT DO!!1
(*) by “guarantee” I mean “don’t guarantee at all, contents may settle in transit, your mileage may vary, the value of investments may go up as well as down…”
February 19th, 2009 at 6:08 am
There’s nothing like a good religious discussion eh Jimbo?
This kind of topic appears at almost every place of work. I’ve had a lot of different jobs in my career and it’s never failed to come up in conversation at any of them. That includes the place I am at now.
This time round it started when someone saw me install ViEmu (which, FYI, is the VIM emulator for Vis Studio that you mentioned). I am a bit of a VIM fan and adding this functionality to VS gives me the productivity boost that I need.
Unfortunately the people I work with consider anything to do with Vi or VIM to be “legacy” or “something that is done on Unix”. Yes, I must work with some idiots. They all get on their soap boxes and proclaim that I’m using the worst tool ever. Why would I want to do that? Why am I not using Resharper, which is obviously the best tool EVER.
Simple answer: I am using the tool that works for me.
I think everyone else should do the same. So what if you’re tied to Vis Studio? If you’re not going to be operating outside of that environment, then tell all those “don’t use MS product” evangelists to get stuffed.
Use the tool that’s right for you. If someone tells you otherwise they’re either stupid, or just jealous that they can’t use the same tools (lots of anti-MS people fit into both categories).
Enjoy Visual Assist while you can
February 19th, 2009 at 10:04 pm
At the moment, I’m deep in C# world so I’m quite content with Visual Studios intelisense. In fact coding XAML I was amazed how good vs2008 was at helpping me out. Adding event handlers in the corresponding .cs implementation file and correcting even my string expressions most impressed. Then WYSIWYG style editors that manipulate code and XAML… we’ve never had it so good. (I feel like the four Yorkshire Men sketch coming on.)
Jon, Although VI is damn cool; You’re using the wrong tool for the job when you’re coding C# and XAML that’s for sure. I’m sorry Jon, but you are cutting off your nose to spite your face there. (I’m talking standalone VI here, not the vs integration.)
I will try some ruby in Vim though, I take your point about the languages being so verbose. I also know you are a language geek so really appreciate such things. I’ll let you know how I get on.
OJ, I didn’t want the discussion to be so religious it dissolves into nonsense. I was told recently that programmers are VERY emotional beings. When they can’t rationalize something they resort to an almost primitive and often bi-polar state. All the good religious debates, certainly with programmers are unfortunately doomed to this.
I’m certainly better off for using these tools. I don’t think anyone can doubt that, or can they? But the right tool for the job wasn’t quite what I was getting at. I mean does my reliance on intelisense-like tools shape which languages I code in. An example being; I can’t be bothered with PHP at the moment because it doesn’t have any such tools. I really don’t want to learn the API or even the language the old fashion way. It’s like stepping back in time. So am I now worse off? Lazy perhaps? Before I certainly would have given it more effort a few years ago than I’m prepared to do now.
Anyway, It’s probably about time that I started running with ViEmu. Maybe I’ll install it tomorrow.
Anyways Sirs, always a pleasure.
February 20th, 2009 at 1:01 pm
> Jon, Although VI is damn cool; You’re using the wrong tool for the job when you’re coding C# and XAML that’s for sure. I’m sorry Jon, but you are cutting off your nose to spite your face there.
Bearing in mind that (last time I checked) I’m not actually editing any C# or XAML, I think my nose remains intact, and my face remains unspitten.
Now, if you can suggest an editor I can use to edit Ruby, Python, Scheme, Common Lisp, C, C++, Makefiles and plain text, which runs identically on Windows, Linux and OSX, and which gives me the same regex-based search and replace capabilities as Vim (plus the abilities to jump to function definitions and auto-complete in all those languages and more), then hey, I’m all ears…
February 20th, 2009 at 1:02 pm
…and seeing as I can’t edit my comments, if this hypothetical editor ran on BSD as well, that’d be a bonus.
February 21st, 2009 at 3:21 pm
“I was told recently that programmers are VERY emotional beings.”
WTF?
I know what you mean by this but I can’t help think that the term “emotional beings” is too generous. Interestingly, I’ve worked at a company that was internally two separate groups of different ideologies. New blood would eventually figure out there are two groups and then joined the group that most fitted their ideology thereby polarising the groups even further. You can see this happening at any company to some degree, including where we work now.
February 22nd, 2009 at 1:43 am
I’m just going to reiterate my point: use the right tool that works for you. That could mean Kazaml if you prefer it over the VS IDE for editing XAML, it doesn’t matter.
If it works better for you, you should use it.
I’m with The Head, VIM for the win hands down doing all that stuff. Use the plugin with VS and you’re in the best of both worlds.
I’d like to argue the other point though. I think that bad programmers are VERY emotional beings. They’re idiots if they don’t listen to other arguments and find ways to learn in the hope that they’ll improve.
Cheers
March 24th, 2009 at 1:29 pm
Nice blog Jimbo!
Visual Assist does indeed rule, but I think the main reason I use Visual Studio exclusively is that you can’t do Xbox 360 dev in anything else very easily.