Quote
Quivis wrote:
> -> is (inevitably) changed. It also causes /logic/ and /tests/ to be
> -> scattered, e.g. "If MaritalStatus = 'M'" instead of "If
> -> Customer.IsMarried")
> So, I guess, you can say that building a computer program in theory
> is no different than creating a conceptual diagram using ER modeling,
> taking into consideration all the entities (objects) you have to
> create, the attributes (properties) of these entities and so on,
> which eventually (hopefully) leads up to the completed database
> (application)...?
Don't tell your professors, but ... I'm not really sure that I "buy" that
line of reasoning; nor that I really ever have in 25 years or so of doing
this crazy stuff. Modeling the world as "entities" and "relationships"
sounds fine but the real world is awfully hard to model that way. The
whole thing really becomes complicated ("begins to break down") when you
have to interact with an existing database ... or when you must change the
application to suit a new requirement. So I tend to think of ER modeling
as being useful mostly as a conceptualizing tool. My experience does not
tell me that a real-world application can be built that way.
Remember also that there's often a huge gap between the "data model" (or the
application architecture!) that you must program against, and the
"conceptual model" that you want the user to carry in his or her mind while
using your system. Consider for example the relatively simple model
presented by an ATM machine, or a bank in general. As seen by the
end-user, most of the bank's "world" is quite invisible and deliberately
so. An ATM-machine is strictly a "purpose-built machine," and so are most
computer programs.
The ER-model expresses "things" and how "things" relate to one another, more
or less, but it says nothing about how they /move/ and /interact./ It says
nothing about rules which define which interactions are possible (deduct
money, followed by cash dispense) and which are not (account is overdrawn,
dispense cash anyway, oops). So for all the "good" things inherent in the
ER-model, there are a lot of limitations too. And the textbooks that I've
read for review usually don't go into that. Which is why, in my classes, I
usually don't use those (or any) textbooks.
My students like that. My bookstore doesn't.
Quote
> -> Remember this: programs as they are originally written, by the
> original -> programmer who wrote it, usually work pretty well (or not at
> all).
> Tell me about it... ;) I currently (being forced to) take a course
> in VB-6. E-eww! ;-)
Well, VB is a fairly decent tool as far as it goes, but I honestly wish that
BillG wasn't quite so enamored of it. His business has kinda got "a decent
low-level tool" (now that C# is here anyway), and "a decent macro tool" in
VB, but nothing in the middle and all of it /extremely/ dependent on
VBXes... oops, OCXes. Which creates a huge versioning problem, but I guess
I've wandered fairly off-topic now.
You can write good software in anything. You can write bad software in
anything. And the more software you write, and the more software you
encounter, the easier it will be to see what I mean.
Quote
> -> /Design/ your programs to facilitate change. These factors need to be
> taken -> into account at the earliest possible point in the program's
> writing. ->
> -> Also, (and I say this somewhat hesitantly...) don't be afraid to
> _s{*word*99}_ old -> code and "rewrite it properly" if you can convince yourself
> /and/ one or -> two of your peers(!) that by doing so you can make its
> problems "really go -> away for good."
> I don't think that will be an issue: convincing yourself is quite
> easy, but what comes out of the re-make has got to be better than
> what you put it...that's the tricky part! ;-)
True. One of my classic lessons for a Sofwtare Architecture class was to
hand out floppy-disks with [sanitized, anonymous] other people's programs
on them. With each disk I handed a list of requirements: changes to be
made, "the programmer got hit by a bread-truck and he left it
half-finished," or simply, "we lost the comments [of course I'd stripped
them out], figure this thing out and put 'em back in," or even, "the name
mangler chopped up the variable-names in this program... choose
appropriate names and fix them," stuff like that. /Real/ /world/ /stuff/
like that. Gave it to 'em on Thursday and it was due the _next_ Tuesday.
{Billy Joel: /pres-sure/ !!}
It was an awfully quiet Tuesday. But that was _real._
----------------------------------
Fast automatic Paradox/Delphi table repair at a click of a mouse!
http://www.sundialservices.com/products/chimneysweep