Path: utzoo!utgpu!watserv1!watmath!att!dptg!mtunq!mtunq.att.com!psrc From: psrc@mtunq.att.com (Paul S. R. Chisholm) Newsgroups: comp.object Subject: object-oriented design is *hard*! Keywords: object-oriented design OOD Message-ID: <1264@mtunq.ATT.COM> Date: 30 Aug 90 15:41:32 GMT Sender: psrc@mtunq.ATT.COM Organization: AT&T Bell Laboratories Lines: 46 Nuts! I'm well on my way into my second non-trivial C++ program. This one will bring me over the thousand statement* mark for the first time, and I'm learning some lessons. One of them is rather bitter. I like C++; it's a good language to do the coding phase of a software engineering effort in. It forces me to think about data types and initialization a lot more than any other language I've dealt with. I like that. Some of the semantics aren't obvious, and it's not always clear where to find the code that does some of the important stuff. I do find that constructors, by hiding lots of information from the calling routine, make my modules more cohesive. I like object-oriented programming. I wasn't satisfied with the ways I thought to apply it to my recursive descent parser, so I didn't. I did finally figure out how to make the objects I parsed all respond to a common "message" (member function), and I can see that's going to reduce the number of lines of code I write (and make the code more cohesive). But I'm *really* struggling with object-oriented design! I've *finally* become very comfortable with the top-down approach; I can hack out a few hundred statements of code at the rate of a hundred statements every day or two, including the time needed for design (and some specification). I walk down the calling tree, designing and coding as I go. Managing the intellectual process is very straightforward. OOD is different. I seem to need to keep everything in my head, design everything, and only then start coding. The only way I could get far enough to come up with an object-oriented design is do the bulk of a top-down design, and then notice the common elements! Even so, I don't really know where to start, or what the natural next steps are when I've finished one step. Anybody else experiencing this, or should I apply for a job flipping hamburgers at McDonalds? (*Really, not "statements", but "non-commentary source lines". A 1K NCSL program is fairly simple, but not trivial.) Paul S. R. Chisholm, AT&T Bell Laboratories att!mtunq!psrc, psrc@mtunq.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind.