The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Productivity? Where is it?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Productivity? Where is it? Posted: Jul 15, 2004 4:32 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Productivity? Where is it?
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Gary Short points out how - even though it has libraries for lots and lots of stuff - .NET hinders productivity in critical ways. This isn't unique to .NET - Java has exactly the same problem - sealed classes. Here's a great example:

Here at Scotland On Line a colleague is working on an ASP.Net project. There's a requirement to add a number of working days to a DateTime object. A quick look at the DataTime object shows us that there's no such method. Now if we were using Smalltalk we'd be able to inherit from the DateTime object and add our AddWorkingDays method, but 'cos we're using C# and the library designers have sealed the class, we can't. Grrr!

So now we have to create a wrapper class, something like this.....

namespace SOL.UtilityClasses
{%A0%A0 public Class DateTime
%A0%A0& nbsp;{%A0
%A0&nb sp;%A0%A0%A0 private System.DateTime _dt;

%A0%A0& nbsp;%A0%A0 public DateTime(System.DateTime theDate)
%A0%A0& nbsp;%A0%A0%A0&n bsp;%A0 {
%A0%A0%A0&n bsp;%A0%A0%A0&nb sp;%A0%A0%A0&nbs p;_dt = theDate;
%A0%A0& nbsp;%A0%A0%A0&n bsp;%A0 }
%A0%A0%A0&n bsp;%A0 
%A0%A0%A0&nb sp;%A0 public SOL.UtilityClasses.DateTi me AddDays(double NumberOfDays)
%A0&n bsp;%A0%A0%A0 {
%A0%A0%A0&n bsp;%A0%A0%A0&nb sp;%A0_dt.AddDays(Numb erOfDays);
%A0  ;%A0%A0%A0%A0 %A0%A0 return this;
%A0%A0&nbs p;%A0%A0 }

%A0%A0&nbs p;%A0%A0 // Implementation of all the other bahaviour we need.

%A0%A0 %A0%A0%A0 //Implementation of the%A0new method%A0we need
%A0%A0  ;%A0%A0 public SOL.UtilityClasses.DateTi me AddWorkingDays(int NumberOfDaysToAdd)
&nb sp;%A0%A0%A0&nbs p;%A0%A0%A0 {
%A0%A0%A0&n bsp;%A0%A0%A0&nb sp;%A0%A0%A0 //...
%A0%A0&nbs p;%A0%A0%A0  ;%A0 }%A0%A0%A0%A0 %A0
%A0%A0 }
}

...and recreate all the funtionality we need, then we have to add the extra functionality. What a waste of time!!! Why are these classes sealed, come on Microsoft you can trust us, we know what we're doing, you don't have to seal every class in the library!!

This is my answer to those who tell me "but in niche systems like Smalltalk, you have to write your own libraries for things the big vendors provide" - yeah, but Smalltalk doesn't stand in your way and block forward progress. In the case above, a Smalltalker would have added a method to class DateTime and moved on.

Read: Productivity? Where is it?

Topic: Pair programming compatibility survey results Previous Topic   Next Topic Topic: Now keep that thought

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use