"I have a mind like a steel... uh... thingy." Patrick Logan's weblog.

Search This Blog

Loading...

Monday, February 09, 2009

Where do you use Smalltalk?

This question was asked recently at http://stackoverflow.com/questions

I love the responses that say, "It's great. But only use it with good developers that do unit testing."

Why would you use anything with any other kind of developer? And is the claim there is a tool that actually _works_ in those situations?

BTW this is not a new kind of comment from people. It just never ceases to amaze me that those follow-up questions neither seem to be asked nor answered.

5 comments:

Barry Kelly said...

If you take "good" to be a synonym for "better than average", well then, I hate to break it to you, but yes, there are indeed bad programmers out there. Moreover, it makes sense to employ them: the extra wages to employ a higher-skilled programmer wouldn't be justified in the higher quality of output. And even more relevantly, most programming jobs in IT don't require a high degree of technical specialization, but are rather involved with communicating with business people and turning their requirements into code that doesn't even need recursion, much less deep programming expertise.

As to unit tests, they are more important for languages without static typing, and for code upon which a lot of other code will rely. Explicit static typing lets the programmer describe their data structures to the compiler, rather than letting code create the structures dynamically and relying on implied gestalt knowledge to get different modules to work without runtime type errors.

A static type system is basically a very concise notation for unit tests - actually more rigorously, proofs. The compiler will inform you nice and early if you break a test while modifying or refactoring code.

Patrick Logan said...

"A static type system is basically a very concise notation for unit tests - actually more rigorously, proofs. The compiler will inform you nice and early if you break a test while modifying or refactoring code."

So a type describing a stack will prove that my application uses such a stack correctly? I am certainly not updated on the latest type systems for haskell, scala, etc. but I am certainly misunderstanding your claim.

Toby Ho said...

The top answerer on the SO seem to still has his head in the static typing paradigm. I think anyone who says dynamically type languages are no good for large projects at this day and ago doesn't see the whole picture yet.

"A static type system is basically a very concise notation for unit test..."
Static typing is not as powerful as writing unit tests. The set of the types of errors a static typing system can catch is a subset of the types of errors unit tests can catch.
But I do agree that a loosely typed language(ruby, javascript) is much more in need of testing than a strictly typed language(haskell).

Pete Kirkham said...

With static checking - more so if you use static analysis tools rather than relying on the weak checks in most compilers - then you can prove that you don't use the stack in a way that contradicts the assertions you have made about the stack.

On the other hand, unit tests demonstrate that your use of the stack has the expected result for the conditions of the test.

To 'use a stack correctly' may mean either.

Patrick Logan said...

"To 'use a stack correctly' may mean either."

Of course the latter is more interesting for applications and not something the type system can provide.

Blog Archive

About Me

Portland, Oregon, United States
I'm usually writing from my favorite location on the planet, the pacific northwest of the u.s. I write for myself only and unless otherwise specified my posts here should not be taken as representing an official position of my employer. Contact me at my gee mail account, username patrickdlogan.