Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write code in Visual Studio faster? [closed]

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?

like image 271
Eric Anastas Avatar asked Jan 26 '10 10:01

Eric Anastas


People also ask

How do you completely close VS Code?

Go to menu File -> Close Folder and click on it. It will close your project folder and all opened documents.

Why is my Visual Studio code so slow?

You might have extensions installed that slow Visual Studio down. For help on managing extensions to improve performance, see Change extension settings to improve performance. Similarly, you might have tool windows that slow Visual Studio down.


2 Answers

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

like image 191
Rob Fonseca-Ensor Avatar answered Oct 05 '22 09:10

Rob Fonseca-Ensor


  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.

like image 29
Robert Rossney Avatar answered Oct 05 '22 09:10

Robert Rossney