From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f25e853f410d55da X-Google-Attributes: gid103376,public From: Steve Whalen Subject: Re: Time to join the fold? Date: 1999/01/27 Message-ID: #1/1 X-Deja-AN: 437448344 Sender: swhalen@netcom19.netcom.com References: <78abg4$cnc$1@its.hooked.net> <78i8s4$hth$1@its.hooked.net> Organization: ? Newsgroups: comp.lang.ada Date: 1999-01-27T00:00:00+00:00 List-Id: Mike Silva wrote: [snip] : Now for another question. Some people have mentioned getting into the Ada : "mind-set". What are the main components of this mind-set? What, IOW, : should I pay special attention to in order to avoid simply writing "C in : Ada" (whatever that might mean). [snip] Spend more time thinking about your application's data, and your application "as data" (by "application as data" I mean revisit program logic, and see if it can be better represented in a "soft" data structure somewhere). Here's what I mean by spending more time thinking about your data. As assembler or C programmers, we tend to describe data to the compiler just clearly enough so we can start coding. I think a key difference of an Ada "mind-set", is that I now work much harder to tell the compiler everything I know about the data, with as much precision as I can, so I can get the compiler's strong typing facilities working for me. Even more importantly I want to benefit from thinking more deeply about WHY some data should be a represented one way, instead of another. I've had programmers switching to Ada, ask for help in getting this "mind-set". One thing that seemed to help, was when I assigned them to take some data structure they were working with, and create as many different representations of the data structure in Ada as they could (i.e. compile & use them in a simple program). Usually, at the end of the first few meetings, I'd send them back to look at other ways to represent the data & use more features of the language (i.e. go back and read about ...). Once they had a fairly complete set of the ways you could represent the data, I'd have them explain why each one was a good way to represent the data for this particular application, or why it was bad, or why it was best. After a while, a "mind-set" starts to develop, and you learn how important it is to describe your data to Ada properly, so Ada can help you the most. This "mind-set" gets reinforced when you find doing all this extra (or more painstaking) work helps you locate deeper logic flaws in your systems. Bottom line: Getting the data structures and representations right lets Ada help you build higher quality applications. Steve -- {===--------------------------------------------------------------===} Steve Whalen swhalen@netcom.com {===--------------------------------------------------------------===}