Archives for February 2009

#50 How not to accidentally copy a blank line in Visual Studio

We all use CTRL+C and CTRL+V everyday, 1000 times. It’s one of the first things you have to learn as a programmer to keep you hands on the keyboard. It’s easy to sometimes press CTRL+C again, when in fact it’s time to Paste, so you really meant to press CTRL+V. Visual Studio will allow you to copy a blank line. So it what you’re trying to paste, is onto a new blank line, and you accidentally press CTRL+C, you’ll copy the blank line, then your CTRL+V is lost. (Oh but tip #51 Shows you the clipboard ring). Anyway – this tip tells Studio to not copy blank lines.

#49 :: No Video 49, just a little Sara Ford Humor

Sara Writes …

There is no Ctrl+F in books! You know you’ve thought about it at some point it time… "where’s the Ctrl+F to search for something in the book you are reading."  Sorry, there’s no Ctrl+F in books.

And when I first read it – being the geek that I am, I thought she was talking about Book online. So I open SQL Books online, and sure enough CTRL+F worked like it should. I actually emailed her saying "I don’t get it".

She wrote back …

Sorry, it was a bad joke. There’s no Ctrl+F available in actual physical books.

So now she probable thinks I’m an weirdo 🙂 Pssh, doesn’t know what a silly book is. 

 

Please explain your build numbering system

Build numbers are tricky. Just a set of digits, that we all try so hard to make more valuable than 1.0.0.0, which isn’t helpful at all. Our build servers build. That’s all they do is build. Well I guess they also package.

It’s nice to know that the packages are without having to think to hard about it, so here is the build numbering system we came up with. (Notice the dots at EOL).

[Major].

[4 DigitYear].

[Minor][WeekNumber(zero srtart)]
[DayofWeekNumber1=Monday].

[24Hour][Minute(zero start)]

A the final build number of looks like this …

  • 1.2009.30402.1010

 Which interprets as …

  • Version 1.3
  • Built on Tuesday = 02
  • During the fourth week = 04
  • 2009
  • 10:10 AM

With many product builds, building all day long, and so many versions in the wild, I can look at an assembly version number (that match this) from last year, on a product that I may not be familiar with, and immediately know everything I need to know about it’s original and life span. It’s also very easy in my head to know if there is a newer version.

This is all the information we need from the build number, and it’s nice and sortable in the file system.

We prefixed the MMDD with a Minor build number, because when the week is < 10, the 0 is truncated, which breaks the sort.

Do you have another build number idea?

This work is licensed under a Creative Commons license.

#48 Undo and Redo magic (with multiple levels) in Visual Studio

Yeah, ya, we all know [CTRL]+[Z], [CTRL]+[Z], [CTRL]+[Z], [CTRL]+[Z], Undo, Undo, Undo.

  • Oops too far..

Redo, Redo, Redo.

There is a better way to multiple undo / redo. This video shows you how.

 

This work is licensed under a Creative Commons license.

#47 Swapping Anchor points (THIS IS COOL!) in Visual Studio

Swapping anchor points. This one left me wondering for a few minutes, but afer I figured it out, it was very nice. Many times I’ve selected the wrong text by a line or character or two. Only to have to reselect the entire selection.

This video trick shows you how to expand your selction on the top of bottom – no matter which direction you selected up or down. It is one of my favorites so far.

[CTRL]+[K] + [CTRL]+A

This work is licensed under a Creative Commons license.