Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



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:
  • Teach them fun... (Score:5, Interesting)

    by SerpentMage ( 13390 ) on Saturday October 11, 2008 @10:56AM (#25339301)

    1) Teach them to understand that a computer does what a computer is told. So as a class building exercise get them to "program" a robot in pseudo code. You give them a fairly complex assignment that involves decisions. The test in this is that you the teacher are the robot. And the students who thought of this as a joke or simple assignment will quickly realize that garbage in garbage out means something.

    2) Do the assignment again, but this time add "testing" routines. Make them write little assignments, that are assembled into bigger tasks. Show how this could be a "test driven" environment. You teach the robot little things, and then those things are assembled into bigger things. This teaches them components, modules and test driven.

    3) Take all of that knowledge and apply it to a programming language. I personally would choose something along the lines of python and ruby. They have enough problems and they need a quick turn around.

    4) Teach them about OO by introducing them to a programming language like C# or Java.

    5) Finally teach them functional

    Though I would stress team exercises thus giving them the benefit of XP (Extreme Programming) type training.

  • Blender! (Score:4, Interesting)

    by saterdaies ( 842986 ) on Saturday October 11, 2008 @10:58AM (#25339313)

    So, one of my friends in college did his senior research on alternative ways to teach introduction to programming and gave a very convincing argument for teaching it with Python and Blender (the 3D content creator). Blender allows you to use the Python programming language to set everything up and manipulate the objects so they learn programming, but it's a lot more satisfying. For example, what's more fun: reading input from stdin and saying if that integer is divisible by 3 using % or creating some 3D objects and moving them across the screen in a specified way?

    Maybe someone else has a better idea, but I thought I'd share

  • Eduardoare (Score:2, Interesting)

    by FirstEchelon ( 1013697 ) on Saturday October 11, 2008 @11:02AM (#25339345)
    As a college student currently enrolled in an introductory java course, what I found particularly interesting was the initial teaching of really basic HTML and its tags to introduce the idea that programs need to follow a rigid syntax for them to function. Although I already had previous knowledge in Java and understood this, the rest of the class seemed to benefit from the way that the class was introduced. Regardless of the language, the professor can then go into basic programs for the target language (Java, HTML, Ruby, etc.) and build from there.
  • Whatever you do (Score:4, Interesting)

    by ColdWetDog ( 752185 ) * on Saturday October 11, 2008 @11:05AM (#25339367) Homepage
    Don't teach BASIC.

    Scariest title ever.
  • by VikingBerserker ( 546589 ) on Saturday October 11, 2008 @11:12AM (#25339427)

    When I first learned to program, I remember the teacher asking us how we got to school that day, in as minute details as possible. Example: awaken, open eyes, elevate torso, rotate 90 degrees, bend legs until they reach the floor, stand, walk to bathroom, etc.

    From there, you can explain the concepts of procedures to compartmentalize the code. Brushing your teeth may take thousands of steps, yet cut down dramatically with looping, etc.

    While it starts out as a new way of looking at how computers process the steps in a more methodical sense than we do, it soon becomes a way to introduce functions, procedures, and other syntax in a practical sense.

  • by cjonslashdot ( 904508 ) on Saturday October 11, 2008 @11:20AM (#25339477)
    I was not a comp sci major (a physics major), but I took comp sci classes, and am self-taught in compilers, language theory, and everything else I know about computers - including the hardware level, like the majority of people in the field. Looking back on the courses I did take, I feel that they left out a discussion of the flaws in the current paradigms. For example, the failure of the core von Neumann model of computing to address the problems of parallelism. The failure of procedural languages to enable intentional decomposition so that one can be sure a program is correct. The failure of OSs to be secure, and why that is. People think this technology is mature. It is anything but. The situation we are in has to be transitional, or we are in "deep sh**". While teaching them how to hack in the current languages (one can do no better than that), give them the message that this stuff is fundamentally broken, and that something better is needed.
  • by eddy ( 18759 ) on Saturday October 11, 2008 @11:20AM (#25339479) Homepage Journal

    As a starting point, I suggest this (draft) paper, because it's interesting, and short, flippant, and gets you thinking. The Camel has Two Humps [mdx.ac.uk]

    Learning to program is notoriously difficult. A substantial minority of students fails in every introductory programming course in every UK university. Despite heroic academic effort, the proportion has increased rather than decreased over the years. Despite a great deal of research into teaching methods and student responses, we have no idea of the cause.

    It has long been suspected that some people have a natural aptitude for programming, but until now there has been no psychological test which could detect it. Programming ability is not known to be correlated with age, with sex, or with educational attainment; nor has it been found to be correlated with any of the aptitudes measured in conventional intelligence or problem-solving-ability tests.

    We have found a test for programming aptitude, of which we give details. We can predict success or failure even before students have had any contact with any programming language with very high accuracy, and by testing with the same instrument after a few weeks of exposure, with extreme accuracy. We present experimental evidence to support our claim. We point out that programming teaching is useless for those who are bound to fail and pointless for those who are certain to succeed.

  • by Vindication ( 1383017 ) on Saturday October 11, 2008 @11:28AM (#25339543)

    I'm a high school student who has previously taken AP-A Computer Science and is currently taking AB CS (this is the last year they're offering it, I believe), and I have never been more dissatisfied with any teacher that I have ever had.

    Programming is an outside interest for me; while we do Java in class, I experiment around with C, C++ and Python outside of school (and I am planning on trying to pick up PHP and Perl soon). I've found that many of my classmates, including friends who I know are quite competent with computers in general, are quite lost when trying to learn or apply many of the concepts we use in CS.This is understandable. However, my teacher has inexplicably continued to introduce many of these abstract concepts at the same time, without really explaining even the basic purpose and logic behind each one. As a result, I've seen many people new to CS but genuinely interested in it just give up, because it made little sense to them. Personally, I know someone who is quite talented with C, and it is thanks to his help that I can understand basic C concepts (memory management, etc.) and not be overwhelmed. This friend of mine, I believe, is quite a good teacher, and this is largely due to the fact that he a) does not assume that I know things incredibly well and b) utilizes the Socratic method to great effect.

    I agree with the parent's comment. Our current project in AB CS is to write a program that sorts an array using several different algorithms. It is supposed to help us understand Big O notation and the logic behind writing more efficient algorithms, but the teacher hasn't said a single word about Big O, instead opting to hand out papers (which my friends have told me they don't understand at all). The concept of Big O notation seems to be too abstract without practical examples.

    Encourage asking questions...you'd be surprised at how many people are afraid of asking questions because they feel they will sound stupid (at least in high school).

    Pseudocode is a necessity for some of the assignments we have, and yet many of my friends fail to see the point (they just see it as a waste of time). Make sure to emphasize its importance, because they will feel that they do not need it early on.

    Also, make sure to emphasize the importance of debugging your own code early and often. Since my "teacher" does not actually teach, I often end up having to help out my friends who are absolutely stuck, only to find that they had a small debugging issue that they could not find because the teacher never bothered explaining the necessity of debugging.

    I don't claim to be an expert in CS or teaching whatsoever, so take this response with a grain of salt. However, I do like to think that my experiences in these courses lend at least some credibility to my reply.

  • by MyDixieWrecked ( 548719 ) on Saturday October 11, 2008 @11:35AM (#25339599) Homepage Journal

    One of the issues I had when I was in school is that the computer classes were radically changed as I progressed through my grammar/middle/high school career.

    In 3rd and 4th grade, we learned LOGO on some old Atari computers and were basically taught about pixels and where home row was on the keyboard. It was all very simple to grasp and we did a lot of projects (drawing pictures in logo) that required us to use the keyboard a lot.

    In 6th grade, we had a BASIC class (not Qbasic, not visual basic... straight BASIC) on PCjr systems where we learned how to draw shapes to the screen and were taught the basic ideas behind computer resolution, very simple loops, how to print text to the screen, read input and use if/then. We also learned what input and output devices are and the names of the various computer parts (monitor, keyboard, printer, etc).

    I liked those classes and they went at a good pace which was great because I was the only kid who had a computer at the time (this is like 1991/1992) and everyone seemed to get what was going on and it was great. When I got to high school, there was a VisualBasic class which had a pre-requisite of Intro To Comptuers. I opted not to take that since not only did I have a computer for my whole life, but I also had the previous classes. When I talked to my guidance counselor, he said that the intro to computers class was just a typing class. The visual basic class was not a programming class... it was a class that teaches you the basics of computers (what a floppy is and how to print) and then ends with showing you visual basic.

    I opted not to take either class.

    My senior year of HS (98/99), they added a c++ class which I managed to sign up for by talking to the teacher and showing him that I already knew a little C++ and already knew computers better than most others (I would have had to take intro to comptuters and the VB class, otherwise), but that class wound up spending half the year teaching about how to use a web browser and what the difference between RAM and ROM is before we even got to 'cin' and 'cout', and that's all we ever did.

    So my advice is to spend very little time on the basics of computers in general and dive right in to projects that get them applying what they do know to do things that they want to do. Also, use a language that lets you dive right in. Java is a programmer's programming language. New programmers never understand it because it requires so much up-front knowledge to even understand what a simple hello-world app does. Especially if they are coming from visual basic or something similar.

    I think that C is the best beginners language out there. It's very simple. It's super straight-forward. There's a ton you can do with it right out of the box.

    PHP may be another good beginner's language, too, since the web is what most people use the most when they're on a computer and it would enable people to show off what they've done. It would also spark much more interest than C, especially since building a C app to work in windows isn't really a piece of cake... although programming in windows, in my experience, has been very difficult... there's a limited amount of free tools and it comes with virtually nothing built-in for that.

  • the basics (Score:4, Interesting)

    by fermion ( 181285 ) on Saturday October 11, 2008 @11:39AM (#25339639) Homepage Journal
    I was taught, and teach others, in the fundamentals. This means that I understand what is going on, and not just what to do to get a the proper response. So here are my thoughts.

    Start off without a computer. At the basis, computers are sequential, even if some other from is used in the programming. Students must be able to break processes down into steps. They will invariable create ambiguous steps or leave steps out. Act out the process to show the missing steps. Use humor show undesired outcomes. Kids tend not to fully comprehend cause and effect, sequential logic, and the like. They tend to want to told a process, then apply the process mindlessly. The creativity and flexibility at the basis of programming a computer must be taught. At this point language only limits the students options, so it is not necessary to worry about that yet.

    Second, the student must understand the limitation of a computer, and how they function. A sideline into binary math and boolean algebra is useful to teach these limitation, and get the student to think on this detail. If an AOI circuit simulator is available, this can be used to teach these limitations, as well as get the students used to using the computer in a product creation manner. This last bit is important, because many students have never used a computer to create anything significant, and don't really understand that this is what many professionals do. They know how to use proxies to bypass security, but not how to load an IDE to create a program. Many can't even comprehend it, and play with their proxies not understanding that there is something else they could be doing.

    This is a bit abstract, but computers do work in the abstract, which is why CS majors, and scientists, engineers, and math people tend to earn a premium. Such people can think in the abstract, and they can not only because of innate ability, but because they were taught to. Teachers that shy away from the abstract because the kids complain and it is easier not to are leaving out a part of the educational process. But use concrete examples to keep the abstract grounded in something the students can relate to.

    At this point, when everyone is familiar with the computer function, some time can be spent detail the general workings and components of the computer. I have seen children as young as 9 forced to memorize, rote, the names of each part of the computer, and match the name to the part. I have seen high school kids repair computers with a high level knowledge, not quite knowing how everything really fits together. I don't know what level of detail is necessary for computer programming. They should now what a computer is, but I would not formally assess or punish the lack of rote memorization.

    At this point, it depends on what is to be taught. Something like Alice can teach OO concepts in a very accessible and high level manner. Since most everything is moving towards using a high level API with short bits of glue code, this may not be such a bad choice.

    If actually programming is to be taught, I would not use an overly complex IDE or language. The basics need to be taught. for instance, to switch values i=j; j=i does not work. Variable scope is important. How one passes parameters is important. Global variable can be very bad. That sort of thing.

    At higher level, creating reliable contained data structures is always a fun topic. Write a web engine or a word processor is now a well known problem and can be handled in a year. If there is a science or math component, well formed solutions to such problems are also quite instructive.

    A key thing that is often missed in debugging. Give students time to debug their work. Don't cave to the crying. Let them help each other. Assessment is best done in their ability to fix a bug, rather than sketch out a section of code or a data structure.

    And of course project based and group learning is the soup du jour. As mentioned, it is possible to have the students write a si

  • Algorithmic approach (Score:3, Interesting)

    by Amigan ( 25469 ) on Saturday October 11, 2008 @11:54AM (#25339735) Homepage
    I agree with previous posters that have said act as a dumb robot and follow the classes instructions exactly .

    The simpilest example I can give you to use is the making of a peanut butter and jelly sandwhich. Bring loaf of bread, knife, jar of jelly, and a jar of peanut butter to class and ask the class for instructions on how to construct the sandwhich.

    statements like 'put the peanut butter on the bread' would result in taking the jar of peanut butter and placing it physically on top of the loaf of bread. Similarly, the statement 'add the jelly' would mean moving the jar of jelly onto the pile you've created. Until the students understand that each (and every) step must be stated, they won't correctly grasp the concept of what programs do.

    Jerry

  • Re:Teach them fun... (Score:5, Interesting)

    by xenocide2 ( 231786 ) on Saturday October 11, 2008 @12:19PM (#25339913) Homepage

    Computer Science Unplugged [csunplugged.org] is a curriculum out there designed to teach students computing principles, and they recommend a game [csunplugged.org] like that. The game works like this: one person is playing the role of "programmer" and the rest of the class will try to follow their instructions. The goal is to duplicate a drawing that only the programmer can see.

    The first game(s) the rules are easy -- the "computer" can ask questions and the class can see what the machine is doing. Then you introduce restrictions. The computer player will be restricted from speaking, for example. At the end you have the programmer obscured from the class, only able to speak to their classmates to describe a picture. As programmers we rarely get the "full picture" so to speak, and have to give precise instructions that both we and the computer understand identically.

    The most important challenge to this as a teacher is selecting appropriate examples. They have a few, but I'd also add: a formula, with exponents, parenthesis, variables and subscripts. A pixel art smilely face ala CSS testing. A curve. A full binary tree with 4 levels. A small section of text, with bold, underline, paragraphs and bulletpoints. These are harder, but high school students can do it and it illustrates both rendering techniques and the need for language. For highschool students, I'd suggest spending a class on this, and then asking them to either write a paper (1 page tops) on the significance, or if the class is fast and small enough, hold a discussion.

  • by andymadigan ( 792996 ) <amadigan@gmNETBSDail.com minus bsd> on Saturday October 11, 2008 @12:46PM (#25340111)
    Sometimes it's important to know the simple solution as well. Most (all?) of the algorithms that perform better than O(n^2) have a fairly high constant attached to them, which usually translates to more computing time and a difficult to implement algorithm. If you're really concerned about speed (you may have to sort 5 items from each of 500,000 lists) then you need to know how much data you're dealing with.

    However, that's all too complicated for a beginner's course. Teach them about stdin/stdout, teach them I/O basics, teach them about data structures.

    The sorts are interesting sure, but treat it more as a way to demonstrate the multiple ways of doing the same thing can be vastly different. It's a mind-opening experience, not an end in and of itself.

    A good middle or end-of-term program the might just catch their attention, write a program that can retrieve a single page from an HTTP server. They don't need to know every nook-and-cranny of HTTP to do it, and it's a good way to gain some familiarity with networking. I know it's not the standard beginner's material, but that material was written 20+ years ago, today's students want something that's relevant to them.

    Finally, I suggest Java. It's easy to learn, very powerful and (relatively) consistent. Java was the first language I really learned, before the end of the 1st quarter, while the other students were still learning what classes were, I had written my first network server.
  • by SteelFist ( 734281 ) on Saturday October 11, 2008 @12:49PM (#25340147)
    When I took an introductory programming course (high school), the teacher went into painful detail about the history of computers, binary code (with paper and pencil), and so on and so forth. Later in the course, he admitted that it was to weed out the kids who were taking it for a typing course and not the programming course it was. After making it through the weed-out portion of the class, I actually appreciated what the computer was doing more than if we had jumped right into the coding.
  • by Vindication ( 1383017 ) on Saturday October 11, 2008 @01:14PM (#25340319)

    The teacher will probably be relieved to get the help. Be gentle about it though. If the teacher feels threatened by you, your grades will suffer.

    I got about 10% of my grade taken off for helping other people understand in the first grading period. Then, about a week ago, she lectured us for about 20 minutes on how we shouldn't be bothering her and we should be consulting with each other for help. Go figure.

    I honestly doubt the "scripts" are prepared by anyone even in the district; we've got one of the richest schools in the district and only one CS teacher who I believe does not know what the hell she is doing.

    The only reason many of my friends are passing that class is because I try to explain the problem to them when they get stuck, rather than just throwing in code without explaining what it does (as the teacher tends to do).

    To the OP: I stand by my original comment. Emphasize the importance of pseudocode and debugging, and make sure to provide plenty of practical examples when teaching an abstract subject.

  • by Alex Belits ( 437 ) * on Saturday October 11, 2008 @02:09PM (#25340671) Homepage

    At first I thought to ridicule your notion that rank beginners should be taught software engineering theory.

    BAD software engineering theory, to boot.

    Just imagine test-driven aerospace engineering. Test-driven civil engineering. Test-driven economics (okay, I take it back, that's Libertarian idea of letting everyone build "free market" by trial and error and not get wiped out or enslaved in the process). Test-driven medicine. All those area use massive amount of experiments, observation and verification, yet none would find it acceptable to abandon theory, rig up some testing contraption that may or may not be mis-designed and buggy by itself, then do job half-assedly and introduce random changes until tests pass. Or at least this is how "test-driven development" is usually implemented.

    I know one area where test-driven development worked extremey well -- biological evolution. Enjoy your ten million years long development cycles. And cancer. I mean, in products of such development.

  • by Lennie ( 16154 ) on Saturday October 11, 2008 @02:13PM (#25340703)

    Maybe now that you are in teaching, maybe you should have a look how others do it, here is an example:

    http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/ [mit.edu]

    I've been watching these for a while now, I liked them (although to much beginner for me, it's a nice way to get to know a 'new' language).

  • by anorlunda ( 311253 ) on Saturday October 11, 2008 @03:57PM (#25341295) Homepage

    I've taught introductory programming several times. I never thought that my goal was to teach a skill, or an abstract concept, or logical thinking. My goal was to convince the students that programming is fun and easier than they thought. If I succeeded, my students would run out of the class saying I CAN DO IT!

    To capture their imaginations, I used Visual Basic. I taught them how to draw a ball on the screen, how to make it move, how to bounce it off the wall, and finally how to turn it in to a kind of Pong game. I can take a group of random people off the street, and teach them to make their own Pong in about 3 hours.

    Graphics and motion are much more emotionally appealing than any kind of abstract logic. It also presents them with the opportunity to analyze symptoms to debug their own programs. They are better able to grasp the relationship between incorrect behavior and incorrect programming when the subject is graphics and motion.

    Something fun like Pong, also teaches the students that programming is a means to an end, not the end itself. The interesting part is clearly what happens with the ball, not what the source code looks like. Later in more advanced courses, a subset of the students might become entranced with programming as an intellectual end, and go on to become software professionals. Good for them.

    For those who never do become professionals, they at least grasp that,given a lot of work and common sense, one can create source code that shapes and steers behaviors in the run time. Never again will they think of software as some kind of incomprehensible black magic.

  • Logo (Score:3, Interesting)

    by david.given ( 6740 ) <dg@cowlark.com> on Saturday October 11, 2008 @04:15PM (#25341381) Homepage Journal

    Let's face it, most programming languages suck from the point of view of teaching. Python's pretty cool, but the syntax has lots of special cases and many, many weird (but useful) language features, all of which are confusing. Ruby ditto. Java is useful but unspeakably complex. C++ is even more useful and even more unspeakable. C requires you to be anally retentive. Basic is a crime. etc, etc. If you pick any of these, you end up having to teach the language, rather than teaching the abstract concepts that underly the language.

    My university got round this by designing their own custom language, S-Algol, and all the algorithms courses were done in it. Of course, it didn't help that it was a weird, half-implemented language (a garbage collected language with no actual garbage collector!) with lousy error detection (anyone who knows it will remember, and shudder at, the phrase 'void and void are not compatible in this context') and a half-assed IDE (the only editor I've ever seen where you had to move the cursor with the mouse. Yes, the arrow keys didn't work).

    If you want an existing language that's powerful enough to teach proper algorithms and yet simple enough for novices, you could do a lot worse than Logo. Yes, yes, stop laughing. But underneath the cute turtle interface it's surprisingly powerful and rather deep: it's best described as a stealth Lisp.

    Logo's biggest problem is that when it was introduced and heralded as the best thing since sliced strings, most affordable computers weren't powerful enough to actually run it; I remember Acornsoft Logo on the BBC Micro, running a Prolog-alike rules database, where a simple query took several minutes. Since the only thing that would reasonably run on a Logo on one of these machines were toys, Logo itself became known as a toy.

    But if you have another look at it today, you might be impressed. Okay, the syntax is a bit weird in places --- particularly when it comes to local variables --- and there's no object oriented system (although it's pretty much trivial to write one), but it's pretty much ideal for teaching basic concepts such as conditionals, iteration, abstraction, data structures, etc. And that bloody turtle gives instant gratification, making simple programs considerably more interesting than they would be in, say, Python.

    These days, you still won't find a better introduction to the utter basics of what computer programming's all about than the hoary old Logo tutorial. You know: "Let's move the turtle around! Let's draw a square! Let's make a procedure that draws a square! Let's draw several squares! Let's change the procedure to draw different sized squares!" That one.

  • by iabervon ( 1971 ) on Saturday October 11, 2008 @05:14PM (#25341669) Homepage Journal

    I think calculus is, among branches of mathematics, one of the less useful for computer programming. Computers are discrete systems, and either need to use approximations for using calculus or need to use something else. Graph theory, field theory, algebra of all sorts, and (obviously) computation theory are all more applicable to general computer programming problems. Calculus and computer programming mainly only go together when you're trying to make a computer solve problems that can be best modeled with calculus; and it's always the case that it's helpful to have domain knowledge when implementing something.

    Of course, calculus is very useful for a lot of other fields, including ones as related as electrical engineering. (Unless, of course, you include as "calculus" things that are unrelated to calculus except in name and the Latin root; the lambda calculus is good to understand if you're a programmer, so that you can precisely communicate programming language behavior, but that's only related to calculus in that it's a set of symbols and manipulation rules which models an abstract mathematical concept.)

  • by Evil Pete ( 73279 ) on Saturday October 11, 2008 @06:55PM (#25342165) Homepage

    If you do any game engine physics then you are going to be doing a large amount of calculus. Other branches of programming are less likely.

    I always believed that people who say: "I don't see how this relates to me", usually have a singular lack of imagination. That is why curiosity is a survival trait, it forces us to learn things that may be useful later on. There are some things I am terrible at, but that doesn't stop me knowing something of them because I am just curious.

    Calculus, is a less likely contender for the curiosity list but it was curiosity about it (and matrix algebra) that got me interested in mathematics, leading to a degree in it. OTOH, programming languages I find I am curious about but unless I will be using it I know there is no point learning them in detail. Ruby I've read some stuff on, learnt the syntax, but haven't bothered learning it properly because if I am not using it I will just forget it all. Whereas, Java, Python, C/C++, awk etc are different ... I use those often.

  • by tonsofpcs ( 687961 ) <slashback@NOSPAm.tonsofpcs.com> on Saturday October 11, 2008 @08:41PM (#25342707) Homepage Journal

    100 REM TASK 1
    110 LPRINT CHR$(33); "hello world"; CHR$(33); CHR$(13); CHR$(12);
    200 REM TASK 2
    210 LPRINT CHR$(33); "what is your name?"; CHR$(33); CHR$(13); CHR$(10);
    220 INPUT N$
    230 LPRINT N$; CHR$(13); CHR$(12);
    300 REM TASK 3
    310 LPRINT CHR$(33); "give me a number to square:"; CHR$(33); CHR$(13); CHR$(10);
    320 INPUT I
    330 S = I * I
    340 LPRINT S; CHR$(13); CHR$(12);

    You said you wanted it printed, right?

  • by Blakey Rat ( 99501 ) on Saturday October 11, 2008 @10:01PM (#25343079)

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

    Look, here's the reason I posted that: I was part of a CS program at a university that required calculus. I failed calculus more than once (go ahead, make fun of me), and as a result I ended up dropping out of the program and feeling terrible for years. I'd go as far as saying it wasted years of my life working a dead-end support job.

    Imagine how I felt after learning that, hey, calculus is actually mostly useless for the vast majority of software development jobs. Universities are losing students by making pointless requirements that have nothing to do with the field the students are studying, and I think that should stop. That's all.

  • by mysidia ( 191772 ) on Sunday October 12, 2008 @01:37AM (#25343841)

    What's the point?

    There are mathematicians who don't need Calculus in their jobs, either. They could be very successful without ever using Calculus, except for the fact that a math degree requires taking some Calculus classes.

    There are also programmers who can earn good money without knowing C, C++, or Java.

    There is some training that is so basic, that all CS people should have it, even if some people do rarely use it. Basic differential calculus is one of those.

    Everyone needs knowledge of basic math. Mathematical concepts built on Calculus or related are relied upon in many areas of computer science. Use of concepts taught in such courses is not limited to performing numerical differentiation or integration in your software. Limits, ability to do series expansions, and use those discrete approximations, and understand their error properties, are far more useful.

    Computer scientists deal with numerical data in databases all the time, and should be aware of the tools available in their software to be able properly analyze it, and be able to verify the accuracy of their algorithms with testing and manual checking. Concepts often first taught in Calculus courses are required for this.

    It is very frequent that developers need to approximate how large to make a certain data structure, a hash table, for example. And when working on a large scale, it becomes necessary to measure efficiency of software, and be able to understand profiler output.

    Calculus and statistics (modern statistics is based on Calculus) is very useful in estimating how elements of a program will scale, based on (for example), number of users.

    Just developing one narrow kind of software is not computer science. Part of CS is understanding how computers work at a low level.

    Universities don't teach students to only be able to do one specific type of job; college is not "job training". Universities worth their salt ensure all graduates will have a versatile skill set, that they can pursue jobs other than the one specific job that doesn't happen to require knowledge of X.

    When interviewing prospective software engineers, I would consider task-relevant questions best-addressed or only addressable with a Calculus-inspired solution fair game.

    Abstraction is a temporary tool that has its limitations.

    Abstracting away things is not and never was a way to avoid understanding the basic concepts. Someone else may have written the sqrt() function for you, but how are you going to tell if a certain formula using it is precise enough for a certain use in your application?

    You need to be able to look at either documentation that indicates its error properties, or look at sqrt()'s source code, see the method it uses, and sample its outputs, to estimate its precision for certain ranges of numbers, if you want to be confident about the numerical precision of your results.

    Calculus and some of its results are very useful tools that can in many cases provide a very elegant solution, where matters would be very difficult otherwise, even web developers deal with numbers and statistics.

    You need some understanding of how to make bounds on the error.

E = MC ** 2 +- 3db

Working...