Computer Programming for Everyone
jbc writes "According to Guido, DARPA has accepted an initial version of a proposal called Computer Programming for Everybody. The idea is to use government money to develop and promote a Python-centered curriculum for high schools and colleges. He defends the choice of Python, as opposed to languages like Perl, Tcl, or Visual Basic, because the latter are, in his view, 'too cluttered with idiosyncracies' to be effectively taught to beginners. " This is actually something I've been peripherally involved with. My CS teacher and I have been talking with Guido about this (I go to Yorktown, one of the schools mentioned in the proposal) - I can tell you firsthand that C++ is just too difficult for first-year CS students in high school, whereas Python is quite simple and elegant. Hopefully, this program will serve as a nice intro for students so that they can get started in programming and perhaps move on to other
languages as they become more and more accustomed to the practices of programming.
Maybe at least exposing students to a second language would be a good idea. That way the students can actually SEE that the first language can be a stepping stone to others. Just telling them that won't necessarily get the point across.
:) Had I not taken both BASIC and pascal, things might not have turned out this way.
In my case, I went to two different high schools. At the first one, I took BASIC and "advanced BASIC" during my freshman and sophomore years. Had I stayed there, that might have been as far as I went. Luckily, I was fortunate enough to go on to a state-wide magnet school for math, science and the arts. A semester of pascal was required for graduation, even for the arts students. Because of my BASIC experience, I picked it up reeeeally easily, even though it looked quite different at fist glance. It was really amazing how similar the thinking was, even though the syntax looked so different. I didn't take any more computer classes (even though my teacher kept pestering me to be the only girl in his C class) because by then my schedule had been booked up with all kinds of other cool classes in other areas (this was a great school). However, since then I have found it easy to pick up html (not a real language I know), javascript, and macromedia's lingo language.
Had I only taken BASIC, I might have believed that I couldn't just "pick up" some foreign computer language, and I would have never tried to. The goal of teaching programming in high school is not solely to create future CS grad students and professionals. Many might end up like me - I'm a student in a completely unrelated field (med school/neuroscience grad school), but I like to fiddle with programming as a hobby (for fun and profit
Just my $0.02,
-margaret
You don't perhaps think that when they attempt to build a 3D engine using Python they are going to run into some difficulties and very quickly learn that Python is not the best language for this? I suspect that no 3D Python engine is going to come out of this. This will be a stepping stone for them to learn something much nicer and more effective.
TheGeek
http://www.geekrights.org
TheGeek
http://www.geekrights.org
Kill the monkey
> This isn't talking about teaching
> programming to CS students. This is
> talking about teaching programming to
> the general public, early in high school.
So I must have misunderstood the original post.
But then again, it says "C++ is just too difficult for first-year CS students in high school".
-jfedor
> Programming does not require any extra
> level of intelligence;
Well, actually, yes it does.
As for the rest, you're probably right about the accountants and financial analysts.
-jfedor
I'm going to be starting my senior year of high school tomorrow, and that's exactly how they do the programming classes here. BASIC->Pascal->C++
It seems to work out pretty well for most people.
ML has lazy evaluation too. You just need to know the technique. I've seen a small bit of Haskell, and could understand it easily after ML.
Facilities like compile-time type checking for all variables/functions is an amazingly powerfull feature, and it forces you into some good practices. Our Uni also talks up ML's module system, with its interface declarations and automatic checking of interface matching, as well as hiding of implementation from other modules. If only it had a standard visual library for GUI's
> But in high school (the Germans call it
:)
> "gymnasium", or is that primary school?),
> you don't call yourself a CS student, and
> that's the environment that we're talking about
OK.
(They taught us C/C++ and Pascal in my high school, anyway.
-jfedor
I seemed to go through CompSci just fine....
I did QBasic in the 8th grade. Really simple kinda stuff. 9th I did C++. 10th I did AP CompSci AB and got a 5. C++ was very easy after QBasic. Lots of people in my highschool take AP CompSci A as their first ever CompSci course and most of them get 5's on the AP test. (This, btw, was the first year that the AP was in C++. They __finally__ switched from Pascal)
Of course there's also people who take just a regular ol' CompSci as their first in HS and we used C++. Most of them dropped out.
IMHO they should teach something simple like QBasic first so that syntax doesn't become a big issue and they can focus on basic algorithms. Past that point, learning C++ is a breeze.
Programming is indeed just a very thin layer of practical implementation skills on a well-established basis of numeracy, literacy, analytical and problem solving skills.
Students who have acquired the basis, through whatever means, by studying whatever subject, will be successful.
Most people, who are successful in developing software have many more skills than just knowing where to put the commas, braces, and indentation. The latter are just details, that should not even be that important, and, as a matter of fact, are not, in good development environments.
People, who vociferily advocate C/C++, Java, and that kind of languages, are usually people who have no skills at all, besides where to put the commas, braces, and so on.
Smalltalk development environments are still the best ever created, and most of the work was done more than 20 years ago now. The language is OK. The lack of typing makes it hard to have much confidence in Smalltalk programs, and the syntax has its good and bad points, but I'd probably still choose Smalltalk over Java.
Regrettably there's not much choice these days. ObjectShare have gone even further into VB-land and lost the last few really serious projects to use it. Java is good in that it keeps many of the good things about Smalltalk, although I find it hard to understand why so little work has been done bringing the runtimes up to Smalltalk standards. The worst feature of Java is there distinction between reference and primitive types. You simply don't need to do this, the supposed "inefficiency" can be removed by the compiler before it even gets to the runtime.
BASIC is exceptionally good for learning all sorts of bad programming habits. Aside from that there doesn't seem to be much point...
++ Say to Elrond "Hello.".
Elrond says "No.". Elrond gives you some lunch.
"i wish they'd choose to teach a logic course using psuedocode than any other language."
I've dabbled in Python. It's been described as "executable psuedocode", and from what I've seen of it, it's an accurate description. You are absolutely right; programming is about logic. Python was chosen as their initial language choice because it's good at illustrating programming logic without a lot of fuss.
OT: How does Python compare to Perl - if you had a fairly simple task, and knew both, when would you choose one over the other?
:)
.
Depends on the task of course
I don't know Perl, am slowly learning Python, and was taught some C++ in high school (3 years ago). For me, Python is great. I was having a horrible time writing a program for text processing in C++ and had it licked within a day of picking up Learning Python. I really like the language for its lack of low-level involvment.
Now if only I can get freeze.py working under Win98. .
-funcused
The CS requirements for me in both college and HS were very, very minimal, and I ended up going into SA stuff due to lack of coding knowledge.. It's scary knowing how many kids these days are just growing up with computers and the net, whereas us older folk were just getting PCs in the 80s.
An iMac in every pot, I suppose.
-s
---- noi non potemo aver perfetta vita senza amici -- Dante
++ Say to Elrond "Hello.".
Elrond says "No.". Elrond gives you some lunch.
I've never used python or do I know anything about it but wouldn't Java be a better choice?
I'm not sure why people are suddenly thinking that comptuter programming is a skill that everyone should learn in high school, like mathematics and history. Everyone should have some background in math and history to function normally in society, so those subjects are taught in high school. Nobody except programmers needs to know how to program. It's like teaching automitive engineering to everyone so they know how to build a car. Sure it's interesting, but everyone doesn't need to know how to build a car. Programming should be left for the programmers, who write operating systems and applications that other people use.
Basic computer use skills _are_ necessary to function in the modern world, and they should be taught, maybe even required, but programming should not be.
Additionally, in my experience, most people simply can't program. It's just like higher levels of mathematics. If your brain isn't wired for it, you won't learn it well, no matter how much time you study. In the AP Comp. Sci. class I took in high school, many of the students in the class didn't understand fundamental concepts (such as: statements are executed in sequential order).
That is outside of the realm of schools, that should be tought by parents, and if not by parents, then by television.
-- The act of censorship is always worse than whatever is being censored. Always.
I would love to see Smalltalk catch on, but IBM's charging $4999 for a single copy of it, plus several thousand more for the matching tools. Meanwhile, they'll almost _give_ you a version of their Java compiler, which, if I remember right, is largely derived from the same code. There's also an expensive version of their Java tools, but it isn't the only option. Nobody will ever take Smalltalk seriously if they have to get a second mortgage to pay for it.
Although Python is elegant, it was not designed as a beginers language. Almost no languages have been designed in this way, with Basic (and Pascal) being the ones I can think of. But I would not advocate the use of these languages.
My choice would be (although I don't like it for general purpose programming) ML. This has been designed from the ground up to be syntatically and semantically well designed and provide all of the facilities for well formed design and implementation. It can (and is being) be extended to provide a whole specification language with facilities for ensuring that the final code matches the specification. The MLWorks enviroment provides a nice front-end on many platforms. It's also got a really simple syntax, and can be made to do some really powerfull things (like infinite presision arithmetic.)
I have been programming for 35 years and have taught several programming courses. One of the best books I ever came across for learning programming was George Polya's "How to Solve It", originally written in the 1940's.
It didn't have much about coding (since computers weren't around when he wrote it) but it did have a lot about analysis of problems, frameworks, abstraction and most other tools of modern programming.
In one sense, introductory programming should not need computers at all. Computer programming has two main tasks. The first is developing algorithmns, the second is developing data representations. Each task affects the other but both are neccessary for correct implementations of systems. Developing algorithms for hand implementation (playing computer) helps you understand things much better than trusting any language implementation.
Drawing diagrams of the relations between data elements is neccesary before declaring any types and objects in a language.
Only once someone understands iteration, alternation and object properties on paper should the computer become involved. Thus the language should be as close to formalizing natural language descriptions of problems as possible.
Python is a good language for algorithmic analysis because of a clean clear syntax, although dependence of indenting for blocking can sometimes confuse people.
It is not such a good language for data type analysis because it allows mistakes in types to stand in programs. Python with a stronger type system would be a good teaching language, especially with the case insensitivity of Alice.
Some electives like introductory science, history and foreign languages (some that needs much more emphasis in the US due the increasingly global nature of society) are worth dabbling in, too. But computer programming is strictly a vocational topic, much like nursing, accounting, etc. and has no real place in a basic college prep high school program.
Sorry, I disagree. When I was in high school most students had no "roadmap." They figured that they'd cross that bridge when they got to it, at the end of 1st year university.
There were people who were simply lazy, and took "easy" electives like environmental science (shudder) or earth science.
There were also the so-called "prodigies," who always got excellent marks but only through memory rather than understanding.
Neither of those people *knew* what they would be doing for the rest of their lives.
I knew what I would be doing. I took a combination of courses suited for electronics/computing. Physics, Chemistry, Advanced microcomputers (electronics/programming/interfacing) and design technology (CAD, problem solving/design). I learned a hell of a lot in all of those courses.
I was able to test the waters before I wasted money on post-secondary education I may have hated and dropped out of. That wastes money and time.
"Introductory" science courses tended to teach very little. History is important but not the way it is commonly taught (events are important, dates and complete lists of leaders (a la US, we weren't subjected to that in Canada) are *not*).
Foreign languages are useful, but mainly if you want to work in the service industry. In Canada, I think other languages are taught way too early. I had a gf who did French immersion, which had two effects: 1) she was arrogant, because everybody labelled her as "prodigal" at an early age and 2) she could understand neither as well as she should have. I sometimes had to define words and rephrase sentences (she was *18*!). So here's a link to programming: you may know the syntax, but you may not be able to communicate well using it.
With spoken languages, it's hard to teach the theory of communicating thoughts and ideas before a language is known. With programming, it can be done to an extent.
Just don't delude new programmers with a dozen languages or they may miss the basic concepts of programming. Using a single language the concepts are better taught. Throw other languages at them after they actually know the first one. I think a good indicator of that is when a programmer prefers a reference manual over a tutorial book (like those godawful "learn x in y days" books). The fact that tutorial books heavily outweigh reference books can indicate a lot of things here...
Kudos to those who are pushing for this. Maybe we will get a similar project here in Canada.
Maybe a good way to teach programming is to generate an itch that a student wants to scratch. That way they think about it and ask more questions. Actually, that's how most of the programmers I know got into it on their own.
Ooops, I appear to have gone a bit long in my rant. I apologise, but it's something I've thought long and hard about for many years.
Python's a good choice, but what really needs to be done is to separate the coding aspect from the theory aspect (I know, difficult to do). I went to school at Lehigh University where, among other things, I delved a little into the CS department (I was an architecture major, so it was a bit of a sidestep). I hadn't had any programming experience prior to Lehigh, and I cut my teeth on programming theory using Pascal. The programs are so basic at that level that idiosyncracies don't matter, but learning Pascal itself became the major obstacle. Since then, Lehigh's taken their curriculum and moved it over to C++, but the introductory course teaches neither C++ or Pascal. It uses a pseudocode that is very simple, so the class really becomes about theory and not about coding. Later, you learn C++ as part of coding, and you already have the background to handle the theory part. Because the theory part is so complicated and the coding so simple, they can go into different ideas that may not be available in a certain language. That, I think, is where CS studies should go.
Personally, I use Perl non-stop and it was very easy for me to pick up, even having only a Pascal background. I learned Perl reading through old source code and reading the man pages. I do think that programming should be taught by Unix admins. The best CS course I ever had at Lehigh was a course called C & Unix which was taught by Lehigh's EECS sysadmin. I learned so much about coding, and it was all stuff that the Windows-based professors didn't seem to think was important.
*clink* *clink*
There's my two cents.
And many other locations. I had it as a beginner class at the University of Utah (which has a curriculum quite similar to MIT, I believe. Better, in fact ;-). Wonderful language for teaching many beginning concepts (though I wouldn't want to use it in my job).
This is maybe the most strict elegant and readable language floating around (though being a lazy camel I do not use it). Very good choice.
The interesting consequence is that the schools will have to deploy *NIX systems for all students.
Baker's Law: Misery no longer loves company. Nowadays it insists on it
http://www.sigsegv.cx/
I don't really see where the difficulty lies with these languages when teaching them to high school students. I took the Pascal AP and C++ AP in high school and passed the AP tests and came out with a decent understanding of how programming works. I don't think its the language that teaches students its the students willing to learn the language.
[orb]
This is really cool. I have absolutely CRAP at my high school. There is only one cs course taught in grade 11 and they teach turing .
As far as teaching C++ as a first language, I guess your right. C was hard for me to learn. I started with gwbasic when I was 7 and learned C at about 9, but I guess I'm a special case too. Not too many kids learn how to code at that age.
Now at 17 I'm a software developer for Planet-Intra, how cool is that??? Maybe it would have been even earlier if I learned in school.
(Pizza Pizza losing all their teenage employees???)
Yahoo is running Apache over FreeBsd. But in terms of python use, its pretty rampant on the backend of their site. try using one of the yahoo maps and look at the script name
Papa Smurf Says "When You Live In A Mushroom Everyone Looks Blue"
Well, I think that you slightly missed the point. Noone is going :)
to teach programming. They want to teach younger students to 'read and
understand' a simple code and make minor improvements to it.
This is more real to achieve and more usefull. Behaviour of today's programs is defined by three parts: code,
user input and configuration files. Think of configuration files as (Python?) scripts and imagine end
users able not only pushing buttons but also to fine-tune a program to meet their needs by editing a (relatively) simple
script. Something like this we already have in *nix: shell interpreters with redirection and pipes.
Of course, users familiar with Python or whatever programming language will find themselves _empowered_ by pipes and redirection, not confused like click-o-rama addicts. And this will make life for us. programmers, much easier.
BTW, learnign foreign languages is damn hard. Probably acquiring Dutch for English native speaker is like filling a tax bill, try Japanese then
It's really hard. So programming is.
KuroiNeko
Discrete math is good. As you say lots of practical applications and examples. It would lead into statistics and probability quite well. Some study of abstract algebraic structures would also help: groups, rings, modules etc. Also of course, logic, proof, and foundations.
I wasn't poking fun. Its just that learning to multiply *was* part of the curriculum for her. Lots of math classes *assumed* she had learned them (and didn't allow calculators.) She is totally unprepared to take any math or science in college as a result now. This is keeping her from taking the environmental science classes she is actually interested in. If you haven't learned the prerequisites, you'll be frustrated, not educated.
I would also agree that memorization is in general a poor way of learning, but there are some things that act like a ROM-BIOS for reasoning that probably should be stored early on. She spells perfectly in English, and conjugates irregular verbs just fine, so it wasn't the memorization that was the problem here, but the boring way multiplication was taught.
I don't believe that there has to be any one language decided on. Instead they should try to decide on what their goals are: do they want students to be computer literate? do they want students to understand logic? or do they want a huge new group of mediocre programmers?
Language has nothing to do with any of this. I learned lots of languages that made me the programmer that I am. I learned logic using my Vic20/Basic. I learned algorithms and efficient coding using Assembler and C. And I learned Object Oriented Programming using C++ and applied the knowledge to Borland's Delphi. I could go on but every language is important in its own way.
If they want students to be computer literate, give them an operating system install CD, a newly formatted hard drive and tell them to write an essay on it. This is probably more useful to the masses. If they want to teach logic, Lego Mindstorms would do just as well. As for a tonne of weenie programmers, we don't need them. We need programmers who are talented, self motivated, and innovative. Linux would not exist if every contributor wasn't all of the above. And schools can't teach this.
Ozwald
I think it also depends on how much the language you learn first is used.
.h files for us to use. He provided examples. Still these people could not understand how printf worked.
When I first started as a CS major the department taught everyone Pascal. The TA's admitted that "This is a teaching language and nobody does anything serious with it." The professor pointed out that if we graduated in this program that we'd probably know a lot of languages... he explained that graduates liked to list a lot of languages on their Resume's, because it looked impressive. He explained that once you've learned a few languages , learning a new one basically involved picking up the diffrences of how things that you already knew how to do were expressed in the new one. I found that to be the case as I went on to pick up all kinds of other languages.
Now, a year after I started they changed the program around. The new freshman that year started right of on C++. ( I think this had to do with helping them recruit people, because they could say that students start with C++ their first semester. Not that it makes the program better, but other people were saying it and implying that it made -their- programs better ) Over my four years I had to work with these people a lot.
Probably the defining moment when I realized that going straight to C++ was a mistake came in a systems programming class senior year; the class had a mix of people who had started with Pascal and others who had basically used C++ except for their brief forays into Assembly or the AI languages. Well, the systems programming instructor suggested that we use C, not C++, since unix is written in C and we'd be calling unix functions a lot. I was shocked when the juniors in the class complained that they couldn't understand how to use printf(). The professor put up a web page explaining how to use printf. He provided format strings in
Now, I've never really used C++ for anything. I've never taken classes with it or had any training on it. But I can figure out how IOStreams work when I read source listings that use them.
I guess my point is that I don't think starting with something like Python is such a bad idea. Sure, some people won't go any farther. But they weren't meant to be CS people anyway.
Mike
I'm a third year CS student (ok, I'm a professional programmer who's going back to get his degree, but still...)
Programming is not an easy thing to teach. I just finished a intro to programming class (don't ask, they wouldn't let me test out) and at least 30% of the students could not (and still cannot) understand the concept of a while loop.
I did a structural walkthrough of my final program (which perfoms an exceedlingly basic task of converting currencies) and I did some nifty extras in my program that were not required (like using functions) and 90% of the class simply could not understand what my code did. At all.
BTW--IMHO, Pascal would be the teaching language of choice. It was designed by Nicklaus Worth for exactly that reason: it was easy to teach to CS students. Now I don't recommend such a thing for serious, professional programming (with the exception of Delphi which is an awesome RAD tool, IMHO) but the fact that the language has strong type checking and most implementations of the language have builtin checks for common programming pitfalls makes it an excellent teaching language.
Python is too difficult, IMHO...its more for experienced programmers than for students.
My journal has hot
Or perhaps befunge? What part of : ,: >" ;"^ f ^^"bottle""s"^v"les"^>^" yub ,erots eht ot oG"^
:-)
----- begin beer.bf -----
v v0\1:\1:\0\0\!:p15-" ekaT">v
0>>.0"llaw eht no "v"eno"^>0 #"^1^_v
c1,>51g#^_"ti"^. >vr : $
"::^" down, pass "^|\*25,052*":dnuor t"vbv:52*".ll"v >,^ fb e
v"aw eht no r"v
"""
------ end beer.bf ------
Did you not understand?
My journal has hot
The real issue isn't the language, it's everything else. The most useful classes and projects I have been in are the ones which focused on how to solve a problem, not how to program it in a particular language. Just like when you're teaching students how to solve math problems you don't teach them how to code it, you teach them how to _solve_ it. You're better off learning how to write down the requirements, specify the assumptions, plan for every condition, and diagram actions/algorithms. Any decent project has more time spent designing than coding. Ideally, the decision on what language to use should come fairly late in the game, when you know which would be most efficient. Far too many coders spend all their time coding first, and trying to make sense out of it later (*see Windows 95, etc.). I'll be forever convinced that Win2000 would have been done and useful ages ago if they had been willing to do a clean start on it and do it right this time instead of trying yet again to insert functionality into code that is already a lost cause. Can't be done! I would bet that truly successful programmers like Carmack at id Software don't try to just keep reusing code, but instead plan ahead for each project and start over when necessary. Carmack, for that reason, probably accomplishes more each day than 1000 programmers combined at many large companies. At my company everyone we ever recruit is someone who knows how to plan, document, coordinate, etc., not just code. And the results from that technique have been wonderful.
I started using ML for project about 2 years ago
(OCAML) and found the syntax unwieldy. The distinctions between the two different calling conventions (lists of argument capable of being curried versus pare wise agruments that cannot be curried) is pointless.
The object syntax has noticeably been grafted on and is convoluted.
And any language where it is optional to show what procedure is being called on what arguments is flawed in that it makes it unreadable for both humans and compilers (just look at Perl -- if I type 'f g h i' does it get parsed as (also remeber that the operators are left to right associative).
1) 'f (g (h (i)))'
2) 'f (g, h, i)'
3) '(((f (g)) h) i)'
4) other
You get the same problems in ML. The language has a some nice ideas, but the overall implementation and ad hoc nature of the features added over time make the lanaguage far from ideal for either teaching or using.
-jason
It really is a good book, and it teaches you a lot about just *basic* good habits, besides C. I'm glad to see a fellow voice of reason on this subject ;-)
Anyways, I learned a bit of programming (not C) from that same book, and became more involved (and learned my earliest) C from a few other books (even a C++ book for some theory at one point). All I can say is, a lot of theory + application in whatever language you are familiar with is the way to learn to think like a programmer (in general). The "thunking" that your mind does between theory and application in (usually BASIC/Pascal/C) is what really can have an effect on how a programmer turns out.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
Not idiosyncratic? Please. Lists vs. tuples. How about that wacky list slicing syntax, where it's zero-based in the first slot, and 1-based in the second? (or is it -1 based, I don't remember). Guido claims this made it easier to chain slices together, once again where What Is Easy For Guido To Understand must be for everyone, regardless of inconsistency.
... criminy.
lambda (x, self=self):
I've finally had it: until slashdot gets article moderation, I am not coming back.
Python has these features, as do Perl and Tcl.
Actually, I'm not sure what your point is.
Computer languages are best leasrned a a younger age than when you are in High School.
Opinionated Law Student Strikes Again!
actually this is why javascript should die as a language:
operators: =, ==, and ===
Check this out:
Boolean x = new Boolean(false); if (x) { y; }
y will be executed. Every object is true in an identity test, including Boolean false. However:
x = false; if (x) { y; }
y will not be evaluated. a literal false is still false, but an instance of it is not. false is true unless it is the True false. my head just exploded at that point.
I've finally had it: until slashdot gets article moderation, I am not coming back.
Umm... someone has already done this and called it Alice; take a look at the Alice tutorial. This is one of the inspirations for the CP4E effort, because it's been really successful at letting non-programmers do interesting things.
I don't know what kind of applications you're involved in. I can only tell you that most programmers around are employed by companies to help run their business. You're not going to deny that, are you?
Well, you are pointing to constructs in VB that are not an essential factor of success or failure of a business app. You are talking about details, that are far away from handling sales orders, invoices, work orders, pay checks, and so on.
Is your accounts payable module going to fail to deliver usefulness on what you've just named?
Whatever language/tool you are going to use, you should keep the real issues in mind: M mandays x S daily rate = B, the budget. How much usefulness, that is needed to do the above, are you going to deliver with your strstr() function?
By the way, I usually have this kind of final field parsing done by the database manager, by using a function in SQL. As far as I'm concerned, I don't need any crap cluttering my vision on the database, the forms, the reports, and the batches that run the business.
Having started out in ye hoary old PDP days, I find the concept of "computer literacy", as implemented in most school systems, to be the lamest! Mostly, it's been a sop thrown to parents who've already been pressured by computer salesmen to put their newborns in front of the sanctified glow of a Wintel since it's axiomatic that "you need to get them started early, or they won't do well in school." In turn, the school systems turn around and make impressive-sounding pronouncements that "computer literacy" is essential for the job market and computer-trained workers are necessary to make America competitive in the world marketplace. You don't want your kids to have to become servants to the slant-eyed Japs, now, right, moms & dads? Damn straight! (unfurl American flag, show WWII newsreel) Meanwhile, what is it that they're learning? Well, mostly, they go to a "computer room" for an hour or so every week to fiddle around with educational games, perhaps participating in a class project where they get to use the exciting Internet! and send email!! Do they learn such real-world job-market skills as spreadsheet macros or database design? Well...no...I mean, they're only kids, it's more important thay they have fun, right? And look at how much fun they're having -- we're making a web page about the rainforest next week! Oh, so they're learning HTML and Javascript? Well, no, we're using this software...frankly, it's enough work having to wade through their Math essays much less having to learn something like that for just one page. For the whole class? Well...it's not all that good for kids to do individual work...it divides kids and makes the slower kids feel real bad about themselves so we don't do that kind of thing here. So this is kind of like letting them watch TV for an hour, right? Sure, if you put it that way...(giggle)...it's a real help to me, almost like an hour off... Programming might introduce, stealthily, such lost arts as spelling, grammar, logical structure, mathematical rigor, individuality, and creativity. I'm all for it. However, I don't think most Dales (teaching jargon for "good enough" teachers) will have the time, patience, or left-brainedness to learn coding themselves. Old-timers may remember New Math. Nuff said.
teleny, friend of cats.
Yunno, if the company wants me to deliver a package and gives me a coughing banging studebaker that still starts and barely makes the speed limit, I can do my job. Do I want to be using that tool to do the job? No. Did they teach you that concept in management school?
I've finally had it: until slashdot gets article moderation, I am not coming back.
Remember this: typically 40% of the time is wasted doing memory management (malloc,free,new,destroy,tracking references).
I agree that some CS graduates couldn't grasp real world programming concepts. But I'd rather have a CS student that can write only big slow working code, than fast bug-ridden crash prone code, because he only half understands pointer manipulation (argument passing, array, dynamic allocation). Look, if the CS student was outstanding bright then he would already have hacked on his home Linux, or at least would learn the pragmatics of programming very fast. If he isn't, maybe they are a shortage of programmers, and it is often better to write slow correct code, than incorrect fast code. Only 3% of the business applications are rewritten for performance reasons.
Programming isn't easy, although languages like Perl and Python can make certain tasks much easier than they were with C. The problem is making the distinction between tasks that should be tackled with tools like Python, and those that should be tackled with C or C++.
When I was young I always sweared by C/C++ (and by Pascal before), but now I have realize how wasteful they are. A very big amount of the tasked that cannot be tackled by Python/Perl, could be better be tackled by compiled language such as (compiled)Java/Eiffel/Ada/Modula3/Sather/whatever. Any language where you don't have to recyle your garbage, and don't have to do funky pointer passing/manipulation, could be teached to beginners.
Perhaps it is time that CS degrees were split into systems programming courses and scripting based ones. There is a massive demand for programmers who will rarely need to touch compiled languages like C.
Hmm... theoritically other compiled languages (with garbage collection and with bounding checks) can be close to C, don't forget it. You don't have to get a x100 penalty for not programming in C :-)
I took AP Programming during my sophmore year in high school and it really wasn't that hard. Before that, I had almost no programming experience. Just about everyone could do the basic stuff but once we started moving into OOP people fell behind and the class was really difficult for them.
"...interesting are the add-ons available, i.e. libs, free code, examples, ability to act as glue, do system calls, etc.. Python might be great for that..."
It is.
"I don't know. But the point is, if that is the goal, you can probably kiss a lot of the simplicity goodbye."
No, the simplicity is still maintained.
"Further, if writing glue-type programs is the
primary goal, then perl or C might be better, because of the vast number of add-ons."
Python does not have as many modules as Perl does, but the simplicity and consistency of its syntax make up for that IMO.
I do not believe your number 3 is one of the goals. I believe the goal is to empower computer users by making computer programming accessible to a wider audience.
I too have never used python, but now I'm interested. After learning some basic concepts in C, the first language I can say I studied and developed on is Java. I found it to be an excellent example of what an object oriented language should behave like. The undergraduate program at Cornell University is now completely in Java for their "non CS major how to code" classes (Dylan is used for the CS majors in one class). They switched from C/C++ 4 years ago, and from Pascal a few years before that. Regardless of any media slant that Java is a "web lanugage," I find that as an educational tool, it works well in teaching the basics of inheritance, interfaces, and other oop concepts. Chorizo
If you are interested in taking a first hand look at python - maybe even using it for a real application - check out http://objexcel.com
It features Objirc Chat a Java IRC client with Python (and Java) scripting built in.
I've had several queries from students whose assignment was to 'write a chat client in Java'. It seems to be CS101's most common project. Instead, I'd argue they should be using an existing framework and add something new.
From a strict computer science standpoint, I think Python is a very nice language. I like Python and I use it regularly in both personal and professional projects.
However, I think its syntax and "philosophy" is just far too different from the ubiquitous C/C++ language. I don't know about the curiculum in the US (I'm French, and I left university some time ago), but I think CS students should be able to master the languages used in the industry.
Java is simple and elegant (if not orthogonal) and its syntax is clearly more C like than Python. Are there any reasons, other than subjective ones ("Java is slow", "Java doesn't work on my computer" or "Java is not OpenSource"), that rule Java out?
Hey, hey. I did management school; and as a matter of fact, I'm considered the best coder at my company, because I'm fast and my code is bug free; and it's ready before CS guys even started writing their class headers. That's why THEY are paid peanuts. As long as THEY don't understand that someone is going to pick up the tab, to pay for the cars, the beer and the chicks, they'll continue to gaze at their screen, asking themselves why can they, and why not we? while we're having fun.
I work with windows, which, unlike *NIX has a few more RAD pakages. I personally DONT want HS teaching more CS. They just create idiot programmers with no real skill, who get out and make pitiful utilities in VB or Delphi.
.bat file.
Remeber, most high school CS teachers are people who COULDN'T get jobs doing REAL programming. They're not going to pass on too much to the newest group of disinterest im-just-here-for-the-credit HS students.
I personally dont know anyone who EVER learned how to program from CS. They either already knew, or just copied the one guy who did to pass.
We dont need more technology in school. We need teachers that are good. We need EVERY student to be able to read,write,add, and isolate the variable. Why dont we get THOSE taken care of first before we start sticking more stuff in.
Personal note, my School-Computer history:
Middle School - Mandatory Typing class, played SC2k on teachers computer. Teacher did not know how to make a
HS - Computer Science - Old teacher left year before for a JOB, new teacher, tried to teach Pascal. Gave everyone the same grade each 6 weeks. Once failed a paper for making the required program too small.
FunOne
FunOne
Scheme - Great for teaching Object Oriented programming.. Not too pratical tho.
Perl - Sure there is a steep learning curve, but get them started in a language which they can actually use.
...
Bitchslapped? Give Rob a bitchslap from bitchslapped.com.
Is there a point? For the vast majority of students it would be a pointless and needlessly difficult waste of time.If the proposal had been Latin and ancient Greek for everyone, the utter nonsense of it would be immediately obvious to everyone. Useful computer knowledge that everyone should have is limited to things like: - Where the ANY key and the START button are located. - What a monitor is, an intellinside, a floppy, a hard disk, a CD-ROM, a keyboard, a printer, a mouse etc. and what they are for. - Evil crackers can't get into your computer if it isn't connected to the internet, and computer viruses are not dangerous for you. - What the difference is between soft- and hardware. - PC software wont work on a MAC and vice versa. IMNSHO any additional information about computers is not really important for most people, and should not be force fed to them.
it runs on many systems, it's very similar to C++ and pretty easy to code. Also you can do lots of cool stuff with it early (web graphics and so on), which is really important if you want to keep interest of your students.
Some people don't WANT to learn to program. They seriously want nothing to do with computers, except perhaps surf the Internet occasionally. Where they look at 'N Sync fan sites and Hanson webrings. My middle school was full of them. They haven't discovered Classy Pass.. Ahem..
-Warren
Of course a relational database is the best option. But there's definitely no reason you can't decouple the framework from the database stuff. The problems you're talking about only happen if you base the design of your application based on the DATA. That's completely the wrong approach. You design your framework based on the application domain. The flexibility to change the way data is accessed should be built into the design. You certainly shouldn't have your database structure duplicatd in your object model. If that's the case, the design isn't even object oriented.
For example, if a customer can suddenly have more addresses instead of one, the customer object will have read its address from a different table: it's, therefore, broken.
See, this is a perfect example of the design being wrong. Does a customer know his address? Yes. Does a customer know how to go into your database and store or retrieve his address from your files? I certainly hope not, and I hope you realize why this is wrong.
Java Pros:
- strong typing
- everything is an object
Python pros:When something goes wrong, all the weird syntax errors are caught at compile time, often to the line number with a nice verbose explanation. Trying to pass the result of int foo() to String s will make Java complain. Python's typeless system won't catch that sort of mistake.
This encourages one to think about what sort of objects everything is and how to link them together. Python has much less OO reliance by allowing globally-defined functions and variables. Fortunately the input statement keeps namespaces sane.
- ease of use
- strong language
I won't let this degenerate into a silly language war, and I think Java and Python both have uses. But for beginners I think Python is the better first choice.Python has no "one class per file" silliness and all that it takes to run a Python program is to make it executable. No "compile-to-bytecode" step (for the end user) or longwinded execution command.
Java is C-like and provides only the weakest primatives. Python provides strong features like built-in hashes and resizable arrays - also with OO-like design using operator overloading.
Learn all the computer languages you can :)
Ita erat quando hic adveni.
I don't know if you were using the same Scheme that I do, but how can you compare Scheme syntax to that of C?
How can you say that there is too much? The only syntax in the language is '(' and ')' to denote a function (or macro) call. There is no syntax besides that (some versions have some syntax for arrays, too).
This has always been one of the main Scheme benefits (and the rest of the Lisp family, too, I guess) is that it's syntax is so incredibly simple that it can't get in the way.
I would like to see you find a language in which has a cleaner, more consistent syntax than Scheme (I don't know of any).
A Scheme bigot and proud of it!
-jason
Maybe it's me, but I find that to be an extremely silly question. :) Ever had a memory leak or a dangling pointer? That's what's wrong with pointers. Or are you Linus/God and write 100% perfect code 100% of the time? :)
What *about* lists vs. tuples? Tuples are read-only lists, and exist for performance reasons and to use as hash keys.
List slicing is based on the gaps between elements, and works the same in either slot.
Functions and lambdas require all variables to be brought into the namespace explicitly. Lexical scoping may be introduced soon.
Were you bitten by a Python when you were little, or what?
C++ wasn't all that dificult, just the matter of learning it. The part of OOP wasn't immensly hard to grasp, just learning Syntax was difficult, but after the first month it started to become routine of learning new ways of doing stuff. Of course this was in a class that started with about 17 people at the beginning of the year, and ended with 5...
The Secret Government Ego Project
Why are Get/Set methods bad? They are better than public data, anyway, since get/set functions can validate data before it is assigned, preventing things like negative mass.
Better yet, instead of using get/set functions,
simply use:
class MyClass
{
public:
void Variable(int x);
int Variable();
private:
int x;
};
> High School students should be taught how to read WELL, write WELL and do math WELL.
AMEN! Programming is the skill of telling a computer what you already know how to conceptualize and structure. It's the formation of concepts and ability to structure it that is foundational to programming, writing, speaking, planning, analysis, and just plain critical thought. I took no CS classes at all all the way through grade school, and my exposure to computers was owning a VIC-20 then a C64 which I wrote trivial BASIC programs on. The most instructive class I ever had was 5th grade grammar: I must have diagrammed hundreds of sentences in that class, which taught me to recognize structure in sentences. This is an invaluable skill in recognizing patterns in programs now.
I've finally had it: until slashdot gets article moderation, I am not coming back.
I am very strongly opposed to this suggestion, for one simple reason: I've tutored students who started with bad habits. I think I frightened them, actually (I can grow very emphatic when disgusted by seeing yet another random jump or meaningless variable name). Pascal (or maybe Scheme) is still my prime choice for a starting language -- sure, it sucks to actually use it for anything, but I've never met a language that teaches better habits. And it's easy enough for ye students to get a grasp on. Since I don't think any languages should be taught the first year anyway (I like the idea of simply working with pseudocode for a year, see below), I'm particularly opposed to teaching them something that will take years to unlearn if they decide to get serious about programming.
Since I've gotten sucked into this discussion anyway, here's my thought. Learning to program, first of all, is a general skill which actually has applications in other fields. It requires rigorous structured thinking, and does a world of good towards sharpening critical thinking skills. For that reason and the fact that the world is rapidly turning more digital, I'm strongly in favor of making programming concepts a required course.
Note that I said concepts. The language taught in the first year should be nothing more and nothing less than a vehicle for the concepts being conveyed. I don't know enough about Python (it's on my TODO list, but you know how that goes) to be able to comment on its suitability. I would be happier if it were made practical to not teach using a language at all for at least the first semester. The thing is, picking up a new language once you know how to program is easy. Want to learn perl so you can do cgis? Read some manpages. Want to learn Java? Go read Sun's web pages for about a week. No sweat. But if you start somebody off with bad concepts, everything else will be harder for them.
This is also why I'm opposed to OOP as part of the first concept-course. OOP is wonderful. When I first discovered the concept, I was stunned by the power thereby implied. Oddly enough, it leaves first-year students cold (I will not go into my rant about CMU at this point, I'll stick to the rant I'm on). The thing is, it's an overwhelming set of ideas to start with. In my mental map of programming stuff, it fits into a cubby marked 'extensions to basic programming concepts'. First, a student learning OOP after learning algorithmic programming will have some idea of what he is seeing and why it is worth learning. This is good. Second, a stundet who starts on OOP will be screwed in a non-OOP environment. Bad. Third, well, I just think the sheer initial learning curve I associate with OOP, added to the learning curve of programming in general, would be evil and dissuasive. So you teach it to second-year students in parallel with their C classes.
Okay, enough ranting for just now.
Most of the ideas expressed in this post are its author's; some of them arose out of a discussion on the subject. Any errors in logic or application are my fault, not theirs.
P.S.: Has anybody considered interCal?
Sic semper luseris.
Mr. Maynard, do you *ever* have anything nice,
or constructive, or positive to say? Not one
of your posts I have ever read on slashdot was
any one of these.
It's sad. What's your beef?
My high school offers C++ as the language for first-year CS students, and it doesn't seem to be a major problem. In fact, all high schools wishing to participate in the AP curriculum/tests must offer C++ to their CS students, since the AP CS test is only offered in C++ (changed from Pascal about 2 years ago).
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
VB supports interface inheritance - although i agree implementation inheritance is very useful.
There is no such thing as MIDSTR$.
it's called mid or mid$.
There has been an index & strstr in basic since qb (and probably before).
ever seen Instr() or Instr$()?
as a way of discouraging competition. I truly believe MS
encourages developers to use MFC in order to prevent other
companies producing worthwhile software.
MS does not use MFC internally - they're not stupid. Even the designer
of MFC knew it was terrible - it was created for people who
wanted to be C++ programmers but couldn't handle it.
C++ is NOT right for beginners. Even professional C developers with
3+ years experience shouldn't be allowed to touch a C++ compiler until they've
read Effective C++ (Scott Meyers)- there are many pitfalls.
I also think programmers should all be taught assembly at some stage.
http://rareformnewmedia.com/
Comment removed based on user account deletion
As an old man (48 years old) who has made his living programming for a long time now, I will vociferously support ANY effort to teach kids programming. Computer programming is the love of my life, my passion. There's nothing more satifying. Whether it's Python, Perl, C, C++, even COBOL, I'm for it. If taxes need to be raised to get kids into it, I'm for it. I want the next generation to love it as much as I do.
lets just stop teaching math and english in high school and concentrate on programming and computer science. COmputers solve all our problems. Ok. Theres a funny thing about technology, it self perpetuates an ability for people to take it for granted while never allowing itself to trickle down to be useful to those who could find it useful. While people here on slashdot for the most part have the ability to read and do math, a vast majority of the freshmen in my old high school did not. Math A (basic arithmatic) was the most popular freshman math class, a majority of the freshmen didn't have a reading level comparable to the grade they were in. Before you debate which programming class should be taken in high school why don't you first think of a way to make students literate and able to solve a simple algebraic equation. A classical education is more important than an AA in computer science. Why is this? The US is seriously lacking in it's mathematics and science skills. This means the millions of billions of innovations that we now take for granted won't continue to happen. Without engineers and physists who's going to create the machines that you CS degree lets you program. Hell, even if all you do is work at McDonalds you will find your life so much easier if you can read things more complex than an unemployment pamphlet and have the ability to work out your finances algebraically. It seems as if classical education in the US is being left behind in lieu of a more technological education. Schools will spend thousands upon thousands of dollars on new computers but hardly any money on new english textbooks or history books. Who needs to know about history and english when they can program. We think we're so much smarter as a society than we were two hundred years ago but if I asked the average high school freshman today to recite a line or two of Shakespeare he'd look at me funny, if I asked someone two hundred years ago the same question I'd most likely get more than a line or two. Think about it before you moderate it down.
I'm a loner Dottie, a Rebel.
What happens when religion collides with reality?
Seastead this.
>Almost no languages have been designed [as a beginner's language]
LOGO stands out as the best learning language, IMO. Read papers on educational design or download the software (freeware or commercial) from The Logo Foundation.
The Logo programming environments have been developed over the past 28 years.
Some say "oh, its a baby language."
I disagree. I've taught programming to scores of children in several countries. Kids can understand programming right away by seeing the LOGO turtle respond to
But they also can grow with the language and
learn debugging, recursion, AI, arrays, stacks, sorting functions, etc...
I've learned over a dozen computer languages, (LOGO was my fourth). But I really started to enjoy programming one summer when I created my own shoot-em-up game in Logo and helped a 12 year program a Chess game in that 'baby language'.
python's interactive prompt will be helpful to beginners. It's object and package system is easy to understand. It is less complex than perl. I think its a decent choice and with a good teacher kids can learn in any language. But python is designed to be a clear, object-oriented scripting language, while LOGO has 28 years of depth in education.
Good luck to this project! TMTOWTE (E is for Educate)
This is the sort of topic on which everyone would comment by advocating h(is|er) Favorite Programming Language. Since I am not one not to rush along with the fools, I will do likewise.
Of course, in theory, the choice of a programming language should be irrelevant, by a weak form of the Church-Turing thesis (``at the bottom'', all programming languages are isomorphic). Teaching how to program should be that, teaching how to program, and not teaching the use of a particular language, be it the hype of the moment. But in fact we don't believe that — if we did we might as well use the Pure Lambda Calculus, or Turing Machines in the teaching, and something tells me that this would be disastrous. There is, as fortune says, no difference between theory and practice — in theory.
So the ideal programming language should be a high-level one, where the syntactic sugar is kept to a minimum, and where the important concepts are emphasized. And it should be garbage-collected. That obviously rules out C, even more C++, and I don't think Python is such a good choice either. IMHO, the three natural candidates would be:
Scheme is probably the best choice if we want to give students good habits from the start: very limited syntactic sugar (no fear of cancer of the semicolon), simple and logical structure, first-class citizenship for almost all objects (so that students can get used to manipulating all sorts of abstractions, without having to climb out of the Turing tar-pit first by wrapping the instruction in needless layers of content-free material). It might be argued that it is too difficult: I really don't think so; the difficulty most people have in dealing with Scheme is more cultural (and acquired) than intrinsic. Scheme's main disadvantage, though, is its lack of a decent (standardized) run-time library. If, however, we really want to teach the students the essentials of programming (i.e. algorithms), and not the bells and whistles of the cute graphics and so, Scheme is the best choice.
ML is in the same line. Its syntax is not nearly as logical as that of Scheme (rather ad hoc and inelegant), but it does have two features which may be viewed as advantages. One, it is strongly typed; that can be an advantage (teaches good habits) but also an inconvenience (look up ``bondage-and-discipline'' in the Jargon File). Two, it offers the possibility of programming imperatively (which is much harder in Scheme), because it is a relative of Pascal; so students could be shown both styles of programming (functional and imperative) in the same language.
Java is more of a compromise. It is not nearly as ``mathematical'' as the two other ones (and hence, some would say, not nearly as difficult). It is akin to C, but has the considerable advantage of being GC'ed. (Teaching students how to free() memory themselves is an anachronism, like Knuth teaching us how to bootstrap a computer with a punched card.) It also has a rich run-time library. Data abstraction can be satisfactorily achieved in Java; however, first-class citizenship of all concepts is still far.
The syntax of this language actually simplifies itself as you write more code in it. What better way to get beginners going while allowing them to proceed without getting mired in the minutia of programming?
The language of abstract mathematics and symbolic logic; those who have a good background with manipulating abstract concepts, proof techiques, and rule-based evaluation will have a much better ability to understand programming.
You might as well distinguish between conceptual programming (determing an algorithm), and pure coding (implementing that algorithm, with full knowledge of all the idiosyncracies of whatever tool you're using).
As for the coding language of choice, that depends. Do you want them to be able to code quickly, or do you want to enforce structure, or... ? I'm biased towards C or Pascal, but eh.
Only the dead have seen the end of war.
I don't know about US, but in my country if you call yourself a CS student people assume you're smart enough to learn Pascal or C.
Not that I don't like Python (actually I don't know anything about it).
-jfedor
Give them a strongly typecasted language like java, where every little thing they do causes an error. Where they have to type in 5 lines of code to get a simple thing done.
Java requires a basic knowledge of class structure to create "Hello World." After that, though, there are many compelling things you can do with Java that would be impossible to tackle with other languages in a beginning course.
The graphical user interface classes in Java are simple enough for a beginner to tackle during a one-semester course. Remembering back to the time I learned the language, I thought it was immensely satisfying to create functional GUI programs in so little code.
I don't know enough about Python to compare it to Java as a "programming for everyone" language. However, I'd hate to see the issue boil down to which language handles "Hello World" more easily.
Rogers Cadenhead (Web: http://www.cadenhead.org/workbench)
In addition to Squeak, there are several other Smalltalk implementations available for free (some are simply free, others are free for non-commercial use, or free for educational use).
Cthulhu for President! Why settle for the lesser evil?
I just don't see how Python can get, uhhh... in whack(?) again if people mess up the formatting (This is bound to happen if more than one person modifies a file).
:) the syntax shouldn't get 'out of whack' -- they will always indent 4 spaces to the left or right of the current block. However, even if they do have differing opinions on the subject, if they are at all competent they will reindent an entire block when they reindent one line. (as a matter of fact, Emacs in python-mode has a function for reindenting blocks) Python doesn't care that every block in the program isn't at the same level, it just needs indentation to be consistent within blocks. And you *could* use a program to make your indentation consistent again as long as the blocks were correct, it would just be highly specialized :) (in fact, I could probably write such a thing in an hour or two..)
;-) ) I find that it actually makes things easier, since I always indent my code consistently anyway; it just means I can stop lining up braces..
Well, there are a couple of issues here:
-> Editability. With a Python-aware editor (Emacs in python-mode for example) the indentation is handled laughably easily: Tab indents either to the current indentation or one higher, Backspace at the beginning of a line drops the indentation one level. 4-space indents (I think) so you really see the difference between the levels. No tabs at all are used AFAIK, but it doesn't matter if they are. This is really much much less of a problem than you seem to think; the only times I've ever been bitten by it were when entering complex definitions in the interpreter -- something that you rarely want to do anyway for plenty of other reasons.
-> Newbie confusion. I don't really see how this (with a decent editor) is more confusing than anything else. Plus it enforces proper style >=)
-> Maintainence by multiple people. Since they are all using proper editors
In sum -- it seems to sound really bad to people when they read about it (I also went "Huh?" at first) but it is not a problem when actually using the language. (because all the people who have a problem with it got scared off I guess
Daniel
Hurry up and jump on the individualist bandwagon!
> Most /.ers seem to dislike Visual Basic. There can only two reasons for this: a deeply rooted hate for Microsoft, and pure ignorance.
Just cuz you say so don't make it so. Ignorance, hatred of Microsoft, and let's not forget a vast deep disdain for BASIC. Let's enumerate some of its faults:
Overloading of = by context. Strictly speaking this wouldn't have been too bad if the use of the LET keyword was enforced, then you're simply asserting a fact. But let's be real, it's just silly as it's used now.
VB's idea of error handling: ON ERROR GOTO
VB has no idea of inheritance. None. I've seen some hacks to do it, and wow are they Not Fun.
Rather laughable string functions like MIDSTR$, lacking really fundamental functions we expect to see to manipulate strings. Last I checked, there wasn't a simple index() function (or strstr() as C would call it)
I've finally had it: until slashdot gets article moderation, I am not coming back.
If Alice interests you, you might want to check out the Squeak implementation, I think it's called Wonderland. Squeak is a free smalltalk-80 (sort of) environment written in smalltalk being developed by Disney, and there is a linux port available from squeak.org. Wonderland comes with the standard image. disclaimer: I have not had a chance to mess around with either the python or squeak implementations so I don't know how they would compare
At what age is it *appropriate* to teach programming skills to kids? I teach 5th/6th graders, and while our curriculum does not cover programming I'm wondering if it might not be a useful way to introduce logical and critical thinking skills,as well as seeding an interest in high-tech careers.
The language must have logic (do loops, ifelse),
...
... hi precision math?) are IMHO candidates for second phase learning. Start with the command line as interface, learn about basic disk file and filesystem operations, and learn about integers and single and double precision floating point numbers to get a basic inderstanding of computer architecture. Why on earth is hi precision math a requirement?
OK, this I can accept
user interface (windowing, user programmable buttons), connection to a database, and it MUST include a math package of great accuracy.
No. Each of these aspects (GUI, DB
None of these come close in popularity to the most widely used database and programming language - it's the Microsoft Excell spreadsheet.
This may be true (personally I suspect there's MUCH more COBOL code around) but wide usage is no indicator of learning efficacy. Excel macros are now written in VBA which is a mishmash of quasi-OO and VB quirks which IMHO are extraordinarily ill-suited to the beginner. I've had to do occasional work on such VBA "code" written by non-programmers and it's godawful. MS Access falls into this category also.
Yes, its true. When I need to track a mailing list, do I start a 3 year coding project with php talking to mysql with a py front end? Not on your life, I start banging data into a spreadsheet.
Yes but the discussion is about learning to program and developing good programming understanding and habits. Banging data into a spreadsheet has nothing to do with that.
Eagles may soar, but weasels don't get sucked into jet engines.
I don't even want to attempt to try and respond in full to your entire messge, because I could easily spend hours writing a huge essay in response. I'll just focus on the part where you discuss OO, since a pet peeve of mine are all the misconceptions I see about OO, particularly on Slashdot (they seem to be less prevalent in the industry).
Now, sorry if this comes off like a flame, but the above sounds like it's coming from someone who doesn't understand the real principles behind object oriented programming, and who does not have experience working on large-scale software projects. In my experience I have found the opposite of almost everything you say to be true. The only problem with object oriented development is that most programmers don't know how to do it properly.
I have seen projects succed and fail, and I am quite convinced that given competent designers, using an object oriented approach is guaranteed to be more successful (in terms of time, money, and risk) in a large project than other methods of design. There is an overwhelming amount of evidence out there that this is the case. Look into some of the research. Read some of the books on software engineering. You are right that an object oriented design will increase the overall complexity of your design. This is a good thing, since it's precisely what gives object oriented designs their inherent flexibility. Flexibility is the most important benefit of an object oriented design. Another consequence of an OO design is that it will drastically decrease the complexibility of the individual and components within your system. Even on the surface this should be obvious if you think about it. Clearly object oriented models better represent their associated real-world systems than other methods like data modelling. I don't see how anyone can argue that. Now, if the inherent complexity of a system is in the overall design, that is where it should stay, is it not? Other techniques only move the complexity elsewhere, which is less natural, and therefore inevitably more expensive to maintain. You have to expend more effort to constantly differentiate between your application domain and your model since they become quite different.
These business objects "know" your data structure, and, therefore, have to be informed of changes in it.
NOT TRUE!!! In a proper OO design, you do not have "data structures". You have data, which is distributed throughout the objects in your system and encapsulated by those objects. But you should never have to think about data structures. I suspect you have a lot of experience with bad OO designs where a lot of data is passed around. This happens a lot in practice, but is simply poor design.
only two reasons for this: a deeply rooted hate for Microsoft, and pure ignorance.
Actually, in my case it simply doesn't provide the flexibility I need to design complex, large-scale software systems. VB has it's place. I think it is a very good tool for prototyping, and in many cases is appropriate for develping the GUI front-end of an application. I don't use it myself, as I prefer other tools for those purposes, but I can see where it would be useful.
You may, for example, ask most classes, in code, what their properties are, what their methods are, and what their parent class is, and so on. C/C++ not only lack self-knowledge
You don't understand; VB is more of a high-level, dynamically typed scripting language. That's why it can do these things. One can debate the merits of static typing vs. dynamic typing, C++ vs. Smalltalk, etc. all day, however with a proper OO design, you should never need to ask a class what it's properties or methods are. There are rare cases where you might want to know if a class supports a certain interface, which is what dynamic_cast is for in C++. But by and large you're doing something wrong if you ever need these capabilities in C++.
The most important thing to learn from a first language is coding style. *grin* You can code dirty later, but you should know how to code clean.
Most languages have a similar underlying way of looking at the world. Once you've got that you can twig another languages syntax easier, because you know what you're looking for, IMO.
£0.02
Well, well, well; three holes in the ground...
But computer programming is strictly a vocational topic, much like nursing, accounting, etc. and has no real place in a basic college prep high school program.
I disagree. Computer programming doesn't have to be any more "vocational" than science, math or writing. All of these subjects can lead to careers, yet no one will argue that they shouldn't be taught to high school students. And computer skill is becoming more of a "basic" skill as time goes on. I took several programming classes in high school (BASIC and pascal). Although I enjoyed these classes and seemed to be good at it, I chose science/medicine as my vocation. I am, however, grateful to have had experience with programming, and I still use the skills I learned to this day.
In any case does anyone think that a high school can teach the real meat of computer programming? Tail recursion? Hash Tables? Data Modelling? Not very likely, and without these concepts you are wasting your time.
That's not the point. The point is to expose students to programming, to teach them how to think in a different way, and for them to see if they think it is something they would want to pursue further. For me at least, the most important thing I learned is how to think logically. I think this helped me a lot in math and science and even in seemingly unrealated areas like comparative literature! Plus it helped me pick up other computer related things like html and javascript, but that's secondary.
The point I'm trying to make is that teaching programming can be valuable as more than a vocational tool. At least is was to me.
Dude... woefully false. That's all I have to say. Yahoo's web server is apache, which is written in C, so sorry.
I've finally had it: until slashdot gets article moderation, I am not coming back.
As with anything you try to accomplish, you have to know what your goal is. Is it:
1.Teaching students a programming language to get them used to programming constructs, with an eye towards them being able to pick up other programming languages?
2.Teaching students a language that they can write useful programs in from scratch?
3.Teaching students programming so that they can get jobs as commercial programmers?
I should start out by saying that I know nothing about Python. I've done C, C++, Scheme, Fortran, BASIC, Pascal, Modula2, perl, sh, and probably others I've forgotten about.
If the goal is #1, then any of the simpler, syntactically consistent languages are a good choice. If Python was designed with beginners in mind, it may be useful for that.
If the goal is #2, then there is a potential problem. Any language, no matter how simple, start to get ugly when you have to interact with the rest of the world. By that, I mean the Windows GUI, socket code, X, real-world file formats, etc... For me, the things that makes a language interesting are the add-ons available, i.e. libs, free code, examples, ability to act as glue, do system calls, etc.. Python might be great for that, I don't know. But the point is, if that is the goal, you can probably kiss a lot of the simplicity goodbye. Further, if writing glue-type programs is the primary goal, then perl or C might be better, because of the vast number of add-ons.
If the goal is #3, well then they should probably just learn C. If you think the existing code base of C is a problem, then yes this feeds it. It is a market reality, though. Note that doing #1 as a way to get to #3 might be a very valid path.
My feelings? If the kid loves programming, it doesn't matter what language they start with. They'll pick their own language(s) as needed. Do some studies, and see what language tends to spark an interest in kids.
If you're just trying to get them a marketable skill, teach 'em C, and give them the certificate that says they can program. It will be as useful as the other certifications out there.
TheGeek
http://www.geekrights.org
TheGeek
http://www.geekrights.org
Kill the monkey
Yet there's probably more code written in Basic and COBOL than in every other language put together. Go figure. Maybe academic purity of language is orthogonal to that language's utility. After all, I hate to think what Dijkstra makes of Perl...
Oh and wasn't Edgar Dijkstra also associated with "GOTO considered harmful" - which just goes to show that he either a) never wrote a on-the-metal error handler in his life - setjmp() and longjmp() anyone? or b) was a hypocrite (and yes, I have read GCH - and GCHCH...)
--
Cheers
Jon
Cheers
Jon
Ahh, the bubble could have used some bursting. Thanks for the tips, and the books are definitely going onto my reading list. Thanks again!
Droit devant soi on ne peut pas aller bien loin...
Droit devant soi on ne peut pas aller bien loin...
Straight ahead of him, nobody can go very far... -- Le P
Oh and wasn't Edgar Dijkstra also associated with "GOTO considered harmful" - which just goes to show that he either a) never wrote on-the-metal error handler in his life - setjmp() and longjmp() anyone? or b) was a hypocrite (and yes, I have read GCH - and GCHCH...)
It's Edsger, not Edgar. GCH is IMO one of the most influential articles, which brought programming out of the dark ages. You can't deduce anything about the program's state by the position of execution if the program is littered with undisciplined GOTOs. Dijkstra is a theoretician, who wants to create bugless software and he isn't a hypocrite. I've also read "A discipline of programming", where he develops the SVC and WP transformers and the axiomatic method of proving program correctness, and his book in monographs in CS. One of his more famous statements is that "Testing can only show the presence of bugs, not their absence."
There are structured ways to do error handling. Setjmp and longjmp are just one way to handle errors, C has no other; there are other ways... but maybe not in UNIX.
I worked at a school for over two years recently, as a coordinator for everything related with computers. We had pretty decent machines, and I was eager to start teaching the kids computing... What goes on inside, and how could they make it. Well, the principals didn't like it - Nor the teachers, who had NO programming experience :(
:(
After a lot of headaches, I gave up and we taught, over and over again, Office and Internet.
The saddest thing is that 10 years ago kids had much simpler machines, and they DID learn programming - At least Logo (though it may seem useless, as a previous poster noted it, it helps them understand the principles of programming - Think about it, a structured, procedural language, with most bells and whistles you could ask for 10 years ago... With attention-drawing graphics... A hell of a language, IMHO, though not a general-purpose language).
The best of lucks with the project!
If you don't mind tying yourself down to X, XForms ain't bad at all -- it includes a good graphical forms layout manager, and lets you specify callbacks and such. Plus, it's pure C.
Dunno 'bout you, but I found it much easier to use than the AWT's event model. That's largely because I feel a tad too constrained by the OO-ness of Java...
Only the dead have seen the end of war.
{
print This line prints
END_PRINT
}
and wondering why it doesn't work correctly. (For those who aren't familiar with Perl, the above is called a "here document" and the END_PRINT is supposed to start in the first column.) It's the only construct in Perl where whitespace makes a difference.
I can't imagine what kind of headaches I'd have if I had them programming in Python!
bp
The case is air-tight:
JavaScript is the fastest growing programming language (see table below).
The product of JavaScript's market share times its growth rate is the highest of any language. (see table below).
JavaScript source code is inherently "open" for "Everyone" browsing the web. "Everyone" can learn by example at will.
JavaScript is the most widely deployed interpreter. "Everyone" has a web browser.
JavaScript's dynamic features, including functions as first class objects with slots, put it in the same level of power as systems like CLOS. CLOS is, arguably, at least as powerful and general as Python. The fact that an appropriate, CLOS-like framework has not yet been widely deployed for JavaScript merely indicates developers are too distracted by immediate profit opportunities to think straight about JavaScript. This is a temporary stupor.
Back sometime in June, Randall J. Burns took Ted Shieh's figures, later reported by Larry Wall and computed growth rate in demand. We get an interesting picture:
C++.....Java......VB....Cobol....Perl...JavaScript ...Smalltalk...Python. ...+1%.........+23%
-14%....+17%......-4%...-43%.....+18....+51%.....
When multiplied by the approximate market share:t ...Smalltalk...Python
C++.....Java......VB....Cobol....Perl...JavaScrip
40%.....25%.......10%...3 1/2%...+10....+10%.........1%..........1/2%
We get an interesting future dominance metric:t ...Smalltalk...Python. ...1...........12
C++.....Java......VB....Cobol....Perl...JavaScrip
-560....340.......-40...-111.....180....510......
Seastead this.
Sorry to shout, but this needed to be said: Python was orginally designed to be a beginner's scripting langauge that scaled up to other (real world) tasks. Actually, Guido says it best:
q uery=history&querytype=an ykeywords&casefold=yes
http://www.python.org/cgi-bin/faqw.py?req=search&
So yeah, it wasn't intended to be SOLELY a learning language, but it had enough of Guido's 'learning language' ABC background to make it a synthesis of ease and power. What use, says he, of a leanring langauge that you immediately have to drop using once you understand it?
So Python IS meant to be a learning language...
The code sample looked good in the preview, but didn't display correctly. Let me try again:
# example of bad code
{
print<<END_PRINT;
This line prints
END_PRINT
}
bp
I believe that, in general, this is a good idea. :), but there's still one and only :) Nothing to worry about for pro's :)
However, the example with an 'ordinary' literacy
is not that good. I'd expand the analogy from
sesquiped's comment. Think of it as car driving,
not car engineering. Billions of people can drive
a car (I can't
Michael Schumacher.
Same here. Maybe some day they'll even start to
issue 'computer licenses'
just less plain lamers on the highway. Speed up!
KuroiNeko
I have experience with several of the languages listed above: Pascal, Basic, C, C++ and also Perl,Java and x86 assembler. I started programming at about 10 with Pascal and I'm now 17. At HS's CS classes they were teaching programming using Pascal and I would say it's well suited to learning because of clear syntax and pretty good object-oriented features.
Perl/C/C++ are not suited for learning but rather for the real work.
Python's syntax is clear but I don't think it would be _really_ easy to go from Python to more traditional languages.
Hey all,
I'm currently studying computer science at college and we have to learn Pascal. I can state that I absolutly *hate* the language just for it's incosistancy. People state that the language is highly structured and teaches how to write programs with a structure. That's true, but then why are there so many shortcuts and why are the if statements quite so horrible ?
Please don't misunderstand me, there are quite a few people in my class who have never programmed before and are finding Pascal to be difficult but learnable. If we were to be taught C or C++ then I can imagine the most of the class falling apart.
Unfortunatly, I've never seen what Python code looks like, but if it looks better than Pascals, then I say go for it - we can get on to the more complicated stuff later.
So your the first language taught should allow the student easy access to these concepts without having to deal with the idiosyncracies of explicit memory management, the distinction of pass by reference and pass by value, pointers and so on.
That is why here we teach Haskell as our first language. We believe that it allows students to grasp these concepts without getting the dreaded seg fault.
It also helps ensure that when students leave this University they will have learnt to program an imperative language (C), functional (Haskell), OO (C++) and logical (Prolog/Mercury), and will be able to choose the correct tool for the job.
Personally after seeing trees implemented in Haskell after learning how to implement them in C converted me to functional programming.
One lesson GvR took away from ABC was the importance of OS interfaces; in ABC you couldn't walk through directories or open files, though it provided persistent variable storage that was an abstraction on top of files. This made ABC a nice sandbox to play in, but you couldn't get out of it, and ultimately this proved too confining.
I have no problem with forcing kids to take one or two intro programming classes to get some of them interested, but after that point, it should be each child's choice whether or not they pursue the technology further.
It seems that we geeks tend to forget as a community that there are other things that are other professions that are just as worthwile as sitting in front of a computer and hcaking.
Deepak Saxena
Project Director, Linux Demo Day '99
Deepak Saxena
"Computers are useless, they can only give you answers" - Picasso
Not Yahoo -- you're probably thinking of Infoseek.
I'm not sure about the rest of the world, but yer 12 students, and students doing first time programming stuff over here in Aus. are taught pascal, uni is C++/Java...
Well, at least that's how was when I was at school a few years ago....
VK3TST
-- "People aren't stupid. Usually." -- jd
"C++ is just too difficult for first-year CS students in high school" I don't fully understand the concept of a CS student in high school. But you have to admit that if you want to call yourself a CS student, then you will have to learn how to do some real programming. You can't lead students into a false hope that a CS job consists of simple Python scripting. Currently I am in 2nd year CS and know of many people who are in CS and really shouldn't be. They are there because jobs and because they got good marks doing basically nothing in programming courses in high school. I think that they realized this, but I don't think python is the answer. C and C++ should be taught early, even if they have to use simplified libraries to do things. If we are not careful, we will create a generation of Computer Science students that will (if they don't fail miserably when it gets hard) have the degree but not really have the skill nor desire for what they are doing
I goto a
Evidence why that's not such a good idea!
... C isn't. While I don't want to knock Python, I feel it is more useful for a beginner to learn a fairly low level language like C first.
...
The problem I have noticed with CS graduates who have learnt high level langauges to the exclusion of all else, is that they can't then grasp `real world' programming concepts. This may only be a problem afflicting British CS grads, but it is becoming increasingly hard to find good staff.
Programming isn't easy, although languages like Perl and Python can make certain tasks much easier than they were with C. The problem is making the distinction between tasks that should be tackled with tools like Python, and those that should be tackled with C or C++.
Perhaps it is time that CS degrees were split into systems programming courses and scripting based ones. There is a massive demand for programmers who will rarely need to touch compiled languages like C (with its memory allocation and lack of inbuilt dynamic types). So differentiating courses this way could allow a student to focus on one of these two distinct areas.
Or maybe this is just a refelction of my disgust at the low skillsets of CS grads being produced nowadays
Chris Wareham
Personally, I started my programming experience with C during high school (unless you count programming TI calculaors), and I found it to be an excellent language for a beginner. I think a structured programming language is best to start out with, and OOP should probably saved for the end of the students' high school career or the beginning of their college education. C is a great structured language for beginners because it isn't hard to grasp, allows for low-level programming, and makes the move to OOP in C++ fairly simple.
Also, Several people have mentioned that the quality of CS educations has gone down, producing students that can't grasp 'real world' concepts. At my school (Winthrop Univeristy) The courses tend to address real world problems as well as theoretical ones, and we have several one hour credit courses that specialize in everything from Ada to COBOL (which isn't THAT bad of a language once you get into it).
~Caliban
--
I love the idea of computer users learning to program. I don't know how interested I would be in computers if I couldn't program them. Programming is my favorite part of computing, but Winblows takes that away from people by completely shutting them out from the way the computer really works. This is why I loath it. I like mucking around in C++ and assembly (even though Linux doesn't really let me do anything in assembly :-(, and DOS crashes half the time :-/)
I haven't really seen anything done in Python yet, so I guess I'll have to search for it. I started out in QBasic (poor me), then moved on up to C++ once I figured out how to do graphics with it (which was mainly what I was using QB for anyway). I took one look at VB and recoiled in disgust.
Time to go Python hunting...
--
Seeing is believing; You wouldn't have seen it if you didn't believe it.
That's an interesting observation, and you are right. But in C once you've overflowed the stack or a buffer a few times you quickly learn that you certainly can manipulate code as data. Especially when you don't want to!
But C really is a higher level asm. Every construct and feature in C maps very closely to an asm analogy(? you know what I'm trying to say?). While features like type checking, array bounds checks, garbage collection and virtual functions and classes from high level languages don't really match anything in the asm world at all.
I guess it's more a question of how much asm is needed per statement in a high level language than anything else...
Agreed, at my University, we teache HOW to program, as in, how to write decent Pseudo Code, how to develop decent test strategies. It's not until about 5 sessions into the course that we actually teach HOW to code a language. In this case, we use Pascal (Borland). It's fairly straightforward, and has an introduction to C-like syntax (Damn that ";"!). Okay, so Uni is more advanced than CS - I'm assuming CS is for 16+ ?
...Student, Artist, Techie - Geek *
In a time where programming is becoming "dumbed down", I think we need to maintain an understanding in interested youngsters, of the core traditions/ideals of writing good programs, with good code - irrelvant of the language used.
I mean, I use FrontPage here (in MS hell) and even HTML creation has become "dumbed down". It's annoying that users are becoming less empowered, more disenfranchised...
And why not do very basic stuff with a "learning" language such as Pascal, Basic or Python? Once basic proncipals have been taught, then surely it's time to move onto more advanced stuff? Incidentaly, I'm sure Python used to be "123" or "ABC" - or somthing similar... Implying it's a language for learning. A good intro, imho is actually the "Mini Language" JavaScript. Whilst fundamentally used for scripting, it has a simple to learn syntax, that is familiar to a whole host of programmers - plus, it's extremely relevant and useful to todays markt, as it's a now integral part of todays Web.
Mong.
* Paul Madley
*...Slacker, Artist, Techie - Geek *
Remember: Nothing is Cool.
I looked at Python. Not that easy of a language (this is coming from a 2nd year CS student, just learning C++, knows lots of Pascal). I was taught pascal in my 1st year of CS, and it confused SOME people, but most could understand it. Python looks to be more confusing (to the beginner) than C++. But I do think that making CS a required course is both good and bad. Yes, computers are becoming much more widely used than anyone ever thought, but too many people dont care about programming, and being forced to take the class would end up hurting their GPA. But, CS is good at teaching problem solving...
An instructive 5th grade grammar class is one thing, but once a student reaches the high school level I think we should expect more from them than reading, writing, and 'rithmatic. Most high school level CS courses are offered as an elective, and if a student can handle the ideas then let them go for it. Some of the best programmers I've known have been Juniors or Seniors in high school.
~Caliban
did anyone every port logo to linux??
:)
that was a pretty neat program
A year spent in artificial intelligence is enough to make one believe in God.
maybe you should not rely on others to hold your hand through life and actually do something for yourself...my school offers a decent amount of computer classes but i decided that it would be better to just figure it out myself...you can do the same
Yes, I (drum roll please) debug my fscking code!
:-) This is why I write my code such that I can compile under Djgpp/TCC besides GCC in Linux. This alone found a rather nasty bug in some code I was working on (Linux nicely set memory to zero after I malloced it, DOS did not. I added a memset, and all was good).
It may not be correct the first time.
It may not be correct the second time.
Hell, it may not even be correct after "only a few" thirty-hour debugging sessions.
But damnit, man, I will not release bad code!
Anyway, off to the land of profilers and debuggers and compilers and (dear lord) standard system libraries. This portability stuff is pretty kinky.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
I think that this is a great idea. I recently meet a foriegn exchange student from Yogosloviva. He said that in 6th grade you could start taking programing classes their. They first learned pascal and then could goto C. Here in America for at least the Florida Education system you can't have typing classes until 8th grade. And Practical computer skills are tought in 9th. I'm a Senior in high school and we are still using PS2's. The only internet access we have is on Imacs, and their are only like 10 for a school of 1600.
The American education system sucks. They could have at least taught me how to spell decently.
I wish that our high school offered any programming classes, like many others I had to teach myself. As it stands now the whole computer cirriculum is governed by the only person that knows anything about computers (which is VERY minimal) and she's an Apple junkie. Our school just ordered 10 iMacs because of her.. bah... But now I have something to ask, i am currently enrolled in my school's only non-Apple computer course. Computer Networking I which is put on by Cisco Systems, now I've only been in the class a few days but the teacher is a moron, he knows how to get into windows, that's about it. Now my question is, has anybody been through this course or know much about it, is it any good, and is it worth sticking through?
-I didn't just die in Quake2
Think about how everybody learns to read and write in elementary school. They will learn to write in English (or Spanish, French, or whatever the native language is). But how many of those people ever go on to learn to be fluent in a second (or third, or fourth) language? Sure, many high school districts require a couple years of learning a foreign language, but in those two years, few people ever learn or even remeber more than how to say "Hello" and other basic phrases.
By weaning people on Python or any single language, many people will only use Python for the rest of their lives. Python is a good language, of course, but has its limitations. Also, these people will only be able to modify other Python programs to their needs, and would just shrug their shoulders at the vast majority of code written in C, C++, Perl, and other languages.
-Joe
Well, damn. ;-).
;-)). Get them to write a text editor that allows editing ala normal dos edit as a class project or similar (they'll learn memory handling, configuration reading, etc, good for client programs).
:-)
I'm 18 now, and work regularly on C code and utilties for Linux (moving towards a big release sometime soon, hopefully
I read a great deal of theory before sitting down and programming, and I have had decent teachers in the past.
NOT ONE of them would ever say C is low level. Assembler is low level, C is medium level, and things like BASIC and Pascal are high level. Totally interpreted languages (ie: perl, python, TCL) would likely be "higher than high" level languages as they never go beyond P code in the interpreter.
If you want intelligent students from nothing try this:
Grade 9: Intensive computer familiarization. Play with keyboard, encourage good typing skills, introduce to operating systems and misc things.
Grade 10: Begin/end basic (if you're lucky, you'll have a cool teacher like the one I had in grade 10, she was an ASM programmer who did a lot of theory with us). Teach theory. Encourage good programming practices (commenting, indentation, code standards, peer review).
Grade 11: Well, time for C, boys and girls.
Teach them how C sees the operating environment it's in. Teach them also more of the internals of an OS like DOS (simple ones
Grade 12: Now is an opprotune time to introduce things like: networking theory, Linux OS theory perhaps, internals of MS OSes other than DOS.
If they make it through that, they can quickly master any university programming courses, as well as easily fork off into perhaps an IS admin, one of the good ones who really understands the systems they work with.
Anyways, go play with x86 assembler if you really want some mind wrenching stuff. I *LOVE* the power it gives.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
Why not teach Java as a first programming language? The language is completely machine independent and works well over the Internet. Aren't we wiring all the schools for the Internet. Why not teach a language that lets students take advantage of being wired?
"Politicians always tell the truth, when they're calling each other liars."
Python? Perl? Java? C++? C? Fortran?
Whinging whey-faced milksops, the lot of you. Teach them InterCal, Befunge, Malebolge and BrainFuck. If some jobsworth complains that these are of no commercial use, teach them JCL - preferably one of the earlier variants with the really interesting syntax. Or, at a pinch, APL.
Alternatively, if DARPA are prepared to offer me sufficient money (or two crates of Newcastle Brown Ale), I'll craft them a teaching language like no other: one to make kids' brains dribble out of their ears and their pupils bleed.
Offers gratefully accepted.
--
Cheers
Jon (who started programming in PET Basic and still bears the scars a dozen languages later)
Cheers
Jon
1. Questions
The most important issue, and one which surprisingly few posters have addressed, is to identify the properties that are desirable in a 1st programming language. Identify also which properties are considered undesirable in that same environment. Once you've done a thorough study of these issues, only then can you analyse existing programming languages for how well they fit these criteria, or to create a new one that better satisfies them than existing languages. But until you know against what metrics these languages are to be judged, you cannot objectively do so.
Is this ideal beginner-oriented programming language also a language that's good for other focused domains? Will the decisions you've made in designing or selecting this ideal beginner-oriented programming language render it less than optimal for programming that isn't oriented toward non-programmers? Or if you add in properties conducive to non-beginner programming, will this compromise your goals of creating something for beginners?
Can we leverage our natural cognitive strengths in learning natural languages to learn a programming language? Does this imply that we acquire language more readily when we have lots of easy, contextual examples than we would if presented with sets of rules and axioms? Does this mean learning by a usable subset of a language first, and only adding sophistication if and when it becomes necessary? If so, does this not engender dialectical subsets? Would a beginner (equivalent to a seven-year-old speaker of his native tongue) confronted by a complex piece in the language (say, equivalent to a doctoral thesis) find himself somewhat lost? Would it be better to throw out the language you'd learned until age seven and start a new one so this can't happen, or is it better to learn incrementally?
Does it make sense to expect the same language that is used for one domain to be equally applicable to an unrelated domain? Aren't domain-specific languages both more powerful and more user-friendly?
Are we talking about a particular age group, such as ages 9-12, 13-17, or 18-21? Does this affect our criteria? Should a university really be used as nothing but a high-classed tech school as feeders for industry? If so, shouldn't diverse core curricula emphasizing reading, writing, and effective skills get more attention?
Do we understand the differences between "IT" training and "CS" training? What's a business programmer, and how is that different than a programmer? Is the goal to teach programming, or is it to teach computer science? Or are we just talking about teaching computer use? Since when is a computer science degree required to use a computer, or even administrate it?
How do you define "readability"? Does resemblance to a natural language suffice? Is this a good thing? Remember one notorious attempt to create a programming language that even non-programmers could use cursed us with Cobol. Wouldn't it be nice to avoid that next time around?
Is readability culturally biased? Can a language designed to be easy for Unix users to learn be equally easy for non-Unix users? Can a language designed to be easy for non-Unix users to learn be equally easy for Unix users? Think of it this way: Does your knowledge of Greek help you learning Russian? Is it the character sets, or are there more important underlying similarities? Is a language designed to be used by people who know language XXX going to be different than one designed for those ignorant of XXX? Do semantics grow out of syntax (ordering, positioning), or should they be explicitly reinforced by inflection markers (singular vs plural, noun vs verb, etc)?
Should a programming language require a fancy, hand-holding IDE before it can be used effectively, or should a line editor suffice? How much hand-holding is useful to the beginner but annoying to the expert? Can you make a programming language that's designed to be completely learnable in a very short time that doesn't rule out its use later down the road? Is "user-friendly" well defined? Does "user-friendly" always denote "expert-hostile"? Will software that pleases one set also please the other set? Should it? Are languages designed for short-term use or long-term use? Where then should optimization occur?
That's certainly plenty to think about, and mostly what I just did is provide important questions that should be thought through. In many of the questions, there is no single right answer, but there are consequences. Try answering the questions in more than one way, and then compare the resulting trade-offs that arise depending on which path you took.
2. Answers
I certainly don't have all the answers to those questions. But I do have some comments on the Perl matters. The first is that Perl and Python are actually essentially the same language, and that there are a great deal of other sorts of languages out there that a computer scientist should be exposed to. Much like the warning to beware the man of one book, also be wary of the programmer of just one programming language.
And before you can begin to compare two languages, you actually have to know them both! Oh, not necessarily with equal fluency, but you actually have to have taken the time and energy to play with them, to sound them out in real situations. Superficial assessments based upon surface appearances are useless.
The "scripting language" versus "programming language" bigotry is nothing but cultural arrogance borne out of theoretic ignorance. I'm aware of Ousterhout's paper, and I have responded to it before. John is a very bright man, but like all of us, he carries with him his own historical baggage from the past and unfolding agenda for the future.
In this case, this a false dualism of "scripting" versus "programming" does nothing but harm. It has virtually no basis in theory, and little in practice. The assertion that byte-compiled Perl or Python can't handle certain tasks but that by merit of being compiled to machine language, C or Pascal or Ada or Modula automatically can--well, this is completely ludicrous.
Rob Kolstad long ago conjectured the following: "The success of a new programming language is directly proportionate to its resemblance to C." Perhaps a more accurate statement would be "The degree to which a new programming language will be embraced by C programmers is directly proportionate to its resemblance to C." And now you can swap in other programming languages in that equation.
As far as real-world programming goes, I assert that the majority of it gets done using C or a derivative of the same; and yes, I consider Awk, C++, Java, and Perl to be derivatives of C. Now, I'm not trying to claim that this is the best of all possible worlds. I'm simply stating that it's the reality. And given that reality, overcoming the inertia to get existing C-oriented programmers to jump to a completely different programming language, such as Smalltalk, Lisp, ML, or Prolog, is non-trivial at best.
There was some question of non-Unix support for Perl. As far as non-Unix ports go, Perl runs on so many diverse sorts of systems that it's easy to lose track of them. Not only that, but it also ships (or will ship in the next release) as part of the standard O/S release. Perl in some form ships with, or can ship, with at least some systems from these vendors: Apple, BSDI, Be, Compaq, Data General, Debian, FreeBSD, HP, IBM, Microsoft, Novell, OpenBSD, Red Hat, SCO, SGI, Sequent, Siemens-Nixdorf, Slackware, Stratus, and Sun. Those are just standard systems. The major workstation vendors like SGI, HP, Sun, IBM, and DEC/Compaq are all shipping Perl with their current or upcoming release. That means it's in the standard vendor configuration, which is important to many people.
Of course, Perl I run on nearly anything, including: 3b1, aix, altos486, amigaos, apollo, aux, beos, bsdos, convexos, cxux, cygwin32, dcosx, dec_osf, dgux, dos_djgpp, dynix, dynixptx, epix, esix4, fps, freebsd, genix, gnu, greenhills, hpux, irix, isc, linux, lynxos, machten, mint, mips, mpc, mpeix, ncr_tower, netbsd, newsos4, next, openbsd, opus, os2, os390, posix-bc, powerux, qnx, rhapsody, sco, solaris, stellar, sunos, svr4, ti1500, titanos, ultrix, umips, unicos, unicosmk, unisysdynix, utekv, uts, uwin, and vmesa.
On the matter of Microsoft compatabilty for you MIS and IT types, we CS types have tried very hard to make sure that standard Perl programs try very hard to run everywhere. That doesn't mean you can't get at the Unix getpwuid() function or the Microsoft Win32::Process module if you want, but that's not the same as basic functionality that is expected runs everywhere. This includes portable systems programming as well. Basic systems programming functions in Perl like rename() and flock() are not restricted to those systems that support rename(2) and flock(2) syscalls, i.e. kernel traps. We use whatever emulation is necessary to provide the same semantics using whatever your system's primitives provide.
And we don't stop there. The POSIX fork(2) syscall, that simple, elegant, and incredibly powerful feature that has long formed an essential keystone for systems programmers, and one which Mr Bill has never figured out how to do, will be supported on Microsoft's systems as well. This will show up in the 5.6 release of Perl, which is now in late alpha and imminently passing into beta. That means your traditional multitasking server that calls accept() on a socket and then fork()s off a clone to handle the incoming connection will work even if you're a Prisoner of Bill.
If you aren't familiar with the wealth of Perl modules out there, or how easy it is to build and install them, you should look at this search engine.
Perl has seriously different design goals than Python. One of these was to be easy for Unix programmers to learn and use, both simple sh programmers and sophisticated C programmers. Another was to support incremental learning and incremental growth of the language itself. Another was to provide good support for multiple different programming styles (procedural, object oriented, and functional), which goes along with avoiding moral judgments about programming style issues and letting people program the way that comes naturally to them. Python supports both procedural and object-oriented programming reasonably well, but its support for functional programming is clumsy and unsatisfying. Without the nested lexical scoping in anonymous that languages like Perl and Scheme provide, there's only so much you can do. This is not in practice an onerous restriction, however.
Another was speed of execution; as a result of this design requirement, Perl's compiler is remarkably more clever than Python's, because it does quite a few more optimizations and special-case detection at compile time, so that run-time is more streamlined. This includes string-related issues like pattern matching, but also simple base programming features, such as when identifiers are looked up in symbol tables. Python was never designed to run fast, and by and large, it doesn't.
Perl was designed to conform itself to the programmer, not to make the programmer conform themself to the language. This is seen in the "do what I mean" (DWIM) principle. Matters such as memory management and strong typing are largely there to help the computer not the programmer. Because of this, you'll see Perl and Python take divergent paths when it comes to these matters. For example, Perl will automatically allocate space for strings, indexed arrays, and associative arrays as they are needed, without requirements of pre-growing the way Python's lists need. Another example is that Perl doesn't distinguish between 3/2 and 3./2 the way Python does. In Perl, a number is just a number, and if the compiler or run-time library needs to perform some promotions behind the curtain to do what the programmer meant, it goes and does it.
Perl was also intended to support short-cuts for common programming tasks so that expert programmers wouldn't be forever bogged down by spelling things out the long way. In short, it was designed to be expert-friendly, by which I mean that it did not become tedious for those who actually knew how to use it. One example of this is the multiple assignment statement of
Some of Python's design properties were that explicit is better than implicit, that general cases are better than special ones, and that simple features are better than complicated ones--even when this makes the programmer to put the simple features together in complicated ways. But like any language that actually gets used, these goals are not always followed. Compromises happen. I'm not going to sit here and point out all the warts and knobs in either language. Rest assured that they are there.
Do not be distracted by Python's whitespace issue nor by Perl's type-markers. These are both red herrings that aren't related to the core of what the language can truly do. Interestingly, both of these features commonly cited as negatives were actually added to ameliorate not to exacerbate legibility.
Despite Perl and Python starting from different sets of design criteria, they are, in most of the senses that really matter, the same language, just as C and Pascal are really the same language. I strongly encourage anybody who only knows one of them to go out at learn the other as well as you can in a week or two's worth of playing around. Try to write equivalent programs. By and large, you'll find that the final program takes more lines of code in Python than it does in Perl, and that the Perl version runs faster than the Python one. But not usually by a large amount. Usually it's just 20% or 30%.
But if the problem domain happens to be text manipulation, (and not just sed and awk style either), then the difference can be far more dramatic. It is not at all unheard of to find that Perl requires just 1/3 the code that the Python does, and that the Perl version runs in just 1/10 the execution time. Perl is not just about text processing, and there is no tool that's best for all jobs. But if there's one place where Perl outshines all competitors, this is that place. Even people who are heavy users of Python often turn to Perl for these tasks.
Learn as much as you can.
when did i say i was a genius? I'm no genius, but thankyou for the compliment. I'm sorry if the comment somewhat offended you i was trying to be somewhat funny. the last thing that i try to do is brag about myself. i was just pointing out how learning those kind of skills at a young age can be a real benefit and how teaching them in schools can be even better.
genius??? yeah right.
Yogosloviva
And Practical computer skills are tought
They could have at least taught me how to spell decently.
Is this a troll? :-) Well, even if it isn't, you are certainly right: at the very least they might have taught you how to spell. The system is so badly broken that it's scary.
DFL
Never send a human to do a machine's job.
However, let me answer a different question - people always ask me, why is it that so many Indians are good at programming (or atleast employed as such). The reasons are often misunderstood; the Indian high school system lays stress on basic math and analytical skills. Students who take high school math have to do calculus, problem solving and in general, much more competitive math than in the US. Broadly speaking most graduating high school students in India know math equivalent to 1st year math majors in the US.
This means that the math taught in college (in engineering and science courses) is appropriately advanced. Again, engg schools in India (and I have been told by my German friends, in most of Europe) are teaching students to *think*; given a problem, to develop a methodology of solving it and problems in the same genre.
Whereas in US engg courses, students are concerned with passing the course and teaching is centered around graduating students so that they can get a job. It is an industry oriented education system. I was a teaching assitant for a digital design class and was constantly being asked whether the material being discussed would be on the "quiz" ... my urgings of "no, but this is fundamental stuff that you need to know" fell on deaf ears.
In conclusion, I think the problem is more deep rooted; US colleges are producing engineers who can do one type of job well but find it difficult to re-train themselves for new jobs when they come along. Hence, initiatives such as this and more fundamental grass root changes in high school and engg. curriculums are required.
This proposal does raise an interesting set of issues in regards to programming curricula. For example, here, the first language taught to all engineers when I started here was Fortran-90 -- the class was an introduction to engineering. IMHO, this wasn't too bad since the focus of our programs was solely on numerics, but that was a long time ago, so my memory is hazy. EE's and CompEng's and CE's moved on to C in the next programming class (Civil/Mechanical/Aero Engineers continue(d) to use Fortran-90 throughout their college career, along with some Matlab).
Eventually, the CompSci's move on to Scheme to learn functional programming.
Part of the problem with the curricula is that given X semesters for each major to learn programming, along with industry pressure on graduates to learn C/C++, there isn't enough time it seems to use a simple language like Python in the beginning and later teach C. So the CS majors learn Scheme later down the line while the other engineering disciplines are taught to use the industry language of choice earlier on.
There are only two kinds of programming languages: those people always bitch about and those nobody uses.
I was going to post the same messgae, with the same helpful links to the TeachScheme project that were offered in a followup post just after.
In the school I attended (Rice University, also the ones promoting the TeachScheme project which I'll admit is a bias I have) they teach (tought?) Scheme as a first language, as also used it for some much more challenging courses (like theory of computer languages). It was great to have that as a first language (after knowing some Pascal and Basic to start with).
The reasons I can think of to promote Scheme as a learning language are:
*) You will never use it in the real world. Thus, you automatically have to know at least two very differnet languages which is helpful in learning how to think about solving problems.
*) Scheme teaches you to think. You learn a number of simple but powerful concepts - Recursion! Lists! Pointers! Objects! All in a safe environment.
*) Scheme teaches you how to use Emacs. Its greatest strength, or greatest failing - I don't see how you could program Scheme (or any sort of Lisp) without Emacs. That might be the only thing really standing in the way of widespread teaching of Scheme, is a easily installible and usable version of Emacs for the masses. Paren matching alone is not sufficent, I fear.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
GCH is IMO one of the most influential articles, which brought programming out of the dark ages.
... FROMs, anyone?) are present in just about every real language, and should be used when necessary, for fear of something worse happening.
... staring into space, chatting, doodling etc. And of course you won't have to work 80-hour weeks in the month before delivery 'cos it'll be designed properly and will run first time....
GCH was certainly influential: it's been argued over passionately for the last thirty years. Brought programming out of the dark ages? Possibly - but at the same time it caused schisms reminiscent of those in the medieval Catholic church.
Dijkstra was right to argue against the 'unbridled use' of GOTO, but his cause isn't helped by the almost universal inclusion of directives such as 'GOTO will not be used under any circumstances' in programming standards (and yes, I've seen some of these and argued with the writers about them). The argument is often that GOTO doesn't conform to 'structured programming', and hence can offer nothing to the modern programmer. In the spirit of the anonymous pundit who once quipped 'real programmers can write FORTRAN in any language', structured programming isn't concerned with specific language features. GOTO has its place, and anyone who tells you otherwise just hasn't cut enough code to know what he's talking about.
Sure, SEH is a good thing, but none of the boxes I've ever worked on have offered it in hardware: it's generally provided by either the OS or the programming language used. And quite a lot of real-world programming languages (rather than the My Favourite Toy Languages beloved of CS students, researchers and profs) don't support SEH: the same is true for most OSes. GOTO - or its equivalent (computed COME
The proof of correctness stuff, by the way, is one of these fields which I've been following off and on for a while - I just wish that they'd get on and prove something of (at least) interesting complexity. Last time I looked, the bleeding edge appeared to be tools and techniques for analysing programs of the complexity of a four-function calculator. Has the field progressed since?
Agree wholeheartedly about testing, by the way. It's always cheaper to spend time on the front of a project designing it correctly than on the backend patching the whole mess together with string and gaffer tape. Sadly management like to see their programmers programming, not staring into space, chatting or doodling on sheets of paper. Some time I'm going to write a manager obfuscator: you feed it various key words and tell it a language and it churns out several KLines of code which you can progressively show your PHB to demonstrate your productivity while you've been
--
Cheers
Jon
Cheers
Jon
I would like to disagree with a point made by the author. I do not believe C++ is too difficult of a language for beginnners. When I took the only computer programming class my high school offered, which was C++, I had no trouble grasping the concepts. My little brother, who is 14 and a sophmore in the same high school, is taking the same class, and he hasn't asked me for help once, even though I let him know that I was here for him. C++ is an excellent language for beginners, as long as you aren't going into the more serious topics of object oriented programming, Inheritance, Encapsulation, and Polymorphism. Even these topics aren't *too* difficult. But the way our teacher handled it, is he tought C++ as a procedural language, skipping most oop topics. When I got into college, I understood the syntax of C/C++ so it wasn't difficult to add the other topics onto the language I was already familiar with. The problem with teaching someone a non-C/C++ language is they carry over programming habits and thoughts from the other language. Like when you see someone new to C try to type writeln() in C. You're just creating another forced transition period by forcing them to learn two languages instead of one.
I don't think anyone can say what a good age to start programming is. I have seen C and C++ code written by people in their early teens that is simply inspired. On the other hand I have seen code written by adults that made me cringe ...
Personally, I learnt the rudiments of programming on a Commodore 64 (Basic), and then C. This was between the ages of about 12 - 16. Then I didn't touch a computer again until the age of 22. Five years later I now consider myself to be a pretty good C, C++ and Perl programmer.
So I don't think age is the issue, but motivation. To a certain extent, an individual can learn quite difficult concepts as long as they have a burning desire to. In my case I didn't want to be stuck in a bank doing data entry for the rest of my working life - the need to always be learning something new is what motivated me.
Chris Wareham
Basics yes
My school taught basic accounting, the first part was how to do your own taxes
First Aid could be basic nursing
Computer programming can be just advanced computer usage, ever look at some Excel guru sheets?
HS isn't just littl kids, some people don't go on any further, giving basic knowledge is a good thing.
Honestly I think that the into level programming I got in HS would be more helpful then the intro level Calculus, at least to those who don't continue in academics after HS
I simply feel moved by the sincere and and heartfelt emotions expressed by scrytch. I hope that the person who replied to scrytch's original post understands that the love flowing over the net comes from scrytch's deep care for his education and enlightenment. The rest of us also appreciate the poetic terms in which this conversation is couched. It brightens our day, and leaves us with that "fresh as a morning shower" feeling deep down in our souls. Please, someone moderate this sort of posting up even more! We need more such original contributions on /.
I hope that someday I too can enrich the lives of my fellow slashdotters with such score:4 worthy messages, and teach them that in order to be a default 2 person they should emulate me.
Meanwhile, I must simply apologize for taking up yet more space in the database with this off-topic reply.
Thank you,
--iceaxe
WALSTIB!
I'm no expert about Python, but if they really want a beginner's language that's modern, easy to learn, and increasingly in demand, how about Smalltalk? It's extremely object-oriented (everything, and I mean everything, is an object); it allows extremely fast development cycles; it has what I consider to be the most elegant method syntax ever to grace a language ("SomeObject do: something with: somethingElse andStoreResultIn: here." is a lot more readable than "SomeObject.do(codeBlock, &anObject, &here);"); it is far more dynamic than Java; it's now pretty fast (look at VisualAge Smalltalk or VisualWorks 5i); most Smalltalk environments come with WebObjects-like classes for Internet apps (e.g. VisualWave for VisualWorks 5i)... the list goes on and on. True, perhaps it is not the fastest or most practical language, but if the intent here is truly to expose more kids to programming, I can't think of a better solution than Smalltalk.
Visual Basic for Applications
The advantage is that you can do useful things with the GIU and with real applications like Excel and Word for immediate gratification and a whole lot of little customizing tweaks kids will love.
Brainier ones can go onto VB and start hacking the desktop and do ASPs
Real nerds can go onto the higher reaches of Linux and C or Perl.
The idea here is to give everyone a reasonably useful intro and a look at the inside of apps and computers. Python is nice but I think its better to keep on the mainstream then to get into a new language that *might* become a killer app.
Personally I started with 360 BAL and think assembler is the best way to start but then I'm wierd.
Just another perl hacker in Bangkok
Comment removed based on user account deletion
Visual Basic for Applications
Yes they will learn some bad habits. Most of the students won't be going on to be professional programmers anyway so won't matter.
What you need to go for is that immediate kick of making something that works and is cool without too much hassle.
I see the issue as *not* tuning up CS students but taking the fear and loathing of the computer insides away from Users, who are the majority.
Just another perl hacker in Bangkok
I'll stick to perl as long as I can though...
Why doesn't anyone ever mention Oberon? It's a language AND an operating system (free for download). Check: http://www.ssw.uni-linz.ac.at/Oberon.html
Remember this: typically 40% of the time is wasted doing memory management (malloc,free,new,destroy,tracking references).
;-).
;-). A pointer to an int is (you guesed it) a variable that contains the memory address for that int. If you dereference the address with *, you can use it like the original (this helps stop you from having to pass large armounts of data to functions).
:-)
No. C allows you to expose a great deal more of the hardware, so you do have to keep track of things more. However, that doesn't mean it's any slower (those "other" languages have to collect garbage, too, and they're just compilers, not smart human programmers
Also, what is your problem with pointers?! Pointers are easy to keep track of as they are just (litteraly) a memory address. C's strings are memory addresses, which are then read forward until a NULL is hit. Ints, etc, are another chunk of memory (but, being fixed size, require no NULL termination
Now, this may sound dangerous, because it is. The thing is, though, that competent programmers will know how to work with these, and will use them where appropriate. IE: linked list, yes, perfect place for pointers. There are caveats, but that's true with any language.
Well, just my opinion. I am, perhaps, a little defensive of pointers, because I just used them in a project, and they saved a lot of work
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
Now, this is the kinda post that should be moderated up ;-)
;-) And if it's not standarised (give Java more time), I can't use it. How do you write "ANSI Java"?
Anyway, you do have some very good points. The problem is, I have no GJC under Linux, nor do I have a Java-native code compiler under any OS (wouldn't that defeat the purpose of pcode, anyway?). Perhaps D should come about (fully object oriented lang, similar syntax to C++, but integrated garbage collection, memory protection, better class design, GNU compiler for it)...
Well, I've probably just gone and defined Java. Oh well.
If I don't have the compiler, I can't write for it
Oh well.
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
This is in fact the reason I have never seriously considered Python -- I really don't need to worry about my program's whitespace causing syntax errors. I suppose you could say that I'm wary that Python brings new meaning to the phrase "tab damage." The more people say that it's more intuitive, The Right Way, and so on, the more nonplussed I am. I guess it's just a matter of taste. Sorry.
Maybe a) No Perl programmers bother to react b) Perl programmers are not bigots c) You scared them away before they got started.
I hope it's b, as well, but after reading the garbage spewed in the Stevens thread, I rather suspect it's c. My purpose in posting my comment was to act as a lightning rod, hopefully drawing their fire away from the more meaningful discussion.
--
Disinfect the GNU General Public Virus!
Alan Kay (of PARC fame) once said something to the effect that teaching algorithms first is the worst thing you can do to someone learning programming, because they'll never grow past it. His success in teaching ten and twelves year-old children programming by just letting them explore the systems seems to vindicate this, to some extent. That they didn't have any trouble learning algorithms later (some of them later worked at PARC as programmers) indictes that it can't do any harm to put it off.
What's your beef?
I'm sorry I come across this way. Most of what motivates me to post on Slashdot is reading articles that push my buttons; as with most other folks, articles written with that kind of motivation will come across as less than positive. I do try to be positive, but don't succeed as often as I, and apparently you, would like.
Such is the case with this thread. I'd read enough of the Stevens thread to be thoroughly sickened by the behavior of the Perl bigots there, and Tom Christiansen's post simply iced the cake. When this article was posted, I saw something those same people would pounce on, and wrote my message in the hope that it would draw whatever nasty comments there were away from the real discussion. As it happens, the nasty comments didn't appear, something for which I'm grateful.
--
Disinfect the GNU General Public Virus!
As a programming novice, I am just now learning about OO programming. Sure, I've read about the concepts behind OO design, but actually designing an OO program is a whole different ballgame for me. After reading your discussion here, I think a lot of what you said makes sense and perhaps I could benefit by getting a better understanding of good OO programming techniques before I end up going down the path of poor OO design. Any good books to recommend? Any tips for beginners?
It's not enough to bash in heads, you've got to bash in minds. - Captain Hammer
2. It gets people use to coding in OO fashion, which is good.
OO is not good ! It's just better than structured programming. It forces the people to obey the basic good things about programming like abstraction and modularity. The standard OO has many problems that can't be solved easily. Look at the "Design Patterns"-book, which is filled with examples of workarounds in static OO languages like Java and C++.
OO isn't the Silver Bullet. The main problem is that the ontological commitment to classes of objects. You can basically have one object belong to multiple classes and the criteria of class division aren't trivial. The classes may not be disjoint. In any given real world modelling tasks there are objects that basically get new superclasses added at run-time or that change class ie. they get new attributes. Like a person joining the military gets a rank and joining a club he may get some sort of club status. Modeling these kinds of temporal changes just not possible in static OO.
OO is using something that developed pragmatically from the need to abstract _programming_ constructs. Thinking that it can be used to model the real world is buying into to the hype. At least the OO in UML cannot. If OO is going to be taught then it's limitations should also be taught. This is what is often forgotten. I think logic programming is probably a lot better when it comes to modelling real world systems.
Transition to C++ ? Are you nuts ? Time to move on. C++ is transition technology[1]. Seriously isn't it time for something more reliable for the masses ? You want to have every program crash on you ? Most people should use safe languages, because for most applications robustness and development speed are more important that getting maximum efficiency.
AC[1] Bertrand Meyer, Object-Oriented Software Construction, 2nd ed.
Comment removed based on user account deletion
Fortunately the rapid improvement in computer speed allows the use of less efficient languages, with the benefit that they are higher-level.
I really get angry when programmers think this way. When I pay money for new hardware, I buy it so I can do things faster, not so programmers I hire (by buying their software) can be lazy and make inefficient programs.
I was playing Starcraft recently, but it started acting up, so I installed the old Warcraft II demo, and did it run fast. It was sooo smooth and elegant. Yet Warcraft and Starcraft are essentially the same game engine, but Starcraft was made with the inefficient Windows API, while Warcraft was written for older DOS machines, and therefore had to be more efficient.
Have you ever noticed that programs that function the same now as they did ten years ago require computers many times faster? Yet the functionality really hasn't changed much, a few extra features, and that's it.
My Amiga runs at 7 MHz, and can often outperform my IBM PC running at 233 MHz at some tasks. Why? Because Amiga programs are efficient. The average executable is about 1/10 to 1/500 the size of its PC counterpart.
People who think like you cost me time and money. If programs were written now as they were written ten years ago, your OS would start in 5 seconds, take up 1 MB, and would have a full-fledged GUI and command-line interface.
C has the portability that assembly lacks, and lacks the inefficiency that higher-level languages have.
--------
"I already have all the latest software."
int main()
{
cout "Talk in C++? Are you bloody nuts?";
}
// who notes that only folks who don't get laid probably do this...
Having glibly dismissed that issue, I will now address Python.
I am far from a beginner at programming. I almost wish I were a newbie again, what with all the weirdness and speed of evolution in the computing world today. But I also try to keep current, so as new languages emerge, I sample them. A few years ago, I became enamored of Perl. I'm now a total hound for Perl--unless the task clearly demands another language for some reason, I will use Perl. I have a ton of add-on gadgets installed on top of my Perl--the Tk (and more recently, Gtk+) bindings, all the libwww stuff, DBI, HTML, Pilot--I've taken the Swiss Army knife and added power, water, and gas. I love me some Perl.
And still I try new languages whenever I hear about them. Tried REXX (quaint), Rebol (yawn), Icon (cute), Java (ooh, trendy), even ECMA-Script (Java-who?). And while I will certainly use the appropriate language for the task, I keep returning to Perl. (And Ada95, but that's not relevant here.)
Now for the punch line. Lemme tellya--try Python. No, I'm not going to say that I had an epiphany and am ready to forsake Perl in favor of Python. I had considerable trouble adding on modules to Python--they clearly need something unifying like make-maker. Python is not without its clunky, rough, at times even scary parts. But I keep coming back to it. As much as I love Perl, I must admit that it falls down at a certain size, for certain tasks. So will Python, I'm betting, but it covers a different part of Problem Space than Perl, or even Ada. It's cool. It's spare and lean, with enough muscle to push through the weeds. Once I installed the Gtk+ and OpenGL medules and saw my first 3-D coming out of a Python script, well, I just fell about the place. No, I'm not thinking of giving up Perl. But I'm also not going to give up Python, either, at least not until I learn a lot more about it.
So if you were on the fence, let The Knave give you a friendly push. Run through the on-line Python tutorial. It's worth making up your own mind about it.
Oh, and for the record, I fully agree with the others whose advice is to learn as many languages as you can. Programming performance has been shown to correlate much more strongly to breadth of experience than depth. I'd far sooner hire a kid who had five years in the biz and knew ten languages than a veteran of ten years in a VC++-only shop.
While, I am not the biggest BASIC fan (I started with BASH and C), it seems fairly simple for the basic (no pun intended) llama to learn. At my school, we have an Introduction to Programming class which I forced my girlfriend to take, and she seems to be able to grasp onto the concepts although she hates it like no other. I goto a college-prep school/fascist institution and we have programming for every year sort of. We hired a new guy who knows nothing except how to turn on a computer, so he just gives us books to read and tells us to fix the school's network when he crashes it. :-)
Just a thought...
Justin W. Williams
If you have to think for more than three seconds whether your programming language is feasible for implementing an operating system or not, then you can not call your programming language a general purpose programming language. Yes, you are right and I don't disagree: Visual Basic is not a general purpose language, and you cannot implement operating systems in VB. What we disagree on, is whether the 95% of lines written daily in the world are meant to produce an operating system. In my experience, they are written to serve the organisation that is paying the person writing them. Most people are therefore involved in automating business procedures. I'm only talking about the efficiency that can be gained or lost in automating business procedures. I'm not talking about anything else.
The first real programming I did was in C++ and Java with much object orientation, it is *NOT* a hard thing to understand in anyway, at all. The only people who have trouble with are people who are stuck in a procedural mindset, and stupid. (and believe me, there are *a lot* of stupid people in computer science).
Java is a very elegant and intuitive language. Also, I think we should be teaching OO from the start, so people don't have a hard time learning it later on.
The concepts aren't that hard, and with Java, neither is the coding. (though, going back to C++ from Java for a project was a bitch.)
"Subtle mind control? Why do all these HTML buttons say 'Submit' ?"
ReadThe ReflectionEngine, a cyberpunk style n
As someone who has done an undergrad degree in CS and is currently working in the industry for a large company (they don't get much larger), I would say that I strongly endorse Smalltalk as the best language for teaching the fundamentals of OO. If you haven't heard of it, Smalltalk is a language with a very simple english-like syntax; the syntax can be mastered in less than a day. This is very important, because many languages which are touted as great for teaching have such a massively complicated syntax that the only time the entire rules were bound together in one volume, it underwent gravitational collapse and became a black hole (apologies D. Adams). I've seen students get so caught up in the syntax of these languages that they lose sight of the fact that they are supposed to be learning how to PROGRAM, not how to PROGRAM IN (insert language of choice for this year).
Many of the "new" features of a language such as Java were in fact borrowed from Smalltalk, which has boasted them for over 20 years. These features include Virtual Machine/Bytecode technology and Garbage Collection. However, Smalltalk has many other features that make it ideal for teaching. For example, EVERYTHING is an object: no base types, no "magic" classes that aren't really objects, etc.; Java sacrificed these critical features in the name of efficiency.
For a time, the university that I attended taught Smalltalk as the first year language (after I had gone through...). Unfortunately, choosing a good language is only half the journey. I saw, much to my dismay, that rather than getting a solid grounding in Object theory, students were learning useless and irrelevant things like how to put pretty buttons on windows. I realize that SOME visible gratification is necessary, but delving right into widgetry before the basis of programming has been drilled in is useless. Such things are implementation dependent, and much more importantly, language dependent. When Java becomes the thing of the past, there will be 200,000 Swing programmers out there who are screwed because the only thing they know how to do is add a component to a panel. They don't understand the deeper issues at hand, and will find it hard to adapt to new technology because they will have to learn it all over again. Given a solid grounding, any new language is simply a variation on principles that you learned in your first year.
Please don't think that I believe that OO is the solution for everything. I've done my share of C, Assembly, and other non-OO languages. I simply think that OO is a great teaching tool because it mirrors real-life interactions, responsibilities and state of objects. I also know that it is relevant in the workplace, otherwise I wouldn't have a job right now. Even procedural languages can be programmed in an object-oriented manner, although the method of doing so usually overrides the simplicity desired of a teaching language.
I don't want this to sound like an advertisement, but you can get gnu-smalltalk for just about any unix-like system. VisualAge for Smalltalk is available from IBM on www.software.ibm.com/ad. VisualWorks is available from ObjectShare, formerly ParcPlace, at www.objectshare.com. Squeak is available from www.create.ucsb.edu/squeak.
I'm convinced that JavaScript shouldn't even be a language. The ideal is elegant enough, but due to the fact that different implementations exist, and there isn't a suitable consistency to even the most basic of ideas (try working with pull-down menus in forms for what I mean), JavaScript is a pain for even the most hardy of programming veterans to grasp.
The language isn't what's important. What's important for CS studies is the theory behind the language. Languages come and go (witness Ada, Java, etc), but the fundamentals rarely change.
Ok. I'll admit my mistake!
The object-oriented theory is brilliant.
Unfortunately, nobody has ever been able to apply it right;
that's why the overwhelming majority of OOD projects have failed to produce any benefits by using OOD.
We need Einstein to come back to the world!
Object orientation is another one of these miracle cure-all solutions that almost never work, even though no one will openly admit it. By modeling business apps as objects, you will not only lose a lot of time, but, even worse, make your applications much less maintainable. Why so? Because the complexity of business applications is in their data, and the only thing you will do by modeling business applications as object frameworks, is to replicate this complexity once more in your object classes.
This is exactly what object orientation is suppose to fight, and when used properly it does work. By seperating the implementation from the interface, higher level programs stop worrying about how something happens, reducing the replication. A good object oriented design will abstract the important things, allowing this to happen.
The problem is there are too many coders out there who know object oriented languages and not object oriented design. And the result is large class with lots of methods throw together, using class as containers.
This is one of the biggest reasons not to use a procedural language like C (or it's mutant cousin C++) or Visual Basic.
You are way wrong. Yeah, we sure need another government funded programming language! Hahah! The ONLY people in the world who will truely be programmers are those who want to program. I started with Z80 ASM (I am 20yo). That's hard. C is cake. Even if C is hard, a true programmer will latch on and spend his/her own time to learn it... I am in college and I have to correct my C teacher on a daily basis. This is just pathetic.
Corndog
The current AP test for CS is on C++ (changed for Pascal last year). I took a C++ course 3 years ago and the AP one last year, and its not too dificult. I had ~20 kids in the AP class, 14 took the higher level test, and 4 took the lower test. We had 2 3's, 6 4's, and 10 5's.
Its definitely learnable, the key is to limit lectures and maximize time actually fiddling with code.
PERL shouldn't be the first language. If it was Jr. High or younger, I'd say BASIC. I don't know much about Python, so maybe it is easier, but C++ is definitely doable.
Ya should teach'em to smoke Hemp and to program little things in little computers things like the Conway Game of Life, it is very interesting to little kids ya know, i was fascinated at conway's gol when little kid... about programmings, please just dont teach'em that microsloth stuff caled BASIC oh no, the horror! oh no, the pain! not that! It will make them sick little kids. It will cause'em permanent Brain Damage.
Ya should teach em the nature, the trees and the rivers. Ya should teach'em what the america indians know. ya should teach'em that computer programming is not about cold mathematics or sick capitalistic economic or stock managing. Ya should teach'em the little Fractals that can come from it, ya should teach em the beauty from little Munching Squares, ya should teach the Schememonsters, and that Computer Programming in an ART!
Let'em learn the FOO and the BAR, the PHI and the PSI, the YIN and the YANG. Let'em know that they can find answers with it... let them play with 3D... let'em play with Cthugha, let'em play with Music... let'em play with game theory... let'em play with cellular automata and chaos theory...
Teach'em things like the astounding Demos shown on demo parties around the europe... teach'em that computer shall not complement the real life, it shall SUPLEMENT the real life.
Go in peace little fellows, for ya i'm telling...
-- You are in a twisty maze of passages, all alike.
Let me preface this comment by saying that I have never used python, I am simply going by what other people have said about it.
This isn't talking about teaching programming to CS students. This is talking about teaching programming to the general public, early in high school.
Of course CS students could teach themselves C or Pascal(!?!?!), but neither would be good choices for the general public. The main problem with the two languages you mentioned, aside from the fact that they're a bit complicated, is that neither is object oriented (which seems to be where atleast the education community is moving).
The two major languages taught in schools today are C++ and Java, however neither of those would a wise choice. C++ wouldn't be a wise choice for a few reasons. The main reason is that there is very little structure in C++. It is quite possible to write good programs in C++, but if you don't start out with a good background in object oriented programming, you won't. The other problem is that at this point in time, there simply aren't any free compilers which fully implement the ANSI C++ standard. GCC has improved greatly, but it's still not there. Would you want every school to have to purchase a few classrooms worth of MSVC licenses?
Java would be better suited than C++ for the job, as it is a much more structured language, however it too is a bit too complicated. Remember, this is the general public we're talking about. Many of whom don't have computers at home.
What is needed is a basic computer language which isn't BASIC. From what I've heard about it, I think Python fits that quite nicely.
python is still probably a better choice,
but any CS major should learn ansi c.
im not the only one i know who was programming
at a young age (i was told 6 maybe 7).
c++ is complex, but c is simple, and most kids are
alot smarter than many of you realize. they
have this amazing ability to pick up stuff and
learn really fast. we can probably tempt them
into wanting to write thier own games and stuff...
The C Programming Language (kernighan & ritche) is
less than 200 pages without the appendix.
When I went to high school back in the mid 80's (1988 graduate), I took a number of computer science courses during high school that taught various languages and databases. When I started college in 1988 we started at CP/M with machine language actually on the 8080 then went forward with assembler/c/pascal on the PC platform when windows was at 2.0x. Since then I've learned a couple of more languages since including Java which is ongoing. The principles I learned from the classes back then helped me learn whatever I want. I think learning languages is great as long as the principles aren't lost. I've now begun to finish for my degree in Information Science and one of my courses this semester is database management. I've worked with databases for a number of years in my job and continue to do so. I will now be able to learn more theory and apply it to the real world, which is all that languages help you do in my opinion, take the theory and apply it to real situations. This semester I am learning database theory and applying it using MS Access as well as Oracle for the clase. I will also be able to apply this to Mysql, postgresql, Star office database, and filemaker pro 3.x which we use at the office. The way to learn is to take the theory and apply it immediately versus later on when you may forget the principles, this will assuredly help you learn. Patrick Dunn Oswego State U - Go Lakers!
Web Developer
You are so right about PHBs favoring busy-work over thoughtful reflection. It's just the age old problem of having highly intelligent people (in this case programmers) often being supervised by less intelligent people (non-programmers, or programmers who got a classic "fuck up, move up" promotion to keep their hands out of the actual code). They don't know any better, so they want to see more "stuff" to think that a project is progressing. I think Steve McConnell nailed it on the head in his book "Code Complete" when he said (paraphrased) that he thinks less of a programmer who endlessly hacks away compared to one who spends much time just sitting and thinking. Programming is an intellectual pursuit and therefore best practiced by thinkers, not busy-bodies. - Chris
I do agree with you that if you're not going to use good OO designs, then you may as well not use OO at all. Kind of like if you're going to write 1000 line functions with goto statements everywhere, you may as well not split your code up into functions at all. Just because it's being misapplied so frequently doesn't mean OO is the wrong tool.
A lot of it is poor management. Companies like to hire these cheap programmers who only know VB, Visual C++ and MFC. Companies like IBM that know what they're doing will hire real, clueful software engineers to be involved with their projects. They know you can't take some typical $50k MFC programmer and give him an important role in designing an OO system. Now, it's unlikely that ANY company will have ONLY experienced object technologists working for them. There just aren't enough good people to go around. But a smart company will have at least one such person working on a particular project as the main architect, overseeing the design.
But why start from scratch when it comes to programming environments? Why not build on the decades of experience with other teaching languages, like Logo, Scheme, and Smalltalk?
And for real-world relevance, the facts of life are that there are hundreds of "little languages" serious computer users need to learn. Rather than pretending that everybody can exist in a little shell, exploring what is out there in the real world might make for a much better introductory CS curriculum.
And, in fact, even the "little languages" casual computer users encounter teach a lot of interesting concepts: event driven programming (dial-up scripts, game character programming), functional programming (database queries), OOP and message passing (Apple's scripting languages), etc.
I think it's nice to see more money go to Python, but the proposal really doesn't make that much sense to me. I think the development of a good introductory computer curriculum should start with no preconceived notions of which language to use.
Python:
I think Python's a good choice because it is about as simple, syntax-wise, as BASIC, it's somewhat less weird (i.e., less unlike what most of the industry's using) than Lisp, and it's not the industry Flavor Of The Month (unless you're working on RedHat Linux installation scripts). Plus you can use it for real work if you want to.
-- Some things are to be believed, though not susceptible to rational proof.
This is not FUD.
I'll tell you what the real problem is: some people want to complicate programming to the level that only a handful of specialist can develop a system, where before, millions could produce something useful, with results matching their level, but still solve problems.
I can guarantee to you that your approach will fail. It's the users who are paying, and they, obviously, don't want what you're selling. If you are still making 50K, kiss your hands, because sooner, rather than later, it may be over.
I'm not sure if professing a One True(tm) teaching language is such a good idea.
Remember back when BASIC was the ubiquitous beginner's language? It might have been a good first step toward the fast paced world of FORTRAN programming, but it made it a lot harder for me to grok Pascal and C.
Most CS students and a disturbing number of professionals seem to think the best tool (language, OS, DB, etc.) by divine providence has to be the tool they know the best. Give them a hammer, and suddenly all the world is a nail. Ever see a beginner write a one line sed command in their pet language? It is not pretty.
And the danger extends beyond language bigotry. Python is nice, and all, but is it the wave of the future, or yet another dead end? If Python goes one way, and programming trends go another, are we doing the high school kids any great service here?
Finally, I am not sure Python is the best choice. Even if we stipulate it is the ideal learning language, it is kind of sitting there out on its own branch of the language tree. At least when you learn C (which I am not avocating), you know most of the syntax for C++ and Java, and a goodly chunk of Perl. It is a lot easier to use the right tool for the job when your toolbox is full of tools.
It seems weird that the article makes no mention of Ada95, considering DARPA uses it for many things. I was taught Ada my freshman year in college, and it seemed eaiser than having to learn both concepts of algorithms and C++.
That's one opinion. Another opinion is that Python supports only local variables, and that global variables are accepted as syntaxic sugar (useful for modules and functions defined out of classes). Some people think that allowing only local variables in an otherwise OO language is good.
I don't think we're talking about the same thing here. The distinction isn't between local and global variables at all. There are 2 types of local variables, and Python uses a third kind which doesn't really exist.
Static binding is meant to allow you to write (in Perl, say):
The python equivalent fails:
You need to pass n into the lambda explicitly.
2 dashes and a space, or just 2 dashes?
I'm just kidding, or maybe I'm not. I don't know Phyton, nor do I have an idea of what it looks like. However, if it is simpler than C or Java, then it is great. Many educators, specially the most seasoned ones agree that C and Java are terrible tools for education. The whole drive of pushing these languages are based on the following premise:
1) Use what's used in the industry.
However, if one is to blindly follow that, schools would end up teaching data structures using VB or PowerBuilder! In my opinion, one should use either some form of pseudocode or a very simple language (Python according to some, or some subset of a QBasic-like language that suppports modularity). What schools are doing is teaching C or Java programming when the whole point is to teach programming using X or Y language. The whole goal is to teach that:
1) In general, problems can be solved using a step-by-step method,
2) these methods (which students will later discover are algorithms:) can be more or less implemented the same from one language to another,
3) there are standard ways to break up a problem so that it can be solved using a program, and
4) the end goal is not to learn a language, but to learn how to solve a problem.
These 4 items should be the main objectives on a beginner's level. Once a student knows what's the difference between a while, for, and do-until loop, what's the use of if statements, what flag variables are, and why not to overuse (or use at all) global variables, he/she is ready to tackle more language-specific courses. Universities have to get a grip and understand that shoving whatever language is in vogue just for the heck of it does not benefit anyone. The way the computer industry is, whatever "hot" language a student learn in its 1000 level will most likely be obsolete by the time he/she graduates and dive into the work force.
Just to make some fun, I say use BASIC. It is a lot simpler and intuitive to say
PRINT a, b, c
than
System.out.println( a, b, c );
or
printf( "%d%d%d\n", a, b, c );
Leave the esoteric crap out, and use it only when it is absolutely necessary:)
Luis Espinal
www.cs.fiu.edu/~lespin03
Maybe I am a little old fashioned, but I think that in High School the focus should be on THE BASICS, which if I had to make a list programming would not be on it.
High School students should be taught how to read WELL, write WELL and do math WELL. This business of including courses like programming in a high school curiculum are a waste of time when the students can't even write a paragraph that clearly expresses an idea.
Some electives like introductory science, history and foreign languages (some that needs much more emphasis in the US due the increasingly global nature of society) are worth dabbling in, too. But computer programming is strictly a vocational topic, much like nursing, accounting, etc. and has no real place in a basic college prep high school program.
In any case does anyone think that a high school can teach the real meat of computer programming? Tail recursion? Hash Tables? Data Modelling? Not very likely, and without these concepts you are wasting your time.
As far as Python goes, I have not evaluated it, so it may be a very good candidate for a introductory course in computer programming. Personally, of the languages I know I would have chosen something like Logo or Scheme. These languages allow one to focus on the real meat of computer programming without getting tied up in syntax issues or implementation specific issues or the warts on the language du jour, especially the horrific BASIC, C, C++ and Perl (C++ delenda est) much to the benefit of the student and the course.
I'm writing this from my workplace, between third and fourth years on this very course. I think that the reason it was difficult to pick up was that it was so different. These kids have no pre-conceptions of how a program looks, or what a normal programming style is. They can fo this easily. In response to its syntax being evil, I can;t really comment, but I've got to use it to implement an Agent-O interpreter next year!
Hey, it worked for me in 1981....
But seriously, it is interesting how things seem to have gone full circle. In the beginning when computers first entered into schools, "computer literacy" meant programming. Actually, everyone in my school was forced to take a course in BASIC programming. But by the late '80s, "computer literacy" had degenerated to merely being able to use WordPerfect or Visicalc
I think the lack of good teaching staff in CS stems from the fact that anyone who is at all good at programming can get a better paying job.
We learned BASIC in 4th grade. By 6th grade, the propeller-heads in my class were programming in assembler on them old Apples. You can start the basic concepts at any age- especially the ideas of object-oriented design and basic algorithms. Add the code later. Programming isn't just about code, and it's not an isolated discipline. Most youth could benefit by learning the types of thinking skills and analysis that are required of a programmer, but useful in many situations. Classification, algorithms, simulation... I believe it's an interesting commentary on the thinking skills required of programmers that some of the most literate people I know, the people who actually read the great works (Shakespeare, Tolstoy, classic poetry) are high-powered programmers (who, BTW, despise M$). -MVK
**Many of the people who take introductory programming classes are not going to be programmers.*** The world is now full of engineers, economists, statisticians, linguists, etc. that have programming responsibilities in addition to all the other things they have to do. They need a language for quick solutions and that's what an introductory programming language should teach them how to get quick high-level decisions. Only the people who are going to be computer science majors and write C++ code should worry about shifting around bits and bytes, and three's complement...etc. The programming language taught in introductory programming language classes should allow the student to accomplish a lot, solve difficult problems, create sopphisticated gui interfaces without writing a lot of code. Python with Tkinter, the numerical libraries, the very clear OO programming style, is the best for this IMHO. Extensions in let's say C++/STL also seem easier to make with Perl. It's also less Unix-centric. Python seems to be inheriting the best from Perl while eliminating it's obfuscations. Jon Fernquest ferni@loxinfo.co.th bayinnaung@hotmail.com
The wonderful thing about teaching programming to little kids is the way it offers instant gratification when they do something right, because they made something really real happen on the computer. Compare this to most other stuff kids have to sit through: they write down answers under the little line, and the only thing that happens if they're right is they get a checkmark on their paper. @Whee. Even the simplest computer programs encourage a child to engage in mental play and spontaneous experimentation that's either inappropriate or impossible in more traditional areas of education.
:)
In my previous job, I got to do a little bit of programming instruction with early elementary school kids. Inspired by books like Mitchel Resnick's "Turtles, Termites, and Trafic Jams", I installed a flavor of Logo on the lab's Macs, and gave the students three lines of code to type in, which would summon a "turtle" (a programmable drawing tool that lies at the heart of Logo) and make it move up the screen a little, drawing a line behind it as it went. The first kid who typed it all in correctly and ran the program saw the results and cried, "My turtle pooped!!" The others, of course, instantly latched on to this agreeable metaphor, and only a moment passed before other children discovered that the length and angle of the poop (despite the fact they probably hadn't yet been taught what an 'angle' was!) changed in certain ways if they typed in bigger or smaller numbers than the ones I provided. And what happened if they added more turtles?
The class spontaneously broke down into a turtle-poop contest. And thus they all became hackers! Of a sort.
So, really, I support having wee ones learn programming not so they'll know how to code per se (though that certainly is a great benefit), but because it rewards them for thinking and creativity like no other 'ordinary' school activity can!
jmac
I think computer literacy is a prerequisite to programming of any serious type. You need to understand how computers work, how they process data, and the various methods of I/O before you can attempt to program. For people who just discovered that Word has a spell-checker... getting them to learn programming will be about as successful as convincing Microsoft to drop their crummy MFC classes in favor of Java...
--
Here at the university of Stockhom we use scheme as the first language. How I would just love if it was Python we used instead. The heavy use of ( and ) are driving me mad. However the book we use ( the structure and interpretatio of computer programs) is very good. It seems like scheme has some really nice features...
I have what I would claim at least a basic knowledge of C and C++, but scheme drives me mad.
The only nice thing is that we use emacs and those nice sun workstations =)
It's called new wave but it's just the same.
I don't know much Python, but I know it has fantastic object-oriented faculties, and I know as a Java programmer that OOP is the future of programming. The thinking skills required to be a good OOP programmer can easily be taught in the context of a Python class.
The local HS's are teaching VB as intro to programming. Hello!?!?!
-MVK
You left out scheme. I think it's the beginner's language at MIT and Rice.
(currently testing something about signatures here)
Given the increase use of computers in most societies it would be helpful for kids to be involved with them.
Athough I have not read this plan I think it misses one important point. There are still many schools with no computers. There should be first and foremost a plan in trying to have computers available to most kids.
After most schools have computers even BEFORE they try to teach programming they should theach the basics of using a computer including some sort of suite, specially now that there are a few free ones, in particular word processing, database and a spreadsheet.
As for programming I agree with others that they should use pseudo code first and teach concepts. Once one knows concepts the rest is just a matter of syntax.
I would have thought that Java would have been an excellent choice for a first langauage. And yet it's not even mentioned.
Please don't take this as a flame against Python or the other languages mentioned. I actually think Python is pretty cool, even though I don't know it very well. I just think that given the capabilities of Java and the role of Java in the marketplace, Java was at least worth mentioning.
I think this is a great thing. I'm a technologist... I'd like to see technology cheap and plentiful for everyone to use. But if this is to happen, if computer technology is going to have such a large impact on people's lives, then I think people need some basic education on computers and programming. Computer knowledge needs to be something for the masses, not the elite few. This way people would be able to have their computers do what they want them to do, and understand the limitations of the devices.
One reason why this may never happen is because if computer knowledge became common, if everyone could program, and if programming languages were developed to make programming simpler; then jobs with computers and programming wouldn't be high paying and considered "hot" as they are right now, they would be considered menial and low-paying because it would no longer be the job of a specialist (oh sure, there would be a few high paying jobs for the true geniuses, but not many). Current techology companies may claim that technological advancement is their goal, but really profit is. It just so happens that the two coincide... but if their jobs and profits were threatened by consumer education, they'd fight it all the way. From my point of view, the long term goal of the computer industry should be to obsolete itself.
This education isn't intended for those with an interest in programming, it's intended for those who won't be doing that as a job... it's general education to give you a better understanding of how the things that have an effect on your life work. For example, a friend of mine is a math education major. Last spring she took an intro programming class in C++. With this basic understanding of the mindset it takes to create programs, and the debugging process, and the use of libraries, just last night I was able to give her an explanation that she easily understood about how OS's use dynamically linked libraries, and why her win95 machine has gotten so much slower and more unstable over time after adding many more programs.
General education is a good thing. Whether you make it your life's work or not, a little extra knowledge is always helpful.
He said, "You'll be able to tell your grandchildren that you helped assemble the first NT supercomputer," and I cringed.
--
--
I can tell you firsthand that C++ is just too difficult for first-year CS students in high school
I really have to disagree with that. I took Pascal my first year in high school, which is a Junior course in my HS, and I took C++ sophomore year, a senior course. I had absolutely no problems learning either. I don't know much [anything] about Python so I'm not going to talk trash about it, but I think that C++, even though it's hard, should be one of the first languages anyone learns, because it demands that your programming be organized, indented, and aesthetically pleasing. I know a whole bunch of programming languages and C++ has got to be my favorite.
SuPz.orG
Comment removed based on user account deletion
I think this is a very good idea. Starting out with a programming language like java or c++ is kinda hard to just jump into for beggineres. I personally haven't used python, but ive used perl Which i gather is in someway simliar. And its a nice easy langauge. In addition, i know here at the university Im at the beggingi CS class is taught in scheme for the exact same reason they propose to use python, so it works and its a god idea, but thats just my 2 cents.
Comment removed based on user account deletion
My university first teaches Clean, a functional language, second C++ and third Java. Clean is seen as an easy language to get students starting, however I/O is uneasy and GUI-programming heavily in development. I don't think the teachers would be willing to change to another introductional language; Clean is being developed here and is the status symbol of our theoretic department. More general, I am afraid that you can't set a Programming Language standard. HLLs have always been subject of religious debate. The computer world is dynamic, but teachers will stick to their own favorite language.
Um, pardon me if I come off sounding elitist, but programming is not something that can be taught to your average user without a *lot* of background work. Teaching someone to program without having them understand what the heck is going on inside the machine (as it seems they want to do) is Bad and Wrong.
Furthermore, the choice of Python because it's "easy on the eyes" and has "simple syntax" is questionable: Python has its own quirks and weirdnesses that make it just as bad as Perl/Tcl/whatever.
Programming is *not* about languages. Programming is about problem solving and algorithm creation/manipulation. Once you understand these ideas you can learn almost any language and implement them. Granted, there are are a few different programming "styles" available (imperative, applicative, declarative), and learning to translate your solution into those molds is important, but understanding the basic problem-solving and algorithm manipulation *must* be done first, before any actual "coding" begins.
I beg to differ, but will present the exception first. When in Elementary school in Saudi Arabia (an American one) we used to have Arabic classes. I was doing quite well in it, but in third grade it got pulled permanently from the curriculum because of parents going to the PTA. My Arabic now consists of a 20-word vocabulary.
When I was in 6th grade, I started learning French. I was fluent by 11th grade. However, since I'm no longer taking classes in it, it has dropped to a conversational level, even though I'm living in Quebec. The only languages I only remember basic phrases like "Hello" are those I asked friends how to say them in: Russian, Italian, Spanish, Japanese, Cantonese, and so on. I will admit, the Junior High level stuff didn't really stick too well, but the High School stuff stuck like glue.
By weaning people on Python or any single language, many people will only use Python for the rest of their lives. Python is a good language, of course, but has its limitations. Also, these people will only be able to modify other Python programs to their needs, and would just shrug their shoulders at the vast majority of code written in C, C++, Perl, and other languages.
I started learning computer languages in University. I took the Intro to CS course over the summer in just two months. We started off with Pascal, and then in the last two weeks learned C. The Pascal was, to put it not too bluntly, very easy to learn -- the hardest part was learning pointers (wasn't until 4 months later that I finally mastered them). Yes, I found the C difficult to learn then, but since I needed it for a class the very next term, I found I was able to cement it in my mind. This next class I've mentioned also taught us MIPS Assembly. I'm now learning C++ and the whole idea of OOP in about three days for another course, and am actually finding it quite workable.
I don't translate my C/C++ thinking into Pascal just because that's what I first learned. I learn the other languages to the point where I think in them. If anything, I think of my Pascal/C/C++ in terms of Assembly, which I find to be a much healthier approach.
What I'm saying is: sure, if you're not gonna do a good job teaching any of the other languages, of course the kids'll translate back to Python. But they do need an introduction to the *feel* and *style* of programming. And then, if you do a decent job with the next languages, the kids'll think in terms of them, too. They'll be able to look at a problem and decide which language would be best to solve it, and that's what we're trying to breed here.
Droit devant soi on ne peut pas aller bien loin...
Droit devant soi on ne peut pas aller bien loin...
Straight ahead of him, nobody can go very far... -- Le P
I like Matlab but it's a great math language, not a great general purpose one. For example: the way it handles strings as arrays is not nice. I haven't got into the 5.x constructs though.
One thing I always loved about matlab was multiple return values from functions. Are there other languages that do this? (I know, call by reference will do this).
Maybe so many years of coding have made me biased, but the few times I have had to help some friends with scheme did not made me appreciate it a bit.
In particular I found the syntax got too much in the way.
From what I gathered in the comments (have not read the article) this is for intro to programming and most likely won't get too much into complex issues. Syntax can aid or be an obstacle. In the case of scheme and the C family of languages for that matter, syntax seems more of a roadblock than an aid.
I think we should all have understood by now that the criteria by which people assess the quality of a programming language/tool are mostly wrong. The worst of which are: bit-level performance and object orientation.
/.ers seem to dislike Visual Basic. There can only two reasons for this: a deeply rooted hate for Microsoft, and pure ignorance. There may be a lot of things that can be done better in VB. However, VB and Access have quite a large amount of self knowledge. You may, for example, ask most classes, in code, what their properties are, what their methods are, and what their parent class is, and so on. C/C++ not only lack self-knowledge, even worse, these languages require you to code details that are of no interest to problem at hand. C/C++ is for people who don't understand programming. What is programming? It's rather simple: A is the amount of time you have, and B is the result that you need. If you then chose C/C++, you should go and see a shrink.
Bit-level performance is a non-issue for most programmers. The operative word here is "most". What do most people write anyway? Well, just look at who is paying most programmers: corporations. What do they need from programmers? Programs that run their business, that is, programs that help with order processing, manufacturing, payroll, accounting, and so on. Most of these programs spend 95% of their time in larger frameworks that manage the databases, the GUIs, et cetera. Therefore, your language of choice may be fast or slow, it won't make any difference. If you want speed in these applications, chose a fast database, a fast GUI framework and fast, other supportive components.
Object orientation is another one of these miracle cure-all solutions that almost never work, even though no one will openly admit it. By modeling business apps as objects, you will not only lose a lot of time, but, even worse, make your applications much less maintainable. Why so? Because the complexity of business applications is in their data, and the only thing you will do by modeling business applications as object frameworks, is to replicate this complexity once more in your object classes. And then you will have an extra chunk of code to maintain, when you change your database structures. Next to your database design, your GUIs and your batches that you need to maintain, you will need to maintain the so-called business objects. These business objects "know" your data structure, and, therefore, have to be informed of changes in it. The duplication effort is ridiculous and only pays off in wasted time.
The whole concept of business objects is a laughable hype. Quite naturally, the more someone is ignorant and incompetent, the more he will jump from one hype to another, trying to use the latest fad, and miserably fail. This is normal, because the only way incompetent people can judge a technology, is by hyping along with the rest.
I didn't say that object orientation is a bad idea altogether. I've said that it is of no use in typical business applications, and even dangerous.
What is a true criterion for quality in a language/tool? Well, as ever. It's definitely not new. Read the classical Greek literature for the source of true wisdom. A language/tool is of high quality if it has a high level of self-knowledge.
A relational database is a great tool, primarily, because of its self-knowledge. You can ask it what tables it contains, what relationships there are between those tables, what columns they contain, what datatype they have, and so on. You don't need to enumerate all fields in a particular table in your program. You may prefer to work at a more abstract level, and define rules that work in general, and only mention the exceptions to the rule. Therefore, You may manage your code by exceptions, instead of replicating knowledge all over the system, and create potential for inconsistencies.
Most
...C++ would be the perfect language.
I go to a fairly good school, with about half the kids taking at least 1 AP class and our academic teams going to state / national competitions. Our technology department has a large gov grant and every class room has at least 2 computers and the computer labs have 20 celeron 433s each. (while nearby schools only have 486s)
:)
Unfortunately, our CS courses here suck like *beep!* CS / CS Honors / AP CS are offered here. CS doesn't actually teach programming and all kids learn to do is make webpages using netscape composer and adding little animation and crap by stealing javascript codes and images from other sites. CS Honors teaches a little bit of C++ to prepare kids for AP CS. But AP CS is a joke and we ended up with 67% of the students failing the AP test. (I got a 5 of course...)
Anyhow, I blame the teachers for this. None of our teachers are real CS people. The CS/CS Honors teacher used to be a math teacher while the AP CS teacher used to be a physics teacher. Either one of them knows anything about computers and if you ask them what PERL is they'll tell you it came out of an oyster.
Well, our CS classes are going nowhere, if someone is a real programmer and is willing to teach... perhaps you should come and take over... we have a lovely school and lots of technology waiting for you!
_______________________________________________
There is no statute of limitation on stupidity.
Please remember that the point of this proposal is not to churn out programmers who can write CORBA applications, or add to the Linux kernel. This proposal's main purpose is to raise computer literacy, which includes the ability to understand the very basics of how a computer works, and how to make modifications to existing applications. Hopefully this education program will also help future systems programmers and computer scientists get a head start, but I will address that issue later in this comment.
I believe that having lots of programmers who can modify and extend applications is a good thing. Yes, most people will not be good programmers, but this program, if implemented well, will give people the skills and tools to make real contributions to our software that we might not even be able to conceive of right now.
Raising computer literacy will also help in discussing and deciding technology issues as a society, especially as government establishes a larger role in privacy, security, and censorship across the internet.
I have read many posts questioning Python as the choice for a first language. How many of you first learned Basic, then went on to learn C, C++, assembler, and other languages? Did Basic really impede your development as a programmer, and do you really think that Python would be worse as a first language?
My point is that future hackers will learn to use other languages, even if their first language is not C++ or Java. I learned Basic in high school, then Scheme, C, Lisp, and assembler (MIPS) in college. I somehow doubt that learning assembler was made any harder or easier by learning how to program Basic on a Commodore 64.
One previous poster made a very good point that high school should be for learning basic skills such as reading and writing, and not for vocational skills. If done properly, learning how to program can teach one how to think logically, communicate effectively, and organize information in a coherent manner. In order to motivate students and give them positive feedback, it may be necessary to give them work that produces something that is useful, or at least works. I know that it was frustating to only be able to print "Hello world" when I was first learning C.
This is why a user friendly development environment is vital for teaching programming to everybody. On a related note, does anyone have anything to say about the DrScheme? This is a Scheme development environment for beginning students. Is Guile a useful thing for DrScheme, or are the two things irrelevant?
I agree that scheme is a better first language than Python. That is not to say it would be the language of choice for many tasks; but it would be the language of choice for teaching.
I recommend the book by Mark Watson, "Programming in Scheme: Learn Scheme Through Artificial Intelligence Programs". (It is not on Amazon right now, but I have seen it in SoftPro and MicroCenter bookstores. You might look at http://www.markwatson.com, but I think that the stuff he used to have there (scheme code from the book) is gone now.) If I were teaching a high school or Junior High level class, I would take this book and the "Structure and Interpretation of Computer Programs" by Harold Ableson, and use a mixture of those two for two to three months.
Then I would switch to another language. I think you can learn enough scheme fast enough to do interesting things before the semester runs out (the Watson book is just awesome at this), and I think the intellectual stimuli from being forced to the same or similar problems in different languages is just too valuable to pass up.
I'm not sure what the second language would be. I might let the kids pick for themselves -- either do a small project in a new language, or a larger one in scheme, for a final project.
I'm quite sure that if C was the only language available to me when I was starting out, I would have never become a programmer. As a beginner, there is simply no way that I could have started out if I first had to learn about physical things like memory management, library functions, the preprocessor, include files, and so on. Even having to write "int main..." or run a compiler to get my program to wrok would have hindered me. As a beginner, the focus should be purely on LOGICAL concepts.
Now, I was only 6 or 7 and couldn't read well enough to understand a programming manual. People beginning at an older age would be able to handle more complexity. But still, even at the high school level, the focus for beginners should be on the logical aspects of programming. A beginning language should allow the student to do useful things with as little overhead as possible. Python from what I've seen of it seems to allow this (Perl, C, and so on certainly do not).
One of the biggest problems I see in other young programmers in the industry is that they've become TOO aware of things like memory management, C library functions like strcpy(), etc. I think this is at least in part due to the fact that they've ALWAYS had to deal with these things when writing code. At the company I worked for this summer, I saw several older, full-time programmers whose code was littered with mistakes:
- Their high-level C++ code was littered with new and delete when they had no reason not to use auto or reference counting pointers.
- They wrote their own linked list implementations when they could easily have used an STL container class.
- I saw them produce object oriented designs that were basically just procedural designs with the data partitioned into objects. A very expensive mistake.
- They used inheritance for the sake of code reuse, resulting in improper inheritance.
- They had Get/Set methods all over the place.
- They used C-style strings all over the place instead of std::string or some other string class.
The end result was code that was more complex than even the equivalent non-OO procedural code, and MUCH more complex than a proper OO design. These problems seem to be most common among programmers who were trained as engineers. Computer Science majors usually learn many languages and won't be used to solving the same problem the same way all the time. Engineers at most universities I'm familiar with use C and C++ pretty much exclusively. I think focusing on teaching purely C or C++, especially to beginners, is a huge mistake.I think programming is very appropriate for H.S. H.S. should be a place where you get some exposure to a variety of topics to help you choose a specialization (maybe) later. When you learn programming, theory is nice, but you must be able to produce a few actual programs to get that thrill of having produced a program yourself. If it leaves you cold, or it's only so-so, then that's one thing. If it rings your chimes big-time, you may be off on an important new adventure in your life. H.S seems like a good place for this to me.
Didn't Yahoo write their web server from scratch using Python because it was so effective for handling the load? I've seen a lot of comments about Python's "use in the real world" and it doesn't get much more real than what www.yahoo.com faces.
---- Please be nice in case my Slashdot karma ~= my real life karma.
Python's worst feature, in my opinion, is its half-baked approach to variable binding. Scheme and Lisp programmers have lexical binding (variables are looked up in the defining environment), and even Perl has this (`my' variables). Basic and Emacs Lisp programmers have dynamic binding (variables are looked up on the stack at runtime); Scheme, Lisp and Perl can use this (Perl via `local' variables).
Python has neither. Well, it has lexical binding, but it's "shallow", meaning the variables aren't looked up in surrounding environments. So you can have a closure, but you must explicitly import (via optional arguments, "n=n"!) variables from surrounding scopes. This is No Fun (tm).
Perl may have much syntactic ugliness, but at least it gets variable binding right.
2 dashes and a space, or just 2 dashes?
I'm sure that it's valuable to teach kids Python, and many will enjoy it greatly. A good thing for sure.
But I am already awestruck at the horrible lack of foundation many highschool students graduate with. I personally know a college student (senior year) who never learned their multiplication tables. Good thing for calculators! I'm sure the lack of attention to spelling and grammar is also apparent to many slashdot readers.
The way many primary and secondary schools handle math education is another bar to continuing in either math or computer science. Mathematical fields outside arithmetic, basic algebra, and calculus get very little attention prior to upper division college courses.
I would like to see a class or series of classes that taught logical thinking, problem reduction, mathematical modeling, and computing in an integrated fashion. As well as programming as a means to solve problems, part of this could be writing documentation (with a word processor, naturally.)
It's my belief that if you can teach people to think logically, and express themselves clearly, they can pick up any computer language they desire. Even if they don't, those skills will still serve them well in other fields.