Shared posts

29 Mar 20:02

Not even one note

by Seth Godin

Starting at the age of nine, I played the clarinet for eight years.

Actually, that's not true. I took clarinet lessons for eight years when I was a kid, but I'm not sure I ever actually played it.

Eventually, I heard a symphony orchestra member play a clarinet solo. It began with a sustained middle C, and I am 100% certain that never once did I play a note that sounded even close to the way his sounded.

And yet...

And yet the lessons I was given were all about fingerings and songs and techniques. They were about playing higher or lower or longer notes, or playing more complex rhythms. At no point did someone sit me down and say, "wait, none of this matters if you can't play a single note that actually sounds good."

Instead, the restaurant makes the menu longer instead of figuring out how to make even one dish worth traveling across town for. We add many slides to our presentation before figuring out how to utter a single sentence that will give the people in the room chills or make them think. We confuse variety and range with quality.

Practice is not the answer here. Practice, the 10,000 hours thing, practice alone doesn't produce work that matters. No, that only comes from caring. From caring enough to leap, to bleed for the art, to go out on the ledge, where it's dangerous. When we care enough, we raise the bar, not just for ourselves, but for our customer, our audience and our partners.

It's obvious, then, why I don't play the clarinet any more. I don't care enough, can't work hard enough, don't have the guts to put that work into the world. This is the best reason to stop playing, and it opens the door to go find an art you care enough to make matter instead. Find and make your own music.

The cop-out would be to play the clarinet just a little, to add one more thing to my list of mediocre.

As Jony Ive said, "We did it because we cared, because when you realize how well you can make something, falling short, whether seen or not, feels like failure."

It's much easier to add some features, increase your network, get some itemized tasks done. Who wants to feel failure?

We opt for more instead of better.

Better is better than more.

       
13 Nov 04:11

Looking for Lunch in All the Wrong Places

by Judy Dailey

Our newest neighbor is, I think, a Cooper’s Hawk, which feeds mainly on small birds and mammals according to the Audubon Society. I’m not sure our full-grown hens qualify as small birds, but he seems willing to try–and our girls certainly puffed up in that bravely hysterical way that chickens do when they feel threatened.  Tom always puts a chicken-wire roof on their run, which stops talons but not the calculating glare.

14 Oct 17:00

Realistic Facebook Privacy Simulator

28 Aug 00:04

Is Smiling Unethical?

I smile for at least two reasons:

1.       I am happy.

2.       I want to influence someone.

If you smile because you're happy, that seems honest enough. But what about smiling when you're not feeling it on the inside, such as during a job interview, or while trying to make a good impression on a potential love interest? Is it ethical to fake-smile?

Research backs common sense on this topic: Smiling influences how people feel about you, and that in turn influences how they act. So if you smile for strategic reasons, you're not a genial personality so much as you are a manipulative bastard.

On the other hand, don't we all have an implied obligation to make the world a better and happier place? If a fake smile causes a real smile in others, and that initiates their happiness subroutine as science says it will, aren't you - the fake smiler - sort of a living saint and a spreader of joy? Or are you still a manipulative bastard?

I was thinking of this recently because an employee at my local UPS store told me I have a "great smile." I thanked her for the compliment, even though my dentist deserves most of the credit. But I felt a little guilty about it because she was reacting to my professional smile as opposed to my happy smile. And by that I mean that I make a special effort to smile during business transactions because it makes my experience and that of others a little bit nicer. And it's free, so why not?

Smiles are like compliments in the sense that they cost you nothing while having a real impact on the happiness of others. So I try to dole out both smiles and compliments whenever I get the chance. But I have a tiny reservation about the honesty of it all. I never give out false compliments, so that part is honest. And I generally don't smile at people unless I think they deserve it. But there's no doubt that it is intended for effect, and therefore manipulative by definition.

Do you ever smile with the intention of manipulating others? And if you don't, why are you so selfish?

-----------------------------------------------

On another topic, have you friended Dilbert and me yet on Facebook? www.facebook.com/dilbert

 I also accept all connections on my personal LinkedIN account.

05 Jul 02:18

Immutable isn’t just for parallel code

by JaredPar MSFT

For the last 6 months the BCL team has been hard at work shipping an out of band release of immutable collections for .Net.  Most recently delivering an efficient implementation of ImmutableArray<T>

http://blogs.msdn.com/b/dotnet/archive/2013/06/24/please-welcome-immutablearray.aspx

Unfortunately with every announcement around these collections I keep seeing the following going past in my twitter feed.

That looks neat.  Next time I’m writing parallel code I’m going to try that out.

No, no no!!!  Immutable types are not just for parallel code.  They are very useful in even single threaded applications.  Developers are missing out by thinking of them as a parallel only construct.  Any time you want to enforce that the contents of a collection never change you should consider an immutable type.

The Provider

Consider the case of an object which provides a collection to callers where the contents never change.  Something like Assembly.Modules.  A type like Assembly must be robust in the face of misuse by any caller and always present the same set of Module values.   Given this constraint what type should it use though for the property? 

It can’t do something as simple as using a List<Module> with a similarly typed backing field.  Returning such a value would allow a devious caller to clear the list and spoil the results for everyone else.   It cannot even store a List<T> internally and return an IEnumerable<T> as anyone could just come along and down cast to List<T> and clear the collection. 

Assembly assembly = ...;
// Evil laugh
((List<Module>)assembly.Modules).Clear(); 

Instead it chooses to be robust by returning a freshly allocated array on every single call to Modules [1].  This works but is a very wasteful process and results in many unnecessary allocations. 

If this API were being designed today this would be a perfect candidate for using ImmutableArray<T>.  This value can be safely stored and returned with no fear of the caller deviously mutating the result.  There is simply no way of doing so. 

The Consumer

Now consider the case of the consumer who wants to store a collection of Modules instances and do multiple lazy independent calculations on them.  In order for the different calculations to be correct they need to ensure the collection of Module instances don’t change from operation to operation.  Hence they have to make a decision when storing the collection in the constructor

class Container {
   IEnumerable<Module> m_modules;

   public Container(IEnumerable<Module> modules) { 
     // Do I trust my caller??? 
     m_modules = modules;
   }
}

The constructor can choose to do one of the following

  1. Create a private copy of the input collection that it doesn’t mutate
  2. Create no copy and hope that the caller never mutates the input collection

The first option is wasteful and the second is just a bug waiting to happen a year from now when someone decides to reuse a List<Module> for another purpose.  With immutable types the container has a much better third option: demand a collection that never changes

class Container {
   ImmutableArray<Module> m_modules;

   public Container(ImmutableArray<Module> modules) { 
     // Trust no one 
     m_modules = modules;
   }
}

The callee has now forcefully stated to the caller exactly what type of data it expects.  It no longer has to make a wasteful copy or hope for good behavior.  True this may force the caller to create an immutable copy of the value it holds.  It’s also just as likely that the caller will be in a position to provide the collection without any copies.  If it takes the collection as input it can simply pass along the requirement in its parameter list.  Or if it is the original creator of the collection it can do so as an ImmutableArray<Module> from the start and avoid the extra copy altogether.  Over time, code bases which are assertive about using immutable collections will see a decrease in allocations because they will feel more comfortable with sharing data between independent components. 

This is just a small sample of cases where immutable collections are useful in day to day code.  The more you use them the more uses you will find for them.  At some point you may even find yourself asking the following question when writing up a type

Do I actually need to mutate this collection after I finish building it?

Generally speaking the answer to this is no.  And this is why you should be using immutable types. 

 

[1] If you dig deep into the implementation you’ll find it’s actually a fresh array of RuntimeModule[].  So even though they allocate a new array on every call you can’t safely write Module instances into it unless they happen to be instances of RuntimeModule.  So wasteful!

26 Jun 01:07

The lab or the factory

by Seth Godin
Idvorkin

Something to think about at work!

You work at one, or the other.

At the lab, the pressure is to keep searching for a breakthrough, a new way to do things. And it's accepted that the cost of this insight is failure, finding out what doesn't work on your way to figuring out what does. The lab doesn't worry so much about exploiting all the value of what it produces--they're too busy working on the next thing.

To work in the lab is to embrace the idea that what you're working on might not work. Not to merely tolerate this feeling, but to seek it out.

The factory, on the other hand, prizes reliability and productivity. The factory wants no surprises, it wants what it did yesterday, but faster and cheaper.

Some charities are labs, in search of the new thing, while others are factories, grinding out what's needed today. AT&T is a billing factory, in search of lower costs, while Bell Labs was the classic lab, in search of the insight that could change everything.

Hard, really hard, to do both simultaneously. Anyone who says failure is not an option has also ruled out innovation.