Browsing Posts published by james

Consolas is a new mono-spaced font being introduced with Vista. John, Scott, and others have been raving about it for months. It’s designed to be a comfortable font for programming and is a huge leap forward from Courier. (Personally I’ve been using Lucida Console for years as it’s easier on the eyes than Courier. Consolas is a step better than that.) Various folks have documented how to “borrow” the font from Vista builds to use on your WinXP computers. Now there is no reason to hack it as Microsoft is providing a download of Consolas for Visual Studio 2005. The installer even sets your default editor font in VS2005 to Consolas so you don’t have to. Sweet!

N.B. Consolas has been optimized for ClearType. So make sure you turn on ClearType! You can use the ClearType Web interface or downloadable PowerToy Tuner. (You can also turn it on via Display Properties, but you can’t adjust it. It’s also buried deep in the options. So it’s easiest to use the web interface or PowerToy.)

[Via Scott Hanselman]

[Image “borrowed” from John Bristowe]

UPDATE: For some strange reason, Consolas wasn’t appearing in my list of available fonts for any program. (This included VS2005 and Notepad!) The registry entries for the Consolas font in VS2005 looked kosher for my user account and if I launched VS2005 as the local Administrator, Consolas appeared correctly in font selection dialogs. I just couldn’t get it to appear for my user account. Logging out and logging back in (without changing any security settings, registry entries, or other configuration) resulted in Consolas spontaneously appearing and working in VS2005 and Notepad.

Time to let the proverbial cat out of the bag. It’s probably the worst kept secret this side of the Rockies, but I’ve gone independent. JamesKovacs.com Consulting Inc. is open and ready for business. If you’re looking for assistance with .NET development, architecture, agile techniques, or object-oriented analysis and design, email me at jkovacs@post.harvard.edu and I would be happy to chat. I’m interested in both short-term and long-term engagements. Whether you need an experienced team lead to mentor your team on .NET a few hours a week or a seasoned architect to design your paradigm-shifting* application, I can help.

* Paradigm-shifts are limited to one per customer, some restrictions may apply, void where prohibited, …

One of my fellow plumbers, John Bristowe – techno-wonk extraordinaire – has started up a new podcast where he interviews developers from across the Great White North. He’s shipping them in bite-sized pieces that are about 15 minutes long. The first three interviews feature:

Go check it out!

Actually you can get virtualization completely free these days. From VMWare, we have VMWare Player, which is based on VMWare Workstation, and VMWare Server, which is based on VMWare GSX Server. Microsoft recently announced that Microsoft Virtual Server 2005 R2 is now free. Microsoft is even supporting Linux with Virtual Server, including virtual machine additions for Linux. Microsoft has also loosened up its licensing policy when it comes to virtualization technologies. So whether you prefer VMWare’s or Microsoft’s virtualization products, things just got a whole lot cheaper!

I double-checked that this wasn’t released on April 1st, but Apple will be supporting a dual-boot configuration for Intel-based Macs that let’s you chose between Mac OSX and Windows XP SP2. The code name is Boot Camp and it’s currently in public beta. You need to own your own copy of Windows, but Boot Camp deals with the Mactel’s EFI (as opposed to BIOS that PCs use) and finding all the hardware drivers for your Windows install. More details on the Apple site. Crazy stuff.

John, Bil, and I are tending bar and the Pan Galactic Gargle Blasters are on the house. You can grab one here. The episode will hit MSDN Canada Community Radio in the near future.

Show Notes

  • Introduction
  • News Bytes: IronPython v1.0 Beta 4
  • The 73+ Languages in .NET
  • News Bytes: Windows Workflow Foundation (WinWF) v2.2 CTP
  • News Bytes: SQL Server 2005 SP1 CTP
  • News Bytes: Visual Studio SDK CTP
  • Developer Destinations: Matt Hawley (eWorld Controls)
  • Intel Developer Platform Update
  • Huh? Power per instruction? Wow.
  • Multi-Core CPUs and Moore’s Law
  • on10.net and Leeroy Jenkins
  • Blackberry .NET Development with AppForge’s Crossfire
  • Multi-Platform Frameworks
  • TestDriven.net
  • Scott Hanselman and DasBlog at Alberta .NET User Group
  • Do You Own a Mac? Got Windows XP?
  • John C. Dvorak: Windows XP Now!
  • Calgary Code Camp – May 27, 2006
  • Vance Morrison – CLR Performance Dude
  • James on Locks and Lockless Programming
  • Double-Check Locking and CPU Architectures
  • MSDN Canada realDEVELOPMENT_06
  • Time Management with TimeSnapper.com
  • John Sans 360
  • John’s Peter Griffin Moment
  • Sony Delays the PS3
  • Halo and Aliens

Resources

I am currently involved in organizing the Calgary Code Camp, which will be held
in downtown Calgary on Saturday, May 27, 2006. You are probaby wondering, “What
is a Code Camp?” Simply put, a Code Camp is a developer event by and for the
developer community. You get a full day of developer-focused content created by
fellow developers, not marketing wonks. You’ll see code, code, and more code. We
are planning sessions on the usual suspects – ASP.NET, Windows Forms, and Web
Services. We’ll also have sessions on upcoming technologies such as WinFX, Windows Workflow Foundation (WinWF),
Windows Communication Foundation
(WCF)
, and Windows Presentation Foundation (WPF), and the new Microsoft
Command Shell (codename Monad). In addition to technology-focused sessions,
we’ll have sessions on development techniques and tools such as unit testing,
test-driven development (TDD), continuous integration, code coverage, and
more!

You’re wondering how much will all this goodness cost me? Well as Dr. Nick
from the Simpsons would say, “$199.95 and it comes with a free state of Kansas
Jello mould!” Just kidding. This event is COMPLETELY FREE. A
full day of code and fun with cool door prizes for absolutely nothing. We’ll be
posting speakers and sessions on the website as they’re confirmed. Drop by the
Calgary Code Camp Website and
sign-up. See you there!!!

Call for Speakers!

If you would like to speak at the event, please send a brief description of
yourself and your topic to proposals@calgarycodecamp.com.

Call for Sponsors!

If you are interested in sponsoring the Calgary Code Camp, please contact us
at sponsorship@calgarycodecamp.com.

Fellow plumber, Bil Simser, asks the question how the heck does someone debug SharePoint as a non-admin. Elementary, my dear Simser, elementary…

The fundamental problem that Bil is experiencing occurs with SharePoint, ASP.NET, or any app that runs under a different security context than your own. A normal user can only debug applications running under his/her own security context.* Administrators have the SeDebug privilege, which allows them to debug processes running under any security context. Granting your user the SeDebug privilege gives them tremendous power, which is exactly what you’re trying to avoid. (With SeDebug, you can open any process, including system processes with full permissions. If you can do that, you own the box. I leave it as an exercise to the reader to figure out how, given only SeDebug, to elevate your normal user to be a member of the local administrators group.) I know of a few solutions to allow debugging of server processes:

  1. Develop server apps in an isolated virtual machine and use an admin account.
  2. Run as admin when debugging server apps, but run as a normal user while developing them. (This can be done using MakeMeAdmin and then running devenv.)
  3. Run the server app under your user account, though this may mean placing your username/password in clear text, which is non-ideal. (This is the strategy used by the Visual Web Developer Web Server – aka Cassini – that ships with VS 2005.)

* Note that although you don’t require any special privileges to debug a process running under your own security context, Visual Studio does enforce that you need to be a member of the Debugger Users group.

EDIT: Additional information added below related to Bil’s comment.

Bil is correct. If you run Visual Studio as a non-admin when developing server apps and you want to debug, you need to break stride and launch another copy of Visual Studio using MakeMeAdmin or runas. This is highly non-ideal. Is it a huge security risk to run Visual Studio under an admin account while the rest of your log-in session is running as a normal user? Somewhat, but it’s a lot better than running your entire log-in session as an admin.

Also remember one of the main reasons for developing apps as a non-admin – to ensure that you are running/debugging with credentials similar to what your end users will be using. (i.e. Your app isn’t writing to protected regions of the file system or registry to which normal users don’t have access.) With server apps, the story is a bit different. You want your server app to be running with different credentials – the credentials of the account that the application will be running under in production – NETWORK SERVICE or other service account. The safest solution is #1 above. Develop server apps as an admin in an isolated virtual machine. Second would be running only Visual Studio under elevated privileges using technique #2. Although technique #3 above works, you run the risk of developing your server code under unrealistic conditions – for instance, you’ll have a logged in user with a loaded HKCU hive. If you want to try option #3, you’ll have to configure your application pool and/or ASP.NET application to run as your current (non-admin) user. For the app pool identity, you can configure that using the IIS Manager MMC. For ASP.NET, you have to modify the following in machine.config:

<configuration>
  <system.web>
    <processModel username="" password=""/>
  </system.web>
</configuration>

Although you can store this in cleartext, I would recommend against it for obvious reasons. Take a look at aspnet_setreg.exe and the following KB article on how to store this information securely:

How to use the ASP.NET utility to encrypt credentials and session state connection strings

First we had Joel Semeniuk speaking about VSTS in January. Now more Microsoft Regional Directors are descending on our fair city!

Juval Lowy of iDesign will be speaking about Windows Communication Foundation (WCF aka Indigo) at the Calary .NET User Group on March 23, 2006 from 5 to 8pm. You can find details and registration on the Calgary .NET User Group website.

Also in March, Scott Hanselman of Corillian Corporation will be speaking about Anatomy of a Successful ASP.NET Application – Inside DasBlog at the Alberta .NET User Group on March 30, 2006 from 12 to 1pm. You can find details and registration on the Alberta .NET User Group website.

Coming in June, Richard Campbell of Campbell Associates will be speaking about SQL Querying Tips & Techniques at the Alberta .NET User Group on June 1, 2006 from 12 to 1pm. You can find details and registration on the Alberta .NET User Group website, though registration doesn’t appear to be open yet.

Juval, Scott, and Richard are all Microsoft Regional Directors, frequent speakers at conferences and user groups, and prolific authors. You don’t want to miss these opportunities to hear them speak!