I wonder if this is a Java problem. My impression is that most intro comp sci classes now teach Java. Meanwhile, all the scientists I know work in Python, Perl, C, Matlab, Mathematica, or LabVIEW. Last I knew, there were even quite a few FORTRAN holdouts.
Why should scientists respect a comp sci intro class built on a language and a set of design patterns that reek of the cube farm, when all of their actual work is done using languages and systems that they will inevitably have to teach to themselves because nobody offers a formal course?
Surely the need to impress the math department is a great use case for an introductory course in Lisp or Scheme. Not that this is an original idea or anything.
I think this quote from an ACM interview with Donald Knuth in answer to a question on the future of programming sums up the problem of the current state of programming nicely:
"I'm worried about the present state of programming. Programmers now are supposed to mostly just use libraries. Programmers aren't allowed to do their own thing from scratch anymore. They're supposed to assemble reusable code that somebody else has written. There's a bunch of things on the menu and you choose from these and put them together. Where's the fun in that? Where's the beauty in that? We have to figure out a way we can make programming interesting for the next generation of programmers."
Typical bottom-up thinking. While I do enjoy rolling my own libs from scratch from time to time, the availability of a lot of reusable, well-documented, well-designed code have permitted me to tackle, as a single person, projects that would not have been possible years ago.
I wanted to create a 3D data visualization app just for kicks a while back. Guess what, I didn't have to roll my own OpenGL graphics libs, nor my XML parser, but I still had a blast putting it all together, and being able to focus on UI (the main motivator for the project) instead of the nitty gritty behind the scenes.
I think it's valid to have some concern about coders becoming less capable at low-level code-from-scratch principles, but I don't think it's fair to say that the library-centric development today is less fun.
Knuth thinks in algorithms, not solutions. In his day, people were constantly inventing new algorithms--if you've never done it before, you should at least be able to guess that it's a big rush. That's what Knuth thinks of programming as: a series of completely new inventions and associated rushes.
What he's actually trying to say was that, as a usefully large number of algorithms for everyday tasks have already been discovered (optimally, even!) and codified into "libraries", people are running out of (easy) things to invent, and so aren't getting that rush as often. What was needed, in his mind, was a replacement for the rush, as that was what he saw as the raison d'etre of programming; being a mathematician himself, it was probably the only reason he programmed at all!
Of course, we've gotten on just fine without the rush. "Programming" as solving problems has continued to flourish; Knuth's "programming"--really referring to the scientific method applied, as it should be, to Computer Science--has quieted. It used to be that every programmer was a practicing computer scientist by necessity, just as every astronaut is currently an astrophysicist by necessity. When "platforms of discovery" (computers being one, the vacuum of space being another) mature, the need (or ability) for their practitioners to be involved in the creation of the theory underlying the field diminishes. This doesn't mean the field "dies"--it merely segregates.
That sounds about right. The programming tasks most of us get are trivial, but we end up spending an egregious amount of time on integration and configuration, so the projects still take a long time to complete, and the technical challenges we have time to deal with are rarely all that interesting.
(My current position is to some extent an exception, though I'm finding that getting things done in Java with its various bloatware frameworks takes a LOT more time and effort than in most other languages/platforms, including .NET.)
Remember that this is about teaching students to program and not about producing code for a business on deadline. I learned much more about how to program by doing things myself from scratch than using the relevant libraries. Also, I find learning the low-level stuff much more interesting that memorizing libraries and reading documentation.
i looked up a sample code for single file upload, tweaking it to handle corner cases; however, there's a cgi library for that shrug ... better, simpler
but as a bonus, i now know http request better :D ... extending the cgi library, for example, uploading multiple files in one http request
library also has another use, for testing
for example, i got stuck char used as separator/ending in netstring, used in lighttpd's scgi
i looked at python scgi library source code, saw the output scgi variables etc, then readjust my porting code
but i strongly agree that building something from scratch is tremendously rewarding ... no matter how crappy it's - there's a beauty only u got the priviledge to enjoy ... FUN!
Nod. That indeed the problem of Java. I even wonder why university teaches intro course with Java other than C. C is good to demonstrate how the computer actual works and the time/space complexity of program for CS people. For science people, why do not teach them matlab/python/fortran things that may more helpful to do scientific calculation?
MANY physicists still code in fortran. Its blazing fast for the numerics they do and pretty simple to learn. I personally would just teach them C, but there are sooo many math libraries written in Fortran that it has a lot of momentum in the physics community.
I'm not convinced that Fortran has any remaining advantages. Sure, a bunch of libraries (BLAS and LAPACK in particular) may be written in Fortran, but that doesn't mean you can't call them from C. Maybe there are some uncallable-from-C libraries out there that I don't know about, but I'm pretty sure the only reason physicists still use Fortran is that they have old legacy code (and/or old legacy collaborators).
I use Fortran every day, and I can't stand it. But it's quite common to find physicists, even young ones, who only know Fortran.
Old joke:
Q:What will the scientific computing language of the 1980's but like?
A:I don't know but it will be called Fortran.
My undergrad physics department taught a course in Fortran because the Comp Sci department refused to teach it. It's only been a few years but I think they are still teaching it. Fortran is nearly as fast as C and far easier to use than C, so there hasn't really been a drive to switch the huge amount of Fortran code out there to C. I think that if anything kills off Fortran it will be Python or something similarly easy to teach to undergrads.
Yep, my school recently started teaching Python as the intro programming language -- for the bioinformatics program, at least.
C, C++ and Fortran have similar enough characteristics and capabilities for scientific work that once a researcher has learned one, there's not much benefit to learning either of the others. But scripting/glue languages make it possible to hack together something in an afternoon that's impressive enough to get another scientist's attention and perhaps consider that languages do matter.
I think Python will convince new scientists that C++ and Fortran deserve to be replaced, and another fast, easy-to-parallelize language will be the actual replacement.
lucky for me, my university (northeastern) teaches both java and scheme. I think one of the guys who wrote HtDP is a northeasstern comp sci professor.
Intro to comp sci is scheme, honors freshman comp sci is java, and I think down the road it branches off into assembly, C++ (which I know engineering students take alongside MatLab), and Lisp. I could be wrong, but I'm in engineering (switching into comp sci and cog psych).
My wife spent a few years in an aerospace engineering major, and I was quite confused when she ended up in a "C++ For Engineers" class. C++? Really? For engineers? They don't even teach C++ to comp sci students anymore.
Why not Python or something where they can just crunch numbers and write programs instead of learning how to navigate the minefield that is the C preprocessor and the C++ STL?
software for embedded systems is still in C and C++ and that is generally what engineers care about when they are coding.
I agree it sucks, and it's too bad they can't move away from it sooner rather than later. Probably a great niche for any number of programming languages - if you can ever get the big multi-nationals and military to adopt it.
"They don't even teach C++ to comp sci students anymore."
I've been wondering about that one for a while now, because throughout my career as a software developer, some of the worst programmers I've encountered have been people with comp sci degrees.
Not quite true. I know a lot of scientists who program in Java (depends on the community) and there are any number of companies supporting scientific computing that are Java shops as well. Usually you will see a mix of Java or C++, a scripting language (python seems to be the most common) and Matlab. And yep some Fortran holdouts
Depends on the field -- I think Matlab is still a little more popular, especially among engineers, but SciPy (or just plain NumPy) is good for biologists.
There's also a need for glue code and other non-numerical scripting. For example, PyMol is a pretty popular program for molecule visualization, and as you can guess, Python is its scripting language.
Given where the NSF's funding is actually going, I chalk these statements up to a backlash against the trend of more people doing small amounts of programming as part of their "real" work. Scientists tend to view programming as more of a chore than an art, but it's still essential to getting real, relevant work done.
It's clear to any of these researchers that a program just amplifies your own efforts. From a distance, it may appear that an academic rival is letting the computer do all the thinking. That just wouldn't be fair, would it? If the computer can't think, isn't it better to just publish great thoughts in raw form, and let some benighted industry worker do the calculations and data entry?
Obviously, no. Thinking programmatically is different, and allows a researcher to answer new problems -- in any field. Even psychologists and sociologists crunch statistics on population groups: collecting and encoding data is tedious and time-consuming. Traditionally, surveys are filled out and crunched by hand; but looking at the massive amount of data available on social networks, for example, just crawling and aggregating that data could yield much better information than manually roping in 130 undergrads at your own school. Or you could splash a task out on Mechanical Turk to analyze the Turkers themselves. This would be big, and it would upset a lot of academics who built their reputations on traditional methods, and perhaps blew off computational research as a fad a decade or two ago.
Why not require a programming course for physicists and mathematicians? I think part of the reason is this: programming (badly) just isn't all that hard. Programming (badly) is a skill that most smart twelve-year-old kids can easily teach themselves, and most mathematicians and physicists who didn't program as kids are still quite capable of picking up (bad) programming skills as they need them.
Programming well is a much harder skill to learn, but it's not something that you'd pick up from an introductory programming course anyway, and besides, good programming is overkill for most scientists anyway.
If there was ever any doubt about what programming can offer mathematics, ProjectEuler would dispel that. I say give the students an intro book on Python and point them at ProjectEuler.net. If they enjoy math, curiosity will do the rest. I agree that programming isn't necessary for every mathematician, but it offers so much potential for exploring numbers that any math students not introduced to programming is at a huge disadvantage.
What about things like solving the 4-color problem? Even within pure mathematics there are plenty of cases where programming is useful. There would probably be more if the average math PhD had better programming skills.
Definitely Java is not the right way to go - for a mathematician I'd recommend something more like Python or Mathematica.
There is very little room for computing in pure math research. The Four Color Theorem is still an exception and not just because mathematicians can’t program. That said this is irrelevant because the article is about the undergraduate program. Only a minority of undergraduate math majors end up as PhDs in math. The rest do something else. Sadly some of them end up teaching high school or as actuaries (no offence). If they want to do something else but still math related then yes, they definitely need a programming course!
GAP? Pari/GP? Mathematica? Magma? There is much room for programming in modern pure math research. In fact, I think we will end up seeing much more computer-aided-math than you think.
Are you suggesting these as tools for mathematicians? Now what is supposed to happen? They have to find problems for these tools? It should be the other way around...
It's called experimental mathematics. It's gathering data about known structures to make conjectures about all structures satisfying certain properties.
Not to mention that, even outside of experimental math, there are plenty of pain-in-the-ass calculations that computer algebra systems make so much easier.
I disagree with your statement and wish you would provide a counterargument.
I think the four color theorem is an exception because mathematicians weren't impressed and excited to find that computers could prove theorems. Instead they were disappointed and considered it somehow "wrong". We should be pushing forward with automatic theorem provers, and we would be if more mathematicians could program.
Hey, it's still faster than a handful of dice and a blank notebook. Sometimes the point of a course's first assignment is to show students how wrong their preconceptions are.
Why should scientists respect a comp sci intro class built on a language and a set of design patterns that reek of the cube farm, when all of their actual work is done using languages and systems that they will inevitably have to teach to themselves because nobody offers a formal course?
Surely the need to impress the math department is a great use case for an introductory course in Lisp or Scheme. Not that this is an original idea or anything.