
BoiledCarrot - joeyespo
http://martinfowler.com/bliki/BoiledCarrot.html
======
eropple
_> I'm reliably informed that there's no way to cook squirrels so they are
appetizing to anyone who isn't desperate_

Misinformed. Squirrels are pretty tasty. Need a few, though.

More to the point of the article, I appreciate that Fowler calls out stored
procedures as something often misused but secretly pretty awesome. If you are
working in an environment where you can handle a SQL database as a canonical
datastore--and of course there are literally kajillions of opportunities for
that--then sprocs can do a lot to isolate business logic at a level lower than
the application. I wouldn't use them in every case, but I've had good success
using them in many cases.

~~~
KingMob
Unfortunately, most database abstraction libraries and ORMs have the effect of
reducing available database capabilities to the lowest-common denominator.

For example, look at how many ORMs have facilities to add commonly-required
conditions to every query (e.g., "is_active = true"), but lack the ability to
use views.

~~~
eropple
Use better ones. =) I'm a big fan of Sequel, for when I'm in an environment
where I can deal with having models schema expressed via introspection of the
database itself.

------
danso
Knowing that this was something written by Martin Fowler, I knew it wouldn't
be about _this_ particular Carrot [0] but hopefully someone disrupts this
area.

[0] [http://www.introducingcarrot.com/](http://www.introducingcarrot.com/)

------
hashkb
The problem in my experience is that people will emotionally defend their
style of carrot boiling, to the point that they loudly and forcefully attempt
to convince me that carrots come out of the ground pre-boiled, or that if I
try to cook the carrot another way it would still come out equally mushy.

The problem here, as always, is people. Pointing this phenomenon out to
someone causes cognitive dissonance (e.g. "Rails doesn't suck, so I must
suck?") which is often harder to deal with than eating boiled carrots.

------
gwbas1c
I wish this article had a more descriptive title, it's really an important
read. I've come across so many over-boiled carrots in my career.

Almost every time I've encountered an ORM it's been an over-boiled carrot. I
think I've just had bad luck, though.

~~~
lomnakkus
> Almost every time I've encountered an ORM it's been an over-boiled carrot. I
> think I've just had bad luck, though.

Not just your bad luck. Personally, at this point, I consider ORMs an anti-
pattern.

~~~
Singletoned
They're a bit like sugar, in that the first taste can be really appealling,
but after a lot you end up feeling sick and regretful.

------
brimstedt
Honest question from someone who's been using stored procedured with
sourcecontrol for 15 years:

What exactly is the problem? :)

~~~
humanrebar
Also, software development lifecycle tools surrounding stored procedures
aren't as mature: unit testing tools, automated builds, linters, etc.

This puts them on more-or-less the same level as shell scripts to me. They're
fine if they're tiny, in source control, and unsurprising.

~~~
morty16
I'm just going to leave this here...

[http://sqitch.org/](http://sqitch.org/)

------
galaktor
I came here to post a link to Ron Jeffries' "we tried baseball" article [1]
but that's already linked at the bottom of OP. Since it's a good read, but
slightly tucked away, here it is anyway.

[1]
[http://ronjeffries.com/xprog/articles/jatbaseball/](http://ronjeffries.com/xprog/articles/jatbaseball/)

------
guard-of-terra
What's more interesting to me is why previous generation of people were
content with cooking food that just isn't tasty.

Seriously, why?

~~~
fractallyte
The tastiness is in the preparation. Boiling all the nutrients and flavor out
of a vegetable, and then discarding the cooking liquid, is the height of
stupidity.

In this case, _steam_ carrots.

(Apologies for not adding anything to the actual discussion!)

~~~
jere
Yes! I hate most boiled vegetables. Makes potatoes seem slimy and flavorless.
Funny thing is I actually love eating carrots raw. They have a lot of flavor
uncooked.

(might as well keep the off topic in the same thread)

~~~
mungoman2
Please try undercooked carrots. Just a bit soft but still with a spine. Super
delicious!

~~~
knodi123
what's wrong with you people? brushing them with olive oil and sprinkling dill
on them, and then roasting in the oven is the only way to go!

------
bsg75
> Several friends of mine commented how stored procedures were a disaster
> because they weren't kept in version control

There are pre-made tools to do this, and its relatively easy to author your
own extracting of the DDL from all DB objects into a tree and commit them into
revision control.

There is little difference between SQL and other languages in this context.

