Thread: teaching c/c++ in school

  1. #16
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    I guess K&R is stupid then.
    My best code is written with the delete key.

  2. #17
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    K&R is outdated. Teaching it is stupid.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #18
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by l2u View Post
    Without even including the libraries for printf on top..
    You include headers, not libraries. The header was not included, but this doesn't mean that printf() can't be called.

    The program didnt want to compile on linux (gcc compiler) and I knew why - thats why I told the teacher what the problem is..
    The biggest problem is the failure to #include <stdio.h>. The missing return type of main() is okay -- it defaults to int. The missing return statement is bad but not as bad as failing to include a header.

    He came to me and started telling me that by default c includes some libraries - blablah - it was obvious he had no idea what he was talking about..
    By default, C does link against the standard library. Which means you can call standard functions even without including the headers (sort of). It's bad practice, but it works (mostly). So his statement, strictly, is correct.

    It amazed me how some people can teach programming language without knowing s___t about it?
    The good C programmers are employed as developers, they don't work at schools. You will never meet a competent C developer outside of an active workplace. On the other hand, the instructor might be well-versed in general software development concepts. I wouldn't discount him as a complete fool just yet.

  4. #19
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by CornedBee View Post
    K&R is outdated. Teaching it is stupid.
    Every once in a while I bang into a system that only has an old K&R compiler on it. Knowing the quirks of old K&R can be helpful, but yeah, I don't see a need to teach it in school.

  5. #20
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Code:
    int printf(const char *, ...);
    int main(void) {
       printf("hello world\n");
       return 0;
    }
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  6. #21
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,334
    Quote Originally Posted by brewbuck View Post
    The good C programmers are employed as developers, they don't work at schools. You will never meet a competent C developer outside of an active workplace.
    Oh I'm bleeding over here.

    (OTOH, it's probably more true than I want to admit.)

  7. #22
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Anyway, thread seems to be mostly about C. Moving. Should potentially even be in GD or Tech.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #23
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by brewbuck View Post
    You will never meet a competent C developer outside of an active workplace.
    Or sometimes even in a workplace.

  9. #24
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Rather stupid, when they taught us java in uni they showed us a "hello world" program and said don't worry about the rest, "you just have to write it" -- of course we'd later find out what it did, pretty cool way of teaching it, I suppose in a lecture of 300+ that's the only way...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I've been slacking off in high school, am I going to hell
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 31
    Last Post: 06-01-2003, 01:00 PM
  2. I Hate My School (rant!!!!)
    By Dalren in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-03-2003, 07:10 AM
  3. School Shooting in Germany
    By Golden Bunny in forum A Brief History of Cprogramming.com
    Replies: 27
    Last Post: 04-27-2002, 01:47 PM
  4. Question about going to a technical school
    By Goalie35 in forum C++ Programming
    Replies: 1
    Last Post: 08-30-2001, 11:34 AM