My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
Thanks to this post from Sean Corfield, I was able to read about the Invasion Of The Dynamic Language Weenies on Hacknot. All this time I thought it was hot in Houston... and it turns out I'm just a weenie on a lit grill, waiting to be eaten.

I was going to write a long article in response to the Hacknot piece, but luckily for me (and again thanks to Sean), I found Andrew Shebanow and Rick Copeland have already said most of what I wanted to, and some in addition.

The Hacknot article is worth reading, as at the minimum it will make you think. And if you can get through the name calling, he does make some interesting points. If you do read it, you should also read the other two I've linked.

So, aside from what Shebanow and Copeland said, here's what I've got to add:
  1. I'm equally competent in dynamic and static languages, though I've always felt more at home in dynamic ones
  2. Pursuant to (1), I wonder if some people are just more dynamically minded than others, so they may excel better in those languages that fit their model of thinking
  3. I wondered if the author of the Hacknot post was just using some poetic license in apparently writing in the style he was criticizing the weenie fanboys of doing, but I didn't ask because I didn't see where I could leave a comment
Your thoughts?

Hey! Why don't you make your life easier and subscribe to the full post or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!


Comments
Leave a comment

I think there was a reason he didn't leave comments open. It was a bit of a flame bait post and while some of the arguments had some validity, it would have gotten torn to shreds in the comments by the articulate and logical - not just the fanboys.

I've got a whole set of base classes that wouldn't work in a static language without a lot of casting and interface hackery and they really do save me huge amounts of code.

After all, most of the people promoting dynamic languages are language weenies, so they're pretty well versed in C# and Java at the very least, so they know what they're comparing it to. When they guy has been writing in Ruby for a year or two full time I'd be interested to hear if he still felt it brought so little to the table!

BTW - lots of cool posts recently! Enjoying reading them.

Posted by Peter Bell on Mar 29, 2007 at 06:17 PM UTC - 5 hrs

I thought the same thing - clearly a lot of the comments would have been less than constructive, and a mile long. Of course, you are also right in that many would have been constructive.

It reminds me of one of the practices in Practices of an Agile Developer, "criticize ideas, not people." (Which a coauthor just posted in reference to the Kathy Sierra threats at http://www.agiledeveloper.com/blog/PermaLink.aspx?... know some people just really don't like the freedom afforded by dynamic languages, so perhaps even a couple of years of Ruby wouldn't help. But for me, I was pretty hooked after a couple of weeks. Of course, I went straight from C/C++ to CF, so I skipped all the cool things in Java coming to a dynamic language (ie, no more pointers!). Who knows how I might feel if I had hit Java and C# next in my progression? =)

And thanks for the compliment!

Posted by Sam on Mar 30, 2007 at 05:08 AM UTC - 5 hrs

"I think there was a reason he didn't leave comments open."

iirc hacknot turned comments off a couple of years ago when the website was being spammed and never turned them back on.

"save me huge amounts of code"

Can you show they reduce volume by 80 to 90 percent?

Posted by Isaac Gouy on Apr 02, 2007 at 11:55 AM UTC - 5 hrs

I think any comparison would be difficult, because I can't think of how I might control for programmers of varying skill levels (or the same programmer in different languages, in which case you'd have to be sure he/she didn't have a motive to do better in another). However, given a sufficiently small project when I've got more free time than I do now (and assuming someone more well versed in the art of such comparisons could design a fair one), I would certainly be willing to participate in such a study.

I /can/ say I can't imagine (for instance) a Rails-like framework being written in Java (also for instance), unless one were to use a lot of HashMaps - and if you do that, you lose all the benefits of static typing and you still could have written the framework in a dynamic language with half the trouble (in fact, I have used this strategy in Java from time to time on small parts of an application).

In general, I think the type of code generation you'll see done in a static language would still leave a maintenance nightmare (in comparison to), that done in a dynamic one which could be heavily improved, precisely due to the dynamic nature of being able to define variables on the fly, as one example.

Of course, I freely admit that in the last several years, I've programmed much more in dynamic languages than static ones, so I may just be unaware of some advances that have been made. But, I still consider myself competent in static languages. (and these vague comparisons are based on the hugely popular static languages, not small niche types that I have no experience in -- for all I know, they could very well reduce the code to be on par with my experiences in dynamic languages).

I also should say I thought the 80-90 percent might be a bit of hyperbole -- it sounded something like using no prebuilt libraries and just coding everything from scratch very naively in the static language, while trying every trick in the book to use as little code as possible in the dynamic one. That said, I still think you can see very significant reduction in the volume of code.

Posted by Sam on Apr 02, 2007 at 12:33 PM UTC - 5 hrs

Isaac, sure. In two words, base classes.

I have methods like BaseService.getbyPropertyValueList(PropertyValueName, PropertyValueList) and a bunch of others that replace vast majority of my code as now User.getByEmailAddress(), Product.getBySKU(), Product.getListbySKUList(), Category.getByID() and hundreds of other methods become dynamic delegates where I have a generic call method where a single line of metadata can describe the name of a new method, the type of method it implements and a hash table (described as a list of property value pairs) with all of its parameters, so I never need to code any of the methods above - I just describe then and they're dynamically run as if the methods existed.

I save at LEAST 80-90% of the code base.

Another side example. Just wrote a DI engine in under 400 lines (and that is with comments, spacing and curly brackets on their own lines in CF which is NOT a tight language syntactically) using generic code and mixins. I'd like to see a DI engine in 400 lines in Java or C#.

Posted by Peter Bell on Apr 02, 2007 at 01:12 PM UTC - 5 hrs

Leave a comment

Leave this field empty
Your Name
Email (not displayed, more info?)
Website

Comment:

Subcribe to this comment thread
Remember my details
Google
Web CodeOdor.com

Me
Picture of me

Topics
.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and Cplusplus (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (76)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (8)
Windows (1)
With (1)
YAGNI (10)

Resources
Agile Manifesto & Principles
Principles Of OOD
ColdFusion
CFUnit
Ruby
Ruby on Rails
JUnit



RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner