Scott Hanselman

Hanselminutes Podcast 53 - Hiring and Interviewing Engineers

March 2, '07 Comments [9] Posted in Podcast | Programming
Sponsored By

My fifty-third podcast is up. In the ridiculous wake of FizzBuzz, we talk about more practical techniques for interviewing engineers, and Scott interviews Carl for a job as a programmer.

ACTION: Please vote for us on Podcast Alley! Digg us at Digg Podcasts!

Links from the Show

Using FizzBuzz to Find Developers who Grok Coding (mgx)
Don't Overthink FizzBuzz (mh0)
On Interviewing Programmers (mh3)
Why Can't Programmers.. Program? (mgy)
Programming Jokes compiled by Raganwald (mh1)
The Guerrilla Guide to Interviewing (version 3.0) (mh4)
You Can't Teach Height - Measuring Programmer Competence via FizzBuzz (mgz)
What Great .NET Developers Ought To Know (More .NET Interview Questions) (mh2)

Subscribe: Feed-icon-16x16 Subscribe to my Podcast in iTunes

Do also remember the archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Our sponsors are /n software and Telerik.

Telerik is a new sponsor. Check out their UI Suite of controls for ASP.NET. It's very hardcore stuff. One of the things I appreciate about Telerik is their commitment to completeness. For example, they have a page about their Right-to-Left support while some vendors have zero support, or don't bother testing. They also are committed to XHTML compliance and publish their roadmap. It's nice when your controls vendor is very transparent.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

  • The basic MP3 feed is here, and the iPod friendly one is here. There's a number of other ways you can get it (streaming, straight download, etc) that are all up on the site just below the fold. I use iTunes, myself, to listen to most podcasts, but I also use FeedDemon and it's built in support.
  • Note that for now, because of bandwidth constraints, the feeds always have just the current show. If you want to get an old show (and because many Podcasting Clients aren't smart enough to not download the file more than once) you can always find them at http://www.hanselminutes.com.
  • I have, and will, also include the enclosures to this feed you're reading, so if you're already subscribed to ComputerZen and you're not interested in cluttering your life with another feed, you have the choice to get the 'cast as well.
  • If there's a topic you'd like to hear, perhaps one that is better spoken than presented on a blog, or a great tool you can't live without, contact me and I'll get it in the queue!

Enjoy. Who knows what'll happen in the next show?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Virtual PC Tips and Hardware Assisted Virtualization

March 2, '07 Comments [6] Posted in Reviews | Tools
Sponsored By

I posted a list of tips on Optimizing Performance on Virtual PC a while back, and I'm a big fan of Invirtus VM OptimizerJeff prefers to do the optimizations himself, but the time saved is worth the $70 for a tool like this. With the new Orcas March CTP available as a VM and weighing in at 9 gigs, I need to save all the time I can. Frankly, anything I can do to squeeze performance out of a VM is a good thing.

Be sure to check out Tim Sneath's VM Museum - that's where I snarfed the Windows 3.1 VPC picture.

  • I always run my VMs on a different spindle:
    • I swear by the WDC My Book drives, I've got two at work that we run VMs on and one at home.
  • At work, because we're in banking, virtually EVERYTHING is encrypted. If it's not chained down, it's either encrypted, or encrypting. I use TrueCrypt at the Partition-level with AES on my 500gig drives - the ones I run my VMs on, and you'd think it'd cramp my style, but it's actually not all that bad.
  • I run VM Optimizer (the automated version) on all my drives.
  • I have 4 gigs of RAM on one machine, and 2 gigs on the other...I tend to dedicate between 512M and 768M to my VMs.
  • I run my VMs without swap files if I have dedicated enough RAM to them. 
  • I always make sure my VM is running the latest version of the Virtual PC Additions.
  • I turn off features I don't need in the VM. Sound and USB support are often the first to go.

I run both Virtual PC and Virtual Server on my work machine. Why, you ask? Here's my reasoning, from a very good paper comparing Virtual PC and Virtual Server.

  • Host multiprocessor support. Virtual Server scales across multiple processors on the host computer—up to 32. Each running virtual machine can take advantage of up to one CPU. For example, on a 32-processor host computer, you could allocate your CPU capacity so that 31 simultaneously running virtual machines would each use up to one CPU, leaving a CPU free for the host operating system.
  • Multithreading. Virtual Server 2005 is a multithreaded application that runs as a system service, with each virtual machine running in its own thread of execution. In contrast, Virtual PC is a single-threaded application in which all simultaneously running virtual machines run on the same processor.
  • Virtual networking. With Virtual Server, you can create an unlimited number of virtual networks, each with its own virtual Dynamic Host Configuration Protocol (DHCP) server. You can also configure Domain Name System (DNS) and Windows Internet Name Service (WINS) servers, Internet Protocol (IP) addresses, and IP address lease time.

Since I've got a Core Duo machine, this made sense to me. I can dedicate (mostly) a VM to one processor, or more importantly, I can run multiple VMs (often done when doing large demos) and get better performance. When running multiple VMs as a group, you can get better performance by using separate external disks for each VM, and ensuring, if they are USB2, that each disk has its own dedicated USB2 "Root Hub." Avoid during concurrent disk access with two drives on the same USB root hub.

Another interesting feature in both Virtual Server 2005 R2 and Virtual PC 2007 is Hardware Assisted Virtualization or VT Technology. You'll need to turn it on in both apps (Here's how to turn on Hardware Virtualization in Virtual Server).

Note the check box. Here's the trick, though. You not only have to have a CPU that supports this - nearly all newer Intels and AMDs - but often you have to turn it on in the BIOs. My IBM T60 and T60p had this turned OFF by default. Another thing to note is that it's often turned off again after BIOs upgrades. I'm not sure why that is, as it seems harmless, but either way, be aware.

If you're running Intel, refer to this table at Intel to see if your chip supports VT. All the Core Duos support VT except the ones that end in "E" like the Intel Core Duo processor T2300E .

Here's some more details about VT from Intel. Since Operating Systems, by their nature and definition, don't expect to have to share physical resources, they tend to get pissy when asked to. Hardware Virtualization moves a bunch of the "platform management" computational tasks off to the hardware, removing a layer of abstraction. Without hardware help, lots of CPU state information is stored in memory, while with virtualization, it's stored in memory that's dedicated. In a data-center or hosted virtual environment that means that you can't take down the whole "Virtual Farm" by taking down the one VM.

So, now the real question is, does Hardware Virtualization actually make things faster?

Yes, of course it does. But for Windows VMs, it's not like "night and day" different. It's not twice as fast, which some folks feel it should, mostly based on the words "Hardware Assisted" and fueled by past pain of running within a slow VM.

Both Virtual PC Guy and John Howard have done some analysis in this area. Before we get to the nitty gritty, let's just drink in these paragraphs from Virtual PC Guy (emphasis mine):

Now - in order to provide improved performance, our Virtual Machine Additions will (on Windows virtual machines) make appropriate changes to the guest operating system such that we can run the virtual machines kernel mode code directly on the processor too (please note that there are some major simplifications in the above statements).

Hardware virtualization support allows us to run all of the virtual machine code directly on the processor in virtualized mode (with a few edge case exceptions).  So getting back to the original question - what does this all mean for Virtual Server?

Well the first interesting point to make is that it does not make much difference for people running Windows virtual machines with the Virtual Machine Additions installed.  As I mentioned we had already managed to get these virtual machines running almost entirely virtualized (from a processor perspective). 

Basically, this jibes with what I found. It's faster, but it's not like WOW faster when running a tuned VM that has Virtual PC Additions - which is what you should be doing anyway. (Some folks haven't discovered those Additions...make sure you've installed them.)

That said, John did an install of Windows Server 2003 on two VMs, on with hardware virtualization and one without:

Step With Hardware
Assistance
(Seconds)
Without Hardware
Assistance
(Seconds)
Improvement
(Seconds/%)
1: Text Mode Install 236 334 98s=29%
2: Initial GUI Install 167 287 120s=42%
3: GUI Install Completion 733 985 252=26%
4: Boot with additions 10 14 4=29%
 * From John Howard's Blog

He's got some nice charts to check out as well.

From my point of view, check a box, get 10-30% performance improvement. Seems good to me.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Webinar: Online Banking 2.0

March 1, '07 Comments [7] Posted in Corillian | eFinance
Sponsored By

UPDATE: A recorded REPLAY of this Webcast is available now.

If you're interested in what Corillian does, or just in Banking and eFinance in general, there's a free Web Seminar tomorrow on Online Banking 2.0, March 1st, at 11AM PT/2PM ET.

It's presented by one of Corillian's Product Managers, Max Janasik, and it's going to be pretty interesting. I worked a little on the PPT deck, but what's really interesting is the influence of Social Networking and the general "Common Sense and Good Feelings" around Web 2.0 that we're trying to start spreading around the Banking Community. Starting conversations with your customers, gaining their trust and general business transparency are more and more an issue in the emerging web.

Also, if you're interested because of Corillian's recent announcement about being acquired by CheckFree, you'll see some interesting UI things that both Corillian and CheckFree are working on, and maybe get a glimpse of what a Next Generation Banking experience might look like.

Be sure to register ahead of time.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Running PowerShell Scripts from the Command Line in a Hidden Window

February 28, '07 Comments [1] Posted in PowerShell | Tools
Sponsored By

Dave P. said the comments of a previous post "...but it's ugly b/c it actually opens a command window to do it. Batch files don't have this issue. Now if you can figure out a way to run powershell scripts in a hidden window, then you'd be onto something."

Running PowerShell Scripts from the command line is obscure and yucky to be clear, mostly because of escaping of quotes and such.

If you want to run a hidden powershell script, you can use HStart from the awesomeness that is NTWind Software. (Just go over there and download all of his utilities and save yourself some time).

Here's how to run a hidden powershell script:

hstart /nowindow "powershell.exe -command ""&" 'c:\DOCUME~1\Scott\desktop\foo.ps1'""

If you're going to start running hidden scripts like this, or any script, make sure that you've got PowerShell transcripts started with start-transcript and stop-transcript.

**********************
Windows PowerShell Transcript Start
Start time: 20070228113605
Username : MYDOMAIN\Scott
Machine : SUPERDUPERWONDERFUL-T60P (Microsoft Windows NT 5.1.2600 Service Pack 2)
**********************
Transcript started, output file is C:\Documents and Settings\Scott\My Docume
nts\WindowsPowerShell\Transcripts\20070228.113605.3196.txt

GAC Version Location
--- ------- --------
False v1.1.4322 C:\Documents and Settings\Scott\My Documents\Window...
Setting environment for using Microsoft Visual Studio 2005 x86 tools.

True v2.0.50727 C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0....

Hey! I'm in powershell (this is my script running)
**********************
Windows PowerShell Transcript End
End time: 20070228113605
**********************

You can make your scripts run faster by turning off the profile with the -noprofile switch, but be aware you'll have no profile and might not have some helper functions you've previously setup.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Office 2007 Foxit PDF Previewer/Handler

February 28, '07 Comments [18] Posted in Reviews | Tools
Sponsored By

Tim Heuer gives to the community and don't let anyone tell you otherwise. 

Everyone's been waiting ((and waiting) and waiting) for a PDF Previewer for Outlook 2007. I'm shocked that Adobe didn't get their act together in time and release one at the time of the launch. It would have been a compelling enough reason to actually put the crapware software on my system.

Well, of course you know I love Foxit Software because their tiny and glorious little PDF Reader (and PDF Creator) software keeps my computer moving fast and Adobe-(Reader) free.

Update for clarity - I'm complaining about how slow Acrobat 7 is, especially with regard to all it's plugins that it starts up during the splash screen. It's true that Foxit has crashed on larger PDFs and there's some quirky rendering sometimes, but I currently still prefer it for "casual PDF'ing." As for Adobe the company, I love PhotoShop, so I'm not impugning the whole building.

Now, Tim has combined the Foxit ActiveX SDK and an MSDN sample on how to create an Office Preview Handler and just called Foxit up. (The MSDN one uses Acrobat if you like.)

Bam. It was done.

WARNING: The PDF Previewer only works on Vista right now. Tim says via email:

"The problem with XP is that the preview handler model is slightly different.

In Vista, the preview handler is provided through a managed preview surrogate (you can see it running when you do a preview) called prevhost.exe.  In XP, this doesn’t exist and the preview must be handled by a COM surrogate."

Last year Tim wrote a Code Preview Handler (not sure if this works in XP?) so I guess I'll be collecting the best of these, methinks!

Let's all go over and crush Tim's blog with comments of encouragement. And convince him to make XP versions. He says:

"So, the next step for this project for me is to create the managed COM host for this code-base.  I have some stuff researched…but anyone interested in providing that host is appreciated. Time is not on my side for that one."

If you have the expertise and can write the unmanaged COM code, give him a shout.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

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