Xref: utzoo comp.lang.c++:8481 comp.software-eng:3940 Path: utzoo!attcan!uunet!dg!brahma!pkaikini From: pkaikini@brahma.rtp.dg.com (Prasan Kaikini) Newsgroups: comp.lang.c++,comp.software-eng Subject: Re: Project experience with C++ Keywords: C++, project experience, learning, real life Message-ID: <641@dg.dg.com> Date: 13 Jul 90 20:54:30 GMT References: <812@agcsun.UUCP> Sender: root@dg.dg.com Reply-To: ClearVision Organization: IsConfused Lines: 75 In article <812@agcsun.UUCP>, marks@agcsun.UUCP (Mark Shepherd) writes: |> I would like to find out if anyone out there has real-life, long-term |> experience with a substantial (tens/hundreds K lines of code) project |> written in C++. I worked for almost a year in a startup (translates to 2 years in a normal company :-)) on a network management product done completely in C++ (ATT2.0). There were 3 main groups: the UI/X/Motif group had about 4 people, the Object Manager/Database group had about 3 people (including me), and the Comm group had 2 people. When the project was started, each of us had about 3-4 years of experience in C, and we had all read Stroustrup's C++ book. When I left, I think the OM group had written somewhere around 100,000 lines of C++ code. From what i remember, the UI code was as large, if not larger, and the Comm code was probably about 50,000. These numbers are just informed guesses, but it was an enormous amount of code. |> Here are some things I'd like to know: |> |> - how long does it take an C or Pascal programmer to learn and |> become productive in object-oriented design and programming I think the main difficulty was the switch in the thought process from a procedural to an object-oriented paradigm. Once that mental switch was made, it was fairly simple to program in C++. I think it took about 2 months for us pioneers to make that switch. Basically, we learned from each other - we didn't even have access to the net to ask questions! People who joined the project later seemed to be able to make the switch somewhat faster. |> - how long does it take to develop something in C++ compared to C I'll skip this one - too many variables to make a fair comparison. |> - how good is the long-term extendability, reliability, maintainability |> of object-oriented designs/implementations Extendablity: excellent!! Our product depended heavily on the extendabilty afforded by C++. Essentially, we provided a platform for a network management station, and if a network manager wanted the system to manage a new device (one that our system didn't know anything about), all that he/she had to do was plug in a description of the device into the system. Any extra management functions needed by the new device could also as easily be plugged in. (We had a poor man's dynamic linker.) Maintainabilty: very good! Data encapsulation made the code extremely modular, and bug-fixing was simple. However, lots of thought needs to go into designing your basic class hierarchy. We went thru a couple of revisions. I'm not sure if that was due to lack of experience with C++ or with network management! Reliability: don't know. While testing of C software, itself seems to be a hopeless task, nobody seems to have a clue of how to go about testing C++ software! |> - what are the pros/cons of doing a project in C++ rather than C Pros: True data abstraction and encapsulation, inheritance especially multiple, polymorphism, and lots of other small details. Cons: None - other than the learning involved! |> - what are the pitfalls of doing something in C++ Designing the basic class hierarchy - if you haven't done it well, you'll realize soon enough and redesign it. Other minor ones which i need more time to recollect! |> - is C++ particularly well suited (or badly suited) to |> - graphic user interfaces (X/Motif) |> - real time device control Sorry, no experience with either. I'm now back to programming in C, and it feels like going from C to assembler! I can't imagine how I could have ever liked such a language (C)!! Hope that helps. If you need any more details, please email. Prasan