Re: C flame (was: FS/OS in schools)
HM Last time that I heard, in Ben-Gurion university, the first programming HM language was Java. That's a swell idea in my opinion. Java is HM feature-complete, you can't argue with that. It also means that students I can. Too many times I have heard from Java guys working next door phrases like This feature works starting with Java 1.x and saw This feature is deprecated. Also, Java is not exactly the most effective language (try doing integer array sorting on C and proper Java) and also it's interfaces with other languages are pretty arcane, especially for the beginner. HM hackers, I think it is extremely important to teach beginners to HM think object-oriented, even if all they'll ever use is an I don't know why OO is the single concept that needs to be taught before all. Imagine the guy is going to be a relational DBA - how OO is going to help him there? OO is an important concept, but it is not the only concept in existance. HM The basic stuff you need to teach people is algorithms and data HM structures. You want to save them from all the clutter around Hear, hear! And C is actually _better_ for teaching data structures, because you can _feel_ how these data structures work. In Java, a lot of things are masked by gc is going to make it for me and I don't need to know how hashes are working - I have standard class for that and I don't need to initialize - it will be null anyways. That's good sometimes for work - but for teaching, that's not always good. The same way as they make you to solve problems even though the answers are in the book - to make you not only know to use it, but know to understand it. -- [EMAIL PROTECTED] \/ There shall be counsels taken Stanislav Malyshev /\ Stronger than Morgul-spells phone +972-50-624945/\ JRRT LotR. whois:!SM8333 = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
Quoting Stanislav Malyshev [EMAIL PROTECTED]: I can. Too many times I have heard from Java guys working next door phrases like This feature works starting with Java 1.x and saw This feature is deprecated. Say hi to the guys next door... But really, I think you misinterpret this. Yes, there are additional features in Java 2 over Java 1, like there are additional features in ANSI C over KR C. In addition, if a method has been deprecated, it's not because the guys at Sun drank too much one evening. It's because the feature has been re-implemented with better interfaces based on past experience and user demands. Don't tell me there are no deprecated features in, say, PHP... The Java 2 API itself has changed very little from version 1.2 to version 1.4. And all this has nothing to do with feature-completeness. Also, Java is not exactly the most effective language (try doing integer array sorting on C and proper Java) and also it's interfaces with other languages are pretty arcane, especially for the beginner. You need interfaces to other languages in a language used for learning basics? I don't think so. You need them for *real life* programming, in some situations, I grant you that. But seriously, to learn how to implement a B-tree or how to find whether a point is inside or outside a polygon (just examples of possible beginner exercises), you really don't need to interface anything. I don't know why OO is the single concept that needs to be taught before all. Imagine the guy is going to be a relational DBA - how OO is going to help him there? OO is an important concept, but it is not the only concept in existance. OO is good to know, because it teaches you to organize related things in the same place and design them in such a way that they work closely together, but separate them from other groups of unrelated things. This is a concept that would not be bad for anybody to build on, even when they write stored procedures in Sybase, believe me - because I do that, among other things... Hear, hear! And C is actually _better_ for teaching data structures, because you can _feel_ how these data structures work. In Java, a lot of things are masked by gc is going to make it for me and I don't need to know how hashes are working - I have standard class for that and I don't need to initialize - it will be null anyways. That's good sometimes for work - but for teaching, that's not always good. Actually, I think the exact opposite than you about all this. I think beginners should learn the main things, not the little things that can happen in real work. They want to build the tree, they don't want to spend two hours understanding why the program fails only when it runs straight, but works well under a debugger... This is actually something that happened to me in my first C class. Now, when you actually know what you are doing (you've written the quicksort algorithm seventy times and you know you have it right), you can fairly well deal with this. But if you don't know whether your implementation is wrong, or whether you simply forgot to initialize something, you're in for a hard time. Let students face one problem at a time. As for having a standard class for hashes - be serious. When I learned operating systems, I was told to write a shell. Now, do you think I would have gotten any marks at all, if I just told them Oh, I found this sh program, it does exactly what I need? If the teacher wants the student to learn how to implement a hash, he will damn well tell them *not* to use the built-in class, but to create their own. And if they happen to read the source to the original to see how it works - that's actually good education. I am not against C in any way, mind you. I think every CS student in every university should take a C course, and also use it as the language for certain other courses (such as operating systems or introduction to compilers [would you believe I learned compilers in Pascal?]). But that's second-third year university students, not high-school/first year CS students. Herouth = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
At 10:20 08.06.2003 +0300, Stanislav Malyshev wrote: HM Last time that I heard, in Ben-Gurion university, the first programming HM language was Java. That's a swell idea in my opinion. Java is HM feature-complete, you can't argue with that. It also means that students I can. Too many times I have heard from Java guys working next door phrases like This feature works starting with Java 1.x and saw This feature is deprecated. Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Several important additions are planned for the next JDK1.5 - http://java.sun.com/features/2003/05/bloch_qa.html HM hackers, I think it is extremely important to teach beginners to HM think object-oriented, even if all they'll ever use is an I don't know why OO is the single concept that needs to be taught before all. Imagine the guy is going to be a relational DBA - how OO is going to help him there? OO is an important concept, but it is not the only concept in existance. I agree, however students must be taught to *think* in an object oriented manner before they get stuck in procedural. It's rather hard to do the switch once you're used to procedural programming. HM The basic stuff you need to teach people is algorithms and data HM structures. You want to save them from all the clutter around Hear, hear! And C is actually _better_ for teaching data structures, because you can _feel_ how these data structures work. In Java, a lot of things are masked by gc is going to make it for me and I don't need to know how hashes are working - I have standard class for that and I don't need to initialize - it will be null anyways. I disagree. Why must I at all worry how big an int is going to be unless I'm doing some very low level programming? Why must beginners have to handle with the nontrivial issue of releasing memory? Or pointer arithmetics? Maybe my opinion doesn't mean much, but consider this - MIT, Caltech, TAU (yes, TAU is not in the same league, but I study there :-) ) and many other universities teach Scheme in their introduction to CS classes. Scheme has garbage collection, no pointer arithmetics, unboundedly (is that a word?) big integers/fractions. Heck, even arrays in Scheme were shown to us in a by the way, there is also an O(1) access list in Scheme way. I wouldn't say Java is *the* best language to teach beginners (I would say Scheme is), but it's certainly not as bad as C (or worse, C++). As for teaching OO specifically, Java seems to be pretty good. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
On 2003/06/08 12:01, Alexander Maryanovsky wrote: Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Nearly so. JDK 1.1 added the strictfp keyword, and JDK 1.4 added the assert keyword. Eran = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
Eran Tromer [EMAIL PROTECTED] writes: On 2003/06/08 12:01, Alexander Maryanovsky wrote: Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Nearly so. JDK 1.1 added the strictfp keyword, and JDK 1.4 added the assert keyword. Reportedly, more important changes will be introduced in 1.5, including enums, autoboxing (automatic conversion between base and wrapper types), templates (dubbed generics), enhanced for loops, static import, etc. All of the above are, IMHO, sorely missing. My personal exposure to Java is not very wide or deep, but lack of *every one* of these features frustrates me every time I need to write a few lines in the language. Cf. http://java.sun.com/features/2003/05/bloch_qa.html -- Oleg Goldshmidt | [EMAIL PROTECTED] = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
At 13:16 08.06.2003 +0200, Eran Tromer wrote: On 2003/06/08 12:01, Alexander Maryanovsky wrote: Java itself, the language, hasn't changed since JDK 1.1 (released in 97 if I'm not mistaken). Nearly so. JDK 1.1 added the strictfp keyword, and JDK 1.4 added the assert keyword. True, yes... JDK1.1 also added inner/anonymous classes (which is an important addition), but then again, I said since JDK 1.1 :-) The main change since JDK1.1 was the clean and fairly complete Collections framework in JDK 1.2, but that's of course not a language change (although it's much more important than scrictfp or assert). Alexander (aka Sasha) Maryanovsky. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
On 2003/06/08 12:56, Oleg Goldshmidt wrote: Reportedly, more important changes will be introduced in 1.5, including [snip] templates (dubbed generics) Hardly! In Java's new generics you declare what the template argument must extend/implement. In C++'s templates the template code just references members and hope for the best; if the best doesn't happen, you get incomprehensible compile-time error messages all over the place. Baah. , enhanced for loops, static import, etc. All of the above are, IMHO, sorely missing. I agree, even though I don't find static imports all that thrilling. Eran = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
Oh goodie, a holy war :-) [seen on usenet] Well, this is a long thread (and yes, I've read it all) and I feel like replying at almost every point so I'll reply in one piece ;). I've learnt mainly Pascal for my 5 points bagrut. Now that I think of it, the most characterizing thing about this is that in all 3 years I don't remember ever hearing the word library! If I didn't know programming from books by then, what kind of perverted view of it one must get from such education?!? Now this is perfectly in-line with Pascal's philosophy: it's a language created for writing dicosnnected pieces of algorithms, no longer than 20-30 lines, on a blackboard. Originally it didn't even have I/O. Without the concept of libraries, it's completely disconnected from any real programming. I strongly believe that before learning how to sort an array, one should get the slightest idea of the big picture of programming: - Why the first reaction to here the problem and here are your tools should be these you call tools?! ;-) and why every real-world problem is better handled by many layers of tools. - Why do we keep building ever higher abstractions. - How we combine code into bigger programs. - Why we seek simple, well-defined interfaces and how they create various paradigms for composing our programs - functions, libraries, pipes, processes, client/server, objects, etc. - Why every second thing in computers is a tree that can be nested arbitararily, why every array must be resized one day and why we turned to virtual memory instead of hand-managing overlays. The zero, one, infinity rule. - Why we document our programs, how hard is it to debug and maintain them and what can we do to ease it. Programs must be written for people to read, and only incidentally for machines to execute. No, none of these things can be mastered by somebody who doesn't know to sort an array. But he should be told about them from day one, and showed how they occur in each and every exercise he does. By teaching me on programs that fit into a single file, use only the language's primites and end with a period, my school lied to me about the essence of programming. These things are not only essential to understanding what it's all about, they translate to essential skills for programmers: not only good software engineering but also the abilities to read other's code, to find the things one needs in a libraries, to tell good tools from bad ones quickly, to learn new languages, to cooperate with other programmers, to write good documentation, to use version control tools well, etc. OK, I show some pro-FOSS-development bias but he who masters such development will be a good commercial programmer too. I've yet to see commercial programs that are up to GNU software quality standards. And while all these are hard to test on, I believe they must be included in school education. I think a teaching program encompassing these things would be more beneficial than any particular language, kernel or paradigm. It takes a lot of wisdom to create such a teaching program. But a lot of it is availiable (which reminds me that on http://www.education.gov.il/scitech/toch.htm, IT is the *only* subject with no learning materials availiable!). Not all free but what do schools have libraries for??? - `Structure and Interpretation of Computer Programs`__ and `How to Design Programs`__ which *are* actually used (or at least recommended) for teaching of Functional Programming in Israel. Too bad it's not widespread enough. __ http://mitpress.mit.edu/sicp/ __ http://www.htdp.org/ - `The Art of Unix Programming`__ has all the wisdom long attributed to `The Unix Programming Environment`__ (and more). __ http://www.catb.org/~esr/writings/taoup/ __ http://cm.bell-labs.com/cm/cs/upe/ - `The Jargon File`__ captures the spirit of hacking. How would you teach one recursion if not by saying see Recursion? - The Mythical Man Month is a must. `The Cathedral and the Bazaar`__ captures the best known way to battle its predictions. __ http://www.catb.org/~esr/writings/cathedral-bazaar/ - Paul Graham's articles__ have a lot to teach. __ http://www.paulgraham.com/articles.html - A good point for more of these is http://c2.com/cgi/wiki?BookList But there is one more resource, at least as valuable: free code! There is a lot of beautiful code that has been read and polished by a huge number of good programmers out there, er, here - in FOSS. I think the MoE could use a teaching program were for a change real code is shown to students, in big quantities. -- Beni Cherniavsky [EMAIL PROTECTED] An Anti-Idiotarian Manifesto: http://www.catb.org/~esr/aim/ = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
AM and many other universities teach Scheme in their introduction AM to CS classes. Scheme has garbage collection, no pointer AM arithmetics, unboundedly Well, I personally never understood how anybody can use, let alone like, a language that has '(' and ')' as it's only syntax and I personally think it's an assembler for people with twisted minds - so I cannot wholehertedly support or even reasonably evaluate the usefulness of teaching Scheme to the beginners. AM (is that a word?) big integers/fractions. Heck, even arrays in No big deal. My second (the first was Basic, obviously) programming language was one that could easily calculate 100! without resorting to any special algorithms or libraries. :) Actually, with existance of GNU GMP, any language can do this now ;) -- [EMAIL PROTECTED] \/ There shall be counsels taken Stanislav Malyshev /\ Stronger than Morgul-spells phone +972-50-624945/\ JRRT LotR. whois:!SM8333 = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
AM The main change since JDK1.1 was the clean and fairly complete AM Collections framework in JDK 1.2, but that's of course not a AM language change (although it's much more important than scrictfp AM or assert). It definitely is. Standard Java library is a part of Java language package, as well as libc is a part of C and STL is now, AFAIK, part of C++. Imagine you write program using new collections and intend to ship it to a client. What do you ask him? Do you have Java 1.1 or Java 1.2. That's the trick. -- [EMAIL PROTECTED] \/ There shall be counsels taken Stanislav Malyshev /\ Stronger than Morgul-spells phone +972-50-624945/\ JRRT LotR. whois:!SM8333 = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
On Sun, Jun 08, 2003 at 09:51:46PM +0300, Stanislav Malyshev wrote: AM and many other universities teach Scheme in their introduction AM to CS classes. Scheme has garbage collection, no pointer AM arithmetics, unboundedly Well, I personally never understood how anybody can use, let alone like, a language that has '(' and ')' as it's only syntax and I personally think it's an assembler for people with twisted minds - so I cannot wholehertedly support or even reasonably evaluate the usefulness of teaching Scheme to the beginners. I had a lot to comment on this thread, on more than the lisp issue, and I stopped myself thinking (which I still do) this is all nonsense, but I can't stop myself now (and this is not only to you, Stanislav, but to anyone who wants to read a biased but informed opinion): Beating the Averages http://www.paulgraham.com/paulgraham/avg.html. I now recall someone else mentioned Paul Graham. I must admit I never heard of him, and even when I met this article, I did not bother to further look in his site. Naughty me. Maybe I will now. Disclamer: I started programming almost 17 years ago (at age 13), and learned and used many of the mentioned langs. I only worked as a programmer by definition for 2 years, in a lisp-based project, where I learned it, and loved it a lot. I now work as a SysAdmin, and write mostly in sh/awk/sed and C (learning a bit of perl and thinking about python and others). I have no doubt, though, that most big projects won't lose by using lisp heavily (maybe not only, I am not a fanatic). Since I already added my own poison of offtopicism to the list, I allow myself to add some few more notes, in no particular order, and am quite sure some of them will interest whoever is already reading this thread: I don't know scheme, but from what I heard and read, it sounds to me a bit that scheme to lisp (especially CommomLisp) is as pascal is to C. I guess this is a bit unfair to scheme, but you get my point - it's a small language, good for teaching, for small programs, for embedding (such as guile), but for real, big, programs, you do need the big library and unclean real-world features of CommonLisp. About performance: Here, lisp tends to be a bit like Java. Since it has a huge runtime, it takes a lot of time to load, especially CommonLisp. Well, it of course depends on your hardware - I now run at home Linux on a 300Mhz Celeron with 256MB, and starting and quiting a CL (cmucl) takes a few seconds on first run, and about 0.25 on the next ones. This is comparable to the time it takes to gcc 'main(){}'. On the machines we had in the project, (DECStations with 33Mhz R3000 and 32MB), cc (and gcc) were more-or-less the same as on the Celeron (of course proportionally to the cpu speed, but in practice, when you only change a single source file at a time, running 'make' still takes only a few seconds), but the lisp part had a 50MB executable image, used around 70-80MB of memory (most in the swap, of course), and took few minutes to load (and I guess even on a new machine with 256MB will still take much more than a 'make'). But the fact that you then had all the runtime for the whole day (you didn't have to exit/enter the lisp for every change - that's some of the power of it), and that changing a function (or a source file) was comparable to in C, but you were still in the middle of the running program, made all the difference. I guess you have to use it for a few days to understand - a small story won't tell it. I don't know Java, but from what I understand, it partly suffers from the same problems, but without all the fun (some of it, yes, but I did talk to Java programmers and it's not the same). Another note not related to anything (if at all, to another thread on small machines currently running here): Some of you might find interesting tcc, a Tiny C Compiler. It's tiny (100KB), includes its own assembler/linker in the exe, very very fast, can run as a script (but does compile to memory and runs from memory), very cool for small things. Can be easily put on any ramdisk, for example. I haven't really thought of this, but it might be better to put on the ramdisk tcc script versions of some programs instead of things like busybox (which tries to save space by putting many programs into a single compiled executable). This primarily depends on whether machine code is smaller or larger than C, which I don't really know (but I do know they are rather close, not 1:10 or even 1:3 in any direction). One of my favourite sites is www.tunes.org. Among other things, they have there a (quite biased towards what they intend to do) review of many langs and OSes. Recommended to anyone that is looking for interesting langs to learn. Contrary to lisp/scheme (which I personally think, as others here, are the best for teaching programming), it's worth noting that taking Nadav's opinion (about C) even further, Knuth talks almost only about Assembler (of his MIX, now MMIX). So I
Re: C flame (was: FS/OS in schools)
The best Paul Graham article on this subject is http://www.paulgraham.com/paulgraham/icad.html Which should convince you that if someone is telling you that language A he knows and you don't is better than language B you both know, you should learn at least a little of A just in case he's right. Languages I know worth learning: C - to know how the machine works, and you might need to generate it as a portable assembly language for a VM one day. Lisp/scheme - to know how to think about recursion, abstraction and some data structures. Smalltalk - to program most things in, and to learn today the 20-year-mature state of the art that Python hints at and Java and friends are ever so slowly approximating. If you don't think I know what I'm talking about, try to find out where JUnit, or automated refactoring tools, or XP, or OODBs actually came from. www.squeak.org is a more direct good start. In some ways it just starting, we need good programmers with an open mind. Daniel PS VB - to understand what a disaster looks like, and that yes, companies do inflict such terrors on poor unsuspecting programmers. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
Quoth Voguemaster on Sat, Jun 07, 2003: Well, I'm no expert in Perl but I know enough C++ to quickly dismiss your comments about it being bloated. Yes, it DOES have some overhead, but it is extremely negligible. In terms of performance, you only need to know what you're doing to get the same performance from C++ as you can from C. All the myth about it being much more bloated and slower are simply NOT TRUE. I wasn't talking about speed and overhead, I was talking about all the different features of C++. Vadik. -- Avoid reality at all costs. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
On Fri, Jun 06, 2003, Herouth Maoz wrote about Re: C flame (was: FS/OS in schools): Quoting Nadav Har'El [EMAIL PROTECTED]: Let's face it, when you teach someone to drive its enough to teach them to use the pedals and the steering-wheel. But when you teach someone to become a mechanic, you have no option but showing them what the engine looks like by opening the hood, even if it's an ugly, greasy, mess. But you don't teach somebody to be a mechanic before he has learned what a car is. I don't think there are many car repairsmen who do not have a drivers' license, or at least a scooter license... To continue this silly metaphore, *driving* a car corresponds to using a computer for stuff needed for daily life, say, playing or writing papers for school. For that you needn't learn any programming at all. And indeed, like you said, most people *use* a computer before they start learning to program on it. But if you do want to learn how to fix your own car (or to program your own computer) I argued that you better understand the nuts and bolts before you understand the fancy new fuel-injection system ;) -- Nadav Har'El| Saturday, Jun 7 2003, 8 Sivan 5763 [EMAIL PROTECTED] |- Phone: +972-53-245868, ICQ 13349191 |If God is watching us, the least we can http://nadav.harel.org.il |do is be entertaining. = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
Re: C flame (was: FS/OS in schools)
On Sat, 07 Jun 2003 17:49:39 +0300, Vadim Vygonets vadik-linux- [EMAIL PROTECTED] wrote: I wasn't talking about speed and overhead, I was talking about all the different features of C++. Vadik. How do you consider those features as bloating ??? Those features are great for good program design. Eli -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ = To unsubscribe, send mail to [EMAIL PROTECTED] with the word unsubscribe in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]