Fabulous Adventures In Coding

Eric Lippert's Blog

Making it easier

I read an article in a technology column on MSNBC a while back, the upshot of which was “I have umpteen-dozen passwords I’ve got to have memorized these days; I thought technology was supposed to make my life easier!”

Really?

First of all, let’s leave aside the obvious fact that our column writer has a technology-driven standard of living which includes affordable access to varieties of food, drink, shelter, clothing, medicine, travel, and entertainment all of which were beyond the wildest dreams of the crowned heads of Europe less than two centuries ago, much less the peasants. Technology does seem to have made lives a lot easier all around. But I rather want to address the actual claim: is the purpose of technology to make your life easier?

I don’t think it is. I think the purpose of technology is to make specific tasks easier.

Surprise! Let’s take a task like “communicate with a person in Australia”. Suppose you live in, say, London. In the early 1800’s, the best way to get a message to a colleague in Australia was to write the message out with your goose quill pen, making multiple copies. Wrap each up in oilcloth, the most waterproof substance of the time. Find several convenient Royal Navy ships or merchant ships going to Australia by different routes and at different times; Napoleon might sink several of them but one of them will probably get through. Entrust your waterproofed messages to the captains of those ships, and then wait the several months it takes to get the message around either the Cape or the Horn and the reply back to you.

I take this opportunity to point out that this already requires an extremely high level of technology. Safely navigating a vessel from England to Australia is not an easy task under the best of circumstances. But obviously we can do better now; the 1800’s solution strikes me as somewhat more arduous and time-consuming as a whole than having to remember your email password.

The task of communicating with Australia is now much easier, thanks to improved technology. And because we have increased the scope of what is feasible, we can take advantage of new capabilities; in the 1800’s, real-time arbitraging of price differences between Australian and European commodity market derivatives was not anyone’s job description, but I’m sure that there are people pursuing this highly complex task today. The technology enables us to find new ways to complicate our lives, ways that were never possible before because we were too busy spending effort on solving other problems.

I think about this kind of thing a lot in the context of programming language design.

When we add a new feature to the language, we almost always make a specific task easier. But in doing so, we also almost always make the language as a whole more complex and therefore harder to learn. We make it more likely that there will be a communications divide between those who know how the new feature works and those who do not, making it harder for everyone to read and understand each other’s code.

This is one of the major reasons why new features start with “-100 points”, as I’ve often said. Coming up with features that make specific tasks easier is, well, easy. But that’s not enough; the feature has to make things so much better that it justifies the additional complexity added to the language.

******

Wikimedia Commons photo by Ted “Rufus” Ross.

Published Monday, June 15, 2009 9:56 AM by Eric Lippert
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Adam V said:

I also find it funny that someone would complain about technology not addressing this specific problem, when there are at least a couple of technical solutions (these are just off the top of my head):

- Your browser can store logins/passwords to websites

- Programs like PasswordSafe (find it on SourceForge) allow you to store your logins/passwords in an encrypted file so that you only have to memorize one password

So choosing this issue to harp on also undercuts the writer's credibility with anyone who's used these features. (And it's hard to miss; every time I type in a password in Firefox, I get the little "Save this password? Yes / Not now / Never" that I have to dismiss.)

June 15, 2009 4:56 PM
 

Matthew Kane said:

So how would you score adding a feature to allow:

public string Foo { get; readonly set; }

June 15, 2009 5:20 PM
 

Arne Claassen said:

BTW, that picture is of the HMS Surprise (from the movie "Master & Commander") currently part of the Maritime Museum in the San Diego Bay. I walk by it every day on my afternoon walk to get away from staring at the screen all day. Gonna head down there right now :)

Indeed, if you mouse over the picture, you'll get a surprise!

I am a big fan of the books and the movie; I recently read all twenty books in a row on the bus on the way to work. And that movie is the perfect movie to test out a new surround sound system! -- Eric

June 15, 2009 6:02 PM
 

Doctor Thingo said:

I don't have much to say apart from "That was interesting, thanks."

I assume you've seen video of Guy L. Steele's talk "Growing a Language"?  It seems somehow relevant.

June 15, 2009 7:27 PM
 

configurator said:

Well I was definitely surprised.

June 15, 2009 7:39 PM
 

George Spofford said:

Glad to see you putting technology in perspective. I try to use the same perspective when my flight is delayed for some reason or other- flying still beats walking past about 200 miles or so. :-)

June 15, 2009 9:38 PM
 

Jay Bazuzi said:

Such great books.  The movie is very good, and I've watched it many times, but the books are better. I plan to read them again, much more carefully, at some point.  It's no surprise that the small Port Townsend library has the complete colelction.

Surprise was built as Rose, designed by Phil Bolger, who designed my boat (a Bobcat), and who also died a couple weeks ago.  An amazing body of work.  I've decided to build one of his boats, maybe in a year.

Another sound bite for you: "Technology only solves new problems, not old ones".  For most of human history, everyone you knew was in your tribe. You rarely saw a stranger.  You didn't need, say, proof of identification, because who you were was well known.  Similarly, it was rare for someone you knew to go so far away, so you didn't, say, a telephone.  And so on.

Our hunter-gatherer ancestors lived in relative abundance, if you are only measuring those basic needs.  

This seems like a good time to plug http://www.ascentofhumanity.com/text.php, a book of great importance.

June 15, 2009 11:34 PM
 

David Cumps said:

Remembering passwords is so passe :)

Use something like KeePass on a portable stick, remember 1 really good master password and then just generate random GUIDs to use as passwords on different sites.

Works great, no 1 password for all your sites, and you're using really strong passwords too.

June 16, 2009 2:19 AM
 

Ian Ringrose said:

-> Remembering passwords is so passe

Remembering passwords is so hard… (-:

I have to totally trust the software I use.

I have to be able to access them from anywhere not just my machine

If I need to use a PC to access them (e.g when in an internet café) I should not have to trust the PC (what if it has a key logger installed on it)

I have to be able to back them up encase I loose the device/software they are stored on.

I should be able to access them in a public place without someone being able to see my master password.

Now if all unimportant sites used open-id, then the problem get’s a lot smaller and then maybe my brain could cope.

The same happens with feature in a language, for a given person there is a maximum numbers of features they can learn in a new language before it becomes to hard to learn.  But everyone that already knows the languages just says “the new feature is so simple”..

June 16, 2009 10:13 AM
 

chris said:

So true Eric!  Just as excellent communicators carefully choose there words when giving speeches.  Displays of esoteric vocabulary often fall on deaf ears.

June 16, 2009 10:34 AM
 

Greg said:

The new features start at -100 is nice given that only selective new technologies should be added to a platform and have the largest effort directed to improving, bug fixing, documenting and optimizing existing technologies.

June 16, 2009 11:09 AM
 

Pavel Minaev [MSFT] said:

> So how would you score adding a feature to allow:

> public string Foo { get; readonly set; }

I don't know about Eric, but as given, I'd score it "-10, Incomprehensible".

If I understand your intent correctly (which isn't certain, since you don't explain what the feature should do), given that "set" is already a contextual keyword there, a better option would seem to just add a new, clearer contextual keyword rather than try to combine a bunch of existing ones to get something vaguely resembling what you want. For example:

public string Foo { get; initialize; }

June 16, 2009 6:13 PM
 

TheCPUWizard said:

pminaev,

I dont see why

> public string Foo { get; readonly set; }

would be any different than

> public string Foo { get; private set; }

The language already supports having a more restrictive access policy on one of the accessors than the other. Being able to restrict it so that is cal only be called from within the body of the constructor is a natural extension.

Readonly allows for MANY optimizations to be performs [if the current compiler actually performs them is secondary].

Consider a construct such as   x = A.Prop1.Prop2.Prop3.Prop4.Prop5

If it is known that the chain of referrences will not be modified, it is theoretically possible to reduce this to a single call to the final target instance rather than having to "follow the chain" at each invocation.

June 16, 2009 6:47 PM
 

Joren said:

>public string Foo { get; readonly set; }

I'd rather have "public readonly string Foo { get; set; }" for a property that can only be assigned in a constructor. "readonly set" confuses me. How can a setter be read-only? And how do you even read a setter?

Also, I'd prefer to have symmetry with fields.

June 16, 2009 7:10 PM
 

Pavel Minaev [MSFT] said:

TheCPUWizard,

I understand the reason for the feature. However, the syntax you propose - "readonly set" - doesn't make much sense to me. As Joren rightly points out, it's a confusing combination.

June 16, 2009 8:57 PM
 

TheCPUWizard said:

Joren, pminaev,

Putting the readonly at the front (Joren's syntax) would be just fine, as would a "different" word (e.g. initonly) on the setter.

Because of the various limitations with automatic properties, I find that in my designs I CAN only use them about 5% of the time, because this is such a low percentage, and because of the benefits of consistancy, the reality is that I do not use them at all in designs where I have architectural control.

If addational capabilities such as this (ideally along with support for laxy evaluation, pre and post set conditioning) then they would have a major benefit.

June 16, 2009 9:28 PM
 

Dominic said:

The task of communicating with Australia is now much easier, thanks to improved technology.

Reading this from Australia and can't help but think how much 'smaller' the world is thanks to technology.

June 18, 2009 3:45 AM
 

Denis said:

>the purpose of technology is to make specific tasks easier

I think the purpose of a specific technology is to make a specific task (or tasks) easier; the purpose of technology in general, as a part of human life and culture, is to free humans from as much routine as possible in order to let humans to do what no machine can do: the CREATIVE WORK.

It's one hell of a debate, about whether or not machines can actually get creative; personally, I don't believe so (although the Matrix, especially the first installment, is still among my favorites - it all makes sense if you think different kind of "machines", like "the bureaucratic machine", or "the corporate machine"). Some Gen Y guys called me a "technological pessimist" for that belief of mine: they are positive that the purpose of technology is to free humans from ANY work, "just to have fun". Well, maybe I am that, I am not Gen Y, after all (just a couple of years too early), but the only way to convince me otherwise is to write a program (in C#, preferably) that will blog INSTEAD of the author. :-)

Or, maybe, a C# compiler that itself develops its own next version - how's that for a challenge to the C# meta-programming champions?

@Dominic, you and me both: I am in Australia, too

June 19, 2009 1:33 AM
 

Marius Bancila said:

I would argue that making life easier and making specific tasks easier are the two faces of the same coin. Life is a series of tasks that we do (of course one can do nothing all the time and still not finishing with that). If a technology is able to simplify one task, or maybe several, than we can say it simplifies our life.

June 19, 2009 2:13 AM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

About Eric Lippert

Eric Lippert is a senior developer on the Microsoft C# compiler team. Before that he worked on the framework of Visual Studio Tools For Office. Before that, he worked on the compilers, runtimes and tools for VBScript, JScript, Windows Script Host and other Microsoft Scripting technologies. He lives in Seattle and spends his free time editing books about programming languages, playing the piano, and trying to keep his tiny sailboat upright in Puget Sound.

This Blog

Syndication


© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker