Why teach printf first?

Journal started Jul 25, 2003


Ok, ok, ok. What is up with printf? I mean, it's a variable argument function employing complex field syntax, console based input/output, pointers, and mysterious typecasting. It took me years of independent study to figure out how exactly printf works (and I don't even know the specifics of it). printf is incredibly complicated, dealing with advanced concepts and requiring a knowledge of raw assembler to truly understand.

So why is it the first thing they teach you?

"Ok class, we're going to learn C today! Now this here is printf, when you want to print something you do printf(something). Now I'm going to explain what a variable is."

I accede, I have had an extremely bad experience with programming classes. The above statement was from my 2nd year C programming class. o.o But why teach such a complicated function as 'printf' first? Heck, most of those poor students didn't even know what a function /was/ much less how to use one. In my opinion, any C teacher worth their salt will teach students 'puts' first off so students can give themselves some feedback, then immediately explain what functions and pointers are. THEN they can talk about storage variables. From the rate they were teaching my class, it would have taken at least 3 more semesters to even think about touching printf. Heck, in C you don't even have to specify how many arguments a function has, you can call it with as many arguments as you want! :boggles: And entry level students are supposed to understand that!


Comment
Index
Previous (I am Most Certainly Not a Gold)
Next (Place Your Bets)

(cc) some rights reserved