Mort on C#

Rockford Lhotka has a post about developers with Mort's persona conquering C#.

From Nikhil's post:

  • Mort, the opportunistic developer, likes to create quick-working solutions for immediate problems and focuses on productivity and learn as needed.
  • Elvis, the pragmatic programmer, likes to create long-lasting solutions addressing the problem domain, and learn while working on the solution.
  • Einstein, the paranoid programmer, likes to create the most efficient solution to a given problem, and typically learn in advance before working on the solution.

Rockford warns that as many developers moved from VB 6 to C#, there is going to be pressure on C# to become a Mort friendly language, and that the Elvis & Einstein types will have to move to C++ again. I don't think that this is going to happen. Or rather, I agree that C# will get more rapid productivity features, but that is not a bad thing.

Here is a pet peeves about C#:

SomeLongVariableTypeNameThatIHaveToDeclareTwice variable = new SomeLongVariableTypeNameThatIHaveToDeclareTwice();

The above can (and should, in my opinion) be written like this:

var variable = new SomeLongVariableTypeNameThatIHaveToDeclareOne();

You lose no type safety and the code doesn't repeat itself. You should still be able to use the previous version if you want to do something like:

IList list = new ArrayList(); 

(Anders Hejlsberg talked about something similar in a talk about C# 2.0, but apperantly it is something planned for later.)

Or things that we have today (okay, tomorrow, but you know what I mean), like Edit & Continue, anonymous delegates, generics, etc... They are going to help the Mort persona, sure. But they also allows for very powerful conecpts that most Morts will never find interesting or at all (functional programming, or the nearest thing to that, for instance).  I think that it is good to have a language that will cover anything from the very basic to the very sophisticated natively and easily. I don't think that there is a danger of dumbing down C# to make it easier (nor do I think that it's needed).

C++ certainly has its place, and I find it great that the C++/CLI team decided to make it the language that will allow you to use all features of the CLR from the language, without needing to drop to IL; but that is not the reason that I rather program in C#. Put simply, C# doesn't surprise me {it sometimes frustrate me, but that is another thing} as much as C++ does. Then there is the Oh, So Wonderful ReSharper*, which should be enough of a reason by itself.

Beyond that, I don't neccecarily agree with the devide between those personas, I want easier ways to do stuff. Becuase if it's easier, I can often use it to do things that were simply impractical to do before. I often work in different modes during the same project, and I find that most often, I'll use the productivity tools no matter what mode I'm working at.

The funniest quote from his post is (paraphrased):

The way to get respect as a developer is to use semi - colons;

* I understand that the C++ sytnax make it much harder to write a similar tool to ReSharper.

Print | posted on Sunday, July 03, 2005 6:18 PM

Feedback


Gravatar

#  7/28/2005 8:28 PM Jeremy Huffman

Give Rocky a little more credit. He doesn't think you get more respect by using semi-colons. He's gently mocking the people who consider it important to differentiate themselves from the Morts based on the language they use to write code in. He's also pointing out that C# is already almost as easy to write code in as VB.NET - its just a different syntax.

If there is a negative aspect to the Mort it isn't that they want certain features to improve their productivity but that they are driven by a desire for instant gratification. They aren't necessarily the most productive programmer - because they have no overhead (learning and tooling) they have no leverage. A highly leveraged Elvis or Einstein can run circles around a Mort in productivity. By highly-leveraged I mean they have built up a framework or language to the point where they are implementing domain concepts abstractly, with very little code. The maintenace of their domain is also massively diminished.

However, since they have no overhead they Morts show progress quickly and produce adequate work for the needs of many business functions.


Gravatar

#  7/28/2005 10:22 PM Ayende Rahien

I don't think that Rocky is saying that you need to get more respect using semi colons, but what he /does/ say is that C# is being driven now by Morts, and that will affects its design.

I think that he is wrong and that both Elvises and Einsteins can make a great use in features that are supposed to be Mort's.

Comments have been closed on this topic.