[Qt-interest] Qt5 and SQL

Atlant Schmidt aschmidt at dekaresearch.com
Tue Jun 7 13:06:24 CEST 2011


Folks:

  On the other hand, it would be a better world if Thompson
  had, somewhere along the way, changed the spelling of
  "creat()" to "create()".

  Maybe it's a little later in the game for Qt, but maybe
  this still falls into the "But we already had 20 users!"
  fallacy that led Thompson astray. Do you want/do you
  expect Qt to grow? If so, then somewhere along the line,
  one *SHOULD* remove the cruft that accumulates, especially
  when it can be done in a perfectly upwards-compatible
  way such as introducing a properly-named class that is
  documented as being just the properly-named edition of
  an older, badly-named class (or the properly spelt version
  of a file-creation function). The people reading the old
  E-mails will just have to deal with the change.

  And yes, the broken windows analogy is very apt. The
  theory doesn't just speak to how vandals behave, it also
  speaks to the way the tenants behave and feel about the
  place where they live. Just like the tenants don't think
  well of their housing if the windows remain broken, I
  know I'm far less likely to think well of a software
  system, even a software system where I "live" (one I
  use and depend-upon) if the system is full of pissant
  bugs and defects that *NEVER GET FIXED*.

  Do we know any of those (persistent pissant bugs or the
  systems that contain them?)

                            Atlant

-----Original Message-----
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Andre Somers
Sent: Tuesday, June 07, 2011 03:00
To: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] Qt5 and SQL

Op 7-6-2011 8:34, Ross Bencina schreef:
> Andre Somers wrote:
>
>> Op 6-6-2011 17:47, Alan Ezust schreef:
>>> Shouldn't someone start the process of renaming it to QSqlConnection,
>>> having a deprecated typedef to QSqlDatabase in Qt5, so that we can
>>> remove QSqlDatabase from Qt6?
>> To be honest, you are the first I have heard up this confusion.
> Be careful with this attitude, when I take that position I usually regret it
> later. It's a kind of pointless defense against users telling you something
> is wrong with the system. Why not fix all problems rather than just those
> that lots of people are confused by? Especially high-value low effort things
> like renamings.
Sorry you see it as an attitude. I really mean it. I have been active in
the Qt community for quite a while, and I simply don't remember anyone
expressing confusion on this point before you did. *I* think a rename
will confuse more people currently working with Qt than it will solve
confusions for new users. No data on that though.
>> I don't think this is an important one. If one were to
>> re-design the complete API for it, then sure, refactor QSqlDatabase into
>> something that makes more technical sense, but just a rename for the
>> sake of renaming seems none-produtive to me.
> Personally, I think it's extremely important. If naming is not done properly
> it reflects just as badly on the codebase as other types of flaws. It
> implies a serious deficit in design to missname something as fundamental as
> "a connection to a database" as "the database itself". If you can't even
> name objects correctly there is not much hope for the rest of the system.
I find it less important than the classes actually working. And as
argued before, in the case of an embedded DB, QSqlDatabase actually
_does_ represent the database, and not a connection. I really do agree
that class and method naming is important in API design, and I think
that Qt is in general doing a good job in it.
> On the whole Qt does a great job with naming, I think this is just a legacy
> from cloning Borland VCL (which calls the same class TDatabase)
I agree. And maybe it was a mistake back then.
>> There are bigger fish to fry.
> Ever heard of broken window theory?
> http://en.wikipedia.org/wiki/Broken_windows_theory
I was not with the name, but I am with the concept. Not sure if the Qt
code base can be equated with the urban environment, and Qt developers
with vandals though. It seems stretching the theory to domains it does
not apply to, but hey, that may just be the social scientist in me talking.
> Renaming a class is as easy as ctrl-alt-R, grep and updating the changelog.
> Easier in-fact than me writing this email.
Really? Will that ctrl-alt-R also automagically change all
documentation, all knowledge gathered on fora, mailing list archives,
blogs, books and other places on using this class? And yes, I think that
that is relevant. That body of knowledge is valuable, and it is valuable
that people can find it. Fixing this "broken window" may do more damage
than it solves.
> If you don't commit to continuous improvement of the codebase it will
> ossify. A major release is a good time for this kind of change. In-fact, the
> only time given current Qt policies.
>
> While we're at it, shouldn't QSqlDatabase::transaction() be named
> beginTransaction() ?
Transaction should be a RAII class. In fact, I made one for it.
> These things matter. I'd say fix it.
Yes, these things matter, but IMO it is not worth fixing it _in this case_.

André
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest

This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.



More information about the Qt-interest-old mailing list