* New Software Forum @ 2002-09-14 15:33 Jim Rogers 2002-09-15 16:57 ` Daniel Dudley 2002-09-17 13:00 ` Ingo Marks 0 siblings, 2 replies; 26+ messages in thread From: Jim Rogers @ 2002-09-14 15:33 UTC (permalink / raw) Yesterday I became aware of a new software forum starting up at http://www.crystalcode.com/codemage/MainMenu/Home/Welcome.php I have had some conversations with the web master at this site. I find that they are open to articles and discussions concerning Ada. I plan to write some Ada articles for this site, and possibly help them maintain links to existing high quality Ada web sites. I post this so that anyone else who wants to help me expose the wider development world to Ada can help out. Jim Rogers ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-14 15:33 New Software Forum Jim Rogers @ 2002-09-15 16:57 ` Daniel Dudley 2002-09-15 18:29 ` Marc Spitzer 2002-09-17 13:00 ` Ingo Marks 1 sibling, 1 reply; 26+ messages in thread From: Daniel Dudley @ 2002-09-15 16:57 UTC (permalink / raw) "Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message news:3D8356A7.9010208@worldnet.att.net... > Yesterday I became aware of a new software forum starting up at > http://www.crystalcode.com/codemage/MainMenu/Home/Welcome.php > > I have had some conversations with the web master at this site. > I find that they are open to articles and discussions concerning > Ada. I plan to write some Ada articles for this site, and > possibly help them maintain links to existing high quality Ada > web sites. > > I post this so that anyone else who wants to help me expose the > wider development world to Ada can help out. IMHO, this is a good idea, Jim. Exposing Ada on non-Ada-specific sites will surely open the eyes of many programmers. BTW, I found your Concurrent Programming article to be well-written and enlightening. Thanks. Daniel ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 16:57 ` Daniel Dudley @ 2002-09-15 18:29 ` Marc Spitzer 2002-09-15 19:22 ` Jim Rogers 0 siblings, 1 reply; 26+ messages in thread From: Marc Spitzer @ 2002-09-15 18:29 UTC (permalink / raw) In article <9_2h9.18347$0p1.331293@news2.ulv.nextra.no>, Daniel Dudley wrote: > "Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message > news:3D8356A7.9010208@worldnet.att.net... >> Yesterday I became aware of a new software forum starting up at >> http://www.crystalcode.com/codemage/MainMenu/Home/Welcome.php >> >> I have had some conversations with the web master at this site. >> I find that they are open to articles and discussions concerning >> Ada. I plan to write some Ada articles for this site, and >> possibly help them maintain links to existing high quality Ada >> web sites. >> >> I post this so that anyone else who wants to help me expose the >> wider development world to Ada can help out. > > IMHO, this is a good idea, Jim. Exposing Ada on non-Ada-specific > sites will surely open the eyes of many programmers. > > BTW, I found your Concurrent Programming article to be > well-written and enlightening. Thanks. > > Daniel Could you make the font bigger, it is too small for me to read. marc ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 18:29 ` Marc Spitzer @ 2002-09-15 19:22 ` Jim Rogers 2002-09-15 19:33 ` Jim Rogers 2002-09-16 1:17 ` Jeffrey Carter 0 siblings, 2 replies; 26+ messages in thread From: Jim Rogers @ 2002-09-15 19:22 UTC (permalink / raw) Marc Spitzer wrote: > In article <9_2h9.18347$0p1.331293@news2.ulv.nextra.no>, Daniel Dudley wrote: > >>"Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message >>news:3D8356A7.9010208@worldnet.att.net... >> >>>Yesterday I became aware of a new software forum starting up at >>>http://www.crystalcode.com/codemage/MainMenu/Home/Welcome.php >>> >>>I have had some conversations with the web master at this site. >>>I find that they are open to articles and discussions concerning >>>Ada. I plan to write some Ada articles for this site, and >>>possibly help them maintain links to existing high quality Ada >>>web sites. >>> >>>I post this so that anyone else who wants to help me expose the >>>wider development world to Ada can help out. >>> >> >>IMHO, this is a good idea, Jim. Exposing Ada on non-Ada-specific >>sites will surely open the eyes of many programmers. >> >>BTW, I found your Concurrent Programming article to be >>well-written and enlightening. Thanks. >> >>Daniel >> > > Could you make the font bigger, it is too small for me to read. > > marc > Sorry about that. I understand the problem of small fonts. My eyes have been aging faster in recent years. I just submitted the article. The web master at the site does formatting, including font sizes. I suggest you email the web master about the font problem. I suspect he/she (I don't know which) will try to improve the site as needed. I do plan to write some more articles. Right now I am laying the ground work for an article on common patterns for protected objects. I plan to present the subject as patterns for monitors used for thread communication. All my examples will be Ada protected objects. I considered providing some Java examples also, but realized that some of the patterns vary from very nasty to impossible in Java. I will keep the examples simple by keeping them entirely in Ada. Jim Rogers ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 19:22 ` Jim Rogers @ 2002-09-15 19:33 ` Jim Rogers 2002-09-15 23:27 ` CodeMage 2002-09-16 1:17 ` Jeffrey Carter 1 sibling, 1 reply; 26+ messages in thread From: Jim Rogers @ 2002-09-15 19:33 UTC (permalink / raw) Jim Rogers wrote: > Marc Spitzer wrote: > >> In article <9_2h9.18347$0p1.331293@news2.ulv.nextra.no>, Daniel Dudley >> wrote: >> >>> "Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message >>> news:3D8356A7.9010208@worldnet.att.net... >>> >>>> Yesterday I became aware of a new software forum starting up at >>>> http://www.crystalcode.com/codemage/MainMenu/Home/Welcome.php >>>> >>>> I have had some conversations with the web master at this site. >>>> I find that they are open to articles and discussions concerning >>>> Ada. I plan to write some Ada articles for this site, and >>>> possibly help them maintain links to existing high quality Ada >>>> web sites. >>>> >>>> I post this so that anyone else who wants to help me expose the >>>> wider development world to Ada can help out. >>>> >>> >>> IMHO, this is a good idea, Jim. Exposing Ada on non-Ada-specific >>> sites will surely open the eyes of many programmers. >>> >>> BTW, I found your Concurrent Programming article to be >>> well-written and enlightening. Thanks. >>> >>> Daniel >>> >> >> Could you make the font bigger, it is too small for me to read. >> marc >> > > Sorry about that. I understand the problem of small fonts. My eyes have > been aging faster in recent years. > > I just submitted the article. The web master at the site does formatting, > including font sizes. I suggest you email the web master about the font > problem. I suspect he/she (I don't know which) will try to improve the > site as needed. I just looked at the article using Netscape version 6.02. This version allows me to resize the text up to some very large sizes. You might find this browser useful, particularly if your eyes are having problems like mine. Jim Rogers ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 19:33 ` Jim Rogers @ 2002-09-15 23:27 ` CodeMage 2002-09-16 16:43 ` Adrian Hoe ` (2 more replies) 0 siblings, 3 replies; 26+ messages in thread From: CodeMage @ 2002-09-15 23:27 UTC (permalink / raw) "Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message news:3D84E044.9020306@worldnet.att.net... > > I just submitted the article. The web master at the site does formatting, > > including font sizes. I suggest you email the web master about the font > > problem. I suspect he/she (I don't know which) will try to improve the > > site as needed. There's always a thin line between layout and accessibility of a web site. Theoretically, one should never assume anything about screen resolution, font size/color or anything else in the viewer's web browser. In the case of the CodeMages Community web site however we have chosen to assume a certain minimum screen resolution and an acceptable accessibility level on the most widely used web browsers. That is, it looks good on most browsers for most people. My apologies that for some people this means that the standard font of the site (8pt Verdana) is too small to be considered comfortably readable. > I just looked at the article using Netscape version 6.02. > This version allows me to resize the text up to some very large sizes. > You might find this browser useful, particularly if your eyes are > having problems like mine. At first glance it may seem that the Internet Explorer does not allow the same thing, because our web site basically 'forces' the layout and style of the site through the use of cascading stylesheets. It is however fairly easy to configure Internet Explorer to ignore these stylesheets and to choose your own font size for instance. Just check out the Accessibility button on the General tab in Tools | Internet Options. If you check the option "Ignore font sizes specified on Web pages" and you adjust the font size with View | Text Size, I'm sure you wouldn't have to switch browsers just to read Jim's articles! :) Kind regards, CodeMage The CodeMages Community ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 23:27 ` CodeMage @ 2002-09-16 16:43 ` Adrian Hoe 2002-09-16 18:48 ` sk 2002-09-16 23:43 ` Keith Thompson 2 siblings, 0 replies; 26+ messages in thread From: Adrian Hoe @ 2002-09-16 16:43 UTC (permalink / raw) CodeMage wrote: > "Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message > news:3D84E044.9020306@worldnet.att.net... > >>>I just submitted the article. The web master at the site does >>> > formatting, > >>>including font sizes. I suggest you email the web master about the font >>>problem. I suspect he/she (I don't know which) will try to improve the >>>site as needed. >>> > > There's always a thin line between layout and accessibility of a web site. > Theoretically, one should never assume anything about screen resolution, > font size/color or anything else in the viewer's web browser. In the case of > the CodeMages Community web site however we have chosen to assume a certain > minimum screen resolution and an acceptable accessibility level on the most > widely used web browsers. That is, it looks good on most browsers for most > people. My apologies that for some people this means that the standard font > of the site (8pt Verdana) is too small to be considered comfortably > readable. > > >>I just looked at the article using Netscape version 6.02. >>This version allows me to resize the text up to some very large sizes. >>You might find this browser useful, particularly if your eyes are >>having problems like mine. >> > > At first glance it may seem that the Internet Explorer does not allow the > same thing, because our web site basically 'forces' the layout and style of > the site through the use of cascading stylesheets. It is however fairly easy > to configure Internet Explorer to ignore these stylesheets and to choose > your own font size for instance. Just check out the Accessibility button on > the General tab in Tools | Internet Options. If you check the option "Ignore > font sizes specified on Web pages" and you adjust the font size with View | > Text Size, I'm sure you wouldn't have to switch browsers just to read Jim's > articles! :) > > Kind regards, > > CodeMage > The CodeMages Community > > > > Forget about IE. Netscape 6 can do better. Download and install Netscape 6. Choose View from the menu bar and click Text Size. Here, you can zoom in and out freely. No setup hassle. :-,) -- type Dmitry is new Adrian; -- Adrian Hoe -- http://adrianhoe.com -- Remove *nospam* to email ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 23:27 ` CodeMage 2002-09-16 16:43 ` Adrian Hoe @ 2002-09-16 18:48 ` sk 2002-09-16 23:43 ` Keith Thompson 2 siblings, 0 replies; 26+ messages in thread From: sk @ 2002-09-16 18:48 UTC (permalink / raw) Hi, > At first glance it may seem that the Internet Explorer does not > allow the same thing, because our web site basically 'forces' the > layout and style of the site through the use of cascading stylesheets. > It is however fairly easy to configure Internet Explorer to ignore > these stylesheets and to choose Interesting ! I use Netscape/Mozilla and cannot read your site. It has been a very long time since I have had to juggle my fonts just to see the home page of _any_ site. Most sites I want to visit do not have this attitude and if they do, goodbye ! I must wonder about he "mage" part about "CodeMage" and "The CodeMages Community" if there is an insistance upon ME adapting to them rather than taking a position of least common denominator. Hopefully you will follow the policies and practices of all the other sites that wish to provide texts, articles and news to the public and adapt to potential interest rather than the skill set of the web designer. -- ------------------------------------- -- Merge vertically for real address ------------------------------------- s n p @ t . o k i e k c c m ------------------------------------- ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 23:27 ` CodeMage 2002-09-16 16:43 ` Adrian Hoe 2002-09-16 18:48 ` sk @ 2002-09-16 23:43 ` Keith Thompson 2002-09-17 7:38 ` CodeMage 2 siblings, 1 reply; 26+ messages in thread From: Keith Thompson @ 2002-09-16 23:43 UTC (permalink / raw) "CodeMage" <codemage@crystalcode.com> writes: [...] > There's always a thin line between layout and accessibility of a web site. > Theoretically, one should never assume anything about screen resolution, > font size/color or anything else in the viewer's web browser. In the case of > the CodeMages Community web site however we have chosen to assume a certain > minimum screen resolution and an acceptable accessibility level on the most > widely used web browsers. That is, it looks good on most browsers for most > people. My apologies that for some people this means that the standard font > of the site (8pt Verdana) is too small to be considered comfortably > readable. Why do you feel the need to tell my browser how to display your text? I've configured my browser so that text is presented, by default, at a size I find comfortable. Anything smaller than that is going to be difficult for me to read. Your choice of dark blue on light blue also doesn't help legibility. If I have to tweak my browser settings to read your site, I'm afraid it's just not going to be worth my time. As it happens, the browser I use, Opera, has a button that toggles between author mode and user mode; when I press it, your site appears in Adobe-Times at some reasonable size, in black on white. Most browsers make this more difficult, though, if not impossible. -- Keith Thompson (The_Other_Keith) kst@cts.com <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst> Schroedinger does Shakespeare: "To be *and* not to be" ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-16 23:43 ` Keith Thompson @ 2002-09-17 7:38 ` CodeMage 0 siblings, 0 replies; 26+ messages in thread From: CodeMage @ 2002-09-17 7:38 UTC (permalink / raw) "Keith Thompson" <kst@cts.com> wrote in message news:yecit154i0y.fsf@king.cts.com... > "CodeMage" <codemage@crystalcode.com> writes: [snip] > Why do you feel the need to tell my browser how to display your text? > I've configured my browser so that text is presented, by default, at a > size I find comfortable. Anything smaller than that is going to be > difficult for me to read. Your choice of dark blue on light blue also > doesn't help legibility. At the risk of continuing this slightly off-topic discussion in this newsgroup, I would like to say the following about that, which is partly in response to "sk" as well. At least I find your posting a little bit more open-minded and constructive in nature than the posting by "sk". Using cascading stylesheets (CSS) is an accepted practice to effectively separate site layout from site content. When I say that my web site 'forces' its layout on the viewer, I meant to say that a modern web browser (Mozilla, Netscape, Opera, IE, you name it) is inclined to follow those layout rules as specified in those stylesheets, but is not by any means required to follow these rules. If I look around on the Internet, I see a large amount of web sites that use the same technique and for a good reason: as a web site author you want to ensure that no matter what browser is used and no matter what computer configuration is used, the site will have a 'fair chance' to appear and behave in exactly the same way. This means the author also needs to be careful with the kind of HTML, the kind of scripting and the kind of layout directives s/he uses. I feel that every site that wants to transcend the simple 'plain text' appearance will have parts on the screen (e.g. title bars, menu boxes, navigation chain, sidebars) that have been designed carefully with a particular homogenous layout in mind. Using CSS this design is recommended to the web browser, but it may be overridden by the same web browser and some of them handle that a little bit easier than others. I suggest that if people still feel the need to discuss this topic further we could take it to the proper place, i.e. the forum on the CodeMages Community. (unless people are also having trouble reading that! :P). Having said all that, I am going to collect all the useful suggestions that I have read in this newsgroup and I will implement them in the next major site redesign. Kind regards, CodeMage ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-15 19:22 ` Jim Rogers 2002-09-15 19:33 ` Jim Rogers @ 2002-09-16 1:17 ` Jeffrey Carter 2002-09-16 13:51 ` Jim Rogers 1 sibling, 1 reply; 26+ messages in thread From: Jeffrey Carter @ 2002-09-16 1:17 UTC (permalink / raw) Jim Rogers wrote: > I do plan to write some more articles. Right now I am laying the ground > work for an article on common patterns for protected objects. I plan to > present the subject as patterns for monitors used for thread communication. > All my examples will be Ada protected objects. I considered providing some > Java examples also, but realized that some of the patterns vary from very > nasty to impossible in Java. I will keep the examples simple by keeping > them > entirely in Ada. This sounds like an excellent reason for mentioning Java in the article: "I considered providing Java examples as well as Ada, but found that they were extremely complicated in Java, and some of them could not be implemented in Java at all." Just as long as you don't refer to yourself as "we" or "the present author" or such. -- Jeff Carter "Perfidious English mouse-dropping hoarders." Monty Python & the Holy Grail ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-16 1:17 ` Jeffrey Carter @ 2002-09-16 13:51 ` Jim Rogers 2002-09-17 4:27 ` Daniel Dudley 0 siblings, 1 reply; 26+ messages in thread From: Jim Rogers @ 2002-09-16 13:51 UTC (permalink / raw) Jeffrey Carter wrote: > This sounds like an excellent reason for mentioning Java in the article: > "I considered providing Java examples as well as Ada, but found that > they were extremely complicated in Java, and some of them could not be > implemented in Java at all." > > Just as long as you don't refer to yourself as "we" or "the present > author" or such. What? I can't mention multiple personalities?;-) I am still working on that article. If I can find a valid way of implementing my design patterns in Java I will present those also. If I do mention Java in a negative way, which I do not expect to do, it will be in the context of my own lack of ability to implement these design patterns in that language. I expect that I will try to keep the overall message positive, focused on design patterns, rather than dilute the message with language quibbles. I am now planning to leave any Java implementation(s) as an exercise for the reader. Jim Rogers ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-16 13:51 ` Jim Rogers @ 2002-09-17 4:27 ` Daniel Dudley 0 siblings, 0 replies; 26+ messages in thread From: Daniel Dudley @ 2002-09-17 4:27 UTC (permalink / raw) "Jim Rogers" <jimmaureenrogers@worldnet.att.net> wrote in message news:3D85E18B.5080106@worldnet.att.net... [snipped] > I am now planning to leave any Java implementation(s) > as an exercise for the reader. Good on you, Jim! :-) Daniel ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-14 15:33 New Software Forum Jim Rogers 2002-09-15 16:57 ` Daniel Dudley @ 2002-09-17 13:00 ` Ingo Marks 2002-09-17 13:35 ` Preben Randhol 2002-09-18 10:09 ` Ingo Marks 1 sibling, 2 replies; 26+ messages in thread From: Ingo Marks @ 2002-09-17 13:00 UTC (permalink / raw) Jim Rogers wrote: > Yesterday I became aware of a new software forum starting up at > http://www.crystalcode.com/codemage/MainMenu/Home/Welcome.php > > I have had some conversations with the web master at this site. I find > that they are open to articles and discussions concerning Ada. I plan > to write some Ada articles for this site, and possibly help them > maintain links to existing high quality Ada web sites. > > I post this so that anyone else who wants to help me expose the > wider development world to Ada can help out. > > Jim Rogers I have taken a look at http://www.crystalcode.com/codemage/MainMenu/Coding/Programming_Concepts/ConcurrentProgramming.php. My first impression was that the Java code is clean and easy to read while the Ada code looks much too "chatty". I think most unbiased readers would think: "That's Ada? Oh how ugly! No thanks, I'll stay with Java.". Please don't misunderstand me: I reward your good work but I fear newcomers won't understand why Ada is so chatty compared with Java and could conclude: "When Ada code is so chatty Ada must be much more complicated than Java". I would recommend syntax highlighting of Ada code. Syntax highlighted Ada looks wonderful in XEmacs (adamode). The same Ada code looks ugly if syntax highlighting is disabled (the code is much harder to read). There are some pretty good Ada to HTML source converters out there (f.ex Adabrowse). If colors are not wanted at Crystalcode then at least boldface and italic should be used to separate keywords and comments from the other source code (like printer output of Ada source). I also would like to recommend to use shortcuts as most as possible. It is not wise to use Ada.Textio.Put_Line all the time because that deters newcomers who are interested in Ada. With Ada's rename command you can use a pretty short Print or something instead. That way you shorten the source and the code is much easier to read (almost Basic ;-) especially in short examples. Regards, Ingo ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 13:00 ` Ingo Marks @ 2002-09-17 13:35 ` Preben Randhol 2002-09-17 16:39 ` Ingo Marks 2002-09-18 10:09 ` Ingo Marks 1 sibling, 1 reply; 26+ messages in thread From: Preben Randhol @ 2002-09-17 13:35 UTC (permalink / raw) On Tue, 17 Sep 2002 15:00:48 +0200, Ingo Marks wrote: > My first impression was that the Java code is clean and easy to read while > the Ada code looks much too "chatty". I think most unbiased readers would > think: "That's Ada? Oh how ugly! No thanks, I'll stay with Java.". What puzzels me though is : with Ada.Calendar; use Ada.Calendar; and then throughout: Start_Time : Ada.Calendar.Time; ... End_Time := Ada.Calendar.Clock; Why the use Ada.Calendar; if it is not used? I think one can safly do: with Ada.Text_Io; use Ada.Text_Io; and then: Put_Line("Iteration" & Integer'Image(Num) & " Result:" & Integer'Image(Result) & " Time:" & Duration'Image(Elapsed_Time)); > Please don't misunderstand me: I reward your good work but I fear newcomers > won't understand why Ada is so chatty compared with Java and could > conclude: "When Ada code is so chatty Ada must be much more complicated > than Java". I remember first time I saw Ada it reminded me of Pascal that we had to use at the University (for the course everybody had to take in programming). So I didn't like the way Ada looked and not knowing it's advantages and thinking that C/C++/Java were the "only" languages I abandoned Ada. But then some months later I reconsidered and the only regret I have is that I should have discovered Ada earlier. > I would recommend syntax highlighting of Ada code. Syntax highlighted Ada Yes! At least boldify the keywords. Preben ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 13:35 ` Preben Randhol @ 2002-09-17 16:39 ` Ingo Marks 2002-09-17 16:41 ` Ingo Marks 0 siblings, 1 reply; 26+ messages in thread From: Ingo Marks @ 2002-09-17 16:39 UTC (permalink / raw) Preben Randhol wrote: > Put_Line("Iteration" & Integer'Image(Num) & > " Result:" & Integer'Image(Result) & > " Time:" & Duration'Image(Elapsed_Time)); Even shorter (using a suitable string package): Put_Line ("Iteration" & Num & " Result:" & Result & " Time:" & Duration'Image(Elapsed_Time)); Regards, Ingo ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 16:39 ` Ingo Marks @ 2002-09-17 16:41 ` Ingo Marks 2002-09-17 17:33 ` Preben Randhol 0 siblings, 1 reply; 26+ messages in thread From: Ingo Marks @ 2002-09-17 16:41 UTC (permalink / raw) Ingo Marks wrote: or even this way :-) Put_Line ("Iteration" & Num & " Result:" & Result & " Time:" & Elapsed_Time); ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 16:41 ` Ingo Marks @ 2002-09-17 17:33 ` Preben Randhol 2002-09-17 19:07 ` Ingo Marks ` (2 more replies) 0 siblings, 3 replies; 26+ messages in thread From: Preben Randhol @ 2002-09-17 17:33 UTC (permalink / raw) On Tue, 17 Sep 2002 18:41:43 +0200, Ingo Marks wrote: > Ingo Marks wrote: > > or even this way :-) > > Put_Line ("Iteration" & Num & > " Result:" & Result & > " Time:" & Elapsed_Time); Well now we are borderlining the poor readability. In the previous version I could at least know that Elapsed_Time was a Duration here it can be anything. This is one of the great features of Ada that it is so self-documenting. Preben ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 17:33 ` Preben Randhol @ 2002-09-17 19:07 ` Ingo Marks 2002-09-17 21:03 ` Simon Wright 2002-09-18 13:04 ` Stephen Leake 2002-09-18 14:07 ` Kevin Cline 2 siblings, 1 reply; 26+ messages in thread From: Ingo Marks @ 2002-09-17 19:07 UTC (permalink / raw) Preben Randhol wrote: > On Tue, 17 Sep 2002 18:41:43 +0200, Ingo Marks wrote: >> Ingo Marks wrote: >> >> or even this way :-) >> >> Put_Line ("Iteration" & Num & >> " Result:" & Result & >> " Time:" & Elapsed_Time); > > Well now we are borderlining the poor readability. In the previous > version I could at least know that Elapsed_Time was a Duration here it > can be anything. This is one of the great features of Ada that it is so > self-documenting. This short style is suitable for short examples only. In real life one should use the more declarative version, of course. Regards, Ingo ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 19:07 ` Ingo Marks @ 2002-09-17 21:03 ` Simon Wright 0 siblings, 0 replies; 26+ messages in thread From: Simon Wright @ 2002-09-17 21:03 UTC (permalink / raw) Ingo Marks <nospam_adv@region-nord.de> writes: > This short style is suitable for short examples only. In real life > one should use the more declarative version, of course. People tend to follow the style they come across first -- religiously, sometimes! ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 17:33 ` Preben Randhol 2002-09-17 19:07 ` Ingo Marks @ 2002-09-18 13:04 ` Stephen Leake 2002-09-18 13:38 ` Preben Randhol 2002-09-18 14:07 ` Kevin Cline 2 siblings, 1 reply; 26+ messages in thread From: Stephen Leake @ 2002-09-18 13:04 UTC (permalink / raw) Preben Randhol <randhol+news@pvv.org> writes: > On Tue, 17 Sep 2002 18:41:43 +0200, Ingo Marks wrote: > > Ingo Marks wrote: > > > > or even this way :-) > > > > Put_Line ("Iteration" & Num & > > " Result:" & Result & > > " Time:" & Elapsed_Time); > > Well now we are borderlining the poor readability. In the previous > version I could at least know that Elapsed_Time was a Duration here it > can be anything. This is one of the great features of Ada that it is so > self-documenting. It has _never_ been a feature of Ada that the type of an object was obvious at the point of the use of the object. Consider: A := B + C; Is A an Integer, Cartestian Vector, or directed graph? You have no idea. However, any reasonable Ada IDE will provide a way to popup the definition of A, so you can see the type. In fact, the fact that there is no type information cluttering the statement is a feature. Compare it to the use of "Hungarian notation" in some Windows code. My only problem with Ingo's suggestion is that it is a pain to provide the "appropriate string package", that defines all of the necessary variations of "&". That's why I wrote Auto_Text_IO (http://users.erols.com/leakstan/Stephe/Ada/auto_text_io.html); it writes a similar package for me. -- -- Stephe ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-18 13:04 ` Stephen Leake @ 2002-09-18 13:38 ` Preben Randhol 2002-09-28 16:57 ` Richard Riehle 0 siblings, 1 reply; 26+ messages in thread From: Preben Randhol @ 2002-09-18 13:38 UTC (permalink / raw) On 18 Sep 2002 09:04:39 -0400, Stephen Leake wrote: > It has _never_ been a feature of Ada that the type of an object was > obvious at the point of the use of the object. Consider: > > A := B + C; > > Is A an Integer, Cartestian Vector, or directed graph? You have no > idea. However, any reasonable Ada IDE will provide a way to popup the > definition of A, so you can see the type. > > In fact, the fact that there is no type information cluttering the > statement is a feature. Compare it to the use of "Hungarian notation" > in some Windows code. Hmm yes you are right. The problem though is that if this is presented to a beginner he will wonder why he cannot Put_Line his Float or some other custome type in the same way without realising that you need a new Text_IO package. > My only problem with Ingo's suggestion is that it is a pain to provide > the "appropriate string package", that defines all of the necessary > variations of "&". That's why I wrote Auto_Text_IO > (http://users.erols.com/leakstan/Stephe/Ada/auto_text_io.html); it > writes a similar package for me. I find myself always using 'Image as I don't bother with the hazzel of remembering to with Float_IO, Integer_IO etc... so 'Image is faster. :-) Preben ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-18 13:38 ` Preben Randhol @ 2002-09-28 16:57 ` Richard Riehle 0 siblings, 0 replies; 26+ messages in thread From: Richard Riehle @ 2002-09-28 16:57 UTC (permalink / raw) Preben Randhol wrote: > I find myself always using 'Image as I don't bother with the hazzel of > remembering to with Float_IO, Integer_IO etc... so 'Image is faster. :-) The problem with 'Image is that you get scientific notation for floating point, and spaces in front of integers, and have no way to present the data in upper and lower case for enumerated types. Richard Riehle ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 17:33 ` Preben Randhol 2002-09-17 19:07 ` Ingo Marks 2002-09-18 13:04 ` Stephen Leake @ 2002-09-18 14:07 ` Kevin Cline 2002-09-18 17:46 ` Ingo Marks 2 siblings, 1 reply; 26+ messages in thread From: Kevin Cline @ 2002-09-18 14:07 UTC (permalink / raw) Preben Randhol <randhol+news@pvv.org> wrote in message news:<slrnaoeprn.vb.randhol+news@kiuk0156.chembio.ntnu.no>... > On Tue, 17 Sep 2002 18:41:43 +0200, Ingo Marks wrote: > > Ingo Marks wrote: > > > > or even this way :-) > > > > Put_Line ("Iteration" & Num & > > " Result:" & Result & > > " Time:" & Elapsed_Time); > > Well now we are borderlining the poor readability. In the previous > version I could at least know that Elapsed_Time was a Duration here it > can be anything. This is one of the great features of Ada that it is so > self-documenting. This version is easier to read and easier to maintain. I don't need to know the type of Elapsed_Time to understand this statement, and the compiler already knows the type and shouldn't need to be told again. Repeating the type here reduces readability and makes the code more sensitive to a change in the type of Elapsed_Time. ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-18 14:07 ` Kevin Cline @ 2002-09-18 17:46 ` Ingo Marks 0 siblings, 0 replies; 26+ messages in thread From: Ingo Marks @ 2002-09-18 17:46 UTC (permalink / raw) Kevin Cline wrote: > Preben Randhol <randhol+news@pvv.org> wrote in message > news:<slrnaoeprn.vb.randhol+news@kiuk0156.chembio.ntnu.no>... >> On Tue, 17 Sep 2002 18:41:43 +0200, Ingo Marks wrote: >> > Ingo Marks wrote: >> > >> > or even this way :-) >> > >> > Put_Line ("Iteration" & Num & >> > " Result:" & Result & >> > " Time:" & Elapsed_Time); >> >> Well now we are borderlining the poor readability. In the previous >> version I could at least know that Elapsed_Time was a Duration here it >> can be anything. This is one of the great features of Ada that it is so >> self-documenting. > > This version is easier to read and easier to maintain. I don't need to > know the type of Elapsed_Time to understand this statement, and the > compiler already knows the type and shouldn't need to be told again. > Repeating the type here reduces readability and makes the code more > sensitive to a change in the type of Elapsed_Time. The compiler doesn't need extra specification but an unbiased reader of your source would appreciate it. For myself I always use the short form for integer (or ranges of it) only. So I would prefer Put_Line ("Iteration" & Num & " Result:" & Result & " Time:" & Duration'Image(Elapsed_Time)); If it is inevitable that the type of Elapsed_Time may change in future then it could be good idea to define a subtype: subtype My_Duration is Duration; Put_Line ("Iteration" & Num & " Result:" & Result & " Time:" & My_Duration'Image(Elapsed_Time)); If you have to change the type you just need to change one line (hopefully). Regards, Ingo ^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New Software Forum 2002-09-17 13:00 ` Ingo Marks 2002-09-17 13:35 ` Preben Randhol @ 2002-09-18 10:09 ` Ingo Marks 1 sibling, 0 replies; 26+ messages in thread From: Ingo Marks @ 2002-09-18 10:09 UTC (permalink / raw) Ingo Marks wrote: > There are some pretty good Ada to HTML source converters out there (f.ex > Adabrowse). Webcpp: http://freshmeat.net/projects/webcpp/?topic_id=71%2C847%2C861%2C867 Highlight: http://freshmeat.net/projects/highlight/?topic_id=849 Code2HTML: http://freshmeat.net/projects/code2html/?topic_id=96%2C849 AdaBrowse: http://home.tiscalinet.ch/t_wolf/tw/ada95/adabrowse/ AdaDoc: http://freshmeat.net/projects/adadoc/?topic_id=45 ^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2002-09-28 16:57 UTC | newest] Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-09-14 15:33 New Software Forum Jim Rogers 2002-09-15 16:57 ` Daniel Dudley 2002-09-15 18:29 ` Marc Spitzer 2002-09-15 19:22 ` Jim Rogers 2002-09-15 19:33 ` Jim Rogers 2002-09-15 23:27 ` CodeMage 2002-09-16 16:43 ` Adrian Hoe 2002-09-16 18:48 ` sk 2002-09-16 23:43 ` Keith Thompson 2002-09-17 7:38 ` CodeMage 2002-09-16 1:17 ` Jeffrey Carter 2002-09-16 13:51 ` Jim Rogers 2002-09-17 4:27 ` Daniel Dudley 2002-09-17 13:00 ` Ingo Marks 2002-09-17 13:35 ` Preben Randhol 2002-09-17 16:39 ` Ingo Marks 2002-09-17 16:41 ` Ingo Marks 2002-09-17 17:33 ` Preben Randhol 2002-09-17 19:07 ` Ingo Marks 2002-09-17 21:03 ` Simon Wright 2002-09-18 13:04 ` Stephen Leake 2002-09-18 13:38 ` Preben Randhol 2002-09-28 16:57 ` Richard Riehle 2002-09-18 14:07 ` Kevin Cline 2002-09-18 17:46 ` Ingo Marks 2002-09-18 10:09 ` Ingo Marks
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox