Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

How Should I Teach a Basic Programming Course? 452

riverman writes "I have been 'provisioned' at the school where I work to teach a new Computer Science/Programming course. I'm supposed to be teaching everything from the very-very basics (i.e. where that myspace thing is in your computer monitor, and how it knows who your friends are) to the easy-advanced (i.e. PHP classes and Python/Google App Engine). I'm an experienced programmer, but I'm not sure where to start — I could easily assume that my students know something basic they don't. Are there any resources on the internet that could help me find a solid curriculum? What are your suggestions?" I'm sure many of us have gone through intro-level programming courses of some sort; what are some things your teacher or professor did that worked well, and what didn't work at all?
This discussion has been archived. No new comments can be posted.

How Should I Teach a Basic Programming Course?

Comments Filter:
  • by Anonymous Coward on Saturday October 11, 2008 @10:50AM (#25339257)

    Computer basics, ie how to use the web, and computer programming do not belong in the same course. People in the audience for either will not be happy with the other.

  • by nurb432 ( 527695 ) on Saturday October 11, 2008 @10:51AM (#25339261) Homepage Journal

    Don't teach things in 'the abstract'. Give them a task to accomplish that needs particular 'features'.

    Then the next 'task' adds more 'features', but doesn't drop the earlier ones learned.

    And don't make the tasks abstract either. "do a bubble sort" would qualify as too abstract. While "collect 5 client names from the user and sort them" wouldn't.

  • by Anonymous Coward on Saturday October 11, 2008 @11:07AM (#25339385)

    Actually, the history of computers was one of the most interesting features of the Intro to Programming class I took the better part of a decade ago.

    My instructor had worked for DEC and IBM maintaining big iron in the 70's and 80's, and he had a lot of extremely interesting stories, and a good deal of personal insight into computing history.

    Of course, on the other hand, I'm now a graduate student in history, so I may not be particularly representative. YMMV.

  • Don't Teach Down (Score:1, Insightful)

    by Anonymous Coward on Saturday October 11, 2008 @11:14AM (#25339443)

    Don't teach down. By this I mean please do not be shy about giving more complex examples. I had a professor who would constantly keep things very basic on purpose in order to not confuse people. The problem with that is that the top 10% get VERY bored and leave with questions unanswered while the bottom students (those who will go on to write inefficient insurance company database query code) still struggle to understand the difference between ++i and i++.

    You should keep your advanced students in mind and nurture them. Do your part to help out our future.

  • by gillbates ( 106458 ) on Saturday October 11, 2008 @11:18AM (#25339469) Homepage Journal

    The majority of people - even those with college degrees - have a difficult time with logic. Something as simple as an if-else construct can be very confusing to the average person at first.

    And there's another twist. About 40% of learners can understand and manipulate abstract concepts, and learn them without any practical experience whatsoever. The other 60% require experiential learning - they have to do before they understand. Fortunately, computers can very easily demonstrate concepts such as if-else...

    And how computers work is a mystery to most people. Before you start the course, you should come up with a simple mental model that you can use to explain how a computer works to someone with absolutely no understanding of electronics, logic, etc... For a basic programming course, you should first assess class understanding:

    1. Do they know how a computer works at a basic level - files, memory, cpu, etc?
    2. Do they know the difference between an application, and the files it creates ("I saved it in Word..." etc..)
    3. Do they understand how to solve a problem by breaking it down into its constituent steps? Believe me, there are people that really struggle with this, and expect the instructor just to teach them to solve a particular problem, rather than how to instruct a computer to solve problems. In fact, that might be a good introduction to programming, "Computer programming is the art of instructing computers to solve problems."

    For most programming courses, you should not even assume your students understand how to use the compiler. Furthermore, you should probably come up with a series of simple examples which demonstrate your point without any extraneous code. Because most people learn by doing, one of the first exercises should be to build a simple "hello world" type of application to familiarize themselves with the build tools.

    And have fun! Come up with interesting problems. Your students will most likely spend most of their corporate careers doing boring stuff, so they'll appreciate the chance to do fun things like games.

  • by jelizondo ( 183861 ) * <jerry.elizondoNO@SPAMgmail.com> on Saturday October 11, 2008 @11:31AM (#25339565)

    Kids taking an introductory computer course generally are not reading slashdot...

    That is why we are nerds, we like stuff that bores other people to tears...

    Once you are old enough to realize this, you will function better in the world at large.

  • Re:Steve Drasner (Score:4, Insightful)

    by mattMad ( 1271832 ) on Saturday October 11, 2008 @11:31AM (#25339577)
    Focusing on pseudocode might be fine in college - but in HS it is very important to start with topics that are actually motivating the students. The danger is that you lose 80% of your students on the way if you do not give them "something to play with" every once in a while.
  • Re:Whatever you do (Score:1, Insightful)

    by Anonymous Coward on Saturday October 11, 2008 @11:42AM (#25339657)

    Basic will harm their minds less than C. I say teach them python.

  • by wfstanle ( 1188751 ) on Saturday October 11, 2008 @12:03PM (#25339807)

    I remember a story about a teacher that did something similar. He brought in the making for a peanut butter and jelly sandwich. He then asked the class for instructions on how to make it. It went as follows.

    1. "Put the peanut butter on the slice of bread."
          He held the jar over the slice of bread and started to shake the jar.

    2. ""No you take the knife and use it to spread the peanut jelly"
          He started to grab the knife by the blade end.

    3. "No grab the knife by the other end."
          This time he holds the knife correctly.

    4. "Spread the peanut butter on the slice of bread"
          He starts to put the peanut butter on the edges of the bread.

    This went on in minute detail until it dawned on the students that in everyday speech, we leave a lot out assuming that everyone knows what we are talking about. The students got an understanding of how we must communicate with computers. This in turn opened the discussion to other topics.

  • by anom ( 809433 ) on Saturday October 11, 2008 @12:09PM (#25339841)
    This is an extremely good way to teach. This method also makes it extremely easy to teach synchronization too (tell two kids to go modify the value pointed to by their label at the same time, and have that value on the chalkboard). You can give your students a better understanding of pointers, memory, and threading than most students have in a single class without showing them a line of code.
  • by Anonymous Coward on Saturday October 11, 2008 @12:22PM (#25339929)

    What grade level is this on? If it's a semester long high school course, or middle school, you should get up with an experienced teacher. Even if you're teaching this at a junior/university college, you should find a licensed educator to talk to. Too often computer science teachers know a bit about programming and logic, but very little about teaching. I'ld recommend covering your major points, and focus on a very VERY simplistic program that handles a few basic aspects (Perhaps a simple calculator?) and progress through whatever technologies are necessary while stressing that programming languages are like human languages, except machine friendly. Some languages are more flowery (latin) some are more coarse (germanic) and some are very powerfully in their succinctness (some asiatics).. Finding a way to bring this out of nerd land helps normal kids not want to get you fired as badly.

    1) teach background
    2) teach theory
    3) relate theory to something understandable
    4) expound. Verify learning, and repeat. And repeat. and repeat. then move on seems to work. Half the kids are not paying attention at any given time in virtually any class.

  • X = infinity (Score:1, Insightful)

    by Anonymous Coward on Saturday October 11, 2008 @01:17PM (#25340335)

    x = x + 1

    x/x = (x+1)/x

    1 = x/x + 1/x

    1 = 1 + 1/x

    0/1 = 1/x

    0*x = 1

    x = 1/0 = infinity.

  • by johannesg ( 664142 ) on Saturday October 11, 2008 @01:23PM (#25340387)

    At first I thought to ridicule your notion that rank beginners should be taught software engineering theory. Than I thought, "I won't bother. There is nothing I can do for him now, the Mods will get him."

  • by Anonymous Coward on Saturday October 11, 2008 @02:05PM (#25340645)

    Start with logical thinking... Don't root yourself in any particular language.. Teach algorithms in a step by step manner.. Also give a good intro on what programming is good for... i.e. the applications in real life.. show where the value is for the student to learn programming..

  • by Hyperspite ( 980252 ) on Saturday October 11, 2008 @02:21PM (#25340757)

    Electric circuit design. Capacitors and inductors obey differential equations. However you can use a Laplace transform to turn it into algebra. Additionally, the abstract concept of force is actually dp/dt (change in momentum with respect to time). Calculus is everywhere, but smart people simplified it into algebra for the layman.

  • by Deanalator ( 806515 ) <pierce403@gmail.com> on Saturday October 11, 2008 @05:44PM (#25341817) Homepage

    The scope is simple. Teach what they need to pass the AP computer science test.

    http://www.collegeboard.com/student/testing/ap/sub_compscia.html [collegeboard.com]

    1. show an example of a for loop
    2. explain what all the parts mean
    3. give the class some problems that can be solved with that knowledge

    Following those steps over and over again for more complex concepts until the class is comfortable with turning algorithms into code. This is what computer science is.

    Once people get the basics of algorithms, you can expand out into various practical applications. Classes on web design, network programming, operating systems, etc, but that fundamental base is critical.

    Until the process of iterative and recursive problem solving makes sense, all practical application will just be seen as magical gimmickry.

  • by Jarik_Tentsu ( 1065748 ) on Saturday October 11, 2008 @06:24PM (#25342007)

    What are your audience?

    As the parent, said it should be clear who it is aimed at.

    If you've got a whole bunch of completely illiterate people who struggle to install a program, then programming will probably go way over their head.

    Likewise, if your audience is a bunch of people who have a firm grasp on the very basics, the right mindset and are eager to push it one level further, then the basics will bore them.

    ~Jarik

  • by mdwh2 ( 535323 ) on Saturday October 11, 2008 @09:00PM (#25342817) Journal

    I can almost guarantee that the guy who wrote the text messaging code for the phone didn't use any calculus.

    The phones themselves can be designed with CAD software :) And as I say, calculus is used immensely in that - I assure you it's not abstracted away from me.

    Same with the FPS game; the vast majority of games developers don't even see or use calculus.

    I was thinking of maths more generally there - and even if you're using 3D engines, a knowledge of 3D maths is still handy.

    And frankly, I could be the most successful, highest-paid web application developer on Earth and never touch the stuff.

    Of course you could, but web application development is not the be all and end all of programmng. You could be an historian, farmer, astronaut and not use the stuff. But the OP suggested that it had no use in the real world. I'm pointing out that it does. That obviously doesn't imply every job uses it!

    I don't know if it's really true that the number of programming jobs that don't require calculus, or maths in general, outweigh those that don't. I'm not sure that's a useful statistic - and that's not relevant when the claim was about whether calculus has a use (and whether maths teachers explain it), and not about how many jobs use it. I think you're discussing a separate issue to what my post was about. But whatever the percentage is, my experience is that there are many jobs around that use various high level maths - not everything is abstracted away in a library (and to be honest, I find the type of programming where everything is already done for me in a toolkit, and I'm just plugging bits together, rather boring...)

    Put it the other way round - I can be a programmer without knowing all sorts of things, such as web development or how the Internet works. I could claim that programmers don't need to know about networking, "because it's abstracted away from me in a library". But it would be rather absurd of me to suggest that therefore those things were of no use at all in the real world! Clearly someone has to write things somewhere, unless you're just plugging pre-made stuff together. But for some reason, there seems to be this stigma with maths of being "of no use", and I'm just surprised to see it even here on Slashdot.

    Would you rather a teacher who told how maths was used in the real world, as I suggest? Or one who says that, because not every job needs it, it's no use worth mentioning at all? (And by that reasoning, all academic subjects are pointless...)

    My first university, though, wouldn't give a CS degree out until you knew it-- why? Imagine how many otherwise-excellent programmers are dropping out of CS programs because they can't hack the obscure math, it's criminal.

    On the one hand, I agree that it's perhaps unfair the way that CS courses often require other subjects (I did maths myself, but at my Uni, CS students had to do maths and sciences too in the first year). OTOH, if the course doesn't have what you want, then don't take it. I'm sure there are lots of other things taught in CS courses that not every programmer means, but it's rather silly to blame the course for not catering solely to what job you plan on doing.

    And what happened to learning something for the value of learning, rather than whether you planned on taking a job in it? Part of my maths course included theoretical physics, which I don't use, but it was still interesting to learn.

  • by Collin ( 41088 ) on Saturday October 11, 2008 @09:08PM (#25342845) Homepage

    When I was in 6th grade, computer class used Apple II's and we learned out of the Kids and the Apple II book, which took us through the basic language from the ground level and, looking back, I think it did a decent job of teaching us programming concepts in a fun way. I think this background gave me a good foundation of programming that helped me even through college C++ classes.

    But I'm not writing to specifically recommend that book, but to share my observation about that time period of learning. Sure, we had our share of boring calculator programs, and I wrote a fair amount of spaghetti code, but the most fun we had was when the teacher assigned us to write an adventure game, in the vein of choose your own adventure. Since textual and graphical adventure games were what we liked to play at the time, it was a real thrill to be able to try to create even a pale imitation of them.

    But then things got too complicated. Games got to good so it wasn't really possible to imitate them on a low level. If you learned C or C++ in class, it was really difficult to create games or GUI apps without learning all these other tools and platforms. Programs had to be compiled and took all the immediacy out of trial and error programming.

    Years later, when the web came along and everybody was hand-coding or frontpage-ing static HTML pages for their "homepages," I never got into that. I knew that the professionally done sites like yahoo or amazon weren't using static HTML but had server generated pages. When PHP finally came around with the ability to programmatically generate web pages, I felt a thrill just like back in the BASIC adventure game days. I could create media the same way those "in power" created it.

    Today's kids are voracious consumers of media, but they like to create it too. Whenever tools come along that let them create media "just like the pros," they jump on it. For example, when CD burners came around, everybody made mix-CD's just like the compilation CDs sold commercially. When sound and video editing came out, kids jumped on that, first using DVD burners and then YouTube.

    Following this observation, kids nowdays live on the web. To them, Facebook is professional media. If they could create dynamic sites like Facebook, they would feel the thrill of creative programming and be able to connect with the reason for why people program computers.

    For this reason, I think one of the web-oriented languages like PHP or Ruby is a great way to introduce programming to students. They can build pages like what they use and see the results in their web browser immediately without compiling and feel the thrill of creating again.

  • by mysidia ( 191772 ) on Saturday October 11, 2008 @11:37PM (#25343453)

    I'm not ignorance of basic math, I'm ignorance of calculus. And I'm not proud (or ashamed, really) of it at all.

    Calculus IS basic math; it's among the most basic math there is.

    Advanced math is used in applications like scientific computing physics, computer modelling, and developing adaptive algorithms. And in cryptography: implementing ciphers and encryption algorithms, not using pre-made cipher libraries that other people have already developed.

    Calculus is not useless, and the vast majority of software development jobs require (if not) benefit from the use of calculus.

    The fact that you have been able to survive so far (without a tool) does not mean it is a useless.

    Just because a hand saw always worked for you, and you never saw a need for using a chainsaw does not mean that chainsaws are useless.

    If you don't know how to use the chainsaw, you can still take down some trees without it.

    There are many applications where application Calculus is a great aid in software development.

    In some of these you can get around without it, or with using simpler methods (that amount to use of calculus, even if the developer doesn't recognize it)

    If you are developing very simple web applications probably not; other developers have done a lot of the work to build the frameworks you use.

    But if you so much as use the sqrt() function; someone had to use some calculus to make sure you were getting good approximations, when they developed that library for you.

"Life begins when you can spend your spare time programming instead of watching television." -- Cal Keegan

Working...