Public musings, often on software development RSS 2.0
# Wednesday, January 06, 2010

I managed to note on Twitter that I was speaking last night to the San Diego .NET Developers Group.  The session went well, it was an updated version of the presentation I did last year related to working with Boot to VHD and it's usefulness in working with Beta software and in this case actually digging into Visual Studio 2010 Beta 2.  The slides have been updated (and will be again prior to code camp) so for those who are interested here are my slides.  You'll note a couple that are heavy on graphics - yes those are the ones I incorporated from Microsoft materials, I don't make pretty pictures -especially not if my face is in them :-)

VS2010_1_5._2010.pdf (2.01 MB)
Wednesday, January 06, 2010 11:22:14 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0] -
.NET | C# | PresentationMaterials | Technology | Visual Basic
# Sunday, October 18, 2009

A few weeks ago I presented to the San Diego .NET User Group.  Let me say I really like their new meeting location at Intuit, and below my post those of you who attended my presentation will find a copy of my slides.

The title of the presentation is of course a play on an old saying about being adrift at sea “Water, water everywhere, but not a drop to drink.”  It occurred to me that there was a parallel to this situation and beta software.  After all while you may here about all sorts of new features within beta software, for most corporate developers; deploying solutions that leverage these technologies isn’t always possible.  In fact for some the organizations are so short term focused that even working with these technologies may be difficult, since I’ve seen developer’s install beta software on their primary work system, corrupt it and as a result the organization starts to take a ‘no beta’ approach to reviewing new technology.

Given that even a few weeks ago, the beta 1 release of Visual Studio 2010 was starting show its age I wanted a presentation that would better explain to developers some best practices when working with Beta and Community Technology Preview (CTP) software.  After all while part of the session was to look at some of the new features of Visual Studio 2010, I wanted attendees to come away with some best practices in terms of working with the array of beta products that Microsoft is making available in this release wave. Unlike beta 1 or earlier CTP versions from Microsoft, my experience is that when you get to Beta 2 or RC you have something that’s usable for more than just planning.  In fact I really believe that if you are developing a new solution and looking at 3-6 months for a release timeframe you should be using the Beta 2 technology and considering leveraging a ‘Go Live’ license if you are ready before the product releases.

Every few years the product groups align such that whether it is a new OS plus a new Office plus a new Visual Studio or a new version of SQL Server or new versions of a bunch of other products that what you get from Redmond is a wave of new products.  Most of these products spend some overlapping time in beta release, for example Visual Studio Beta 1 came out while Windows 7 was in RC, and since coming out there has been a CTP of Office 2010.  This week we’ll see Windows 7 launch (it’s release was back in August) and soon we should see a beta 2 for Visual Studio 2010 (no later than the PDC)(http://visualstudiomagazine.com/Blogs/RDN-Express/2009/09/VS2010-and-.NET-4-Beta-2-Expected-Soon.aspx), and of course updates to the Office 2010 pre-release versions (isn’t there a SharePoint conference coming up, not to mention PDC… there ought to be something prior to the holidays. http://www.mssharepointconference.com/Pages/default.aspx)

So at this rate if you want to try an keep up and work with the new technology you probably are thinking VPC.  As most of us are aware, over the past few years virtual machines have been to Beta software what the Internet was to networked computing.  However, the one disadvantage of VPC was that of performance.  The fact is things like Windows 7 Beta and Visual Studio 2010 Beta 1 run agonizingly slow on VPC.  Here you are trying to follow best practice and not risk corrupting your core system, but as a result working with the technology borders on impossible.  Fortunately Windows 7 took a huge step toward resolving this issue with BootToVHD.

Boot to VHD makes allows you to set up a virtual machine and then during the boot process select it as the boot partition instead of your primary OS.  As you might imagine this implementation is closer to another way of handling multiple operating systems on a singly physical system’s hardware – multiple partitions.  What’s really being virtualized however is the partition.  In the past you would tell the physical hard drive that the a given percentage of it’s space was to be treated as logically separated from the rest of the hard drive.  There are several disadvantages to these physical partitions, including the ability to resize them, the fact they lock in a percentage of the hard drive even if you won’t use that much space, the fact that refreshing them isn’t easy.  Let’s face it there were enough issues that VPC was easily the solution of choice.

A VHD for those unfamiliar with the acronym is a Virtual Hard Drive, and it is the format used by VPC (but not VMWare) to represent a virtual machine’s disk drive.  The advantages are many, I can set the drive to expand only as space is required.  Once I’ve pointed my boot options to a VHD file, I can swap it out for a different VHD file and the operating system is none the wiser.  This alone allows me to create a baseline image, prep it and then when I need to I can replace my VHD to quickly start on a clean system.

However, it gets better – as noted by Scott Hanselman there is a CScript tool which will allow you to create that Baseline image using the tools from the Windows 7 Automated Installation Kit (AIK).  The focus of the slides below is to leverage information I found in 3 different blog posts (two from Scott and one from Michael Waterman. While I identify how to find Scott’s posts via Bing in the slides, I don’t mention Michael’s excellent PDF document specifically. The order I worked with them was to first read Scott’s posts which helped me get a baseline, and I then download the PDF file from Michael Waterman located at the bottom of his blog post here: http://blogs.technet.com/michw/archive/2009/08/01/windows-native-vhd-boot-deployment-scenarios.aspx  Of course Michael’s document goes at if from the lowest level and as you’ll learn from Scott’s postings, teh Wim2VHD script makes this unnecessary.

While Michael’s post and PDF go through the details of manually creating a VHD to support the Native VHD Boot scenario they are still great reference.  Plus there is one take-away remaining from his post/pdf; the use of the tool DISM.exe.  To quote from his PDF: “The tool we will use is new to Windows 7 and is called the DISM tool, which stands for ‘Deployment Image Servicing and Management’.” This tool allows you to retrieve the names of the images which are available on your DVD.  This becomes important as you’ll see with the enclosed instructions in order to tell the Wim2VHD.wsf. 

The net result as I point out in the slides, is that although images created to support Boot to VHD aren’t as portable as those which are truly virtual a new image can be spun up in under an hour as opposed to a lengthy set up, and by following another tip – don’t activate the image until you need to it becomes possible to quickly spin up, test and replace images.  Rather than run through everything else, with regard to the advantages and disadvantages of VHD images for native boot, let me give you a link to the slides here: NetUGSeptPresentation.pdf (479.09 KB)

and mention my configuration.  I’m running a Dell laptop as my primary development machine.  On it I have a reasonably nice solid state hard drive.  Which means when I configured my laptop I chose disk speed over space.  I’ve had the laptop about 10 months and let I’m as certain as ever I made the correct choice due to another enabling technology.  The drive on my laptop is limited, however, I purchased a relatively inexpensive external WD hard drive.  The 1TB WD My Book series supports e-Sata connectivity.  For those that aren’t aware it essentially provides the access speed of an internal drive (not quite but about 3x USB or Firewire speeds).  This means I can and do place multiple different images out on the external drive.  Just like the laptop the external drive is portable, I just need to have electrical for two devices instead of two.  If you have eSata and you are still using USB for a primary external drive you are missing out on usable access speeds.

At any rate, feel free to dig through the slides and get a feel on what is coming in Visual Studio 2010 and more importantly how to leverage today’s technology to allow you to quickly and safely leverage all of the Beta software coming from Microsoft as the next release wave of new technology rolls into use.

Sunday, October 18, 2009 2:28:01 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
.NET | C# | PresentationMaterials | Technology | Visual Basic | Windows
# Friday, October 09, 2009

As I believe I noted in the past we’ve started a series of .NET Fundamentals presentation at the start of each user group meeting at the San Diego .NET Developers group.  I was the presenter for the October 6th meeting.  Keep in mind these sessions aren’t about ‘new’ features but rather about reviewing some of the fundamentals which you as a .NET developer need to know.

Attached to this post is a copy of my slides.

NET FundamentalsEvents.pdf (559.42 KB)
Friday, October 09, 2009 9:29:55 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
.NET | C# | PresentationMaterials | Technology | Visual Basic

I’ll publish some of the blog posts which I finish and then think – nope not ready to share that with the world… someday – maybe… or maybe I’ll just leave them somewhere the boys can find them.

Friday, October 09, 2009 9:17:43 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
About the Nerd | Musings
# Monday, July 20, 2009

Yes my blogging frequency is down... fact is I've been getting set up on Twitter... I'll be getting a few posts out over the next week as I process some blog related updates.  Up until about a month or so ago I tended to follow Billy Hollis's school in that Twitter seemed pointless.  However, in reviewing what's been going on I see it CAN be pointless (and for many people is), but managed as a live connection network you can get questions answered, updates on items of interest etc.  For example Kathleen McGrath (http://twitter.com/kathleenmcgrath) is posting a link to a video a day related to VS2010, this was my inspiration for finally signing up.

You can follow me on Twitter as: http://www.twitter.com/nerdnotes I'm working to keep up a regular (3+ times per week) feed of updates for VB developers tagged as #VBDevTips... given that twitter seems to have the memory of a goldfish however (ie. short term only) I may also consolidate these 140< word tips in aggregate blog posts on an irregular basis.

Finally for those interested in the vast array of VB related twitterers there is an index page at:

http://www.cto20.com/home/entryid/112/tweeps-list-microsoft-visual-basic-mvp-rsquo-s-and-influencers.aspx

Monday, July 20, 2009 2:37:26 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
About the Nerd | Visual Basic
# Tuesday, June 02, 2009

Did I mention I was planning on speaking tonight at the San Diego .NET Developer’s group?  I was asked to do a short presentation on Generics as part of tonight’s meeting, as part of something we’ve introduced called .NET Fundamentals.  The idea is that User Groups are meant to help people come up to speed, but of late it seems more and more like we’re only focusing on the latest what’s new, whiz-bang stuff.  So to help with some of the folks who really are just getting started with .NET come up to speed on portions of .NET.

So for those of you who were present for tonight’s short presentation and whom are interested in a copy of my slides, I’ve added a PDF containing those slides.   I enclosed all of the sample ‘code’ as part of the slides and they contain both VB and C# examples (although a few snippets are in just one language or the other for the purposes of space.)

dotNET_Fundamentals_Generics.pdf (1.26 MB)
Tuesday, June 02, 2009 7:12:50 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
.NET | C# | PresentationMaterials | Technology | Visual Basic

Windows 7 is to quote one Microsoft person “A lot closer than most people imagine”… in fact they just announced that general availability (ie. boxes on the shelves) will occur on 10/22/09.  Of course this was old news 5 minutes after it was posted and refers to general availability – not the Release To Manufacturing (RTM) date that really represents when the software will be done and start being available for download if you have an MSDN subscription.

However the focus of this post since I installed a few copies (or more) and since I’m using it on a few machines, are my three (yes only three, and in no particular order) top features and have some notes on using one of them.  (OK actually they are ordered inverse to how much I’m going to write about them…)

The first is the boot to VHD feature.  As I noted you need to ensure you’ve enabled hardware virtualization on your PC, but this feature rocks.

The second which I’m only just starting to work with is the backwards compatibility XP host support.  The idea is that there are several older apps which for a variety of reasons will not run on Vista/Windows 7 natively.  For example old Access applications which leverage the MS Grid OCX stop working when you move beyond XP.  To resolve this, while preserving the core security of the new environment, the Windows team created a compatibility mode which essentially uses a Windows XP VPC in the background, but allows these applications to ‘seem’ to run on the newer system.  The idea sounds like a good way to bring these two opposing needs (I need this old application, and I need all the newest security and capabilities on my computer) together.

My third feature is pinning.  Windows 7 makes it easy to add new items to the Start Menu and to the Windows Task Bar.  The feature makes it easy to keep the most frequently used lists from betraying you.  However there is a way to really leverage this feature better than the default.  You’ll note in the image below I’ve placed both Visual Studio 2008 and Windows Explorer on my start menu. 

 image

By default Windows Explorer comes on the task bar in the RC and I’ve gone to the trouble of moving it.  The reason has to do with how the different locations behave.  When I click on an item pinned to my Start Menu, I get a new instance of that item, even if an instance is already running by default.  To be honest whether copying from one folder to another folder on my local machine, to a USB device or across the network there are a lot of times that I want 2 instances of Windows Explorer.  Similarly I often open two instances of Visual Studio, I’ll be working on one solution and want to review how I did something or examine some sample solution, or access one of my junk test code projects where I quickly test some code… the result is I’ve pinned these items to the start menu.

On the other hand items pinned to the Task Bar do not by default open a second instance of that application.  Thus you’ll note I’ve placed Outlook, Virtual PC, the Snipping Tool, Windows Sticky Notes, and although not shown in the image below SQL Management Studio.  In each of these cases I only need a single instance.  Yes I can ask for a second instance by right clicking on the icon and then selecting the application from the context menu – but creating a second instance isn’t the default and is thus more involved, and in the case of most of my choices isn’t really the desired behavior.

image

My suggestion to you as you might guess is consider where you want to pin items.  Keep in mind that when something is on the Start Menu not only can I open multiple instances, I can pin target documents/folders from the most recently used selection into the context menu next to that item. 

You also may not I skipped Internet Explorer in my list above.  I’m still deciding – for now I’m trying it on the taskbar on separate instances plus tabs.

Finally however, I have a request with regard to the task bar…. I know it won’t be a change to Windows 7 but let’s talk about icons vs. icons and description on the task bar.  When I pin a program to the task bar, you add the icon which is good.  However, For things which aren’t pinned to my task bar I like the description.  As noted above things I pin to the taskbar only typically have one instance – as a result I don’t really ever need to see the label associated with that icon.  On the other hand items like Visual Studio on the task bar show the name of the current project in the label, which is useful.  Yes I realize I can just hover over that item and you’ll give me pictures of what each instance contains – but if you are familiar with Visual Studio you know that isn’t the most useful way of recognizing which is which – on the other hand I can look down at the task bar and know which instance I want even before I can move the mouse to it when it’s labeled.  This isn’t to say I’m not willing to stack similar task bar items when I run out of space – just that if we could keep the items pinned to the taskbar as icons I would have more space for those items where the label is actually useful to me.

Tuesday, June 02, 2009 4:49:36 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings | Technology | Windows
# Saturday, May 30, 2009

A few weeks ago while I was up at Tech Ed during one of the presentations, someone’s phone rang.  We’ve all had that person in the meeting… and in some ways, since everyone has on some occasion forgotten to turn off their phone, let me not cast the first stone here.  The offender headed out to take the call and headed back in after the call… and as soon as they sat down – AGAIN their phone starts ringing.   So at this point its fair game to throw stones… but I thought about my own situation.

I once rarely thought of turning off my phone but a few months ago I set it to vibrate… again… and something strange happened – I forgot to turn the ringer back on.  The next call came in and I knew it and that was it, I’ve just permanently left it on vibrate.  In considering this I thought about all the places where I ‘should’ have the ringer turned off vs. on.  Then I considered the cases where if my phone was in vibrate mode and I wanted the call I wouldn’t know.  For example if I’ve left my phone in another room while I’m playing with my son – I don’t care if it’s “ringing”.  The challenge of course – some women carry their phones in their purse as opposed on their body.  The result is that they don’t feel a vibrating phone – they still need ringers – as do kids who like the attention. 

But seriously if you’re an adult and you carry a cell phone – put it permanently on vibrate.  I recently got a Blackberry and all the messages come in with vibrate mode – not a ringer.  Do you know why they’re called “Crackberry” – because even without ringing those message vibrations are enough to keep people up to date on their messages.

Saturday, May 30, 2009 9:22:43 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings
# Friday, May 29, 2009

As a virtual PC user, and in some cases now at work a VM Ware user, one of the options I’ve always wanted to leverage was acceleration for my virtual machines based on hardware virtualization.  It was something I always wanted while at Internowlogy but of course since I was using 3+ year old hardware, let’s face it the hardware didn’t support it, and odds are if you are using older hardware neither does yours. However, I’ve gotten new laptops since leaving Internowlogy 64-bit high end machines with lots of RAM.  Let me say up front since this post is obviously about how to enable this feature – my performance for my virtual Windows 7 hosting Visual Studio 2010 B1 has dramatically improved since enabling this feature (not to mention the performance of the virtual TFS server I set up here at Rubio’s.)

Originally I wondered if the problem was with the Vista OS so when I installed Windows 7 RC on one of my machines I was looking to leverage hardware virtualization – however, no change.  This became an issue because I wanted to take advantage of Windows 7’s ability to boot directly to VHD and thus set up a system with Windows Server 2007 R2 x64 RC – which isn’t supported by VPC.  Finally I found a little note that Dell doesn’t enable this CPU feature by default.

That’s right if you bought a new Dell you probably have a hardware virtualization capability for Virtual Machines that’s disabled.  To enable it you need to use F2 during startup to edit your BIOS settings.  Depending on which type of Dell you have you’ll either have 1 or 3 settings (based on my experience) related to hardware virtualization.  For those with slightly older PC’s will probably find just a single setting for hardware virtualization which is defaulted to [disabled].  Change this to [Enabled] and that’s it you are done.

Then there are those on the real cutting edge – like my Latitude e6500.  This brand spanking new system has 3 settings related to virtualization (actually closer to 4… but once I explain the potential issue you’ll see why I’ve ignored the 4th).  When you get to the BIOS for that machine there is a section on Virtualization Support.  Within this there are 3 settings: the first titled Virtualization should be enabled.  The second titled ‘VT for Direct I/O’ can also be safely.  However the third titled ‘Trusted Execution’ which deals with protecting information exchanged with the CPU – it’s an Intel ‘feature’.  For now enabling this setting reverses the previous two settings.  So if you are like me and your initial thought is ‘turn it all on’ then you will find that you still don’t have virtualization support, even if you carefully read the instructions under the trusted execution settings and find the TPM setting and enable it.  Don’t bother – it doesn’t help.

So to review: to take full advantage of your Dell’s virtualization capabilities use F2 during startup and go to the bios settings, enable virtualization support but do NOT use Trusted Execution.

Friday, May 29, 2009 12:06:00 AM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
Musings | Technology | Windows
# Wednesday, May 27, 2009

So a couple weeks ago I posted a note prior to the start of TechEd (Time for Tech Ed North America) talking about how if I could have gone this year the one session I would have been certain to not miss was DTL336 Future Directions for Visual Basic with Anders Hejlsberg and Jonathan Aneja.  Well good news this video has been made publicly available.  The video is the full hour of the session and starts with Anders discussing the future of programming languages.

Before I give you the link, let me provide one important tip: Don’t watch it online… you can but you’ll not just below the default viewing window on the right hand side is a download button.  You’ll be tempted to click that – here again – pause and instead right click the download button.  Save the target (DTL336.wmv) to your local machine.  Attempting to watch a full hour of video over the network just isn’t going to be a good experience, and trying to do so in that tiny little window in the browser is just a measure of torture.  The video is available from Tech Ed online at:

http://www.msteched.com/online/view.aspx?tid=1d3d650b-a6b3-4c98-9240-571866969b89

Anders discussion of the future just as it relates to concurrent programming issues is enough to make the download worth it.  I think this was a great session, and speaks well to a very active future for Visual Basic.  I think someone in Redmond finally woke up wrt VB in terms of finally starting to provide the resources people need and which in the past were focused on C# so that more and more people will be able to move into VB on .NET and away from older technologies. 

Wednesday, May 27, 2009 1:22:07 PM (Pacific Daylight Time, UTC-07:00)  #    Comments [0] -
.NET | Technology | Visual Basic
Archive
<February 2010>
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
28123456
78910111213
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Bill Sheldon
Sign In
All Content © 2010, Bill Sheldon