Re: Object Relational Mappers are evil (a meditation)

2010-01-06 Thread Ethan Furman
J Kenneth King wrote: In many contexts I'm sure there is reason to use Perl instead of Python just as there are situations where C is more appropriate than either. However, the mark of a poor programmer in my line of reasoning is one who cannot recognize such distinctions. One must be aware of

Re: Object Relational Mappers are evil (a meditation)

2009-12-29 Thread J Kenneth King
Steven D'Aprano writes: > On Wed, 23 Dec 2009 10:55:19 -0500, J Kenneth King wrote: > >> Steven D'Aprano writes: >> >>> On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: >>> A programmer that lacks critical thinking is a bad programmer. The language they use has no beari

Re: Object Relational Mappers are evil (a meditation)

2009-12-24 Thread Lie Ryan
On 12/24/2009 12:11 PM, Terry Reedy wrote: This buggy idiom survived many years of Python development, missed by virtually everyone. The last statement is false. The hazard of using and/or was well-known back in '97 or so when I discovered or learned it and I believe it was mentioned in the FAQ

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 20:11:25 -0500, Terry Reedy wrote: >>> Instead the accepted, idiomatic Python way of writing this was to use >>> short-circuit booleans: >>> >>> result = condition and x or y >>> >>> However this idiom is buggy! If x is a false-value (say, 0) then >>> result gets set to y no ma

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Terry Reedy
Instead the accepted, idiomatic Python way of writing this was to use short-circuit booleans: result = condition and x or y However this idiom is buggy! If x is a false-value (say, 0) then result gets set to y no matter what the value of condition. This is only a bug if one expects otherwise

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread Steven D'Aprano
On Wed, 23 Dec 2009 10:55:19 -0500, J Kenneth King wrote: > Steven D'Aprano writes: > >> On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: >> >>> A programmer that >>> lacks critical thinking is a bad programmer. The language they use >>> has no bearing on such human facilities. >> >> T

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread J Kenneth King
Steven D'Aprano writes: > On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: > >> A programmer that >> lacks critical thinking is a bad programmer. The language they use has >> no bearing on such human facilities. > > That's nonsense, and I can demonstrate it by reference to a single > p

Re: Object Relational Mappers are evil (a meditation)

2009-12-21 Thread Steven D'Aprano
On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: > A programmer that > lacks critical thinking is a bad programmer. The language they use has > no bearing on such human facilities. That's nonsense, and I can demonstrate it by reference to a single programming language, namely Python.

Re: Object Relational Mappers are evil (a meditation)

2009-12-21 Thread r0g
J Kenneth King wrote: > c) This has nothing to do with programming languages. A programmer that > lacks critical thinking is a bad programmer. The language they use has > no bearing on such human facilities. The language may well have a bearing on the quality of the programs generated though,

Re: Object Relational Mappers are evil (a meditation)

2009-12-21 Thread J Kenneth King
Lie Ryan writes: > On 12/17/2009 3:17 PM, J Kenneth King wrote: >> A language is a thing. It may have syntax and semantics that bias it >> towards the conventions and philosophies of its designers. But in the >> end, a language by itself would have a hard time convincing a human >> being to ado

Re: Object Relational Mappers are evil (a meditation)

2009-12-18 Thread Lie Ryan
On 12/17/2009 3:17 PM, J Kenneth King wrote: A language is a thing. It may have syntax and semantics that bias it towards the conventions and philosophies of its designers. But in the end, a language by itself would have a hard time convincing a human being to adopt bad practises. Perhaps som

Re: Object Relational Mappers are evil (a meditation)

2009-12-17 Thread Neil Cerutti
On 2009-12-16, J Kenneth King wrote: > The language doesn't encourage anything. It's just a medium > like oil paints and canvas. A painting can be good or bad > despite the medium it is constructed on. The skill of the > painter is what matters. Technically, oil paints do encourage a certain k

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
Neil Cerutti writes: > On 2009-12-16, J Kenneth King wrote: >> The language doesn't encourage anything. It's just a medium >> like oil paints and canvas. A painting can be good or bad >> despite the medium it is constructed on. The skill of the >> painter is what matters. > > Technically, oil

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
r0g writes: > J Kenneth King wrote: >> Steven D'Aprano writes: >> >>> On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: >>> > > Hear, hear! >>> That's all very well, but some languages and techniques encourage the >>> programmer to write bad code. >> >> That's just BS. >> >> Bad

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread r0g
J Kenneth King wrote: > Steven D'Aprano writes: > >> On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: >> >>> Hear, hear! >> That's all very well, but some languages and techniques encourage the >> programmer to write bad code. > > That's just BS. > > Bad code doesn't just write itself

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
Steven D'Aprano writes: > On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: > >> Simon Forman wrote: >> [...] >>> As far as the OP rant goes, my $0.02: bad programmers will write bad >>> code in any language, with any tool or system or environment they're >>> given. If you want to avoid b

Re: Object Relational Mappers are evil (a meditation)

2009-12-11 Thread Steven D'Aprano
On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: > Simon Forman wrote: > [...] >> As far as the OP rant goes, my $0.02: bad programmers will write bad >> code in any language, with any tool or system or environment they're >> given. If you want to avoid bad code there's (apparently) no >>

Re: Object Relational Mappers are evil (a meditation)

2009-12-11 Thread Steve Holden
Simon Forman wrote: [...] > As far as the OP rant goes, my $0.02: bad programmers will write bad > code in any language, with any tool or system or environment they're > given. If you want to avoid bad code there's (apparently) no > substitute for smrt programmers who are familiar with the tools

Re: Object Relational Mappers are evil (a meditation)

2009-12-11 Thread Steve Holden
Paul Rubin wrote: > Mick Krippendorf writes: If I knew what First Anormal Form was I (hope!) >> I read it somewhere once, I just can't find or even remember the source. >> I definitely didn't make it up, though I wish I had. > > I found exactly one google hit for it, which is this clpy thre

Re: Object Relational Mappers are evil (a meditation)

2009-10-22 Thread J Kenneth King
Aaron Watters writes: > On Oct 16, 10:35 am, mario ruggier wrote: >> On Oct 5, 4:25 pm, Aaron Watters wrote: >> >> > Occasionally I fantasize about making a non-trivial change >> > to one of these programs, but I strongly resist going further >> > than that because the ORM meatgrinder makes it

Re: Object Relational Mappers are evil (a meditation)

2009-10-21 Thread Aaron Watters
On Oct 16, 10:35 am, mario ruggier wrote: > On Oct 5, 4:25 pm, Aaron Watters wrote: > > > Occasionally I fantasize about making a non-trivial change > > to one of these programs, but I strongly resist going further > > than that because the ORM meatgrinder makes it somewhere > > between extremely

Re: Object Relational Mappers are evil (a meditation)

2009-10-16 Thread mario ruggier
On Oct 5, 4:25 pm, Aaron Watters wrote: > Occasionally I fantasize about making a non-trivial change > to one of these programs, but I strongly resist going further > than that because the ORM meatgrinder makes it somewhere > between extremely unpleasant and impossible to make any > non-trivial c

Re: Object Relational Mappers are evil (a meditation)

2009-10-16 Thread Tim Wintle
On Fri, 2009-10-16 at 01:01 +0200, Mick Krippendorf wrote: > Maybe my English (and my memory) is just not so good. I'm german, and > here "abnormal" and "anormal" are both negations of "normal", but with > a slight difference in meaning. "anormal" means just "not normal", > whereas the meaning of "

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Ben Finney schrieb: > Mick Krippendorf writes: > The word “anormal” appears to have been made up by you. > The negation of the word “normal” is “abnormal”, perhaps you meant > “First Abnormal Form”? Maybe my English (and my memory) is just not so good. I'm german, and here "abnormal" and "anorma

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Ben Finney
Mick Krippendorf writes: > Paul Rubin schrieb: > > Ethan Furman writes: > >> If I knew what First Anormal Form was I (hope!) > > > > It appears to be a made-up term. > > I read it somewhere once, I just can't find or even remember the > source. I definitely didn't make it up, though I wish I h

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Robert Kern writes: > I believe he mistyped it. Try "First Abnormal Form": > http://www.sqlmag.com/Article/ArticleID/21369/sql_server_21369.html Ah, that makes sense. Article is subscriber-only but would seem to explain the situation. -- http://mail.python.org/mailman/listinfo/python-list

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Robert Kern
On 2009-10-15 16:37 PM, Paul Rubin wrote: Mick Krippendorf writes: If I knew what First Anormal Form was I (hope!) I read it somewhere once, I just can't find or even remember the source. I definitely didn't make it up, though I wish I had. I found exactly one google hit for it, which is thi

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Mick Krippendorf writes: > >> If I knew what First Anormal Form was I (hope!) > I read it somewhere once, I just can't find or even remember the source. > I definitely didn't make it up, though I wish I had. I found exactly one google hit for it, which is this clpy thread. -- http://mail.python

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Paul Rubin schrieb: > Ethan Furman writes: >> If I knew what First Anormal Form was I (hope!) > > It appears to be a made-up term. I read it somewhere once, I just can't find or even remember the source. I definitely didn't make it up, though I wish I had. Mick. -- http://mail.python.org/mail

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Ethan Furman schrieb: > If I knew what First Anormal Form was [...] This refers to the Normal Forms one goes through when normalizing relational databases. (http://en.wikipedia.org/wiki/Database_normalization#Normal_forms) The First Anormal Form (FAN) means just lumpin' data together in a comma s

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Ethan Furman writes: > If I knew what First Anormal Form was I (hope!) It appears to be a made-up term. -- http://mail.python.org/mailman/listinfo/python-list

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Ethan Furman
Mick Krippendorf wrote: Ethan Furman schrieb: Mick Krippendorf wrote: BTW, the comma-separted-values-in-a-field is officially called the First Anormal Form. There *has to be* some value to it since I've seen it used quite a few times... Just because you've seen something, doesn't mean it ha

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Ethan Furman writes: > > BTW, the comma-separted-values-in-a-field is officially called the > > First Anormal Form. There *has to be* some value to it since I've > > seen it used quite a few times... Mick. > > Just because you've seen something, doesn't mean it has value; just > because somethin

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Ethan Furman schrieb: > Mick Krippendorf wrote: >> BTW, the comma-separted-values-in-a-field is officially called the First >> Anormal Form. There *has to be* some value to it since I've seen it used >> quite a few times... > > Just because you've seen something, doesn't mean it has value; [...]

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Ethan Furman
Mick Krippendorf wrote: Steve Holden wrote: Many such designs make mistakes like using multiple columns (or, even worse, comma-separated values) instead of many-to-many relationships. BTW, the comma-separted-values-in-a-field is officially called the First Anormal Form. There *has to be* som

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Steve Holden wrote: > Many such designs make mistakes like using multiple columns > (or, even worse, comma-separated values) instead of many-to-many > relationships. BTW, the comma-separted-values-in-a-field is officially called the First Anormal Form. There *has to be* some value to it since I'v

Re: Object Relational Mappers are evil (a meditation)

2009-10-06 Thread Simon Forman
On Tue, Oct 6, 2009 at 2:00 AM, Carl Banks wrote: > On Oct 5, 7:25 am, Aaron Watters wrote: >> This is a bit off topic except that many Python >> programmers seem to be allergic to typing SQL. >> >> RESOLVED:  Using ORMs leads lazy programmers >> to make bad database designs.  It's better to >> c

Re: Object Relational Mappers are evil (a meditation)

2009-10-06 Thread Bruno Desthuilliers
Diez B. Roggisch a écrit : Aaron Watters schrieb: (snip) FOR EXAMPLE: Consider blogging. The most successful blog software is WORDPRESS. Here is the WordPress data model: http://blog.kapish.co.in/wp-content/uploads/2009/03/wp_2.7.png (snip) Now let's look at the Sakai Blogger tool data mo

Re: Object Relational Mappers are evil (a meditation)

2009-10-06 Thread Bruno Desthuilliers
Carl Banks a écrit : On Oct 5, 7:25 am, Aaron Watters wrote: This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. RESOLVED: Using ORMs leads lazy programmers to make bad database designs. It's better to carefully design your database with no invisibl

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Carl Banks
On Oct 5, 7:25 am, Aaron Watters wrote: > This is a bit off topic except that many Python > programmers seem to be allergic to typing SQL. > > RESOLVED:  Using ORMs leads lazy programmers > to make bad database designs.  It's better to > carefully design your database with no invisible > means of

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Simon Forman
On Mon, Oct 5, 2009 at 11:14 PM, Paul Rubin wrote: > Steve Holden writes: >> It seems to me that the biggest sin in databases is a failure to use >> rigorous design techniques. If somebody doesn't understand relational >> theory > > Where does one find out about this

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Ben Finney
Paul Rubin writes: > Steve Holden writes: > > It seems to me that the biggest sin in databases is a failure to use > > rigorous design techniques. If somebody doesn't understand relational > > theory > > Where does one find out about this? I've somehow managed to av

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Paul Rubin
Steve Holden writes: > It seems to me that the biggest sin in databases is a failure to use > rigorous design techniques. If somebody doesn't understand relational > theory Where does one find out about this? I've somehow managed to avoid it for an awfully long time, but it begins to look useful

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Steve Holden
Diez B. Roggisch wrote: > Aaron Watters schrieb: >> This is a bit off topic except that many Python >> programmers seem to be allergic to typing SQL. >> >> RESOLVED: Using ORMs leads lazy programmers >> to make bad database designs. It's better to >> carefully design your database with no invisib

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Diez B. Roggisch
Aaron Watters schrieb: This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. RESOLVED: Using ORMs leads lazy programmers to make bad database designs. It's better to carefully design your database with no invisible means of support and there is no reaso

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Bruno Desthuilliers
Aaron Watters a écrit : This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. What I am mostly allergic to is manipulating sql queries as strings and resultsets as lists of tuples. I strongly prefer a higher level representation of both the queries and