[opensource] RESOLVE

richard hornsby me at rhornsby.org
Mon Feb 9 12:36:14 EST 2009


On Mon, Feb 9, 2009 at 11:16 AM, Aaron Joseph <bonesawosu at gmail.com> wrote:

>
> I could see how the requires and ensures clauses could be useful... but
> they require the use of the cryptic math definitions to actually do them. So
> although the idea is somewhat on the right track, it goes about
> accomplishing it the wrong way. I agree with Tyler that it's something that
> is nice to be exposed to, but maybe for a much shorter period of time. They
> spend 1 day talking about object oriented design but spend 3 quarters
> talking about this design-by-contract idea. That is just a backwards way of
> doing things.
>

Well, not really.  OO is just one approach to programming.  It happens to be
quite popular, but it is one approach among many.  There are two Java
courses (one is relatively new) in CSE which I think do a pretty good job of
covering OO concepts, although some basic understanding of OO coming in is
really helpful.


> I'm reading these posts and trying to get an understanding of why they
> teach us stuff that isn't actually used in the real world. And so far, like
> Tyler, I have yet to see any good reason why they must teach us the things
> they do. Are they preparing us for the real world or just forcing their
> research ideas on us because the real world hasn't adopted them? What
> exactly are students getting out of this course? Sure you learn important
> concepts that are important for programmers to know, but what should a
> student think about most of the focus being stuff related to Bruce Weide's
> research and not on useful knowledge? Does funding play any role in their
> decision? Does resolve possibly bring in funding for the department? Would
> switching to Java take money away from the reusable software research group?
> Would using a more popular language really make it all that much harder for
> students to learn the concepts? I would really like to understand why it is
> so hard to convince the department to switch to a more useful language. I
> also wanted to try to throw some more wood on the fire so that we can keep
> this good discussion going!



Yes, I would say the course is in preparation for the "real world" of
programming.  You certainly have valid points.  Like you, I argued for years
that Resolve was completely useless.  And in terms of a practical language
that you can use to build the next Facebook or Amazon, you're probably
right.  However, the concepts are solid - forcing the examination of, for
instance, what happens to an object and are you adhering to the contract?
It seems to me that perhaps the purpose of using Resolve this way is to try
to keep the student focused on the concept, and not distracted by the
language itself, as I think someone else may have already suggested.

This is where I've seen the Resolve concepts out in the "real world": You
(generic, not you Aaron specific) know the
Java/C/Ruby/Python/some_in_house_proprietary language better than anyone
else at your company.  But if you can't write good, solid, documentation and
STICK to the "contract" you state when you design objects and write methods,
then I would argue you're a lousy programmer. You might have a really clever
idea, but if no one can use it or you're causing them endless headaches
trying to hit the moving target that is your API, you suck and you're only
going to piss other people off.  If your code can't be maintained because
you decided to get cute about how you manipulated a variable and it causes
me to waste hours debugging, the boss says that is unacceptable.  If you
tell me that the pass-by-reference object I give you will be unchanged after
calling your method, it better be.  This is the kind of thing that Resolve
(imho) tries to get across.  It forces you to consider the consequences of
your actions and communicates to others what to expect - design by contract
as I understand it.

I think I actually benefitted from the series.  I don't write code or
documentation exactly like that now, but RESOLVE helped drill into my thick
skull the importance of thinking about what I was doing, and considering the
implications of it - without being distracted by shiny pieces of tinfoil
like Swing.  Keep in mind that 221/222/321 is basically an introduction to
CSE - not meant to be the capstone practical test material.  As I'm sitting
here pondering, it occurs to me (I have no idea if this is true) but I might
be motivated to teach RESOLVE so that I can drill the concepts home to the
students not only without distractions, but with far fewer pre-conceived
ideas and bad habits of "how things are done" in languages such as Java or
Objective C - which means less time arguing with the students and more time
teaching.  I don't mean that to sound so negative, but I think you can
understand what I mean.  Every day and every assignment would be "Well,
Larry Wall does it this way, so you're teaching it wrong."  As has been
stated over and over, the series is not meant to be teaching a language (see
459.xx), but ideas and concepts to build a foundation on.  Even the ASM
course doesn't teach you a language as much as what it takes to get down a
dirty with a processor (and a serious appreciation for higher-level
languages.)

Every now and then I'll be coding something and stop for a second wondering
about my arguments - if I'm about to ALTER or DESTROY them and what the
consequences might be of doing so, and did I clearly tell the reader what
I'm doing?  Over the years I've done C/C++, Coldfusion, Java, C#, PHP, Perl,
Python, and other stuff I've forgotten.  The basic ideas of Resolve have
stuck with me.

Would I have preferred the RESOLVE series to not be so abstract with the
crazy math definitions?  Sure.  That said, you guys are probably very lucky
to be taking the series now.  When I was taking it (besides walking uphill
both ways to class, barefoot, in the snow), we were the lab rats for this
new thing called "RESOLVE/C++", as they were still trying to figure out what
worked and what didn't.  :)


-rj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.cse.ohio-state.edu/mailman/private/opensource/attachments/20090209/ba3e2bf1/attachment.html


More information about the Opensource mailing list