Fog Creek Software
Discussion Board




teaching programming languages = worthless?

There is a general opinion that CS college should not insist on teaching a certain programming language and libraries.

For example, on thread http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=136305&ixReplies=17
I found this:

> Because of that, specific languages aren't
> as useful (imho) as a thorough grounding
> in general CS principles:  data structures,
> algorithms, math, logic, development
> methodologies, etc.

I think that on the contrary, CS courses should also teach at least a programming language that is popular in the industry and at least 2-3 libraries for things such as user interface, database access, etc.

A popular programming language (C++, Java or C#) and the few libraries (WinForms, ADO, Windows API, etc)  should be studied in depth.

Why?

Because otherwise something bad happens: you get a lot of university graduates who think that they are ready for good jobs, just because they know algorithms, data structures and Scheme (or worse, Pascal for DOS).

In-depth knowledge of a popular programming language (such as Java, C++, C#, Delphi, Python) is VERY valuable.

Why?

Because if you know one language, you can learn a similar language quickly.

For example, if you know C++ or Delphi, you can very quickly learn Java.

If you know LISP, or Pascal in it's standard form, you can't learn Java as quickly.

Then there is the issue of libraries.

If you know Delphi's VCL, you can easily learn WinForms or WebForms.

Let's say you know ADO or ADO .NET. Yes, Microsoft will invent another "database access technology" in 2 years from now.

But guess what - if you know ADO and SQL well, you will probably learn that library quickly.

So.. let's compare two recent graduates.

Graduate A knows algorithms, data structures, Scheme and Pascal.

Graduate B knows algorithms, data structures, but also knows C#, WinForms and ADO .NET, and has studied both the WinForms and ADO .NET libraries in-depth.

Which graduate do you think will be better equiped to get employed and develop modern software?

I'll tell you: it's graduate B - he has a serious advantage.

I'm not saying that algorithms and data structures are not valuable.

What I am saying is that the following knowledge is also very valuable:

- a popular programming language (C# or C++ or Java or Delphi)

- a popular user interface library (.NET WinForms or Delphi VCL or Swing)

- a popular database access library (ADO or ADO .NET)

Yes, these things get old. They become obsolete in time, and get replaced by newer things.

But if somebody knows C# very well, it is very probable that he will easily learn the next language that will be popular, than someone who just knows LISP or Pascal!

By popular, I mean "used in the industry".

Also the value of "algorithms and data structures" is diminuishing: nowadays, you don't need to write a linked list or a binary tree, because there are many container libraries available which satisfy most needs.

Yes, I know - these are "leaky abstractions". But still, knowing about algorithms and data structures isn't as valuable as it used to be.

M. Schneider
Wednesday, April 28, 2004

There are post secondary institutions that teach this stuff -- they're called trade schools. If you want to learn how to use Windows Forms, go to one and get a diploma.

If you want to learn how to write software, take software engineering at a University.

If you want to study the science of computation and information processing, take computer science at a University.

Matt
Wednesday, April 28, 2004

You never mention application architecture. Personally, that's my pet peeve. You mention data structures and I may have the wrong meaning but I find them very, very important as I usually start my applications with a development of data structures.

I think a good grounding in history, theory, and reality by showing how a language implements theory would be pretty good. But don't forget at least a class on "how to organize your code".

must remain anonymous
Wednesday, April 28, 2004

Actually, I agree with M, to some degree. To learn the concepts we're talking about, you need a vehicle - you have to learn "some" language. Why not teach a spectrum of the larger more popular languages?

Is there a reason why a CS student can't, in his/her three years of course study, pick up Java, .Net, and C++?

Or are Universities still using Pascal and Lisp because "the language shouldn't matter, the algorithms are still the same?"

I'd call that ivory towering. If you have to use *some* language to teach, why not use a modern one?

Philo

Philo
Wednesday, April 28, 2004

For the record, for a CS program to be ABET certified, they must adhere to a broad set of standards.  The following is an excerpt from the ABET's Criteria for Accrediting Computing Programs (CAC):

"IV-8. Students must be exposed to a variety of programming languages and systems and must become proficient in at least one higher-level language."

Source: http://www.abet.org/criteria.html

Most schools fulfill that requirement with C++ or Java.  Some schools may choose other languages - e.g., I think MIT focuses on Lisp (of course, MIT JoS'ers can correct me on that if I'm wrong).

So what?  If you don't like the curriculum, then don't hire people from the school.

yet another anon
Wednesday, April 28, 2004

Some of the languages taught at university are interesting alternative viewpoints. But let's face it, their track record of success on real life projects is identical to the track record of using apricot pit to cure cancer -- there have been a few successes here and there but it is considered by those knowledgable to be due to the perseverance and willpower of the patient/programmer and not because of the value of the treatment/language.

And yes I am slamming lisp and its ugly worthless pals here.

If medical schools taught useless quack cures in medicine instead of proven successful treatments the same way that universities teach quack languages instead of proven successful languages, there would be government inquiries all around.

Dennis Atkins
Wednesday, April 28, 2004

Come on, Dennis - don't hold back. Tell us how you really feel...

Philo

Philo
Wednesday, April 28, 2004

It takes what, two days to learn a language? A week? You can do that on your own... schools have more important things to teach.

Ron
Wednesday, April 28, 2004

Most of the work I did in my CMU CS degree (1993-97) was in C.  For most of that, I had the option and could write in whatever language I was most comfortable with (within certain bounds).  I was also exposed to Java, C++, Pascal, Common Lisp, and ML (and probably others).

The goal of a CS degree at CMU is not to teach you how to write applications in (random language) - it's to teach the students what's behind all the technologies and expose them to a bunch of different approaches.  I don't use lisp day-to-day, but I have (ok, had at one time) some idea of how it's put together and *why*.  CMU isn't content for a graduate to be able to write an application in C++ or any other language for that matter - they want that graduate to be able to design and implement the next big language/technology.  (No, a college degree doesn't qualify you to do that, but it gives some of the necessary foundation.)

Teaching a specific programming language isn't worthless, but it's not the end goal, either.  Yes, you generally need to be proficient in one to demonstrate profiency in some more-fundamental CS discipline.  Yes, that may as well be with a language that sees some actual use in the real world.  The fallacy is that exposure to what's most prevalent in the software market today doesn't (necessarily) give a good foundational grounding in what's happened in the CS world in the last 40 years.

schmoe
Wednesday, April 28, 2004

You have 4 frickin years in school. It's not too much to ask
to have programmers develop an expertise in several
different practical environments.

It's like a painter learning color theory and perspective
while never having to paint a complete picture.

son of parnas
Wednesday, April 28, 2004

Graduate A creates new languages and compilers,
Gradulate B uses them......

apw
Wednesday, April 28, 2004

By the time I finished my BS in CS I had been exposed to many languages.  ML in compiler writing, Smalltalk in a software design class, Perl in NLP and a few other classes, Java in a basic data structures class, C++ in a graphics class (implement in whatever language you want), pure C in an operating systems class, and many different libraries.  Did the rest of you really have such a narrow exposure to languages as some here are implying?

>> To learn the concepts we're talking about, you need a vehicle - you have to learn "some" language. Why not teach a spectrum of the larger more popular languages?

The languages you and the business apps guys are suggesting are mostly designed for (surprise!) business apps.  Their value is not so great for many CS courses. 

Finally, I think most CS students would be bored in a class discussing how to use a GUI library.  Is it even possible to discuss such a subject more than a week?  If students wish to learn this stuff they'll pick it up on their own without trouble.

Matt
Wednesday, April 28, 2004

"The languages you and the business apps guys are suggesting are mostly designed for (surprise!) business apps.  Their value is not so great for many CS courses."

Which to me says that the value of a BSCS is not so great for developing business apps.

So after MS, Intel, Oracle and Rand have hired 2% of the graduating class, what are the rest of them going to do?

Philo

Philo
Wednesday, April 28, 2004

What are "business apps," anyway? (I'm in aerospace, I really don't know...) I mean, when everybody here talks about databases and web this and that, what kind of stuff are they making?  Do they involve complex algorithms and distributed processing (where a BSCS would be useful) or is domain knowledge more important (where maybe economics would be more useful)?

Ron
Wednesday, April 28, 2004

> It takes what, two days to learn a language? A week?

I'd say it took me 10 years of using C every day to really learn it completely.

Dennis Atkins
Wednesday, April 28, 2004

Business apps = a simple data entry GUI  (a couple text boxes and radio buttons) that stores the user's input in a database. That's it. Sometimes the database is actually a soap service and sometimes the GUI is actually a web page, but there's no magic to it. No fancy algorithms, no need for elaborate architectures or any of that advanced stuff you learned in schools. Just be a code monkey.
  But lest we get too smug about how business apps don't require any real thinking--well, even "advanced" projects like compilers or graphics engines or AI neural nets use only 2% "thinking" code and 98% "plumbing" code (parsing, data storage, etc). Coding is pretty much the same the world over.

Sexist
Wednesday, April 28, 2004

Most real world languages were taught in optional seminars during my education.  I think this is a good way to go.  I honestly don't think C is that good of a teaching language, so teaching it as a third year seminar seems reasonable to me. 

Languages are just languages.  I prefer some over others, but they aren't all there is to software development.  I personally used Modula 2 for most of my CS classes and I think that is was fine choice, even though it has little commercial support.  In fact I think Modula 2 is superior to many "modern" languages, and learning it made me a better developer.

christopher baus (www.baus.net)
Wednesday, April 28, 2004

Many universities are attempting to address the issues that many of you have raised by creating a software engineering program which would be to computer science what mechanical engineering is to physics.

For years universities have been pressured both by industry and by students to have a "more practical" computer science program. In many schools the quality of the computer science program has suffered from attempts to blend the theoretical with the practical -- resulting in neither aspect being taught in a satisfactory way.

Matt
Wednesday, April 28, 2004

"No fancy algorithms, no need for elaborate architectures or any of that advanced stuff you learned in schools. Just be a code monkey."

Sexist, I think I worked on one of the apps you wrote.

Philo <- currently working on a "business app" that uses polar coordinates, linear least squares fitting, and a bunch of geometry & vector math.

Philo
Wednesday, April 28, 2004

Someone answer this question:  How in the world can you *really* understand datastructures, and OO concepts, without knowing how to apply them in the real world?  Do you really think someone can be taught datastructures without actually trying to use them in a lifelike situation?  To me, it just doesn't seem possible.  Learning a high level language well and some of the basic APIs seems like a requirement before you can get into more theoretical concepts.  Otherwise, your just wasting the poor students time.

vince
Wednesday, April 28, 2004

"I'd say it took me 10 years of using C every day to really learn it completely."

But it didn't take you 10 years to learn the syntax and keywords of C, which is all the language is... Weren't you really learning software development using structured programming, that happened to be in C?

Ron
Wednesday, April 28, 2004

--
How in the world can you *really* understand datastructures, and OO concepts, without knowing how to apply them in the real world?  Do you really think someone can be taught datastructures without actually trying to use them in a lifelike situation?
--

They don't learn about these data structures in a vacuum. In most universities the classes have accompanying programming assignments in which they have to implement and use these data structures.

I think that qualifies for really understanding them.

Andrew Hurst
Wednesday, April 28, 2004

"In most universities the classes have accompanying programming assignments in which they have to implement and use these data structures."

Yup.  There is alot of programming in a lot of courses.  In one of my operating system courses I had to implement a multithreaded operating system scheduling simulator that ran on Solaris.  The point of the assignment was to understand the schedular AND to understand multithreaded application implementation.  Fun stuff.

I took some very valuable courses and a few not-so-valuable ones.  But overall, I think getting an degree was a worthwhile excerise.  How many people get to run through the entire Waterfall lifecycle (requirements, umpteen design documents, and implementation) before their first job?

Almost Anonymous
Wednesday, April 28, 2004

Give a man a fish, you feed him for a day; teach him how to fish, you feed him for life.

It's easy to learn a language; it's hard to learn how to program. A good college will not just teach you algorithms and data structures; you'll also learn OOP, declarative programming, RDBMS concepts, GUI programming, distributed systems, and some rudimentary design skills. In order to do that, you should end up with working knowledge of several languages. You will also pick up invaluable debugging skills along the way.

I think this is enough foundation to be prepared for a junior programming position, in which you should easily be able to start being productive and improve the programming language skills.

I do, however, think that the education should be conducted in popular wide-accepted languages such as C/C++/Java rather than some obscure stuff like Modula 3 or SmallTalk the the professor might prefer because it's a "purer" language in his opinion...

genius
Wednesday, April 28, 2004

Philo, if we tried to get jobs based solely on what we learn in school, then you're right .. only about 2% of the people would get hired.  (And I'd pity the english majors.)  But we always augment our classroom learning with other stuff too.  In the CS classroom, you learn about algorithms, the theory of microprocessors, compilers, interpreted environments, etc.  Stuff that's going to be valid 20 years from now.  A foundation for everything else.  Yes, you need a language to learn this in, and I think it should be a moden one, but I don't think you should spend a whole bunch of time learning the nitty-gritty details of whatever language it is.

While you're writing real apps (on the side, as an intern, with your buddies, previous jobs, etc) you learn how to use those algorithms and theories to real world situations.  You learn nitty gritty details, and gain experience.  They're the kind of skills that are likely to be out of date in 2 years, but hopefully you'll still be learning new things that whole time and 2 years from now will be proficient in whatever else is the new fad.

Of course there's a bit of the former in the latter and vice-versa.  But that's the general idea, IMHO.

Michael Kale
Wednesday, April 28, 2004

Allow a couple of years for it to be clear that your high level language has a future.

Then allow a couple more years for your university staff to get profiicient enough in it to teach it to a high leve.

Then add four years oof your CS course.

And you'll just about graduate when your language of choice is going to be superseded.

Stephen Jones
Wednesday, April 28, 2004

What a disconnect.  I spoke with a number of students and academic types over the weekend.  Their particular schools against biased against lisp and even Scheme.  They ARE taught Java.

I'm irc chatting right now with a dude who uses real tools like Python at work.  His team is having a hard time hiring good people!  Despite not hiring specifically for Python experience.  People here have likely heard of the company, they're in the US.  They can't increase their burn rate without compromising code quality, despite having the will.  (I'm sure some guy will flame that his company must be awful.  Tell it to those who get to telecommute.)

Cynically speaking, industry has always wanted universities to churn out coderbots so it can work them 80 hr weeks until they're unemployable at 35.  This happened during the internet boom; decent university departments struggled to keep some measure of quality, but the pressure was strong, and seniors in 2001 were left hanging.

The problem is that schools turn out people who don't give a damn about programming, who aren't going to take the time to code one ugly little Xava# app to pretend they know the language.  And still industry wants academia to teach single-paradigm languges like C++ --  Alan Kay: "I invented the term Object-Oriented and I can tell you I did not have C++ in mind." -- without considering what that does to developing minds.

Tayssir John Gabbour
Wednesday, April 28, 2004

I would personally like to see the following topics covered in more depth in university:

*  design and architecture
*  multithreading and designing for thread safety
*  internationalization (eg, UNICODE, etc)

The first is an obvious point, and I think it fits squarely even into a theoretical curriculum.

The second is less obvious, but it's just plain necessary.  How many graduates really understand threads, and their implications for designing a sound and usable software system?

The third is a very practical business concern, and as has been pointed out, very often overlooked.  The idea of localizing software should be beaten into everyone's head, and furthermore, creating UIs for people around the world is an important UI theory concept.

specifics
Wednesday, April 28, 2004

>But it didn't take you 10 years to learn the syntax and keywords of C, which is all the language is.

There is much much much more to C than its syntax and keywords. The syntax and keywords are nothing more than the rudimentary basis to build a parser skeleton and tell you nothing at all about the language.

Sure, someone can learn the syntax and keywords in under a week. But, knowing that and no more, they will be utterly useless as a programmer.

> Weren't you really learning software development using structured programming, that happened to be in C?

I wasn't refering to learning architecture in the 10 yrs; I guess I can throw that in, though it's not really learning but rather inventing since there's little useful resources to learn from - I learn stuff by inventing it from first principles generally.

Regarding structured programming, I've never really programmed in C in a pure structural manner - it's always been OOP in C for me, since day one.

Now, knowing C, I was able to write programs productively in Perl after about a week of study, but even though I have written extensively in Perl over the last few years, I don't know the language yet.

Java was the same way - took a week or two to get to the point where I could write productively in it, but I don't really know Java.

If I wrote in Java or Perl every day for 10 years, then I would know those languages.

Dennis Atkins
Wednesday, April 28, 2004

It's not the language per se that takes 10 years to learn, it's the libraries and platform(s) associated with the language.

T. Norman
Wednesday, April 28, 2004

Threading is overrated.  If I had my way I'd make people find race conditions in Multithreaded code so they'd never be tempted to start another thread again. 

christopher baus (www.baus.net)
Wednesday, April 28, 2004

With any popular modern programming language, the semantics are much much more complicated than the syntax.  On the other hand, there are only a few reasonably different semantic models in use in the software business.

Kalani
Wednesday, April 28, 2004

Dennis, you're just playing semantics... if you can write productively in the language, then you know the language. You picked up Perl and Java in a week because you already knew structured programming (OOP in C or C++ is structured programming, as opposed to functional like, say, Lisp). And that's why schools teach structured programming, and not "languages" that like somebody pointed out can be taught with a weekend seminar and some photocopied handouts.

Ron
Wednesday, April 28, 2004

Eh? You can write 'functional' programs in C/C++ and 'procedural' programs in Lisp.  AFAIK, 'functional' essentially refers to only using stateless functions (and sometimes people use it to mean a language with functions as first-class data types, which C/C++ qualifies as even though anonymous functions aren't allowed).

Kalani
Wednesday, April 28, 2004

"Correct" code has several attributes:

* Lack of bugs
* Speed of execution
* Interface safety (getter & setters, etc.)
* Thread safety
* Error handling

These are all important, but there are additional real-world factors that determine the "goodness" of a piece of code:

* Speed of development
* Simplicity
* Maintainability
* Documentation
* Expandability
* Does what the user wants/needs
* Plays well with other modules

The first group are independent goals.  i.e. it's possible to achieve all five.  The second group requires tradeoffs and cost-benefit analysis based on the type of project you're working on.

The latter set of criteria are probably more important to career success than the first.  I've yet to see anyone fired for not being thread-safe.

It would makes sense that these topics should be stressed in school, but they seem to fall by the wayside.

Is it possible to learn these in a classroom setting?  I don't know.  Integrating some project management into CS curriculum wouldn't hurt.  Perhaps there should be two degrees: "Computer Science" and "Software Engineering".

My personal experience is that engineers come out of school wanting to use the fancy tricks they've learned.  That's normal and healthy, but programming as a profession doesn't provide good checks and balances.  A building architect would never be able to get away with putting a feng-shie marble lobby in an cheap corporate park office.  It's not uncommon, though, to see a J2EE or COM+ solution deployed to solve something that could easily be done with MS Access.  What the difference?  Apprenticeship?  Supervision?  Lack of standard industry practices?

It's the classic wisdom vs. knowledge debate.  There's a certain world-wearyness that you'll see in an MBA graduate from Columbia that ends up making them successful.  How can that be replicated for CS?

Bill Carlson
Wednesday, April 28, 2004

Bill, interesting observations.  I don't think classes are TEACHING code "goodness".  I know I wasn't taught code goodness.  It took a nice boss a while back  to come to me and say "your code is ok, but it could be a lot better".  It seems to me universities are more interested in teaching datastructures, OO concepts, the latest APIs, all very good stuff, but not how to be VERY good at the basics.

vince
Wednesday, April 28, 2004

Please let's not redefine Software Engineering, which is a fine and worthy field to mean an associates degree in coding.

SE has nothing to do with specific languages or apis.

***

On the one week thing, who knows. I think I do know how to  write code and it's a minor skill in the big picture. Interestingly, at school, there were NO classes in languages as part of the degree program. It was assumed that you knew how to program in at least a few languages when you arrived. If you were assigned a project where a specific language was required, it was up to you to track down the resources and allocate the time to learn that language or tool.

C is like a scapel, a hammer, or a soldering iron -- it's just one of the tools you might use to get a job done. Can be productive using the tool in a matter of hours. But mastering the tool happens over a period of years. It is not something that can be taught but is something that comes from experience -- like Joel's talk about working with those bread machines in that commercial bakery.

A school teaching how to hold a hammer or such, like these local trade schools and many foreign universities, seem very worthless, just as worthless as a school that teaches one how to do surgery by focusing on scalpel technique. Someone knowing how to cut with a scalpel is in no way qualified to be a surgeon, exactly the same as people with these trade degrees that teach languages and APIs and focus on passing lame 'certs' are not qualified to be developers.

Dennis Atkins
Thursday, April 29, 2004

Now we're back to the 'cargo cult science' discussion.  The point is that (for any reasonably complicated activity) people can't practice something just by 'mirroring' the behavior of experienced practitioners.  The difference between the actions that both sets of people will take is that one set has a working model of the problem domain in their heads while the other one doesn't.  That's why we teach people theory in the first place.  After that, any specialization that people pick up is just fine (but it doesn't work if the specialization comes first).

That's why it's not necessarily that important to teach students the most cutting-edge modern languages, in my opinion.  The crucial theory can get lost in the details.

Kalani
Thursday, April 29, 2004

PS: There was a good discussion on this topic on flipcode.com:

http://www.flipcode.com/cgi-bin/msg.cgi?showThread=ContemporaryComputerScience&forum=discuss&id=-1

Kalani
Thursday, April 29, 2004

I'd like to point out to those who think they can learn a language in a one week seminar that their experience must be limited to fairly simple languages like Visual Basic and PHP.  Anybody who works with C or C++ knows that it is indeed a life long learning experience. 

If you think that you can learn C in a week, I invite you to try.  Here's a challenge for you:

Write a word translation program.  The input will be a text stream, and a mapping of words and the words to change them to. A word is defined by alphanumeric data separated by whitespace or punctuation.  The size of the map is unknown and unlimited, except by system resources.  The output will be the text stream with the replaced words.  Also note that if one of the mapped words is "fashion" it shouldn't trip off on "fashionable".  There also isn't any limit on the length of words in the input stream.

This isn't honestly very hard, but if you've never seen C before, you're unlikley to succeed in a week.  Also note that using C++ for this challenge isn't kosher (where the solution will be exceptionally fast).  It has to be K&R C.

Snarfing somebody else's code also isn't the right way to solve this.  Actually prove that you could learn enough C to do this in a week.

Clay Dowling
Thursday, April 29, 2004

Hey Dennis, if it took you 10 years to learn C then I suggest you don't start on C++ or Java.  You won't live long enough to learn them to any degree of expertise.  C has got to be the simplest language I've ever learned.

I work for a Python based shop.  Their opinion here - and I've seen it again and again - is that a smart, experienced developer can learn Python in less than a week.  Not having Python experience is not considered a negative for employment here.

There are always things that make me reach for the Pocket Reference (like just today I forget whether Python's test for equality is "eq" or "==" because Perl is one way, and Java is the other, and I forget which one if Python).

5v3n
Thursday, April 29, 2004

Sven,

I found that both C++ and Java are much quicker to get up to productive speed with than C. Python is a great educational language but is much too slow for almost all serious applications.

Dennis Atkins
Thursday, April 29, 2004

What makes you think that?

Kalani
Thursday, April 29, 2004

*  Recent Topics

*  Fog Creek Home