Zed Shaw - Ruby has dodged a bullet

On Jan 4, 2008 2:10 AM, Michael S. [email protected] wrote:

into that work already. What’s the point of having your homebrew X that
you fully understand, but that is broken-as-designed? Write your own X
if you understand the existing alternatives and they can’t be made to
do what you need.

My opinion: You often cannot do this evaluation until you have written
your own or have been badly bitten by existing alternatives. For
instance, in the web application framework I work in (which is written
by one of the guys I work with and modified quite a bit by me) we have
a few external dependencies, and they bring us an inordinate amount of
grief.

For instance, authentication. The perl library we used to do this has
an extreme amount of configurability, and it end up being very hard to
debug when we have problems. Rewriting the major part of this took us
under an hour, resolving the problem and making things easy to handle
and debug. It used to take us several hours to debug every error; the
rewrite was actually part of a single authentication debugging
session.

Another instance is the session library. It is a complex mess of
spaghetti, due to solving a bunch of problems we don’t need solved,
and a direct implementation should be about 40 to 100 lines of code
(probably closer to 40). Alas, we’ve not dared replace it, since
since it is used all over the place over many hundreds of thousands of
lines of code, and some subtle issue could crop up and be nasty. If
we’d just written the code when we first needed sessions, we wouldn’t
be in this mess.

An external solution very seldom satisfies the following requirements:

  • Totally seamless upgrades and integration along with the rest of the
    project
  • Having somebody local that completely understands the code
  • Having it be the minimal amount of code necessary to handle your
    requirements
  • Follows your coding standards

In addition, with an external library you get extra olution search
costs (finding the library), evaluation costs, integration/setup
costs, and potentially debugging costs at later points - in addition
to costs from not fitting the above soft requirements.

You should use external libraries when the benefit from the library
exceeds these costs. You should use a locally written solution when
the costs of using something external exceeds the benefit.

I personally like to erri on the side of writing locally rather than
on the side of adding too many dependencies, as I find that I tend to
underestimate the particular amount of grief from an external
dependency more than I underestimate development time, and that
particularly in aggregate external dependencies give grief at more
random times when I need things to get easy.

Eivind.

On Jan 4, 2008 8:54 AM, Eivind E. [email protected] wrote:

already been done and particularly ignore the thinking that has gone
grief.

There’s a great deal of merit in both points of view. But there may be a
basic architectural consideration at work here too.

It’s axiomatically a good thing to leverage the good thinking (and
debugging) done by others. Any number of Unix heavyweights have made
the
point about “standing on the shoulders of giants.”

But the task of debugging and maintaining a production-quality piece of
code
is correlated strongly with its size and even more with its
heterogeneity.
Adding in a lot of external libraries, no matter how well designed and
executed, is going to create problems simply by virtue of the number of
points of contact.

But I don’t necessarily think the whole answer is to develop local
solutions
to standard problems. For really standard pieces of basic functionality,
tightly-focused small external libraries are usually the right answer.
(You
probably won’t roll your own XML parser, for example.) But sbove that
level,
things get very fuzzy, very fast.

The world still hasn’t found a really good solution for creating
loosely-coupled applications that can leverage external functionality
without incorporating it in-process. And there are many reasons for
this:
impedance mismatches, performance problems, lack of integration
standards,
and many others we’ve discussed many times already.

The enterprise world, which has strong economic motivations to solve
this
problem, is finally creeping tentatively toward a commitment to SOAs,
after
talking about it for years. The problem in this space is that the
discussion
has been driven by vendors, who all want to control the network
standards
used for loose-coupling. But none of the standards (XML-RPC, SOAP, REST,
many others) is really ideal. As a result, people have been focusing on
all
the wrong things, and there is a lot of home-grown mish-mash out there.

We’re still years away from a real solution.

On Friday 04 January 2008, Jeremy McAnally wrote:

Maintaining third party libraries becomes exponentially easier when
you know and intimately understand how they work (usually by at least
building a basic prototype of a similar solution).

I think both points of view – use existings libs and write your own –
when applied responsibly boil down to the same principle: understand
the code you’re using.

Incidentally, that’s the advice I tend to give (Rails) people when they
ask if there’s a plugin to do something. Be prepared to take over
maintenance of the code yourself when something breaks; the original
author might have abandoned it by then. In the case of Rails plugins
that’s not entirely unlikely.

Even given this caveat, if at all possible, I prefer using established
existing code over DIY. Even more so when there already is a community
of people using the existing lib, plugin, whatever. I like to have some
common coding ground with others, instead of lots of one-off solutions.

Michael

Chad P. wrote:

I’ve seen people, from time to time, chime into a slightly heated debate
with the words “What would Matz do?” or something to that effect.

Well, what Matz did was create a new language because none of the
others were exactly what he wanted. Now, I’ve been there – decades ago,
actually. None of the existing languages were exactly what I wanted
either. But there wasn’t a way one could build a world-wide community in
those days without being a multinational corporation or being part of
one. APL, for example, probably would never have taken off if Kenneth
Iverson had invented it in a university instead of at IBM.

Maintaining third party libraries becomes exponentially easier when
you know and intimately understand how they work (usually by at least
building a basic prototype of a similar solution).

–Jeremy

On Jan 4, 2008 10:05 AM, Francis C. [email protected]
wrote:

I’d consider it bad advice to tell people to "write your own X so you
by one of the guys I work with and modified quite a bit by me) we have
point about “standing on the shoulders of giants.”
probably won’t roll your own XML parser, for example.) But sbove that level,
talking about it for years. The problem in this space is that the discussion
has been driven by vendors, who all want to control the network standards
used for loose-coupling. But none of the standards (XML-RPC, SOAP, REST,
many others) is really ideal. As a result, people have been focusing on all
the wrong things, and there is a lot of home-grown mish-mash out there.

We’re still years away from a real solution.


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book

My blogs:

http://www.rubyinpractice.com/

Research. Research. Research.
Then, steal… err, borrow the best ideas that suit your goal[s] and
make your own X.

The problem with most software products (including languages) is that
they ignore the lessons of the past–there is nothing wrong with
making your own wheel (because you can make it rounder or with
year-round studs or anti-gravity or bright red…) as long as you
progress to a BETTER (for various definitions of “better”) wheel. And
then, of course, software without a purpose is…

(Sometimes it might just be fun to write X.)

Of course, the above should be taken in a context where making X
doesn’t impede on your ability to earn a living, live happily, or
delay other [software] development.

APL, for example, probably would never have taken off if Kenneth
Iverson had invented it in a university instead of at IBM.

APL took off like the Spuce Goose.
[http://www.sprucegoose.org/aircraft_artifacts/exhibits.html]

Paul S. wrote:

APL, for example, probably would never have taken off if Kenneth
Iverson had invented it in a university instead of at IBM.

APL took off like the Spuce Goose.
[http://www.sprucegoose.org/aircraft_artifacts/exhibits.html]

There was a time in the late 1960s – mid 1970s when you couldn’t walk
into an econometrics shop without knowing APL. I don’t think it ever
found any other practical niches, but it was very big there. The current
open dialect, Aplus-fsf, was in fact cut loose from Morgan Stanley.

I would have loved to learn APL in its heyday. I was actually at IBM
(Poughkeepsie, NY) when it was developed, and met Ken Iverson. He and
Aden Falkoff were promoting the language within the IBM laboratories.
But the team I was on had severe performance constraints and we wrote
everything in assembler.

After I left IBM, there was never an opportunity for me to learn and use
it, and by the time personal computers showed up that could run APL, I
had discovered Forth. :slight_smile:

On Jan 6, 2008 7:49 AM, M. Edward (Ed) Borasky [email protected]
wrote:

After I left IBM, there was never an opportunity for me to learn and use
it, and by the time personal computers showed up that could run APL, I
had discovered Forth. :slight_smile:
It is good to go forth in life (but some smalltalking does not heart
either) ;).
Robert


http://ruby-smalltalk.blogspot.com/


Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein

On Jan 6, 2008 8:10 AM, Robert D. [email protected] wrote:

On Jan 6, 2008 7:49 AM, M. Edward (Ed) Borasky [email protected] wrote:

After I left IBM, there was never an opportunity for me to learn and use
it, and by the time personal computers showed up that could run APL, I
had discovered Forth. :slight_smile:
It is good to go forth in life (but some smalltalking does not heart either) ;).

Oh my God! APL is STILL encouraging one-liners!


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

Il giorno 02/gen/08, alle ore 18:11, Michael S. ha scritto:

Rails people unpleasant in the real world? Honestly, I don’t meet that
many to judge the case. If anyone of those I did meet was unpleasant,
it was entirely unrelated to Rails or Ruby.

+1
I work professionally with Ruby and Rails, that’s why I will never
thank Rails enough - I studied Ruby years before Rails, I never had
the possibility to work with it, not even close (biggest problem can
be that I’m italian …).
From time to time I find myself asking something on IRC, and have
some silly “I know everything get a clue” answers, but what the hell,
who cares. I passed my 18 and I can just ignore harsh comments -
especially if they’re from someone I don’t care of.
There will always be strong personalities (I can name some in the
Python community for example) and silly people, but definitely not
because of the language or the framework or whatever.
I can’t really say something about Zed, he literally saved my ass at
an italian conference, and saved twice because of Mongrel, plus even
if he goes in Hyde mode on his blog he is a nice guy and I’m sure
that everybody who actually met him can tell the same - but you can’t
say all that he says and in the same time doing exactly the same
thing just 3 times worse.
Anyway, there is of course some convergence to Rails from PHP, and of
course some kind of “skill clash”, PHP is basically a structural
language, and being Rails pretty easy to learn people just don’t
learn Ruby before: I just rewrote a Rails app written by PHP
programmers, and my god, it redefined the meaning of the word “hell”.
Still I don’t fell like it’s a Rails fault, if people writes shitty
code it’s people fault, not of the framework.

My 0,2
ngw

On 6-Jan-08, at 8:26 AM, Rick DeNatale wrote:

heart either) ;).

Oh my God! APL is STILL encouraging one-liners!

Ohhhh well done! :slight_smile:

Cheers,
Bob


Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/


Bob H. – tumblelog at
http://www.recursive.ca/so/
Recursive Design Inc. – weblog at
http://www.recursive.ca/hutch
http://www.recursive.ca/ – works on
http://www.raconteur.info/cms-for-static-content/home/