The Artima Developer Community
Sponsored Link

Agile Buzz Forum
It's called Testing...

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
It's called Testing... Posted: May 30, 2007 4:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: It's called Testing...
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

Can someone explain the concept of testing to Bobby Woolf? I thought he'd get that kind of thing, but not so much:

Declared interfaces, like clean air and clean underwear, are easy to take for granted until you don't have them. I used to do my OO programming in Smalltalk, which is a great language; but one deficiency I always felt (and this is heresy for a Smalltalker to say, but I'm saying it anyway) is the runtime binding -- what I came to think of as extremely weak typing. Smalltalk variables had no declared type/class, so practically any code with correct syntax would compile. It wasn't until runtime, when a client invoked a message on an object, that the environment determined the variable's object's class and looked at the class to see if it implemented a method with that signature. So you didn't really know if your code worked until you ran it, and you got lots of runtime errors that finally uncovered your simple programming mistakes.

That's perhaps the most uninformed paragraph I've read in a long while. Since you can run Smalltalk code at any time, not testing it takes effort - even if you don't have unit tests, ad-hoc testing gets done all the time (I do it with my blog server and with BottomFeeder all the time). That class of error is what static typing advocates are certain Smalltalk must suffer from - but in practice, we just don't see many errors of that sort in a sealed application (and we can deal with the ones that do happen).

Along those lines, there's a kind of testing that's much, much simpler to do in Smalltalk than in the languages Bobby seems to favor now - live testing. Say you are trying to hook up some client tool to your server using a poorly specified API like MetaWebLog API - it's common for person A to interpret the spec one way, while person B interprets it another. What I've done is have someone hit my test server with a client, and had the inbound message break in a debugger - and then I've fixed my code to match the client while it was waiting for a response.

You can have all the declared interfaces you want, but they don't always help in the real world, when you are hooking up disparate pieces that were implemented by different people reading the same spec differently. Maybe in Bobby's ideal world, that doesn't happen:

XML does for data what Java interfaces do for code: It strongly types the data by declaring its schema (much like the DDL for a relational database schema). XML data has to be well formed to be parsed. It can also be valid, meaning that it fits the agreed-upon data structure. That structure is declared in an XML schema which the XML data is validated against. So when the consumer of some XML data can't consume it successfully, the development teams have a much more objective and less political means to determine where the problem is: a validating parser. Either the XML data validates against the schema--in which case the consumer has a bug--or it doesn't--in which case the generator has a bug (or the data validates yet the consumer finds flaws in it, in which case the schema needs to be improved).

*Cough* MetaWebLog API *Cough*. Or RSS. Two widely used XML Specs that demonstrate just how deep the rabbit hole goes - and how far off in WS* fantasy-land Bobby has travelled. Come on back to Smalltalk, Bobby - the water's fine, and we can handle specs that make your Java code pitch fits.

Read: It's called Testing...

Topic: Three 16 Episode Seasons? Previous Topic   Next Topic Topic: Future of the News

Sponsored Links



Google
  Web Artima.com   

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