Friday, April 18, 2008

tfsbox Today I had a problem. At work we had a SCSI Raid controller that failed and we lost a logical device. Man I was pissed off! On top of this the raid was RAID 0 (striped), meaning there was no chance of getting any data back. This was the drive(s) hosting the OS which we had to reinstall :-( Anyway, this resulted in me having to spend quite some time in a freezing and noisy server room fixing the problems. While doing stuff like this (reinstalling OS, software and a pointless effort of restoring data) there is a bit of waiting time, so I figured I might as well work on our new server waiting to get TFS 2008 up and running. A brand new server (see spec below) dedicated to protect the heart of our company; the source code!

So I started digging around for the TFS 2008 DVD, knowing it should be on my desk with the MSDN subscription we get through the Microsoft Gold Partner program, but it was nowhere to be found. After a call to MSDN it turns out that the DVD's are now being shipped to our headquarters in Oslo, which was the case for TFS 2008 as well, but they couldn't find it. The guy who knew was of course away that day. You might wonder why not download? Well, you can't. TFS versions available on MSDN subscription is only Workgroup and trial editions.

My last attempt before giving the whole thing up was calling my friend John from NNUG and ask if they had a DVD I could use. He had a much better idea:

"Just use the trial and upgrade with your key at a later time".

Dooh! Why didn't I think of that. Check out Brian Harry's blog for more details: http://blogs.msdn.com/bharry/archive/2007/11/22/2008-installation-questions.aspx

Server spec:

  • HP ProLiant DL380 G5 Intel® Xeon® E5440 Quad Core Processor 2.83 GHz 12MB 2GB 1P Rack Server
  • HP 4 GB PC2 5300 DDR2 DIMM Memory
  • 6 HP 72GB 2.5 inch 15K rpm Hot Plug DP SAS Hard Drives
  • 2 HP 146GB 2.5 inch 10K rpm Hot Plug DP SAS Hard Drives

hpserver 

I think this should keep our source code safe for a while...

Friday, April 18, 2008 9:56:18 PM (W. Europe Daylight Time, UTC+02:00)
 Tuesday, February 26, 2008

You might argue both, but that's beyond the point :-) I've been thinking lately about how different programmers get their work done. If you look over the shoulders to 3 programmers, none of them is working the same way. The first difference I tend to notice is the use of keyboard shortcuts. Personally I've always been a fan of shortcuts, especially in development environments like Visual Studio, but also general shortcuts in Windows or other applications. For instance I never do File -> Open. I always use ctrl -> O and it always annoys me when a program does not support the most common shortcuts. However, I still feel I can learn and use more of them.

We can divide developers into three groups related to the above:

  1. Love the mouse and rarely use shortcuts
  2. Use mouse often, but use shortcuts for the most common actions
  3. Use the mouse only when there's no shortcut for the action.

I think I can put myself in category 2 and I'm not sure if I want to or are able to be in category 3. One important aspect to consider before I dig myself to deep into this, is that you don't necessarily produce better software by using a lots of shortcuts (obviously). However I'm quite sure that a developer in group 3 produce code faster than a group 1 developer. But one can argue (if you're a bit extreme) that the quality of the code produced by group 1 is better, because they get more time to think :-) But seriously you can't use this type of groupings for defining developers, but in general I think many developers could benefit from using more shortcuts.

Here are the most common shortcuts in Visual Studio 2005 as I see it:

Builds    
Ctrl+B, Ctrl+S Build BuildSelection
Ctrl+Shift+B Build BuildSolution
Ctrl+Break Build Cancel
     
Debugging    
F5 Debug Start
Ctrl+F5 Debug StartWithoutDebugging
Shift+F5 Debug StopDebugging
F10 Debug StepOver
F11 Debug StepInto
Ctrl+F10 Debug RunToCursor
Shift+F11 Debug StepOut
Ctrl+Shift+F10 Debug SetNextStatement
F9 Debug ToggleBreakpoint
Ctrl+Shift+F9 Debug DeleteAllBreakpoints
     
Navigation    
F12 Edit GoToDefinition
Ctrl+F12 Edit GoToDeclaration
     
Other    
Shift+Alt+Enter View FullScreen
Ctrl+Shift+F12 View NextError
Ctrl+Alt+P Tools AttachtoProcess
Shift+Alt+A Project AddExistingItem
Ctrl+K, Ctrl+M Edit GenerateMethodStub

You probably know where and how already, but if you go to Tools -> Options -> Keyboard in Visual Studio you can define your own shortcuts. This is a great feature of Visual Studio that let you create custom shortcuts for almost every action you can do with a mouse. You can either change an existing shortcut or define new ones. Here's a screenshot of the shortcut dialog in VS:

image

Commands are displayed alphabetically after some type of menu structure (e.g. Edit.Copy), though there a many more commands than you can find in the menu. This list is of course populated dynamically which means you'll find commands for 3rd party VS plugins like e.g. ReSharper. One thing to be aware of though is existing shortcuts. If you for instance want to have the shortcut Ctrl+V, Ctrl+A, you will override the Ctrl+V command for Paste, which is probably not what you want.

Tuesday, February 26, 2008 2:53:51 AM (W. Europe Standard Time, UTC+01:00)
 Wednesday, November 21, 2007
VSOrcas.gifYou probably know allready, but Visual Studio 2008 is now available on MSDN Subscriptions for download. If you don't have an MSDN Subsription I'm afraid you'll have to wait until February 2008...

Wednesday, November 21, 2007 12:07:24 AM (W. Europe Standard Time, UTC+01:00)
 Monday, November 05, 2007
VSOrcas.gifThe wait is almost over. At TechEd Barcelona Microsoft announced the release date of Visual Studio 2008 and .Net Framework 3.5. Check out the official press release here: http://www.microsoft.com/presspass/press/2007/nov07/11-05TechEdDevelopersPR.mspx

.Net | Events | TechEd | Tools | VisualStudio
Monday, November 05, 2007 11:36:07 PM (W. Europe Standard Time, UTC+01:00)
 Sunday, August 19, 2007
If you are like me you probably have a hard time finding something to create when trying out new stuff.  This time I sat down and tried to figure out something to use LINQ and Silverlight for and maybe WCF, WPF and Ajax as well. At the time I was watching TV and the EPG (Electronic Programming Guide) didn’t work, so I started to look for a web site with a program guide supporting reminders and other nice features to let you know what’s on TV. I didn’t find anything good.
I then started to look for an xml/text format for TV programs. I did some searching and came across xmltv. Nice! I now had an xml source looking something like this:

<tv>
  <channel id="channel1">    
    <
display-name lang="nb">Channel 1</display-name>
  </channel>
  <channel id="channel2">
    <display-name lang="en">Channel 2</display-name>
  </channel>
  ...
  <programme start="20070801033000 +0200" stop="20070801053000 +0200" channel="channel1">
    <title lang="nb">Program 1</title>
    <desc lang="nb">Program description.</desc>
    <credits>
      <director>...</director>
      <actor>...</actor>
      <actor>...</actor>
    </credits>
    <date>2004</date>
    <category lang="en">movie</category>
    <category lang="en">drama</category>
  </programme>
  ...
</tv>

So now I had an xml document containing all the data I needed and this was a perfect time to try out XLINQ. I decided to stick with the LINQ query syntax and not mix in Lambda expressions to keep things simple and readable. I came up with this expression to get all TV channels:
public List<TvChannel> GetTvChannelsWithoutGuide()
{
IEnumerable<TvChannel> channels; try
{ XElement tvGuide = XElement.Load(_xmlFileLoc);

channels = from c in tvGuide.Descendants("channel")
orderby (string)c.Element("display-name") ascending
select new TvChannel
{
Id = (string)c.Attribute("id"),
Name = (string)c.Element("display-name"),
Lang = (string)c.Element("display-name").Attribute("lang"),
TvGuideLoaded = false
};
} catch (FileNotFoundException fileNotFoundEx) { throw new FileNotFoundException(string.Format("Xml file for tv guide not found at {0}",
_xmlFileLoc), fileNotFoundEx); } return channels.ToList<TvChannel>(); }

The XElement gives me the complete xml document that I can use XLINQ expressions on. In my query I’m looking only for TV channels, so I specify that in the query by

    from c in tvGuide.Descendants("channel")

This gives my a variable c that I use in my orderby clause and select statement. The orderby clause

    orderby (string)c.Element("display-name") ascending


uses the c variable to access the “display-name” element to set order by. But it’s the select statement which is the cool thing here! First here a listing of the TvChannel class:
[Serializable]
public class TvChannel {
public string Id { get; set; } public string Name { get; set; } public string Lang { get; set; }

[XmlIgnore]
public IEnumerable<TvProgramme> TvGuideNonSerializable { get { return TvGuide; } set { TvGuide = value.ToList(); } }

public List<TvProgramme> TvGuide
{ get; set; } public bool TvGuideLoaded { get; set; } } 
Ignore the TvGuideNonSerializable property for now. By using select new TvChannel I can create an object of my TvChannel class an assign data from the xml document to my properties. I just love this syntax! It’s really nice and easally understandable. Another cool feature (running VS 2008 Beta 2) is that you get ItelliSense in LINQ for your classes, like this:

LinqIntellisence.png

I also created other methods for retrieving all programs for one channel, all channels etc. At the time of writing I’m working on a Silverlight implementation for the TvGuide which I hopefully can show you soon. And later I’ll make all source code available.

.Net | CSharp | Linq | TvGuide | VisualStudio
Sunday, August 19, 2007 1:11:51 PM (W. Europe Daylight Time, UTC+02:00)
 Thursday, July 12, 2007
Yes, it’s important to distinguish between the two. At the partner conference in Denver Kim Saunders (Senior Director, SQL Server Marketing) said that they launch SQL Server 2008 in February, but the actual release will be in Q2. And by launching they mean that they have all the marketing material and the final product information, but not the product.

As for Visual Studio and Windows Server I have not yet heard anything similar, so I'm still thinking 27th for these.
Thursday, July 12, 2007 4:10:11 PM (W. Europe Daylight Time, UTC+02:00)
 Tuesday, July 10, 2007

Update: At TechEd Barcelona Microsoft announced today (2007-11-05) that Visual Studio 2008 and .Net Framework 3.5 will release in late November. See the official press release here: http://www.microsoft.com/presspass/press/2007/nov07/11-05TechEdDevelopersPR.mspx


I’m at the Microsoft Partner Conference in Devner where Microsoft just announced the release date for Visual Studio 2008, SQL Server 2008 and Windows Server 2008. Look forward to February 27!

Tuesday, July 10, 2007 9:11:44 PM (W. Europe Daylight Time, UTC+02:00)
 Sunday, April 22, 2007
VSOrcas.gifBeta 1 is now available and you'll find it here: http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx. I think you'll either need a MSDN subscription to get it or Virtual PC (you can download the Orcas vpc image here). Enjoy!

Sunday, April 22, 2007 9:43:19 AM (W. Europe Daylight Time, UTC+02:00)
 Wednesday, January 24, 2007
MsdnLive.jpgDon't forget to register for MSDN Live in Bergen 13. February! It's no surprise that Ajax and IIS 7 attract a lot of people to this event, so register now before it's full. You don't want to become the guy, who wasn't there, would you? ;) You can even pick up some Tips & Tricks for VS 2005. If this Tips & Tricks session is the same as at TechEd, you'll have to see it!
Wednesday, January 24, 2007 12:37:07 AM (W. Europe Standard Time, UTC+01:00)
 Wednesday, January 17, 2007
NNUG.jpgJust wanted to let you know that we have put out the agenda for the january meeting at NNUG in Bergen. You'll find it here: http://www.nnug.no/Avdelinger/Bergen/Moter/Brukergruppemote-Januar/. Don't forget to register so we know how much food to order. See you there.

Wednesday, January 17, 2007 12:33:45 AM (W. Europe Standard Time, UTC+01:00)
 Friday, December 15, 2006
During the day I found two new releases. Asp.net Ajax RC is out (http://ajax.asp.net/) and Visual Studio 2005 SP1 is released (http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx). I vote for Monday releases, so we can get paid testing them. Since I can’t keep my hands off these two, my weekend is ruined! :) Enjoy!

Update: You might want to have a look at Scott Guthrie’s blog before running the installation. He has some tips you should have a look at. Both for pre Vista and Vista operation systems. You'll find his post on vs sp1 here and vista here.
.Net | Ajax | Web | VisualStudio
Friday, December 15, 2006 1:00:00 AM (W. Europe Standard Time, UTC+01:00)
 
Aggregate Me!
Feed your aggregator (RSS 2.0)  Rss
Locations of visitors to this page