Fog Creek Software
g
Discussion Board




Little things all developers should know

Thanks for reminding me how important it is to think about character sets/encodings, etc. It's cool to see somebody challenge the developer community to learn some basics that are soooo important.

Not long ago I posted a challenge to developers to learn just the basics about security so they might actually start producing Windows apps that I could run without having to be an Admin all the time. Imagine that - a program that doesn't blow up when you run under a normal user account.

Anyway, your readers might enjoy the link. It's controversial and informative.

http://www.develop.com/kbrown/book/html/lifestyle.html

Keith Brown
Monday, October 13, 2003

Keith,

Excellent article - very informative - thanks!

Mark
----
Author of "Comprehensive VB .NET Debugging"
http://www.apress.com/book/bookDisplay.html?bID=128

Mark Pearce
Tuesday, October 14, 2003

First, he says it's easy.  Then, he details the ridiculously long process for reasonably developing under non-admin permissions.

Frankly, I have no desire to jump through all of those hoops.  And the fact that there are those hoops indicates that it's such an unusual environment that not even Windows expects you to do it.

Practically speaking, if you're writing standard end-user software, how likely is it that your user is not an admin on their machine?  It would only seem possible if your software is run by people at work.

Do ANY home users run without admin rights?  OK, OK, I'm sure a few security-paranoid power users, but what about regular users?

David
Tuesday, October 14, 2003

It's interesting that Joel brought this up now.  I also follow "Squawks of the Parrot" ( http://www.sidhe.org/~dan/blog/ ).  This is the blog of Dan Sugalski, the designer of Parrot (the interpreter engine for Perl 6).  He just recently wrote two articles about strings from the perspective of a VM implementor.  One is "What the heck is: A string" ( http://www.sidhe.org/~dan/blog/archives/000255.html ), which talks about the history of string encoding and what makes string handling more complex that most of us programmers realize.  The other is the follow on "Strings, some practical advice" ( http://www.sidhe.org/~dan/blog/archives/000256.html ).  Both are very good.

Doug Alcorn
Tuesday, October 14, 2003

"Practically speaking, if you're writing standard end-user software, how likely is it that your user is not an admin on their machine?"

Practically speaking, how many people write standard end-user software? Almost none. Most work on software that's run inside corporations, where yes, security is tighetened down, and yes, software will be rejected if it fails to run under a normal user account.

I actually believe that Windows XP and 2003 are both ideal environments for non-admin development. XP gives you fast user switching, and 2003 lets you Remote Desktop back into your own box as admin to do admin tasks. Both support "Run As" as well.

As for long directions... the description of what it takes to turn a "bare" PC into a "development" PC for our company is 7 pages of dense HTML. It's almost entirely specific directions, with virtually no "conversational" text. And I would consider our environment to be pretty atypically light in its requirements.

You don't realize how much it takes to describe a process until you've actually done it. Believe me, I expected our software install process to be MAYBE 2 pages. Just because something is verbose, doesn't mean it's complex (usually the opposite is true, actually).

Just because _you_ aren't used to it, doesn't mean it's wrong.

Brad Wilson (dotnetguy.techieswithcats.com)
Tuesday, October 14, 2003

David,

>> First, he says it's easy.  Then, he details the ridiculously long process for reasonably developing under non-admin permissions. <<

It's perfectly easy. It's long because it's comprehensive. Almost anything in IT that's genuinely comprehensive is long.

>> Practically speaking, if you're writing standard end-user software, how likely is it that your user is not an admin on their machine?  It would only seem possible if your software is run by people at work. <<

Nearly all of the software that I write, and that my company writes, is used within corporates. And most corporates rarely give admin rights to their users.

Even at home, I have a small network where both my wife and stepson run their machines as non-admins. Even my baby daughter has a non-admin account! When my parents come for the weekend, I limit the amount of damage they can do by giving them non-admin accounts.

Mark

Mark Pearce
Tuesday, October 14, 2003

I know that the users of the software I work on will absolutely complain loudly if they can't run on a non-admin account.  Sure, today it's mostly corporate users in this position but XP has made it a bit easier for home users to run as non-admin and I imagine that this is the direction we're headed.  One common use (at least for power users) for non-admin accounts at home is what Mark mentioned -- limiting the damage that visitors can do. 

It really isn't that hard to write software that runs under non-admin accounts.  In Windows, you stick to the user-specific locations such as "Application Data", "My Documents", and HKEY_CURRENT_USER.  If you need to stray outside of these areas, just make sure you open with read-only access.  That easily cures 99% of the problems preventing non-admin use .  If you insist on developing under an admin account (I do!), at least test under a non-admin account.  This is trivial to do in XP. 

Software that won't run under non-admin accounts is a major annoyance of mine, if only because it highlights the poor level of knowledge that is prevalent among developers today. 

SomeBody
Tuesday, October 14, 2003

*  Recent Topics

*  Fog Creek Home