Wednesday, February 17, 2010

Can't engineers program anymore?

I taught junior-level thermodynamics three times in a row as a fresh assistant professor at Florida State. There was a small Matlab (actually Octave, but doesn't really matter) component to the class, so that we could solve some realistic problems without sweating the algebra or arithmetic, and let the computer do the dirty work.

But instead of being wildly popular, it was easily the most-unloved portion of an otherwise well-received course. I have talked to colleagues in other engineering departments here and elsewhere, and the lack of programming skills seems to be a pervasive phenomenon, independent of the rank of the university.

It has indeed become a national epidemic, or maybe perhaps, even a global pandemic.

To me, this seemed unexplainable, at first. Kids these days are exposed to computers and other programmable gadgets at such an early age. They are comfortable with them. How then, could their ability to squeeze performance out of these devices be so poor?

And we are talking Matlab - which if you ask me - is not even a real programming language. I mean there are no classes, structures, libraries, templates, or any of the other hallmarks of a real programming language. Spreadsheets like Excel are all they can handle, and even there, they aren't power-users who exploit the underlying programmability.

One thing I realized gradually, was that electronic equipment and computers have become extraordinarily complex. When I was first exposed to computers, it was easy and fascinating to poke "under the hood", and tweak things. This was true of other electronic equipment like radios, TVs and VCRs

As Feynman puts it (via this amazing blog):
Radio circuits were much easier to understand in those days because everything was out in the open. After you took the set apart (it was a big problem to find the right screws), you could see this was a resistor, that’s a condenser, here’s a this, there’s a that; they were all labeled. And if wax had been dripping from the condenser, it was too hot and you could tell that the condenser was burned out. If there was charcoal on one of the resistors you knew where the trouble was. Or, if you couldn’t tell what was the matter by looking at it, you’d test it with your voltmeter and see whether voltage was coming through. The sets were simple, the circuits were not complicated. The voltage on the grids was always about one and a half or two volts and the voltages on the plates were one hundred or two hundred, DC. So it wasn’t hard for me to fix a radio by understanding what was going on inside, noticing that something wasn’t working right, and fixing it.
And as a commentator on the same posting wrote:
The problem, I think, is much wider and deeper than just for physics. Philosopher Stephen Clarke has argued that we are currently in a unique transition point in the history of technology: From a time when most people could understand (or could quickly learn) how most technologies they encountered in their everday life worked, to a time when almost no ordinary person can understand how any everday technology works.
I will blog more about this topic in the near future, but if you have any ideas and suggestions to make programming "cool" do let me know.

7 comments:

Ankur Kulkarni said...

May be you can begin assessing if the students are good at other things similar to coding - such as puzzle solving or simple maths. It would surprise me if they were. The reason is the following:

I have TAed a course where students have to code and have been left aghast by how immobile the students seem when they code. It is as if they have a "coder's block" - they just can't seem to get themselves to plan the logic, decide variables and constants and then type the code. And this does not limit itself to coding. They do not figure out trivial "trick" questions. They do not understand concepts behind simple mathematical jugglery like, say, creating a random variable with a given distribution from a uniform random variable. Anything beyond the obvious and the apparent, they struggle at.

My feeling is that there is significant shallowness in the mathematical training of these kids. They don't understand the concepts behind mathematical problem solving, they only know to manipulate symbols on a page, without knowing the meaning of what they are doing. Most surely don't understand the idea of a variable in maths and what it means to "find" it.

Sachin Shanbhag said...

Ankur, I find nodding at more of your observations, than I would like. What bothers me is whether this is a trend. What do you think? Has it always been this way, or is this getting worse?

Ankur Kulkarni said...

Well I don't know if there is trend, since I haven't been in the US long enough, just 4 years. I can muster a guess though.

There seems to have occurred in the US, somewhere in the 70's, a shift away from engineering. It's consequences are seen today where the number engineering faculty or scientists in companies of US origin are disproportionately small. The shift seems to have happened towards business and the arts. I think this has led to a nation-wide apathy towards mathematics and engineering, and seeing it as something "unAmerican".

And that persists today. In fact, in the minds of many engineering alumni of my university who are today into business, there is a a certain arrogance. They seem to think that struggling with physical objects is the condition of the third world. The first world thinks only of higher-level issues like HR, finance, business and so on.

Ankur Kulkarni said...

Hi Sachin,

I know this is an old post, but I found something that is related to it here. I commented above about the attitude towards mathematics in American kids. Today I found an article by Terrence Tao on CNN.com:

http://www.cnn.com/2010/OPINION/04/23/tao.who.am.i/index.html?hpt=C2

While the article is nice, what is illuminating is reading the comments which reveal the attitude towards maths of at least some of the readers. Here's a small sampling:

"But can he fight? Numbers don't mean squat in a good old-fashioned street fight. I bet he's never been in a real fight all his life. In which case, he's not even a real man. The only thing guys like him can teach is how to run away in the face of danger."

"When I was 17, I smoked a lot of weed and still managed to get a perfect score on my SAT. You don't have to be smart and a nerd at the same time. You can still be smart and cool at the same time."

"You dont have to waste your childhood to become arrogant and "smart" like this guy. (no offense to him).
im 17, i scored a perfect score on my SAT and i play xbox all the time. and hang out with friends, and acutally dont study that much.
you DONT HAVE TO be a crazy kid who does nothing but study to be smart. i have a social life, i play xbox, modern warfare 2 ALL THE TIME. and (not to show off) i got a 800/800 on the math section of the SAT in a breeze.
playing xbox and having "fun" is fine for those of u who say it isn't as long as u put it in your mind that wut u do as a teen in school, will affect your whole life (just saying...im just saying)"

Sachin Shanbhag said...

Words like "painful" and "sad" come to mind, reading the comments. over the long run, sustained hard work usually trumps pure smarts.

however, working hard was never really cool, even when i was a student. in fact even at iit, we classified toppers into "muggoo" (hard work) and "crackoo" (exam-smarts), and the latter category was more exalted. so hopefully, there is some of that false bravado motivating some of the comments.

chaosFarmer said...

The title of this could also be called "Can't Teachers teach anymore?"

If the teachers truly thought that programming and math were important, they would change the homework and tests to reflect this.

Create problems that require brute force problem solving only a computer can do. For example, make the students parse data out of hundreds of files, and based on the contents of the files perform different actions.

"They do not figure out trivial "trick" questions" -- Ankur

I'm not really a fan of trick questions, because it seems the only reason the giver of the trick question knows the answer is because they have heard it before.

I'm more of a fan of people learning something practical they can build on top of. Not just a bunch of tricks they can use at parties to impress their friends.

If you think about, trick questions are kind of like frat boy hazing for engineers.

If you are looking for a way to get people more interested in coding you can try some of these:
http://processing.org/
http://www.openframeworks.cc/
http://structuresynth.sourceforge.net/index.php
http://blog.hvidtfeldts.net/

Sachin Shanbhag said...

@chaosFarmer: i agree with you that teaching programming via visualization software is a good idea, since it forces people to think logically and has a desirable feature in instant karma. that should ideally happen before college.

"If the teachers truly thought that programming and math were important, they would change the homework and tests to reflect this."
In my own department we've tried to do that, but let me tell you - it is extremely unpopular. we have to sell it like medicine. popularity is a prerequisite, but it does help when you're fighting systemic inertia.

"I'm not really a fan of trick questions, because it seems the only reason the giver of the trick question knows the answer is because they have heard it before."
On the other hand, I am a fan of reasonable trick questions, posed in-class or before exams, precisely because they force you to appreciate subtle distinctions. Just like logic puzzles, you can get better at teasing apart these questions by practice.