Re: why teach about compilers, was Java compiler courses

George Neuner <gneuner2@comcast.net>
29 Apr 2007 19:02:04 -0400

          From comp.compilers

Related articles
Java compiler courses wookiz@hotmail.com (wooks) (2007-04-20)
Re: Java compiler courses 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-04-25)
Re: Java compiler courses gneuner2@comcast.net (George Neuner) (2007-04-26)
Re: why teach about compilers, was Java compiler courses 148f3wg02@sneakemail.com (Karsten Nyblad) (2007-04-29)
Re: why teach about compilers, was Java compiler courses gneuner2@comcast.net (George Neuner) (2007-04-29)
Re: why teach about compilers, was Java compiler courses bobduff@shell01.TheWorld.com (Robert A Duff) (2007-04-29)
Re: why teach about compilers, was Java compiler courses danwang74@gmail.com (Daniel C. Wang) (2007-05-04)
Re: why teach about compilers, was Java compiler courses cdsmith@twu.net (Chris Smith) (2007-05-04)
Re: why teach about compilers, was Java compiler courses gneuner2@comcast.net (George Neuner) (2007-05-04)
Re: why teach about compilers, was Java compiler courses torbenm@app-7.diku.dk (2007-05-07)
Re: why teach about compilers, was Java compiler courses torbenm@app-7.diku.dk (2007-05-07)
[2 later articles]
| List of all articles for this month |

From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: 29 Apr 2007 19:02:04 -0400
Organization: Compilers Central
References: 07-04-074 07-04-098 07-04-120 07-04-149
Keywords: courses
Posted-Date: 29 Apr 2007 19:02:04 EDT

On 29 Apr 2007 09:18:24 -0400, Karsten Nyblad
<148f3wg02@sneakemail.com> wrote:


>George Neuner wrote:
>> On 25 Apr 2007 04:14:58 -0400, Karsten Nyblad
>>
>>> Finally, a curse on on compiler design should not be a curse on
>>> debugging code or data structures. There is no reason why students
>>> should fight memory leaks in C code or reimplement stacks, maps, etc.,
>>> when they can use library functions in other languages. The students
>>> have only so much time for their student projects, and there is a lot of
>>> compiler theory they will not have time for trying in practice.
>>
>> Like it or not, programming skills are an integral part of a CS
>> education. We can debate endlessly what are appropriate teaching
>> languages, but in the end the students must somehow get practical
>> programming experience to gain certain skills and master certain
>> concepts. You can argue that the student may never again use those
>> languages, but you can't reasonably argue that she will never design
>> or write software or manage people who do - that's the whole point of
>> her education. Most of the skills are portable to any environment the
>> student may find herself in later. Debugging is a skill for life, not
>> just for programming.
>>
>> To that end, compilers are complex programs that intersect many skill
>> areas. A professional developer will certainly need to successfully
>> read and write files, parse input, format output, manipulate complex
>> data structures, manage resources, plan strategy and schedule
>> operations. Even a simple compiler touches on all of these things.
>> Certainly, the student should be able to use any facility of the
>> implementation language to help herself - but debugging comes with the
>> territory.
>
>[...]
>
>> The student's ability to design and implement a halfway decent
>> compiler for a reasonable language is a practical test of the CS
>> program's ability to impart concepts and skills. A compiler is one of
>> a handful of senior level projects I can think of that does encompass
>> virtually everything the CS program is supposed to teach.
>>
>> George
>
>It is very true, that designing a large program is a valuable lesson
>for students and it is also true that a compiler curse is a good
>chance for giving the students that experience. However, your are not
>telling us, why you think it is important that students learn fighting
>low level bugs or learn about data structures in a compiler curse.


I didn't say that, and if you think I did, you should reread my post
until you understand it.


I can't help but notice that you ignored where I said


  Certainly, the student should be able to use any facility of the
  implementation language to help herself


and snipped the part where I said


  Moreover, compiler courses are not "Intro to Programming" courses ...
  they have many prerequisites and are typically not offered before the
  3rd year. Students taking such courses are expected to already have
  good working knowledge of the implementation language(s) used
  (learning a few tools like Bison/Flex should take a few days at
  most).


and also snipped your own comment


  Secondly because lots of computer programs read text files. You can
  use the theory for front ends when writing code to read such text
  files. Such readers will typically be written in same the language as
  the rest of the project. Thus there is no particular reason to
  believe that the students later in will use their knowledge in
  projects using C.




I think I more than adequately addressed your questions already, but
for the record: I do _not_ think students should be learning to
program in a compiler course and I reject your opinion that skills and
techniques learned in the course of student projects will not be
transferable.


Likewise, I said nothing about programming in C - you are the one who
brought it up (or down as the case may be). Regardless, it might
interest you to know that C has libraries - including full garbage
collectors - and even without GC, students with enough C programming
experience to take a compiler course using it should already have the
skill to avoid most sources of leaks.


And in case you didn't know, GC is not a panacea. Programs written in
GC'd languages fail to recycle memory if they are written poorly and
GC does nothing to help with the management of any other exhaustable
resource.




>Data structures are better taught in a separate curse preceding the
>compiler course, and low level bug hunting is better taught in curses
>where you need to program at a low level, e.g., the data structure
>curse


As I said in the part you snipped.




>or a curse in real time programming.


No. Speaking from more than a decade of experience in commercial RT
systems, RT does not belong being taught in any CS program. It is one
of the most difficult of the specialty programming areas. A
practitioner requires excellent programming, design and analysis
skills, and considerable hands on experience before she would ever be
trusted to design and implement a commercial system. A course for
students would barely dent the subject and projects real enough to be
interesting would be too difficult and frustrating for the average
student to complete.




>If the students do not learn it, then they will get a crash curse
>at their first employer.


Crash courses in basic skills and concepts create lousy developers
that produce unreliable crap. Attitudes like that are the reason a
lot of software today isn't worth the media it's delivered on.




>However, most of the students will never again get the chance for
>learning about the internals of a compiler, and thus a compiler curse
>should center on that topic.


I honestly don't know whether to say "duh!" or "huh?" An interested
person can read any of a number of good books to learn about compiler
internals. CS students who don't take a language track may never
study compilers at all.




>Programming at a higher level will allow the students to implement a
>larger language, implement more optimizations, or get closer to
>generating real code.


I said nothing that disagrees with this.


And by the way - course is spelled C O U R S E.


George


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.