see below, please. regards,
Richard Erlacher ----- Original Message ----- From: "Andrey Vlassov" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, September 04, 2008 12:39 PM Subject: Re: [Sdcc-user] documentation & open source generally > Well, > > it is very simple -- most Windows users do not know how compiler works > (I mean what stages source come through). I work for university as > Systems Analyst and I must say that very few students learn what really > happens in background. > Little of the doc's that come with commercial products go into any detail at all about such things. > > Nowadays, every compiler is a command line program. Even Microsoft Studio > has command line compilers but most programmers do not think about it. > All what they see is IDE which is nothing than editor with syntax > highligting, integrated help system and interface to run compiler. > > If you ask them what really happens when they click "Compile" or "Run" > you will get wrong answer. > > For most IDE the sequence is next: > > 1. save file > 2. regenerate makefile (if it required) > 3. run "make" (or other equivalent) > 4. "make" runs compiler > 5. compiler takes for example C++ code (.cpp) > 6. compiler runs preprocessor (.cpp) > 7. compiler converts C++ into C (.c) > 8. compiler runs C optimizer (.c) > 9. compiler converts C into ASM (.asm) > 10. compiler runs ASM optimizer (.asm) > The most important thing is to be able to skip this step entirely, as optimization of ASM should be done by the individual programmer who should know all about every detail of the device he's programming, and should carefully optimize the code himself. > > 11. compiler runs ASM compiler (.obj) > I can't imagine what this represents, except, perhaps, a location-independent form of output that is palatable to the linker. > > 12. compiler runs linker (.exe/.com/.bin/.ihx/.out) > Why would the compiler do that? The relocatable object file(s) could originate in several different compilers, couldn't they? Perhaps the IDE would do that. > > But system can get even more complicated (GNU Compiler Collection) > > C++ -> C > Objective-C -> C > Pascal -> C > Ada -> C > Java -> C > Fortran -> C > C -> Assembly > Assembly -> binary code > > Now a question "Why is it so?". And answer is simple, so that code in > different languages could "cooperate". Programmer is free to choose > language of his choice and his code can be reused in other programming > language. Unfortunately most programmers do not use it. > > I heard that "Windows" is so great from students -- and my conclusion is > that students play more games than they study or learn about "Windows". > When I inform them that they need to set some variable they do not have > a clue what I am talking about. > This is because, with Windows 95, Microsoft began issuing their software without any formal documentation of any kind. The previous Windows 3.x had some documentation, but, I suspect, this resulted in numerous lawsuits because Microsoft failed to test its software against that documentation, probably because the documentation was written after, rather than before, the code was written, hence, the code could not be tested against it. > I've seen no official document that describes, in any way, the effect of any of the environment variable settings, switches, etc, or the ways in which they interact, with one another or with the system software or its effects on applications. If there were such a document, it should be required reading for all programmers, and they should probably be required to recite its entire content from memory. They won't be, of course. > > Well, but in regard of the subject discussed here I must agree that good > documentation with examples of working code with reasonably good > explanation what happens "under the hood" is best help for beginer > programmer. > It's not only a good thing, it's an absolute necessity, and is sadly lacking in much of the "open-source" community's output. > > I learnt C in 1989 from "The C Programming Language" (Kernigan and > Ritchie) and up to today I consider this one of the best books ever > written for subject for it's own time. > > Other gratest book "The Art of Electronics" (Horowitz and Hill) was must > read during my study. So far there is no superrior to this book > (although it is not uptodate for new technologies) in form of > explanation the subject. > > The person who started this thread had complain about documentation. I > must agree that documentation could be better but by my personal opinion > documentation is "good" enough to start. Same person would expect to > have "commercial" quality documentation with complementary books for > different MCUs. > I'm the one who started this thread, and I'd hope for much better than "commercial quality" (which, in recent years, has degenerated into total rubbish, where software and its documentation is concerned) documentation from "open-source-community" output, since it's generated by people who should actually recognize not only the necessity for and the benefit of sound documentation, but who are actually equipped both by experience with and by their personal involvement in development of their products. > > But did he took in account how much time should be put into writing > documentation? Did he took in account that many people who participate > in this project are live in poor countries where survival is quite > difficult. Did he took in account that many people who work on this > project do not speak proper English (including myself -- I am > immigrant)? Does this person have any idea how difficult to start new > life in new country from level zero? I believe that he is not. > That's exactly why it never happens. The entire conception, design, development of the final working code, trial, debugging, etc, and, if documentation exists, testing, which isn't possible without a firm document, take up less than 10% of the time and effort of such a project, and half of that 10% is for the testing that can't happen if the documentation, which is about 90% of the effort. Unfortunately, code is written by people who like to write code, and they generally don't like to write documentation, and certainly don't like to do it before they do the "fun" part. Moreover, they don't like to be restricted by a requirement for strict adherence to a predefined specification, which is what the documentation provides. Coders often like to write what they want, rather than what they should, and a predefined specification would take the fun out of their work, in many cases. > > Nobody forces him to use SDCC. There is other commercial products > available (Iar, Keil for example) which do job better than SDCC. If he > is not happy with SDCC then if he can afford other commercial product go > for it. I can not afford to buy other product which cost $5,000+ and I > prefer to use SDCC. > It is true that nobody force me to use SDCC, but the deficiency in the documentation actually prevents me from using it. > > Sorry for long post, it is better to get back to work and do something > more usefull. > > Andrey > > > Bobby Garner wrote: > >> Windows users. Go to Start> All Programs> Accessories, and right click >> on Command Prompt. Click on Properties, then click the Options tab. >> Under Display options choose Window or Full Screen. Click the shortcut >> tab and notice that the target in each case is one and the same >> 'cmd.exe'. >> >> Any questions? >> >> Why would any compiler ever run in a window? Even MSDOS Quick Basic >> which runs in a GUI in full screen mode or in a window, has the >> compiler built in and it runs in the background. There is nothing to >> display except the output which goes to wherever its directed. >> >> Bobby > > ------------------------------------------------------------------------- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Sdcc-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sdcc-user
