On Apr 29, 2014, at 11:06 , Jeremy Evans <[email protected]> wrote:
> I think the general problem with a cookbook is that each recipe is generally
> only helpful to a small percentage of people. So you might read the whole
> cookbook and find a single thing that is helpful.
Hmm.
> Don't get me wrong, Sequel should be better documented, but I prefer to
> document things in a structured manner, as opposed to a cookbook with a bunch
> of unrelated recipes. However, I do not want to discourage anyone else from
> writing such a cookbook, if they are so inclined.
Well, there's hardly anything I can think of that couldn't stand better
documentation. One of the reasons I'm such a fan of Sequel is that the
documentation is really good. It's enormously better than, say, Ramaze's, which
is the other Ruby-esque thing I have to deal with a lot.
What's missing for me is the "why" component. Take eager loading. I really
don't understand what it does or (more importantly) what it's for. I *think* it
could reduce the number of queries hitting the db server, and thus speed things
up. I don't need speed right now, I just need things to work. Thus, I haven't
tried to figure out eager loading.
I'm probably not a useful exemplar for what Sequel needs, though. I spend only
a small fraction of my time coding. I spend a fair amount of time re-learning
things because I don't use them enough to retain them. As a result,
'obviousness' is by far the most valuable trait for coding and language tools.
I love the fact that I can map a database table with Sequel by just saying
"class NameOfTable < Sequel:Model end" That's awesome. All kinds of magic
happens, and things appear where I expect them, and act like I think they're
going to, without me having to re-learn. By contrast, the "redirect" function
of Ramaze/Sinatra frequently goes somewhere other than I expect, and then I
have to figure out why. Tracking the singular vs. the plural is a wash; when it
doesn't work (the plural of "Postage" is not "Postages") I have to go digging
through the docs to figure out how to fix it, but it doesn't happen often.
Associations aren't quite so smooth. As long as I make sure everybody's got a
primary key named "id", it mostly works okay, but turning what would be, say, a
three-table join query with a subquery in it into the Ruby equivalent is
sometimes a conundrum, and I have occasionally abandoned the models and built
it with datasets, which puts a lump of relationally in the middle of the
object-oriented landscape.
It's distinctly possible that if I'd come at all this more fluent in
'objectivity' in the first place, and were thinking more in terms of objects of
objects, that it would be more intuitive. But, since the three programming
languages I know the best are SQL, AppleScript, and TeX, (Ruby's 4th), that
unavoidably influences how I model things in my head.
Well, anyway, back to work, I've got a whole e-commerce shopping cart system to
build from scratch. {sigh}
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.