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

Re: Object Relational Mappers are evil (a meditation)

2009-12-29 Thread J Kenneth King
Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Wed, 23 Dec 2009 10:55:19 -0500, J Kenneth King wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Mon, 21 Dec 2009 11:44:29 -0500, J Kenneth King wrote: A programmer that lacks critical thinking is a bad

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

Re: Object Relational Mappers are evil (a meditation)

2009-12-23 Thread J Kenneth King
Steven D'Aprano st...@remove-this-cybersource.com.au 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

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 st...@remove-this-cybersource.com.au 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

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

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 matter what the value

Re: Object Relational Mappers are evil (a meditation)

2009-12-21 Thread J Kenneth King
Lie Ryan lie.1...@gmail.com 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

Re: Object Relational Mappers are evil (a meditation)

2009-12-21 Thread r0g
J Kenneth King wrote: snipple 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

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-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

Re: Object Relational Mappers are evil (a meditation)

2009-12-17 Thread Neil Cerutti
On 2009-12-16, J Kenneth King ja...@agentultra.com 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

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
Steven D'Aprano st...@remove-this-cybersource.com.au 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.

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread r0g
J Kenneth King wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: snip 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

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
r0g aioe@technicalbloke.com writes: J Kenneth King wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Fri, 11 Dec 2009 19:20:21 -0500, Steve Holden wrote: snip Hear, hear! That's all very well, but some languages and techniques encourage the programmer to write

Re: Object Relational Mappers are evil (a meditation)

2009-12-16 Thread J Kenneth King
Neil Cerutti ne...@norwich.edu writes: On 2009-12-16, J Kenneth King ja...@agentultra.com 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

Re: Object Relational Mappers are evil (a meditation)

2009-12-11 Thread Steve Holden
Paul Rubin wrote: Mick Krippendorf mad.m...@gmx.de 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

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 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-10-22 Thread J Kenneth King
Aaron Watters aaron.watt...@gmail.com writes: On Oct 16, 10:35 am, mario ruggier mario.rugg...@gmail.com wrote: On Oct 5, 4:25 pm, Aaron Watters aaron.watt...@gmail.com wrote: Occasionally I fantasize about making a non-trivial change to one of these programs, but I strongly resist going

Re: Object Relational Mappers are evil (a meditation)

2009-10-21 Thread Aaron Watters
On Oct 16, 10:35 am, mario ruggier mario.rugg...@gmail.com wrote: On Oct 5, 4:25 pm, Aaron Watters aaron.watt...@gmail.com 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

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 abnormal is

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've

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*

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; [...] The

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Ethan Furman et...@stoneleaf.us 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

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

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Ethan Furman et...@stoneleaf.us 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 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

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Paul Rubin schrieb: Ethan Furman et...@stoneleaf.us 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. --

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Mick Krippendorf mad.m...@gmx.de 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. --

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 Krippendorfmad.m...@gmx.de 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

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Paul Rubin
Robert Kern robert.k...@gmail.com 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. --

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Ben Finney
Mick Krippendorf mad.m...@gmx.de writes: Paul Rubin schrieb: Ethan Furman et...@stoneleaf.us 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

Re: Object Relational Mappers are evil (a meditation)

2009-10-15 Thread Mick Krippendorf
Ben Finney schrieb: Mick Krippendorf mad.m...@gmx.de 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

Re: Object Relational Mappers are evil (a meditation)

2009-10-06 Thread Carl Banks
On Oct 5, 7:25 am, Aaron Watters aaron.watt...@gmail.com 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

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 aaron.watt...@gmail.com 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

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

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 pavlovevide...@gmail.com wrote: On Oct 5, 7:25 am, Aaron Watters aaron.watt...@gmail.com 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

Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Aaron Watters
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 reason to not use SQL

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

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

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 invisible means of

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Paul Rubin
Steve Holden st...@holdenweb.com 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

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Ben Finney
Paul Rubin http://phr...@nospam.invalid writes: Steve Holden st...@holdenweb.com 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

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 http://phr...@nospam.invalid wrote: Steve Holden st...@holdenweb.com 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