Posts tagged Visual Studio
Get a VS2010 Ultimate Experience for Less
3As of writing this blog post, there are thousands of developers converging in Las Vegas for the official release of Visual Studio 2010. I’ve been using Visual Studio 2010 for the a while now and it has been a generally positive experience. While as was exploring the VS2010 site I saw this question posed. “What Edition is Right for Me?” That prompted me to look through the editions. Microsoft has planned to sell for commercial versions: Professional, Premium, Ultimate, and Test Professional. A much smaller selection that the VS2008 editions, but that is a good thing. What shocked me was the outrageous price jump from Professional to Ultimate, from $799 to $11,899; that is over $11,000 difference for one copy of Visual Studio. So this blog post is to show you how to get an Ultimate experience for less, so that you can utilize that extra money for pizza and beers for you development staff.
1.) Visual Studio Professional ($799)
you are going to need this right? So what is missing from Professional that is in Ultimate?
- Intellitrace (Historical Debugger)
- Static Code Analysis
- Code Metrics
- Profiling
a.) Intellitrace ( $0 no alternative )
sadly I couldn’t find something that replaced this feature. It is very cool. Look at it this way though, the fact that Microsoft moved it up to the premium edition makes me think that they feel the common developer probably doesn’t need it. I also rarely used this feature in my own development.
b.)Static Code Analysis & Code Metrics ($410)
so what is static code analysis? Wikipedia defines it as the analysis of computer software that is performed without actually executing programs built from that software. Hmm… this sounds familiar, I think I’ve done that before. Oh wait I have! NDepend is a great static analysis tool that has been around for a while now.
c.) Profiling ( $0 – $500 )
There are a ton of profilers for the .Net framework, and some of them are FREE! In this post I chose the two that a company might buy ANTS Memory Profiler and JetBrains ReSharper.
2.) Testing
So you are a testing kind of developer, that’s great but you want all the extras that ultimate offers.
- Code Coverage
- Test Impact Analysis
- Coded UI Test
- Web Performance Testing
- Load Testing
- etc…
a.) Code Coverage ($479)
NCover is a mature and great tool for code coverage.
b.) Web Performance Testing and Load Testing($0)
The web has been around long before VS2010, so this problem has been solved a million times. Realizing that there are a ton of tools out there to do this and I won’t list each of them. Just Google and prepare to be overwhelmed by the possibilities.
c.) Coded UI Test ($0)
Watin allows you to code tests for UI interaction of web applications, which is probably the hardest interaction to test for.
d.) Resharper ($349)
I have to mention this tool just because it is so good and it improves the unit testing experience inside of visual studio, regardless of your framework.
3.)Database Development
the dreaded database…. how do we handle this stuff?
- Database Deployment
- Database Change Management
- Database Unit Testing
- Data Generation
a.) Database Deployment ($0 – not needed)
In theory this sounds great, but the majority of companies have a company structure that forbids any developer from making database pushes; the job of pushes are usually left to a Database Administrator. They will probably want to execute SQL that they have crafted and labored over.
b.) Database Change Management ($0 – code option)
again this is probably left up to your DBA with a combination of your source control (SVN, Hg, Git, TFS). I recommend looking into a migration framework if you really want to control the versioning of a database.
c.)Database Unit Testing (Whaaaaat? $0)
this troubles me on two fronts. First off you probably shouldn’t be unit testing enough of your database to have a whole project dedicated to it. Secondly, this is what developers refer to as integration tests and you don’t need any other tools other than your favorite unit testing package to do this. Granted, VS2010 probably has some nice UI tools to make this more pleasurable, but in my opinion tests are about results and not how pretty the UI is.
d.) Data Generation ($0)
This is a problem that isn’t that complicated to solve, and again has been solved. Check out AutoPoco which allows you to generate a ton of data easily through a fluent interface. After generation, just go ahead and pump this data into your database with your favorite ORM or DAL.
4.)Architecture and Modeling ($100)
Buy a whiteboard for modeling and get your team involved. There is nothing worse than an Ivory tower architect that pushes his architectural will on the team without discussion.
5.)Source Control ($300)
Unfuddle is a great online source control provider and in my opinion gives you a lot of things your business will use from Team Foundation Server. When I quote the $300, I am talking about for your whole company and not per developer. This is a huge cost savings. There are also a ton of other online source control providers that are similar to Unfuddle.
Tools I have to mention: TortoiseSVN, MsysGit, TortoiseHg, AnkhSVN (all free)
Conclusion and Total Price: $2637 ($2832 less than Premium and $9262 less than Ultimate)
That savings per developer is nothing to joke about. You could save over $9000 dollars but just looking around more. So what is the downside? Well you will have a hodgepodge of tools to use and many of these options might lack UI tools and possibly Visual Studio integration. Do your homework and see if the benefits of buying these tools outweigh your desire to have a all in one tool like VS2010. If you have a team of five developers, I just saved you over $45k. Your welcome.
Git –newbie –workflow
1Introduction
I recently found the time to dedicate to learning a distributed version control system. I had the choice between Mercurial and Git. Both are great systems but what it came down to ultimately was the fact that I already had TortoiseGit on my machine. Yes you read that right, it came down to the fact that I didn’t want another source control provider taking up space in my context menu; frankly my context menu is getting a little ridiculous.
I know it isn’t exactly a scientific method of picking between the two, but honestly, I see very little that is different between the two (for a learner).
Initial Reaction
When I first read the description of Git, I thought “who would be stupid enough to have source control on their own machine?” The second thought to go through my SVN-centric brain “I like SVN, so why should I change to Git?” The first question came out of ignorance to the ideas behind a distributed source control system, the second is a completely valid rebuttal.
I will attempt to address the first question. Yes your source control is on your machine but think of it as your own personal local copy of the “Truth.” You edit your version of the “Truth” until you feel comfortable with your additions and changes. The next step is to push your changes to a central version, possibly on GitHub or Unfuddle. That last step is important, because your source is no longer local. Your code now exists somewhere that is hopefully safe, secure, and accessible to you and your team of developers. What is powerful about Git is the fact that most of the expensive actions performed locally: commits, merges, additions, and deletions. This makes Git crazy fast, CRAAAAZZZY FAST! The two most expensive actions are pull and push, but even these can be quick if your central source control repository is on the local network. After a couple hours playing with Git, my ignorance about the ideas behind this system were overcome by an understanding and comfort.
The second question is valid. If you like SVN, why should you switch? Well nobody is forcing you to switch, and people won’t call you a loser if you decide to stick with SVN. I still have a warm place in my heart for SVN, it was the Han Solo of my escape from the Death Star known as VSS (Visual Source Safe). That being said, Git is a lot easier when it comes to branching and merging. In SVN branching occurs remotely on the SVN repository, which can be slow. In Git, branching happens locally and is even encouraged by most resources that I read. The one thing developers might gripe about Git is the fact that there really isn’t much Visual Studio integration. SVN has a ton of integration tools inside Visual Studio. What I would say about this though, is that the projects I work on have more than enough files outside of my VS Solution to negate the good aspects of integration tools. File types like third party assemblies, documentation, build scripts, and other files all exist outside the scope of my solutions. Now to add them to your SVN repository you are forced to use TortoiseSVN, a tool that exists outside Visual Studio.
I may or may not have convinced you to try Git, but I really feel you should. More and more compelling projects are being hosted on GitHub. How will you get involved and help these projects grow with a knowledge of Git? Also, Codeplex now offers Mercurial support, so don’t be suprised when your favorite projects on Codeplex start moving to a distrubuted SCM.
Basic Workflow
To get started with Git download MsysGit. This will setup an environment ready for Git on your windows machine.
I also recommend TekPub, they have a great series about mastering Git.
To learn about a system you have to use it, and that is what I did with Git. I wouldn’t call myself an expert but I do feel comfortable enough with it now to jump into a Git project. The basic Git workflow is as follows (type: “git help” in a command window):
- init or clone: if you are starting a repository use init, if you are getting use clone.
- branch: create a new branch to start working in or just work in the master branch.
- add: add any or all files involved in your project.
- commit: commit staged files to your local source repository.
- pull: get any changes that have occurred at the central repository.
- merge or rebase: make sure all your changes and branches are reflected in the master if need be.
- patch or push: some repositories online are private so you can produce a patch to send to the owners, if you own the repository the push away.
- Rinse and Repeat until content.
These are the commands you’ll need to know to just get by, but there are many more to become a master. I modified my environment to work with WinMerge for both merging and diffing. Below are the instructions to get that working.
- You will need to modify your git environment. This is done through modifying the .gitconfig file found in your user folder (C:\Users\<yourname>\.gitconfig).
*Note, when you install WinMerge be sure to check the box that installs WinMerge into your system path.
external = “c:/users/khalid abuhakmeh/difftool.sh”
[merge]
tool = winmerge
[mergetool "winmerge"]
cmd = ‘WinMergeU.exe’ \”$MERGED\”
trustExitCode = false
keepBackup = false
- Create a bash script to execute against WinMerge. Create a file called difftool.sh and save it in the same directory. Below are the contents of my file.
#!/bin/sh echo Launching WinMergeU.exe: $1 $2 "C:/Program Files (x86)/WinMerge/WinMergeU.exe" -e -ub "$1" "$2" | cat #!/bin/shecho Launching WinMergeU.exe: $1 $2"C:/Program Files (x86)/WinMerge/WinMergeU.exe" -e -ub "$1" "$2" | cat
Now when you execute the commands "git diff @{1}" (compares against previous version) or "git merge" you will get to use WinMerge to perform those actions. Pretty cool.
Conclusion
So there you have it, my initial interactions with Git and what I have learned so far. There are more things to learn, but I am definitely a convert to Git. Can you Dig Git?
Coding With My Voice
0I was exploring some screen casting software the other day and I noticed that Windows 7 has speech recognition. It probably was there in Vista, but I never really played around with it. I wondered how easy it would be to program a “hello world” program while keeping mouse and keyboard strokes to a minimum. I started by starting my voice recognition on my instance of Windows 7 machine.
The next step is to announce to my computer to start Microsoft visual studio 2010. That command is “Open Microsoft Visual Studio 2010”
This is where it goes down hill for me. Visual Studio 2010 doesn’t have voice support for actions. I tried to say something like “File > New> New Project” but Voice recognition just ignored me. The second approach was to remember what the shortcut was to start a new project. Since I know it, I said to my computer “Control Shift N.” Soon after, I was presented with the New Project dialog. Another painful experience. I had to tab my way to a new project, and tabbing with your voice is not fun. Below is a play by play of my tabs.
Not exactly fun. The next step was to get into the code. I cheated here and had to click into my code. After some painful, painful, painful yelling at my computer I got this code. It took me about 10 minutes of backspacing, and fixing things to get a simple application.
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.Read();
}
}
So you might be thinking, why would anybody do this?
Well I started thinking about scenarios where programmers could leverage their voice to program. Before we know where we want to go, we have to know where we are. Obviously we are not very far when it comes to programming with your voice. Below are some things that need to change for developers to start programming with their voices.
Context Switching
Programming languages are created to crudely mimic human language. A phrase could mean two different things to a word processing application and a development environment. Theoretically, when I enter Visual Studio my voice context should be switched to a developer context. This means that voice recognition is listening for different keywords to perform functions. Below are some examples of actions that could be present in a developer context.
- “Add New Class”
- “Add New Project”
- “Lambda x comma s executes s equals x” (x,s) => s = x
- “Console Write Line String Hello World End String”
- “Select Current Method”
- “Select Class”
- “Rename Function/Class/variable”
- “Comment Above Line ….”
In addition to knowing actions in this context, the voice recognition could know you programming preference and make appropriate decisions for you. This is primarily for casing variables, functions, and classes. When you say “Calculator Service,” The voice recognition should know that you mean CalculatorService.
Programming Language Hooks
The voice recognition software should be able to recognize keywords and namespaces of the programming language you are using. So if you say a class name, the voice recognition software should know if you are creating a new class or talking about an existing class. This approach could be achieved two ways: create an API that the voice recognition can call in an IDE, or create a dictionary that you could place into a location for the voice recognition. Either way, you are building an API to allow developers to extend the voice recognition for their particular programming language.
Fingers-Voice Hybrid
Right now you are able to type while you talk to your computer. I would expect that you could do the same when programming with your voice. Some things just might be faster using your fingers.
Conclusion
These are the first step to voice recognition for developers, they are obviously large steps to take. Clearly the current voice recognition in Windows is made to server the greater population of users, who are interested in word processing, email, and chat applications. It would be great if you could take the voice recognition in Windows and specialize it to be used with Visual Studio and other IDEs to boost the efficiency of developers. Microsoft, I hope you are listening.
ReSharper 5.0 Early Access Program
0I found today that JetBrains has just released an early beta of ReSharper 5 so I’m giving it a shot. The one done side to the Beta is that it still doesn’t support Visual Studio 2010 (which I am itching to move to). So if you are brave and want to try it out, here is the link to the ReSharper download.

ReSharper Installer


