Plunging into .NET Development

Weblog Pieter Gheysens
Microsoft .NET Development - C# - Enterprise Library - Visual Studio 2005 Team System - Compuware DevPartner - ...
 


Saturday, February 28

Keyboard Shortcuts

Keyboard shortcuts are cool and really help to boost productivity for power users. For me, using keyboard shortcuts is almost the same like using an external mouse on a laptop. Without an external mouse, I loose too much time with that stupid thing in the middle of my keyboard or with the slow touchpad.

From Wikipedia :
Keyboard shortcuts are typically an alternate means for invoking one or more commands that would otherwise be accessible only through a menu, a pointing device, different levels of a user interface, or via a command console. Keyboard shortcuts generally expedite common operations by reducing input sequences to a few keystrokes, hence the term "shortcut".

Here's my top 5 of most used keyboard shortcuts used on a Windows operating system and in Visual Studio!

Windows shortcuts
  1. Windows key + E to launch Windows Explorer
  2. Windows key + L to lock my computer
  3. Windows key + M to minimize all running applications and to return to my desktop view
  4. Alt + Tab to navigate between running applications (on Vista you can also use Windows key + Tab)
  5. Windows key + R to open the Run Window
Visual Studio shortcuts
  1. Ctrl + Shift + B to Build a solution
  2. Ctrl + J to list members for statement completion when editing code
  3. F4 to display the properties window, which lists the design-time properties and events for the currently selected item
  4. Ctrl + . to open up the SmartTag options for the focused element. I use this all the time to import missing using statements for example or to do some kind of refactoring.
  5. Ctrl + K,C or Ctrl + K,U to comment/uncomment the selected line(s) of code
What I also didn't know from the beginning is that you can use Ctrl + C or Ctrl + X without selecting the line of code in Visual Studio. Visual Studio will copy or cut the current line of code without needing you to select it!

You can also visit the doFactory that gives you a nice overview of all available shortcuts in Visual Studio.

Recently I also discovered (by accident actually) a new shortcut that's only available on Windows Vista. You need to press the Windows key and a number (1, 2, 3, ...) : that key combination will open the Quick Launch shortcut (Quick Launch toolbar) that is in the position that corresponds to the number you've chosen.

To reset your shortcut settings for Visual Studio, you need to go to Tools > Import and Export Settings. To customize key bindings go to Tools > Options > Environment > Keyboard.

Any other important shortcuts you use all the time?

Labels:

Saturday, February 21

India (Part II)

Just back from my second trip to India (India - Trip 1). Again I didn't find any time to do other things than working/sleeping/eating, but I still found it a very interesting week. In total I have now trained almost 40 .NET developers how to work with Compuware DevPartner. I tried to convince them of the fact that DevPartner must be seen as a tool that can help them to deliver quality software applications. One of the misunderstandings is that DevPartner is solely a troubleshooting tool that can be used to troubleshoot issues in a production environment. Well, it's not! Actually it's a tool that should be used pro-actively in a development environment. DevPartner looks over the shoulder of the developer how things are implemented and can be seen as the virtual expert that increases code quality. Also the consultancy job went pretty well and all that was promised to the customer was also delivered in time and with the appropriate documentation. The in time factor was really important and that's why I've chosen for a solution with LINQ to XML and especially the Entity Framework. Why should we still keep writing our own Data Access Layer? The O/RM tools out there have evolved quite a bit these days and do we really think we can do a better job than the NHibernate team or Microsoft? The main benefit I get from using an O/RM tool is productivity! NHibernate may be the best free OR/M solution on the market for now, but I'm more familiar with using the Entity Framework and it was the perfect match for the requirements I was faced with.

On the other hand I finally learned why India has a GMT +5:30 timezone. Until I travelled to India I actually did not know that certain countries/areas have timezones that only differ 30 minutes from an adjacent timezone. India is quite a large country : the country's east–west distance of more than 2000 km covers over 28 degrees of longitude, resulting in the sun rising and setting almost two hours earlier on India's eastern border than in the far west. So, India spans almost exactly two time zones, but their government decided that they wanted one time for the entire country. Their solution was to split the difference between what the time would be if they used two zones. Instead of the time being 10:00 in Bombay and 11:00 in Calcutta, the time is 10:30 in both places and also for all other areas in India.

Just as a side not : this download may be handy if you travel a lot between timezones or if you schedule a lot of meetings with people in different timezones : Microsoft Time Zone. It installs a small tray icon that allows you to specify a number of cities to watch the different times at those places.

Labels: