views:

828

answers:

14

Whenever I start a new software project I spend a good amount of time at the beginning drawing class diagrams and other flow charts to plan out how I see the application working. This part just takes a lot of thinking and testing. But at a certain point when everything is planed out I don't need to think about it so much anymore I just need to code it.

IntelliSense is definitely a godsend, as is being able to generate code from it automatically by hitting the TAB key. But now I'm wondering: what are some other techniques or tools people use to get the code in their head to the screen as fast as possible?

+25  A: 

I get a lot of productivity out of Resharper - It's especially useful if you learn all the features and keyboard shortcuts

Rob Fonseca-Ensor
ReSharper is the number one productivity booster!
bitbonk
ZombieSheep
The world is separated to kinds of people: those who hate Resharper, and those who can't live without it ... I relate to the first group..
@opc I'd say the world is separated into pragmatists and dogmatists, that way you cover non-programmers too
Rob Fonseca-Ensor
+2  A: 

Unfortunately for me it's just intellisense, although I do tend to re-bind a number of keyboard shortcuts to help. The context menu (my keyboard doesn't have a context menu button) is one of my most used for adding references etc.

I did read not too long ago about a 'neural headband' for gamers. It was designed to be trained so they could think 'forward' & 'fire' rather than pressing W + Mouse1, and claimed to increase reaction times. I doubt it could be trained up enough yet, but if technology like this could be used so you think 'implement base class Foo and add method Bar()' and the code is generated within VS, then that would be amazing :) Sadly it's a little way off, and I can imagine 'Coffee' being the result of far too many broken builds...

Ian
+9  A: 

I don't want to open a whole CodeRush & Refactor! / Resharper can of worms, but a good quality re-factoring tool like one of these would probably help enormously. I have been using CodeRush and Refactor! for a little over a year, and the time it takes to write robust and maintainable code is way shorter now than it was a couple of years ago.

Of course, there's a learning curve, but the benefits after just a few weeks are enormous.

ZombieSheep
Unfortunately for the holy war, I'm a pragmatist and would say to everyone: Just try resharper and coderush for yourself for a week and use the one that suits you the most...Not using either is the only wrong choice
Rob Fonseca-Ensor
My point exactly. I tried Resharper and found it wasn't for me, but I know there are many happy users out there. Neither company would survive if the product didn't have benefits. :)
ZombieSheep
I use both together. With a bit of tweaking, they play well together.If you have used both you know that there IS SOME overlap but the gestalt of each is entirely different and they compliment one another quite nicely.
Sky Sanders
+2  A: 

Good tools help a lot. I especially like Visual Assist X: http://www.wholetomato.com/

+5  A: 

You could draw your class/sequence diagrams in a modelling tool like Enterprise Architect that can then generate the code for you.

Paolo
This can save many hours of tedious typing, it will even generate skeleton methods for you. It makes UML much more useful because you can also link your code/UML meaning as you change the code, the tool can update your UML to match and the UMl doesn't end up out of date like the rest of your documentation.
John
+5  A: 

I hate to be the one to bring this up and I'm no Linux fanboy but I tried an addin called ViEmu a few months back. It took me at least a month to get back up to my usual productivity because learning all the commands and how to chain them is a big ask but now,..I'm easily 5-10 times quicker at refactoring.

It kinda hard to explain how but you get the most work out of it when you come across text editing jobs that are awkward and repetitive it seems,..say you've got 20 lines of code where you need to remove the middle camel cased word from the variable name. It's that kind of thing.

The link for ViEmu is here - http://www.viemu.com/

HTH

Stimul8d
I love ViEmu. Having command/edit mode in Visual Studio has sped up my programming speed tons.
robber.baron
+1  A: 

Have you thought about creating and using code snippets for things you do regularly? These can be a real time saver as you just dump them straight in and can easily refactor the variables used within them.

Ian
+9  A: 

Make your environment to respond faster.

Slow pc, IDE, build, repetitive tasks that could be automated kills speed seriously.


Every little thing counts. Even increasing Repeat rate in Control panel=>keyboard properties.

Arnis L.
+1 for the repeat rate. That's the first thing I do when I have to start working on a new computer - max out repeat rate, and set repeat delay to minimum.
Tarydon
I find that a fast hard drive makes the biggest difference here
Rob Fonseca-Ensor
recently upgraded my dev lappy to use the runcore 64g SSD. 200/100 read/write makes everything faster!
cottsak
How many repeating characters are you people entering?
notJim
@notJim it's scrolling around that gets noticeably faster
Arnis L.
Ooooh, interesting.
notJim
A: 

It seems to me that I see two things:

  1. You don't have a full keyboard. I can't recommend getting a new keyboard enough.
  2. You could use templates to make it easier. I gather that you have to do a lot of programming before you ever get started on your project. If you would use templates, you could make a template containing all your exception handlers, .NET references, and so forth. Then when you want to code, you just open the template, edit the namespace (which might be automatic) and your good to go.
Arlen Beiler
A: 

Well, no doubt I'm an oddball, but for desktop apps (not web) here's what I do. I consider almost any app as just a glorified editor. That is, it has a data structure that needs to be persistent, and a UI to let the user put information into that data structure and get it out.

For the data structure, keep it simple, simple, simple. I consider it just a repository for information, with as little redundancy as possible. I do not want to build data structure that exists for the purpose of being a visible manifestation of the underlying data, such as tree controls, etc. because then that needs to be kept in agreement with the underlying data, and you get into all the issues of how to keep redundant data consistent. (Example: for graphics, don't build it, draw it.) If I cannot avoid creating redundant data structure, I stay away as much as possible from notification-style programming that tries to keep redundant data structure in tight agreement. Much of the buglist and performance issues arise from that. Rather I prefer loose coupling, where a certain amount of inconsistency can be tolerated and is managed by processes that run once in a while to propogate changes.

For the UI, I was a big believer in OOP and MVC-style UI coding, until I discovered this in 1986. Now I'm spoiled, and I can get complex UIs coded in a fraction of the time possible by the usual control-event-handling style, and they are trivial to modify as requirements change. But so far, I'm in the company of maybe only 3 people in the world who use it, because it is definitely not mainstream.

Mike Dunlavey
A: 

You may try Resharper.

Other option - you can try Telerik's Just Code.

Danail
A: 

I learned the dvorak keyboard layout, which is much faster for English and a little bit faster for programming. It took me three months to get back to my old qwerty speed, but I continued improving. I think it saved me a lot of time in the long run.

Thomas
+5  A: 
  1. As everyone else has mentioned, use Resharper or equivalent.

  2. Learn the keyboard shortcuts and use them. Just about every operation you can perform in VS has a keyboard equivalent, and the more of them you know, the less time you'll spend poking around in menus. This is equally important for using Resharper.

  3. Pay attention to anything you have to wait for. Are you waiting for builds to finish? Remove projects that you aren't working on from your solution and reference their assemblies instead. You can always add them back if you need to. Are you waiting for unit tests to run? Maybe you can segment the tests into a set you run several times a day and a set you run before every check-in. Are you waiting for your application to start up every time you test it? Maybe you can define a build configuration that excludes startup code whose functionality isn't involved in what you're working on right now.

  4. Get a solid-state drive and put your OS and development tools on it. Put more memory in your machine.

  5. A simple for tip for dealing with the tedium of editing code that you copy and paste: Don't copy and paste code. I'm sure that there are circumstances under which it's acceptable, even necessary, to copy and paste code, but if it's part of your everyday workflow you need to stop what you're doing and fix it. I wouldn't even mention this if more than one person hadn't suggested it.

Robert Rossney
+1 for removing projects. Build times can be a major roadbump in VS.
Dave Sims
As Dostoevsky observed, man is the animal who can get used to anything. This can be a great strength, but it also means that we often forget that it's even possible to change things that plague us.
Robert Rossney
A: 

In addition to Resharper, I've found Hawkeye saves me enormous amounts of time tracking down source code for a particular widget, or trying out properties and their visual effects in real time. Highly recommended.

It's kind of like FireBug for .NET rich clients.

Dave Sims