This post originated from an RSS feed registered with Ruby Buzz
by Jim Weirich.
Original Post: Some Pointers
Feed Title: { | one, step, back | }
Feed URL: http://onestepback.org/index.cgi/synopsis.rss
Feed Description: Jim Weirich's Blog on Software Development, Ruby, and whatever else sparks his interest.
I have not updated this Blog for over a month. It’s real busy, and I
have some ideas I want to share, but I think I’ve run afoul of
Charles Miller’s #1 blogging rule.
So I’m just going plunge into this posting by pointing out a couple
of interesting reads I’ve found lately.
But First, Some Apologies
Yes, my site was down for a few days in February. I didn’t notice it
right away, and when someone at work pointed out they couldn’t get to
onestepback.org I had to wait to fix it until I got home. Even then, I
thought it was only down for the day. It wasn’t until I reviewed the
web stats for February did I realize that it was down for at least three
days.
Sorry. It turns out that the copy of apache servicing http requests had
crashed and burned. The ssl server was still up so remote access to my mail
was OK. I just didn’t notice that the http server was down (see, I
really was busy). Nevertheless, we now have some monitoring software in
place so simple crashes shouldn’t cause extended outages any more.
Directing VS Enabling
Static verses Dynamic Typing. Checked verses Unchecked Exceptions. The
battle rage on (and I’ve taken part in my share of them). Martin
Fowler has some keen insight
into the nature of the proponents of each side of the debate. He calls it
the difference between a Directing attitude and an Enabling attitude.
Directors wish to make the computing environment as safe as possible and
willing accept restrictions to achieve that goal. Enablers desire
flexibility above (in their view unneeded) safety, and will chaffe
unagainst restrictions. Read Martin’s writeup,
he explains it much better than I do.
I’ve landed on both sides of the debate in the past. Lately
I’ve found myself on the enabler side of the equation more often than
not.
When Generic’s Aren’t
Bruce Eckel has some surprising insight on the use of
generics in Java (available in Java 1.5). For those who enjoy the ad-hoc
polymorphism available in C++ generics are going to be surprised by
Java’s version. If Eckel is correct, then generics look like they
will be great for making generic containers and little else.
Speaking of the Static/Dynamic typing debate, the feedback page for
Eckel’s Generics
article, a commenter is defends the need for interfaces with the
following comment:
In java, the symantics of a method are not boun
1000
d to its name, so much
as they are bound to the interface the method belongs to.
Bruce responds with a followup article on Latent Typing, but I would
like to add my two cents here.
Java interfaces are more about syntax than semantics. They insure that
implementing classes have the proper methods defined with the proper number
and type of arguments, and that the methods actually do return a value of
the appropriate type. But that’s it. Interfaces do nothing to support
any meaningful semantics about the methods.
If you are interested in language support for semantics, I suggest you take
a look at Eiffel. When you define a interface in Eiffel (which Eiffel would
call a deferred class), you not only specify the argument list for the
method, you also specify the promises to which the method implementor must
adhere. This set of promises (the semantics) is called a contract and leads
to the concept of Design by Contract.
Even if you never program a line of Eiffel code, understanding Design by
Contract is a useful skill for a developer.
Speaking of Design by Contract
And that leads us to our final posting. Artima has published a series of
interviews with Bertrand Meyer, the designer of Eiffel and Design by
Contract. The interviews are worth reading (here is part 4, you can find
links to the other parts from there).
I find that I don’t always agree with Meyer, but when I do disagree,
I think through my position very carefully.
All for Now
I’ve run out of time. Hopefully it won’t be so long before I
post again.