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.
My big complaint with PdoxDOS, and most any language is the default variable scope. Everything was global unless declared local. Good grief, did that lead to trouble. Variables should always be local, and declare the one or two, mostly for value passing, that must be local. Who can keep track of them all?
1) Python also allows coding in OO style (and most Python programs do use OO and the standard classes), it just doesn't enforce it. :)
2) Do we really need to start little kiddies with objects?
3) Python builds things into the language that are a minor pain to deal with in Java, such as lists and hash tables. Yes, every programmer should be able to implement them, but beginning programmers shouldn't have to deal with that stuff straight off!
4) A good programming course should leave the students able to pick up another language easily, *at least* from the point of syntax. IMO the hardest thing for Java programmers moving to C++ to grasp is probably memory management -- something that Python will also give them headaches about.
5) Not everyone needs to learn C++
Daniel
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
Generally you need more Java code to do the same thing as some Python code (or more Java compared to Lisp, Scheme, Smalltalk, for that matter). /etc/passwd, parsing it, and then printing the users sorted by uid and printing them also sorted by name, would take about 10 Python lines.
For instance reading
Challenge: try to do as short with Java.
Bahh, point is who fucking cares? So what this kid learned a couple programming languages at a young age. Can he really program? Has he done anything?
Not only that but the kid looks to be a majorly antisocial, talk in C++? Wow that boy needs some education.
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.
well, that's exactly what we are doing in france i started a course of CS today, and (blam!) 4 hours of introduction to ada to start the day, and latter in the year C++ I personally think ada is a great langage. vivien
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
Track back to page 1, look for a thread subject titled "Sounds Good". Decent sized thread. At UCSD they use Java as the first CS class for CS majors, and at the beginning they tell students to just accept public class (classname) { as not to think about it so that they don't get confused by OO at start.
> 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.
I agree. I absolutely love the language, but the lack of closures drives me crazy, especially since it provides 'lambda', 'map', 'filter', and 'reduce'. Having programs crash with a NameError because 'map(lambda x:self.get_entry(x),lst)' doesn't know about self is no fun :( :/ Personally I think Scheme is a better language for beginners, but I guess they wanted something with practical applications. (a common mistake IMO)
(Usually I call the resulting function 'evilnastyhack()')
Anyway, though, I don't think beginners are likely to be doing this sort of stuff a whole lot, and they can use weird nasty hacks if they have to
Daniel
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.
I've been learning Python under Windows and haven't found anything that wouldn't run unless it was explicitly OS specific and I've found very little of that. That's one of the nice things about Python, it's very portable.
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.
SQL isn't programming. I do SQL, so I know first hand. SQL:DBMS :: Command Line:Linux (sort of) you can do programming LIKE things with both SQL and shell commands. but i wouldn't call it programming. i agree that giving people a greater sense of the power of the typed command is a good thing and that everyone should be taught this in school much like being taught a human language. programming is a TOTALLY different envdevour. think of it this way (i take it you are a DBA?): how many of your now-empowered SQLers would want your job of designing complex databases? how many could actually do it w/out getting completely bored/frustrated/annoyed? interface interaction (SQL, CLI, GUI...) is NOT programming.
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.
It is practically impossible to teach good programming style to students that have had prior exposure to BASIC : as potential programmers they are mentally mutilated beyond hope of regeneration. [E.W. Dijkstra]
On COBOL:The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense.[E.W. Dijkstra]
ACwell here (in france) we are starting by ada, and later c++
I don't know. These are guidelines you'll encounter almost anywhere that you talk to computer people. IMO, though, it's more of an aesthetic sense than a set of rules; I didn't really get the hang of this stuff (assuming I can be said to have now) until after hearing these many times, going off and doing things my way, and ending up with huge buggy inflexible gobs of code. Trial and error :) I'm sure there must be a shortcut, though.. Daniel
"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.
Shudder...I despised scheme but I guess that was some time ago and now that I look back, it was a very simple language. Here at U.C. Berkeley the introductory course is taught using scheme by Brian Harvey. It's called SICP (Struture and Interpretation of Computer Programs) which was a class named after the book by Abelson and Sussnan and derived an MIT course. I didn't particularly enjoy the experience because I saw nothing but parenthesis and it didn't have much to do with making shrink wrapped software but sure I learned a lot about computer science in general. Having gone through several years in Berkeley CS I think SICP was a very valuable class giving an insight into data structures, running time analysis, functional and data abstraction, recursion, memoization, concurrency, programming languages, and so many things I learned in other classes. As far as pre-college education is concerned, I don't think learning C/C++ is so critical. Most people here picked the language up in 2 weeks after having learned Java. Logo is the language of choice for grade school students. It's just too bad they no longer use Logo as a result of educational CDROM packages which have little or no pedagogic value.
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
That's why you shouldn't try to write closure-style code in Python. Using explicit imports is then considered as a feature: since you are expected to do this rarely, a big "WARNING WILL ROBINSON DANGER DANGER" in the form of explicit imports is considered helpful.
FYI, I often use Python, but rarely need explicit import. Most of my code is in objects anyway.
Perl may have much syntactic ugliness, but at least it gets variable binding right.
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.
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.
window=gtk.GtkWindow('Hello')
button=gtk.GtkBu
window.add(button)
button.connect('cli
button.show()
window.show()
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.
It could be true. netcraft says they're running "unknown" on FreeBSD (high profile poster child for FreeBSD). But is the language really responsible for handling the load? It would seem to me language is almost totally irrelevant. It would just mean python has a good compiler and the people who wrote it knew how to write web server using python. I'm sure you could get some people to put together a webserver in x86 assembler (heh) that would handle load as good or better than a python one.
But the point still remains (if the claim is true), python IS used in the real world.
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???)
FWIW, Python's original name was ABC, as in "as easy as"...one of Guido's design goals was that it should be easy to learn and non-idiosyncratic, good ones to have in a first language. I don't have a lot of heartburn with this choice.
--
Disinfect the GNU General Public Virus!
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
Is one class per file really bad? I guess it would be better if you let people have multiple class defs in source, but compileed to separate class files.
And, do java.util.Hashtable and java.util.Vector count for anything?
What about GNU Smalltalk, the educational/non-commercial version of VisualWorks, or, better yet, the open-source Squeak (http://www.squeak.org/)? Sorry, but Smalltalk, at least in an educational setting, isn't any more expensive than any other language.
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
Actually, my high school programming class did in fact cover recursion, hash tables, trees, and some simple sorting. In fact, that was pretty much all I learned out of the whole year :-(
BTW - Python is probably not as good as Scheme for beginners, but it's only slightly worse in my opinion.
Daniel
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.
It was something like 10 programmers per computer in the 1950s, to about one programmer per 100 [general purpose] computers now. Why make everyone a programmer?
Python has these features, as do Perl and Tcl.
Actually, I'm not sure what your point is.
Well, I think students should be given programming as an "elective". I had no such electives in HS. Maybe there are some people who can't afford a computer, but want to learn how they work, so they take this "elective" in programming. As in, everybody doesn't have to learn to program, but give those who want to a choice. But, we do need good/better teachers, who teach because they WANT to.
failed for making a program too small? Funny.
In HS one of my friends helped a student cheat in typing class (sad, isn't it?) because the computers were networked 286's (running the greatest DOS word processor EVER, WordPerfect 5.1, over the network). All he did was put his file in another students directory on the network drive, and the other guy opened it to show the teacher. I dunno if the teacher if knew it was possible.
If they taught Assember as a first language, think of how great our programmers would be....
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.
Start with the basics! Get a feel for the hardware under the software....... Seriously, best class in programing I ever had was a lab that taught 6800 assembler. Ran on a box attached to a Dec Rainbow (LM something). A very clean chip/assembly language for beginners. Great for teaching all sorts of computer concepts. Did a lot more for me than learning buble sorts in basic in 11th grade.....
More precisely Scheme, an object-oriented LISP in Course 6.001 required of all computer majors (about 1/3 of MIT's enrollment). Most of the other engineering departments teach more "practical" languages such as Java. This debate between pedagogics and practicallity has been going for at least 28 years since I took the course.
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.
Well, if he wasnt ignorant he wouldnt have to ask questions, would he? Why dont you try to answer his question instead being an ass..
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.
'...most people can change a tire, the oil, even do minor repairs. How many people can rip an engine apart and put it back together?' But no-one is suggesting that they need to be able to write their own operating system or anything. Just that it would be good for them to at least know what a program is, how it works, and so on. Who knows, maybe some of them can even use this stuff -- just yesterday I wrote a program that can serve as an electronic diary. It took relatively little code and nothing particularly advanced -- each entry is stored in its own file. I wrote it in Python; the 'core' of the program is probably a few thousand lines (there are 10000 total, but there's a lot of commenting and extra features that I put in for the heck of it). This might be a stretch for non-CS types -- but I think they could handle it, and it would be useful to them. Even simpler things can be quite useful as well -- even just a script that automatically handles incoming mail (Python's mail-parsing facilities are exceptional) and does stuff with it. Anyway -- I seem to be losing focus here :) Basically I think that it *is* useful for people to have basic competence with stuff like tires and simple programs. Daniel
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.
25 years ago Basic was a big step forward and it taught a lot of people how to program. By todays standards it reeks. Someone should start over, take the original goals of Basic, add modern code/data structures and invent a new beginers all purpose programming language.
Aww, the poor widdle high school students think C++ is too hard...boo hoo. What purpose would it serve to teach everyone in America Python, or any amount of computer programming for that matter. I'm already being told that I'm too late to get a good job as a programmer, because now everyone is switching to CS from other majors. So I busted my ass for four years teaching myself C/C++ from wretched books, and because I was born too late I find my future profession deluged with people who don't know a pointer from a breed of dog. Seriously, this is my fourth semester of CS, and right now they're trying to introduce C++ to these poor souls...I just sit there in class bored to tears and occasionally correcting the professor when he messes up a portion of code. Blech.
I'm sorry if this sounds rude, but it's the honest truth. I may not be particularly nice, athletic, or socially adept, but I think I can code better than my peers.
-W.W.
Posted anonymously due to being locked out of my account and Rob not answering emails.
http://www.rit.edu/~waw0573
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
That's not exact. Turing machines have an even simpler syntax ("0" and "1"), and are clean and consistent. But they are unusable. What you need is a language that where the basic individual steps of your program are easily implemented.
One pratical example where Scheme syntax is simplistic is OO (in pratice you have to name the class, method and instance at each method call, not fun at all).
A problem I see with Scheme is that it uses very abtstract concepts such as "lambda" (returning, storing functions in variables, along with apply and map), but maybe 8 year old children can cope with this.
I keep forgetting that /. doesn't default to Plain Ol' Text for AC posts, and that I'm not using my account atm :)
Daniel (formatting correctly this time!)
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
I think it's worth pointing out that "print 1,2,3" will produce the output "1 2 3" in Python :) (note that you can also get more controlled output using sys.stdout.write('1 2 3') but print is a good thing for beginners and quick/dirty debugging outputs :) ) Daniel
System.out.println(a, b, c); wont work because the method can only take one arg. But, if you have: int a=1, b=2, c=3; System.out.println(a+b+c); produces the output: 6 But if you do this: System.out.println(""+a+b+c); then you get: 123 Its whats called "syntictally left-associative", aint java fun? :)
Well actually Guido is the Python language initial author :-) I guess you won't see often Larry Wall advocating Java, or Bjarne Stroutput(sp?) advocating Lisp...
Note that many compiled languages are as nice as Ada95 (Eiffel, or even Fortran90 to some point). In fact any compiled OO language should be much easier and comparable to Ada95. For some reason, it is always the worse language that wins (COBOL, FORTRAN, C++).
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.
...for us non-coders (read: humanities students) who are looking to break in? What you guys described sounds pretty akin to what I'm looking for....
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.
...Discrete math? It teaches you to think logicaly and EVERY problem you encounter in the class is "real life." My brother took it in HS...stupid charter schools get the best classes... Any way..my local university offers Discrete Math..and I'm going to take it. As for poking fun at people who don't memorize multiplication table...THERE ARE OTHER WAYS OF DOING MULTIPLICATION QUICKLY!! Memorization is crap learning...problem solving and logic is when you really learn.
I don't understand why (you probably mean statically typed, you can't add a string and a list in Python either).
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.
Well that's why there is JPython (a Java implementation of Python), so that among other things, you can test your Java objects in with short edit-test-edit-test cycle. You can write Python code running on most Java implementation and interacting with its objects ! (isn't what C++ is achieving with C ?).
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.
Don't go trying to argue that Python (the language) is "better" simply because it has a better set of basic libraries that make certain tasks easier. The language doesn't make it easy to parse the password file, the helper libraries do. Java could probably do the same. If you're saying that Python is the better choice or more useful because these things are easier BECAUSE of a good base of nice libraries, then say that. But don't give credit to the language because you can call a few functions in 10 lines of code to accomplish some task, when your program is just calling out to great big modules that actually handle all the real work. Not that I don't think Python is a better choice for education. Dynamically typed languages make it infinitely less frustrating for students. Plus, if you have an idea for a program that requires little less than lumping together of other components, Python (and all it's handy modules) is perfect for that.
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? :)
excues me... noone under 18 would be able to understand polymorphism or encapsulation? wtf? gimme a break.... I'm 16... and understand it just fine thank you!!! age isn't everything you know
I know at UCSD, they recently switch the first CS class for CS majors (and EE majors) from C++ to Java. So Java was the first (and only) CS class I took (of course, I had already taught myself the basics of C). I found that Java was a pretty good language to start, but I wasn't a TOTAL beginner. Also, one of the professors (Dr. Savitch) wrote simpler input routines for the class (to go along w/ his book) so students could use simple input into their programs. Thinks I found: Java really makes you think OO. And, all the crazy keywords (like public static void main(String[] args) we were just told to accept and ignore in the beginning, which I had no trouble with.
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
Here's another new programming language which would is great for both beginners and seasoned professionals. It's called Rebol.
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;
};
From what I've read and from looking at Python,
it seems like a good choice, except for one detail: the use of indentation to define control structures.
Indentation is a problem because the tab
character means different things on different
systems. Mixing spaces with tab characters can
thus lead to confusing error messages (if you're
lucky) and incorrect results without having
visual indication why. For instance, given:
f = open ('cookbook.data1')
LoL = [];
while (1): """ #3 """
line = f.readline() """ #4 """
if not line : break """ #5 """
LoL.append (string.split (line)) """ #6 """
printLoL ('read from a file: ', LoL)
the following results can be seen:
* the program will work if #3, #4, #5, #6 all use
tabs or spaces
* the program will give a strange error if
effectively (at the compiler's tab settings)
#4 and #5 are not indented wrt #3 (actually
we may simply get bad results if we're in a
nested loop...)
* the program will give incorrect results if
#4 and #5 are indented wrt #3 but #6 is not.
This sort of syntactic/semantic error would
really confuse the newbie.
Also, with Perl/C++/Java/Basic, it's possible to
write a pretty-printer if tabs get out of whack.
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).
> 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.
How can the syntax of Scheme get into the way? It *has* no syntax! Look, here's a quick definition of Scheme (there are a few extended things but this is enough to get you started. Well, maybe not. )
:) All the parentheses are just list boundaries; not that each special form has its own syntax, but each also just relies on lists, reducing the number of weird syntactic entities.
Basic data types: boolean ("#t" -> true, "#f" -> false), integer, float, string, list (I lie, it's cons, but this is OK), symbol (a variable name), 'special forms'
Lists consist of two parts: a 'car' and a 'cdr'. 'car' is the first element, 'cdr' is a list with the first element removed (think box-and-pointer..)
The interpreter proceeds by evaluating expressions. Literals (strings, numbers, and booleans) evaluate to themselves. Symbols are 'bound' to values (like a variable definition); they evalute to their value. Lists are evaluated by first evaluating the first element of a list. If it is a procedure, the remaining elements are evaluated and passed as arguments to the procedure; the value of the list is the procedure's return value. If it is a special form, the action depends on the form:
-> 'if' - the next element is evaluated; if it is true ('#t') the third element is evaluated and returned. Otherwise the fourth is.
-> 'define' - the second element, a symbol, is bound in the global namespace to the value of the third element (after evaluation). So '(define a (+ 3 2))' results in a==5.
-> 'lambda' creates a procedure. (lambda ARGS BODY). ARGS is a list of argument values, BODY is the procedure body (one or more expressions). When the procedure is called, the symbols in ARGS are used as temprary variables and the expressions in BODY are evaluated one by one; the value of the last is returned.
-> 'quote' takes a single argument and returns it *WITHOUT EVALUATING IT*. This is very important. "(quote (+ 2 3))" evaluates to "(+ 2 3)". This can be abbreviated as '(+ 2 3) -- that is, by putting a single quote in front of the expression to quote.
Some basic procedures:
(cons CAR CDR) creates a new list (actually a new cons cell, but often a list) from two values
(car LST) returns the car of a list
(cdr LST) returns the cdr of a list
I think that's the core syntax of Scheme, right in front of your very eyes
Daniel
I doubt that I'm a good example but, I learned at a really, really early age, around age 6.
my first language was BASIC on a old Texas Instrument that was as old a I was when I got It.
Infact I had more interest in learning various programming languages then I did in perfecting my
english, which is still really bad, but on the other hand I can proggram in about 9 different languages now. After all you just did not get
the same stimulation writing in english as you did programming.
But as far as a normal child by the time they hit the 5th or 6th grade they should be able to pick
up a computer language. Infact most kids I know in that age group are very Interested In that sort of thing.
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/
Can anyone explain to me why the hell the military should be designing high school curricula? Regardless of the merits of the project itself, why should tax money be spent to fund it? It sounds to me like another post-Cold War budget justification.
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.
you make a good point, however... PE isn't a very helpful class yet they make you take 3 semesters of it (where I am). AND health is a blow off class and you have to take it. So if your gonna have these other classes that really aren't important you might as well have an elective that teaches you SOMETHING useful (i.e. you dont sit in the bleachers the whole period listen'n to yur cd-player and talkin to freinds because your coach gets paid the same amount whether you do something or he just reads the newspaper).
I like turtles.
- Smalltalk has been used to teach programming to kids and that works.
- Smalltalk is pure: *everything* is an object.
- Smalltalk is available in free, commercial and non-commercial versions (squeak, VisualWorksNC, many more...)
- Smalltalk comes with an IDE, no stupid edit/compile/test cycle for the entire source, no switching between editor and app, you can even change a Smalltalk program *while it's running*.
- OO companies love to see Smalltalk on your resume.
- A lot of Smalltalks are binary compatible across platforms.
- Add-ons commercially supported (OOdb, distributed Smalltalk, versioning systems, connectivity to legacy systems, web connectivity etc. etc,)
- see also:
- news:comp.lang.smalltalk
- Smalltalk FAQs
RIncremental compilation is a big boon to rapid prototyping, I won't explain, you have to *feel* it.
-
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)
Except you just added a perl regex to your reply, so much for 'everyone should talk in C++'
;->
The way you've spelled (or rather mispelled) Yugoslavia makes me agree: The American educational system sucks!
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?
> 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
Hi -- I am from South Africa, so other here is my opinion at face value on US CS education -- it sounds like the US education system as a whole is not teaching people to fish any more, but rather catching their fish for them. It is not important what language you learn to program in, but rather that you learn to take real world problems, creatively find solutions and turn these solutions into algorithms and translate these algorithms into a language that best suits a particular application. I know this is the larger aspect of programming, but in essence, instead of focusing on finding a "computer language" to solve the "grasping of computer languages as a whole", rather focus on the creative problem solving and algorithm creation. If people were not grasping how to speak English in the US, would the US change the official language to French and make that compulsory as a language to understand all other languages implementation simply because it has less idiosyncrasies. But, hey, I am a South African -- what do I know...
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++.
Do you really want to inflict X on beginners? The ONLY graphical programming I've done is w/ java.awt and java.awt.event (that's the 1.1.x). I didn't find it that hard, but my prof said that the java.awt is a LOT easier than other systems he's used (he said the same about the java.lang.Thread class). From what I hear about Xlib/Xt, Java would be a better choice for a platform independent graphics API.
I don't know how much of that document you guys read (or if you read it at all), but they said that they were planning to create a 3D ENGINE, or at least use some kind of API developed by the project. So now we're going to have a bunch of high schoolers (or whatever) running around claiming that they've written games better than quake in a language written for newbies, without even understanding the inner nuts and bolts of the process which goes on. Programming was not meant to be easy or 'accessable' to everyone. If it was, then just anyone would be doing it right now. I started programming logo in the 2nd grade, and when i was 11 took an all day (excellent) course (9am-9pm) on qbasic for two weeks called ACE. Then my middle school forced us to learn pascal, and after a year of that, i found how much better C was and stuck with that for a year. In the years following, I learned visual basic, c++, java, and perl, and never found them 'hard' to learn. I suppose the bottom line is that I clambered over a bunch of languages in the beginning that were useless. I really much would have spent the time I spent learning logo and qbasic on learning c++ and java. In other words, I would rather have spent 5 years (or whatever) studying c++ and struggling, than wasting 5 years on a bunch of other programming lanugages that were useless (logo, qbasic, etc...). And, now with the advent of this 'new easy language', I think they're simply reinventing the wheel. Qbasic is plenty easy enough for anyone. So where does my frustrations with the 3d engine come into this? It's as if they're trying to use it as a peice of candy to get kids to program! I'm sorry to say it, but programming stems from the intellectual interest in logic and science, and soforth. Not everyone likes it! Programming is not for everyone, as is linux. Linux was not meant for the 'average user', it is meant for those 'few good men' who need its power and can understand it properly, and have the desire to use it. You must endure the difficulties and the struggles that occur with languages like C when you first start. We can't baby our future programmers. that's all folks.
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.
I don't know how much of that document you guys read (or if you read it at all), but they said that they were planning to create a 3D ENGINE, or at least use some kind of API developed by the project. So now we're going to have a bunch of high schoolers (or whatever) running around claiming that they've written games better than quake in a language written for newbies, without even understanding the inner nuts and bolts of the process which goes on.
Programming was not meant to be easy or 'accessable' to everyone. If it was, then just anyone would be doing it right now. I started programming logo in the 2nd grade, and when i was 11 took an all day (excellent) course (9am-9pm) on qbasic for two weeks called ACE. Then my middle school forced us to learn pascal, and after a year of that, i found how much better C was and stuck with that for a year. In the years following, I learned visual basic, c++, java, and perl, and never found them 'hard' to learn.
I suppose the bottom line is that I clambered over a bunch of languages in the beginning that were useless. I really much would have spent the time I spent learning logo and qbasic on learning c++ and java. In other words, I would rather have spent 5 years (or whatever) studying c++ and struggling, than wasting 5 years on a bunch of other programming lanugages that were useless (logo, qbasic, etc...). And, now with the advent of this 'new easy language', I think they're simply reinventing the wheel. Qbasic is plenty easy enough for anyone.
So where does my frustrations with the 3d engine come into this? It's as if they're trying to use it as a peice of candy to get kids to program! I'm sorry to say it, but programming stems from the intellectual interest in logic and science, and soforth. Not everyone likes it!
Programming is not for everyone, as is linux. Linux was not meant for the 'average user', it is meant for those 'few good men' who need its power and can understand it properly, and have the desire to use it.
You must endure the difficulties and the struggles that occur with languages like C when you first start. We can't baby our future programmers.
that's all folks.
The language must have logic (do loops, ifelse), user interface (windowing, user programmable buttons), connection to a database, and it MUST include a math package of great accuracy.
Beginners can't, and business users don't have time for the UNIX way of doing things. It must all be there.
Look at the packages that have succeeded. DbaseIII and all of its many clones, Paradox procedural(DOS). Paradox object (Win) was a miserable failure because nobody could get the hang of it. Turbo Pascal wasn't very popular in business because it required too much cobbling.
None of these come close in popularity to the most widely used database and programming language - it's the Microsoft Excell spreadsheet. 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.
Think about it.
TheGeek
http://www.geekrights.org
TheGeek
http://www.geekrights.org
Kill the monkey
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
Programming does not require extra intelligence, at least according to Psycologists. Just to prove the point (and w/o mentioning names) some of the best programmers I've known are just plain dumb and naive in many other aspects of life. This is not about intelligence or I.Q.. It's about capabilities and tendencies of reasoning. It is well known that some people are capable of reasoning using "big pictures"; they can't handle small details at once. On the other hand, there are others who work better from a bottom-up approach. Computer Scientists and many Mathematicians falls into another category in which the individual is capable of doing a sort of "multi-dimensional" reasoning where they are capable of going back and forth from top to bottom at multiple angles or "views" of the problem at hand. I cannot remember the names of these "reasoning" categories, but somewhere I read that only 1 out 4 (or 5?), is apt to do the last reasoning scheme I mentioned (perhaps was in Scientific American or on a ACM magazine-can someone give me a hand on this one:)
These different modes of reasoning have no direct dependency with the individual's intelligence, and they appear on individuals working in disparate activities from Math to Business to Music. In fact, "multidimensional reasoning" is not an strict requirement for doing programming at all; it just eases the learning process. An individual's intelligence cannot be measured just based on his/her reasoning mode, but on many other factors. It's not as simple as "I program -> I'm smarter". It doesn't work that way. At least that's what I learn in my Psycology courses (unless of course, Psycology is wrong, and CS intuitive pride is right - just kidding;)
Luis Espinal.
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!
VB is a compromise that works fine for typical custom apps that manages typical business situations that you will find in the average company. I may remind you of the fact that 95% of the man-hours spent on programming are indeed in this kind of projects. When you use VB for this kind of apps, you can't beat its productivity. Java is a radical dictat consisting of number of irrelevant dogmas about programming, that hold true for a limited number of situations, but mostly not in the situations mentioned above. This langguage was invented by people who have never set foot in the offices of an average company, who are trying to force people around the world to waste substantial amounts of time, by raising issues and conditions that hardly ever apply.
{
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...
I was curious so I looked in on some Scheme sites. To my untrained eye, Scheme looks like LISP. Lisp is a huge pain to program in, no matter how elegant your parentheses matching editor is. The syntax is just too awkward and unforgiving for a rank newbie (dumb) programmer. Maybe it's fine for an MIT first year student, but that's not who this whole article is about. Remember: high school.
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
OK. Let's add javascript and rebol to the list of languages for high school students to learn, too.
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
I think that they should get Unix/GNU/Linux/whatever boxes at high schools. These do not prevent learning in an attempt at ease, and students could have far more controls. Graphics could be made fairly platform independent with X.
C is about the lowest you can go short of asm.
Pointers, memory management, buffer over runs, pointers, just scream low level to me.
Compare the output of a C compiler against the C source and you will see how closely the two match. (A decent compiler should be able to output asm with the original C source side by side.)
--Simon who doesn't have his passwd handy.
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
My university teaches what they call a "suedo" code (basically a made up and non-compileable (well... there do exist compilers for it now.. =) ) language just for the cs 1301 students to learn how to think algorithmically and not get so focused on syntax issues. There is a small group that also take 1301 with scheme (me). This is an experimental class to see who does better in the end. The suedo'rs or the scheme'rs. I enjoy scheme as a functional language that forces me to think about the problem in a way that is totally new to me. My vote goes for scheme as the first language.. but i really dont think it matters too much. Fish
"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!
People should check it out...
The thing about Perl is that it doesn't HAVE to be a complex language at all. You don't need to bother with classes if you don't want to, variable assignment is simple, arrays and hashes just make sense and file manipulation is easy. When most first programming classes basically deal with string and number manipulation and basic logic. I think Perl is perfect for that sort of thing.
But then I live in Kentucky, where most HS grads can't even read "big" words (like "cat"), so I doubt trying to teach programming is a good idea here...
If you are relying on a tool/methodology such as UML then yes, you are damaging the ability of OO to be as abstract and versatile as possible. Adding new "attributes" is far from difficult and easily modelled if you step away from canned methodologies created by academics. If you truly understand OO and apply it correctly it can do wonderous things - regardless of the language. There are concepts that are difficult to implement in C++ that are much simpler in an interpreted language ( Smalltalk, Java, Eiffel ) but not impossible. The problem is that people are taught to use the language and never taught how to THINK in OO terms. Without that basic ability one can only be a marginal OO developer, at the very best. People think in OO terms all their lives.. it isn't that difficult to apply it programmatically and develop some workable, efficient models. LM.
The obvious language left out of this list is REXX. To quote the first line of the Preface of the Rexx "Bible": "The REXX Programming Language has been designed with just one objective; it has been designed to make programming easier..." Rexx has no datatypes, no declarations of variables, decimal arithmetic, no reserved words, no superflous punctuation. It is simple to read, yet powerful enough for most applications.
... 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...
Seems to me that people who can program always underestimate people that currently cannot program, and that people that cannot program think that programming is very hard (probably because the people that can program like to let them believe that). Imo, programming isn't more difficult than learning a foreign language, solving mathematical problems or filling out a taxform. In fact, it's easier. The thing is, you have to give people the confidence that they can program, that it's easy, that anyone can learn it, and that it is enjoyable, instead of starting out negatively by saying "let's take a simple programming language, because programming is very hard as it is". What's also needed is a good stable environment in which the programming is done. Imo most of the difficulties faced have nothing to do with the actual programming or problem solving, but more with the idiosyncracies of the operating system, the network, and the programming environment. Loz
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
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
Why not Simula '67? I've never encountered a better programming language for learning beginners. :)
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
A lot of the thread go on to say how they know very little about pyrhon, then branch off to suggest C++, smalltalk, pascal, C and other langauges. By all means, if you don't know python you should go and read about it, before you blindly make stupid comments. www.python.org. I definitely think python is an appropriate language for this task. I know this because I have coded in BASIC, PASCAL, FORTH, C, C++, various assemblys than you have fingers, YES PERL too! and I am not picking side based on preference, but based on what I see will be more sucessful. If it was a personal thing, I do say go with C. I think 6th-7th graders can grab python. I so envy them.
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.
I work at a school here. When i came the computer room was: a 5x86/32Mb RAM/2Gb HDD/Netware 3.12 fileserver, and 15 386-486-5x86/8-16Mb RAM/No HDD/MONO-VGA-1Mb SVGA video/floppy booted PC's, all nicely tied to Win3.1/Office 6.0 and not even one legal license. They were having problems with the BNC coaxial cable network, constant failures, virus problems, etc.
I proposed replacing all the software with linux, they accepted, based on a witchhunt initiated by the national software antipiracy enforcement agency (Indusoft, akin and alliated with BSA), and not with quality.
Now, some months later, some legal problems stopped the piratehunting, and they told me to reimplement the disaster again (of course upgrading it to Win95). I said that the teaching of programming would be good for the children, that at least LyX would be better than the WYSYWIG model of wordprocessing and that using nonfree software without paying was bad. But they replied that they won't program when they get out of the school, that all they would see would be MS bloatware and that teaching programming is stealing from them, so "Put windows! is an order!".
I need the job, but i don't want this disaster to happen. The law is out of the withhunt, so they can get away with this. I don't want a legal battle, but an ideological and moral one. So, i need arguments/strategy/reasons against this madness. I'm thinking on installing windows in the PC's anyway.... Windows 98 with IE5 and Office 97 (remember the hardware specs of the PC's? hehe!), but more ideas, reasons, strategy are welcome.
As Anonymous Coward (just in case).
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.
Matlab, since it fairly well dominates engineering, seems a good choice. As to cost, use GPL Octave, which runs most all Matlab code.
I heard a talk by Przemik at National Institute of Standards touting Octave.
We do not seek that students understand programming in its greatest generality. John Dewey, quintessential philosopher of education, lambasted learning without application. If people merely learn Python because it has the breadth of programming, but market forces keep it from common use, I would teach another language. Matlab, while perhaps not having the breadth of Python, does have tremendous application.
I would add that we also seek some computer literacy. Isn't the first step to computer literacy working with the operating system? I would seriously consider teaching bash shell programming together with various Unix commands. For example, with mpage and bash, one can write a program to squeeze every character onto a printed page. Surprising for this Slashdot group, people presume that teaching will be done on Microsoft Windows operating systems, so a computer language must be taught under those constraints. Those taught under such constraints will likely go on to merely point and click. On the other hand, those taught bash programming and some powerful unix commands will see the flexibility of unix, plus know how to use "if...then", "here" documents, variable expansion.
jameson@pressroom.com
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've looked at all three. Oberon and Squeak are both 'monolithic', unlike Python, which was designed for gluing other code together (among other things.) They are all good. But you have to pick one, and I picked Python. Neither Oberon nor Squeak provides an OpenGL interface, which I needed for my renderer. I'm going to have to go with Guido on this one. But do look at the others. sr
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
I completely agree.
I started to learn Perl during an internship with the county school system's IS department (or lack there of) my senior year in HS.
I found it to be rediculously easy, with the help of both Learning Perl and Programming Perl by everyone's favorite book publisher.
I've been using Perl ever since then self teaching myself many of the more complex concepts (LoLs, OO, refs, ect).
As I've never tried Python (shame on me) I'm not qualified to say which is 'better' for beginners, although I'd wager to guess that the language which is best to teach beginners varies as much as the kinds of people that take programming classes.
The 'best' beginners language in the world isn't of much help when it comes to concepts if your professor can't teach the material effectively.
-Jason
jasonb@edseek.com
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.
Actually, I don't see anything fundamentally wrong with math people (or even physics although it's a stretch) doing CS. The fields are related enough to make it feasible. At my high school the CS teacher was also (or formerly, I'm not sure) a math teacher, but she did pretty will with the introductory CS stuff. She dealt with the advanced students by letting them work on their own projects or by using them as informal TAs. Admittedly she didn't have an extremely broad knowledge of programming (or perhaps even CS), but the class was fine for beginners, and yes even for the AP.
:)
BTW, what does Perl have to do with CS anyway, or at least what is so critical about it that someone is clearly a moron if they don't know about it? I bet Turing never heard of Perl
Daniel
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
I disagree.
I don't care what kind of electronics he has, I want my mechanic to know how to tear apart and rebuild my car's engine with hand tools. Same thing with a computer programmer, either you know how to build it by hand or you're a fucking menace. In my opinion.
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.
There are at least six Smalltalk development environments available free, VisualWorks, Smalltalk Express, Squeak, GNU Smalltalk, Pocket Smalltalk and Dolphin Smalltalk. If your company joins the IBM Solution Developer program, you can pick up a copy of VisualAge for Smalltalk for media cost, CDN$50.00. I don't think price is quite the issue you think it is.
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
I'm a high school student who took APCS (Advanced Placement Computer Science) last year as a junior having had *0* programming experience. This year the AP board chose to use C++. I found C++ to be a very organized, very structured, very easy to understand language. Not only is it good for theory, it helps teach object oriented program (which IMHO is very important for writing modular programs). I recommend C++ as a standard for teaching beginners. -abe zuckerman
You're asking if Java would be the better choice even though you know nothing about Python. Rather ignorant.
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.
Python is pretty simple to learn, but they really screwed up by having whitespace be significant. People learning to program would be better served learning a language that has a more rational treatment of whitespace.
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. Sorry. This is what have happened with Java. Java would have overtaken many more lines of code, only if it had generated more efficient programs.
However, in my opinion, it should not be impossible to create a programming language that combine selected high-level programming features with good performance and low-level programming. Of course, it is difficult, but it should be doable. The problem is, that in the last decades, the design of programming languages have been concentrated to either object orientation or to more high-level-only languages like for example functional programming languages. Simple imperative languages like C and Pascal have been regarded as too non-fancy and ordinary to be interesting to improve (without involving object orientation).
Okay, but what is the problem with object orientation or languages like Haskell (a lazy functional programming language)?
Object orientation is usually to ad hoc, and after more than 30 year not yet a simple and proven technology. The number of interpretations of what object orientation really is, are as many as its implementations.
IMHO, use basic and proven techniques and do it well (like in C and Pascal). Add a number of selected more high-level features like exceptions, templates (parametric polymorphism), overloading, anonymous functions and records, try to make it simple to use high-level data structures (and maybe self-knowledge as you wanted; Python is actually quite good in this respect), and things like that; and you probably get a quite nice and powerful language. If you really want object orientation, then please try to use a more general form of subtyping than just inheritance, and a more general form of run-time overloading than what is used for implementing virtual functions. (I think that Modula 3 is a language that has followed this path at least to some extent.)
Pure functional languages contains a lot of good and interesting stuff, but the problem is that they usually try to be too pure. This makes it easy to program at a high level, but hard to program at a low level. For example, imperative programming is not impossible in a language like Haskell, but compared to using ordinary assignment statements it is much harder to learn and understand properly.
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.
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.
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
Java is a radical dictat consisting of number of irrelevant dogmas about programming
WTF is that supposed to mean? You sound like some kind of right-wing and/or libertarian wingnut.
VB is a compromise that works fine for typical custom apps that manages typical business situations that you will find in the average company. . . . When you use VB for this kind of apps, you can't beat its productivity.
Actually, you can use a consistent, rationally designed language that allows you to do some real programming while still offering RAD goodies. I don't work for the Borland corporation and I don't own any stock either, but I'm about to start praising Delphi here. Delphi is an excellent example of how VB ought to have been done. I can't see any sense in wrestling with the labyrinthine and arbitrary syntax of VB when I could be enjoying the relatively mild inconveniences of Pascal. It goes beyond mere syntax as well; since Delphi/ObjectPascal supports normal low-level data types and since it's a genuinely compiled language, interacting with the API (sometimes you just have to do that) becomes extremely easy, and much time is saved. Saving time == greater productivity, the last time I checked. Aside from the miserable syntax, the greatest problem with VB is the fact that you're stuck in a padded cell. How easy is it in VB to handle window messages that the framework doesn't handle for you? What about controls that the framework doesn't support? Once you're done fighting against the language itself, VB does indeed provide extremely convenient access to all the goodies that the designers thought you might want -- but it puts monumental barriers in between you and anything that they forgot about, or didn't know about, or that they just thought you wouldn't need. And when you hit that wall, "productivity" becomes a dead issue.
Delphi isn't perfect by any means, and VB isn't pure evil either. However, I (and a lot of other developers who've used Delphi) have found it to be a technically preferable -- and more productive -- solution to the same problem that VB addresses. At this point in my life, I don't use either. My first programming job was with Delphi, but thankfully a bunch of C++ bigots revolted and they switched all the Delphi projects to C++ Builder (also a very nice tool, for its purpose). Nowadays I do GUI's directly with the API, or else with MFC. I prefer the API, because it's easier and quicker to work with when there's something genuinely interesting to be done. That, of course, is where the rubber hits the road for most people who dislike VB (and this is where I'm going to justify our mutual use of the word "bigotry" in our subject lines
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.
Topic: What language woulf you suggest for an intro to programming?
1. C
2. C++
3. Objective-C
4. Smalltalk
5. Eiffel
6. Python
7. BASIC
8. Pascal/Object Pascal/Borland-Delphi Pascal
9. Tcl/Tk
10. TOM
I think that covers all the languages that could be practically considered. Did I leave a major one out? (Sorry - as much as I love Perl, there is no way that I think that it would be an acceptable language for an intro to programming. You'd scare off most of your students)
This sounds a little bit scary to me. Not everybody needs to be using computers. Thus, not everybody needs to learn computer programming.
They use the analogy to literacy to justify it, but even mass literacy isn't all it's cracked up to be. Literacy isn't really a necessary skill for everybody in a patient society (although a high literacy rate is probably something to be proud of). Plus their 'goals' seem especially frightening to me. They want to turn the our 6th graders into some sort sweat shop for information. Not everybody likes to read and write; not everybody likes to use computers. I can't see the economic (or whatever) gains of an army of hackers as an excuse for making everybody use computers. Newsflash: computers are boring to the vast majority of the public. Gee that would be a real surprise if the drop-out rate rose.
The trend in society seems to be to require more and more 'advanced' people. Right now, in order to survive (have decent food to eat and a place to sleep), you need to be able to read. In ten years, you'll need to be able to drive. In twenty years, you'll need to be able to use a computer. In a hundred years, you'll need to have genetic enhancements. And the only advantages we're getting are longer work weeks. Python classes are fine. But they are not required learning. I wish people would stop to realise that we can't just keep progressing indefinitely, that our quality of life "in the stone age" (before the mass infiltration of computers, i.e. 1950) was just as good as it is now.
In conclusion: I just got up and haven't eaten breakfast yet (mind not working). Also, sorry if I misinterpreted their plan. The paper was 77 Lynx-pages long, and from what I read, they wanted to teach computer programming to everybody, like they did with reading and writing. No fun if you ask me. I'd vote for mandatory cooking classes before mandatory computer classes.
Peace out.
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.
VB allows experts to create apps without the low-level baggage of other languages.
Could you give an example of "low-level baggage"? I'm trying to imagine what that could be, and I'm drawing a total blank. Low-levelness is a state of lacking baggage, isn't it? High-level languages like VB are huge, lumbering dinosaurs weighted down with arbitrary crap. C is the zippy little mammal that eats their eggs.
Bigoted programmers still equate VB with novices, which is unfortunate because they themselves could be so much more productive if they only approached VB with an open mind.
By "productivity", I could (rather rudely and without solid justification, I admit) assume you mean the marketroid/MS definition of the term, as in MS Office: "Productivity" means wasting an hour every day of your life fighting with a tool that wants to do your work for you -- but the trouble is, it has its own ideas about what needs to be done and it doesn't give a damn about your opinions in the matter. Similarly, VB programmers call VB "powerful" because it does things they never told it to do, and because it ignores them when they tell it do do something stupid; C/C++ programmers call C/C++ "powerful" because it does exactly whatever they tell it to do, no more and no less. I've often gotten the impression that the word "productivity" is defined in equally contrasting ways by the two groups.
Or do you mean productivity in the "lines-of-code written" sense? Ugh, that's even worse. As you say (but I'll say it in a normal tone of voice), "It's the craftsman, not the tool". Anybody who consistently writes 100 lines of code every day (in any language) is either working on meaningless, trivial projects, or else s/he's generating a cloud of bugs and crap that will delay shipping by months when QA finds the train-wreck.
Honestly, my reaction to the word "productivity" is negative largely because it's a near-meaningless industry buzzword. It has a stink of marketing about it, a stink of quantity-regardless-of-quality. I've never seen it associated with anything useful or worthwhile.
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!
Ever had a memory leak or a dangling pointer? That's what's wrong with pointers.
That is what's wrong with pointers, true, but it's also what's wrong with inexperienced programmers. Any means of managing dynamically allocated memory is going to lead to memory leaks, unless you do garbage collection; and garbage collection is a serious hassle to implement in an efficient way. It's not a magic bullet. If you really, really need it, it can be implemented in C/C++ anyway. Even not considering dynamic memory allocation, being able to pass addresses around is an enormously powerful and useful thing. It comes with a slight cost in debugging terms, but at the end of the day it's worth it. Heh. I had this code last week that was sort of nibbling on the stack, such that i got to the end of main( ) and crashed 'cause the function in the run-time library that called main( ) lost its stack frame. It was cool. The program was a sort of test harness for some code that's gonna go in a device driver. It's a good thing I found the problem then.
Or are you Linus/God and write 100% perfect code 100% of the time?
Yeah, I see the smiley, and no, of course I don't write 100% perfect code. I doubt that Linus does either, and I doubt that He claims to do so. If he did, that would scare me, 'cause we're all mortal. Every project is gonna have some imperfections; you try to minimize them, and you try like hell to do the best job you can all around. Only God knows where all the bugs are. He'll fill you in when you die. In the meantime, you gotta set some breakpoints.
This is the classic misconception about BASIC. While BASIC lowers the bar so that poor programers too can write poor code, it also frees good programmers from mundane details so they can write good code. What better platform for teaching good style than one without the intricate details of other languages: puctuation - who cares! preprocessor-schmeprocessor! separate editor/make/compile/link/libary/debug tools - not! Visual Basic, especially, is by far the most productive tool I have used to create Windows applications for a variety of Fortune 500 clients.
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.
It's the perfect first language because:
Even if you have prior experience in Pascal, C, etc. that's not gonna help you. Everyone starts off on an equal footing.
Weeds out the folks who are just in CS to learn VB and make a quick buck.
Perfect for teaching theory. Concepts like recursion are necessary to use the language effectively.
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
<sarcasm>
why not that wonderful language, VB?
</sarcasm>
actually it's sadly true, a lot of young programmers I know are VBers, it's easy, so they learn, then when they try to learn something else, it is to hard cause VB got them used to programming crap. Also, I think VB is the most pirated developer application on earth, it seems everyone has it, but no one ever baught it.
Speaking of VB, if any of you want to see how VBers act, if you happen to have AOL (yuck), check out PC Dev II it's so funny, all idiot programmers, it's great fun to watch!
I learned Python earlier than Perl, and what everyone says and I verified about Perl is that it is a write-only language (specially at large programs) because it is just too difficult to understand programs written by another person. Because of it, it is bad for Open Sourcing and it is bad for software engineering and real-world applications.
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.
IT IS THE CRAFTSMAN, NOT THE TOOL! VB allows novices to create apps without a huge learning curve imposed by other languages, but novices still produce novice level code. VB allows experts to create apps without the low-level baggage of other languages. In expert handes the level of productivity possible with VB is almost untouchable. Bigoted programmers still equate VB with novices, which is unfortunate because they themselves could be so much more productive if they only approached VB with an open mind.
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.
Check the following for a Python example, at the "99 bottles of beer on the wall" site...
e r_n_r.html#python
http://www.ionet.net/~timtroyr/funhouse/beer/be
That sure looks like ugly code to me. What's wrong with teaching kids a language that might actually be useful? I sorry, I forgot - school isn't supposed to prepare kids for adult life is it? It just crams their heads full of pointless garbage to prove they can pass exams. Bah!
Any kid who can't cope with BASIC should not be allowed anywhere near a programming editor! (and I suspect would be quite happy about it too)
+AndyJ+ no account... can't be ****ed
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.
Still, it allows the four letter word: GOTO.
Writing code is only a small fraction of getting a product out and making money off of it. Design, testing, marketing, maintainance consume far more effort. Thus it is amusing to have these HS or college interns think they are hot shots because they've learned a little bit of C++.
Lisp is. In C code is different from data. You cannot manipulate it as data. In both assembler and Lisp you can.
ACNot sure how old CS students as I am a Brit, but I know that I was "broken in" with a Procedural language (Modula2), and then we moved on to Python. This was as a first year university degree, but they did take the view that you didn't know anything.
Personally, I believe that anybody any younger than 18+ may have a bit of a problem getting their head round Ploymophism (Spelling) and Encapsulation etc, but its well worth a go.
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.
Your post doesn't really contribute at all in anything, nor does it have any substance for one to take and reason about.
> 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.
So, what's the point. I can see two things here:
1) the pervasive "I program, therefore I'm a CS". That's bullcrap! Programming is not restricted to CS only, nor it encapsulates the whole of CS activities.
2) It is assumed that to learn Pascal or C, one has to be smarter than those who cannot. And this is the stupidest thing ever. Programming does not require any extra level of intelligence; instead it requires a different model of reasoning just as any other discipline.
The idea of bringing programming to the masses using a simple, non-esoteric language is great. Why should an engineer knows the intrinsic guts of data structures, semantics of programming languages, and stuff like that. To him, a programming language is a tool whose utilization should (must) not be as complex (or more so) than the engineering problem at hand. Why should a financial analyst or accountant be considered a CS person when the only thing he/she wants is to program some analysis macros in Excel? The financial analyst example is even more relevant because it represents (for what I've observed in the "real" world) the majority of non-CS that are doing some programming relevant to their job functions.
By bringing programming to students prior to entering College, students get a chance to observe what programming looks like, and what it can bring to them. From here, students can determine whether programming is either:
1) a passion,
2) something to make a living with,
3) a tool that complement other "more important" activities (as in the examples I gave), or
4) some anoying activity one potentially, but not necessarily has to deal with.
Every and each of these perspectives is a valid one, depending of the students' strenghts, weaknesses and goals. With a simple, small language, students can get an idea of how programming can help (or affect) their jobs. Let the more esoteric languages for later. Whether this may help future CS students is something that remains to be seen; however, this will be extremelly benefitial to those that will pursue a different career path.
Luis Espinal
http://www.cs.fiu.edu/~lespin03
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.
How about the Matlab programming language? It's easy to learn and flexible, and you can teach students mathematics at the same time.
Beginners don't have to worry themselves with data types:
-Everything is just a number. e.g. 3/2 is 1.5, not 1.
-Indexing an array by say A(1.5*2) is perfectly alright.
-For loops can be incremented by any amount, not just a number.
Plus a rich set of mathematical tools and graph plotting functions -- it's a great educational tool.
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
There is already a very good programming language which is very well suited for learning computer science, much more so than Python.
There are excellent books for learning this language. E.g. "Structure and Interpretation of Computer Programs"
Yes I mean Scheme.
See:
http://www.schemers.org
The TeachScheme! Project
comp.lang.scheme FAQ
Color BASIC, GWBASIC, QuickBASIC have INSTR(). I'd expect the same from VisualBASIC if i'd code for Windows.
As a software engineer and object technologist with a couple decades of experience, I have to say you're completey off-base in this thread. Have you ever participated in a large project using the OO paradigm? It sure doesn't sound like it. And you're too stubborn to listen to those who have. I have *never* been involved in failed project, and therefore understand what it takes to be successful in large-scale development. The most important thing is that the software be flexible, which is the main goal object oriented technology achieves. You CANNOT achieve this level of flexibility with traditional methods.
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
Once you've programmed three or four languages you start to realize that conceptually most problems are the same and going from language to language only syntax really differs. All languages have their strengths and weaknesses, though I usually find that a choice of Perl or C will encompass most of the problems you could be presented.
in the proposal they speak of a utopia where everyone, or at least most of the populace, programs.
ok, lets look at another work horse of the day: the automobile. is everyone a mechanic? does everybody WANT to be a mechanic? most people can change a tire, the oil, even do minor repairs. how many can rip an engine apart and put it back together? exactly.
to think that teaching everyone to program will promote millions to program and create a new world order of software is rather rediculous.
programming isn't the sort of thing that most people enjoy doing, not because its "hard" or they "don't know how" or "computers are just so complicated!". its because it involves math (and always will at some level) which isn't a hot ticket item and it involves mildly complex logical thought processes. these are not the pass times of the masses. and there's nothing wrong with that. why must we geeks try and make everyone else like us? we're not the most useful or advanced piece of humanity.
besides, if everyone's hacking, who'll farm? (the computers? haha... yeah, i see THAT reply coming already...)
- Aaron J. Seigo (because slashdot doesn't like to give me accounts. *shrug*)
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.
right on. Programming is about logic. i wish they'd choose to teach a logic course using psuedocode than any other language. Personally, ive used perl, java (2nd favourite), BASIC (started on GW moved to quick and visual), modula-2 (great language!), C (favourite) and also coded in/on lambda (the moo)...Out of all of them i found lambda/MOO coding to be the most helpful in learning about object oriented stuff.
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
Pascal was designed for a person's FIRST programming language. I learned it at around 11-12 years old. I made a game :) Basic is CS 1, Pascal is CS 2 (my first year was CS2), and CS 3, CS AP* is C++. I find that this line is quite sufficent. After all Python is a scipting language, not programming...theres a difference...a big one. Besides...what difference does it make what language? Computer Science is the study of creating algorithims, not how to program...
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.
As you said, programming is not something most people enjoy; however, I've work with many people that are not CS (or even Sciences) majors, and yet have to program in order to automate a part of their workload. Best example I've encountered are financial analysts, accountants and actuarials. As a matter of fact, in my prev. job, we equiped our fin. analysts with MS Access and MS Query, and then taugh them a little bit of Excel's macro programming and SQL. Why this? Because, we could give them a "dump" of our data every day at 9:00am, and they would query it and disect the data as they pleased. This enhanced productivity since the analysts could query any questions to the data, and report it and slam it into Excel. They would no longer have to wait for us to create an ad-hoc report, nor would we have to spend hours trying to understand what they wanted and implementing those damned but necessary reports. I have the suspition that this is the case in many other places. So don't be surprised if there are millions already programming out there:)
Luis Espinal
http://www.cs.fiu.edu/~lespin03
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
Mrp sucks.
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
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?
matlab is expensive, I'd suggest that numerical python http://www.python.org/topics/scicomp/numpy.html would provide as good a base as matlab for interactive math & linear algebra.
Hmm I still don't see the benefit of teaching things to people that they hate. I hate to quote RMS (it's a good way to get ignored), but he did have a good insight wrt the educational system: the problem with computer classes is that they're designed for students who don't want to be taking computer classes. Target your classes towards the people who like CS, not the public at large. Getting kids access to computers could be all fine and dandy (I don't want to go off topic), but please leave computer science to people who show some sort of interest in it. I suppose one elementary grade class is an OK idea, since it gives kids a chance to get enough of a taste to see if they're interested, but I wouldn't get too caught up in them actually programming something. As a side note, these "please use my preferred language! It rules over Python!" posts are getting a little old.
And again, I don't see the trends in society (read "economy") justifying it. I'm in the good position where I actually like programming. But if car mechanics were the "hot" thing, I think I'd rather go hungry than take mandatory courses on car mechanics (or worse, do car mechanics all day at my secretarial job *shudder*).
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 agree. I think if you're truly fluent in a language, you don't need to stop and translate. I don't know for sure, since I have never spoken any languages fluently other than English. But the grammar for a programming language is usually considerably simpler than the "grammar" that would describe a real language. And programming languages are surely more closely related in terms of constructs. For example, Pascal and C are so similar that they may as well be the same language - like American English and British English.
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.
Sorry to burst your bubble, but there is no way you can understand the "whole idea" of object oriented programming in three days. Many programmers spend years writing C++ code using classes, inheritance, and polymorphism, and still produce "OO" designs that are basically just procedural code with the data and functions split up into classes. It takes a significant amount of real experience before you can become a good object oriented designer. Furthermore, learning the C++ language is orthogonal to OO design, and just as difficult. It's not hard to write C++ code, but to truly master the language takes at least a couple of years of experience.
(Un)fortunately, the majority of people who do object oriented programming in C++ are not competent at what they do. I consider myself competent, but I know that there is still room for me to improve a lot with experience. Just be aware that simply being able to write C++ code that works, and being able to use it's object oriented features does not make you a competent object oriented C++ programmer. Get a lot of experience, study lots of theory, read really good books like Design Patterns, Large Scale C++ Software Design, Rapid Development, etc. That's the minimum it takes to become a good software engineer.
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.
You want to see high school students squeal? 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. If the difficulty of C is too much, then don't consider java; OOP is no way to start.
- Rei
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.