Re: [Edu-sig] Microsoft's KPL

I had written re: Galison's book
Turns out that the fact that Einstein happened to get a day job in a patent office in Switzerland - where the timekeeping action has always been - seems to have been the kind of serendipity that contributes to a Leap Forward. That day job got him to where he got much more directly than it is generally understood.
I would like to complete a circle here. And relate it back to the learning and teaching of programming (and mathematics). The most general point of the Galison book is that the general meme about how science progresses needs some adjusting. One way to state the prevailing meme - is that, say, abstract mathematicians work in an atmosphere of pure inquiry playing with ideas, and then at some point those ideas, thought to be purely abstract, are found to have some application to some real problem in, say, physics. The meme - according to the history lessons discussed in this book - underplays the extent to which the abstract ideas are informed in the first case by the efforts of the practical scientists and engineers (and politicians and businessmen) to solve very worldly problems. Like how do we sync our clocks in remote locations so that train schedules make sense. Programming. Personal frame of reference: My interest in mathematics is purely in the abstract - my goal is to gain mindfulness. But I find that goal is only achievable by working in the concrete, and I have found that the best concrete approach - for myself - has been in the practical practice of solving problems in the context of programming. Setting out to make concrete things occur, and struggling toward the solution that will induce them to incur. My interest in programming in purely practical. As above - making concrete things occur. And I find that my efforts to do so inform a whole level of unanticipated appreciation of a different kind of abstract thinking - connected to the abstractions that computer scientists and programming language designers live within and develop. When I say that I want to learn to *program*, not "learn to program", I think I am meaning that I want my struggles to induce the practical to allow me to discover on my own the abstract issues. Which is another way of insisting on being allowed to make my own mistakes. Guido is quoted somewhere recently (I did not see the quote first hand and cannot vouch for its authenticity) that Python is an experiment in how much freedom to give programmers. Many people seem to object to Python in the real world, "business critical" environment, because by some standards it allows programmers too much freedom to make mistakes. I don't need to join that debate, nor am I qualified to participate in it. But I am certainly convinced that the freedom to make mistakes is unassailable as part of a learning process. And therefore conclude that programming in the style that Python allows is an unassailable and under-utilized educational resource. The end. Art

office in Switzerland - where the timekeeping action has always been -
<hushed whisper> Wait a minute, isn't Kirby secretly Swiss? Or was that Bill Mahrer (HBO)? <click target = "http://www.grunch.net/synergetics/urner.html" /> Uh, ok, not so secret then. </hushed whisper> Kirby

Behalf Of Arthur
But I am certainly convinced that the freedom to make mistakes is unassailable as part of a learning process. And therefore conclude that programming in the style that Python allows is an unassailable and under-utilized educational resource.
Clarifying what I mean here, and asking some real questions at the same time. No, I don't think writing code in Python is so free as to be more subject to the problems of programmer error, but that's OK because it is good for learning. What I do mean perhaps goes back to the discussion of properties and the Uniform Access Principle. There are languages that believe so strongly in the importance of the UAP, that it is imposed within the design of the language - from what I see Ruby and Eiffel offering the strictest implementations. But if one were to be learning programming from, say Ruby, it seems to me that there are at least two things that it will be near impossible to discover: 1) The basis for a conclusion that the Uniform Access Principle should be considered an inviolate principle. 2) The basis for a conclusion that it should not be. Because one cannot explore the possibilities (and problems) of working both within and outside of it. The Python environment - providing properties as a convenience for exploring the possibilities of working within it, and the ability to ignore them for exploring the possibilities of working without - seems optimum. For learners/explorers - for sure. But I would expect for fully grown-up programmers as all. That being said - still not getting the UAP thing. Which seems to be saying that distinguishing between assigned attributes and methods that do not take parameters is an implementation detail, and hiding it, benefits (is essential to) API design flexibility - via a decoupling. But why is distinguishing between methods that do and do not take parameters any more justified, and isn't doing so its own kind of violation of a principle of decoupling. None of this questioning coming from the abstract realm - because I am exploring in a language that does inhibit exploration. If anyone is still reading... One of the cases in which I used properties and thought I had it right - on the getting of a vector I wanted the return, for purposed of drawing, to be constrained to some MAX value, which is a module level constant. So I had a method that would return a constrained vector, and since the vector itself was a plain attribute, it felt right to flatten this constrained version of a vector via a property. Now I find there are advantages to having the MAX value be sensitive to certain conditions of the caller. And I want the caller to call the method with a MAX value that is appropriate to its needs. So I have no choice but to de-propertize the method. In the case of Kirby's Triangle angle, might it be wise to avoid the possibility of exploding any spacecraft, and insist that a contract be formed with the caller so that the caller must specify whether they are expecting the return value in radians or degrees? Seems maybe yes. But that requires a parameter, though changes nothing else about what the angle is in relation to the Triangle. So the UAP is not getting through here. Art

In the case of Kirby's Triangle angle, might it be wise to avoid the possibility of exploding any spacecraft, and insist that a contract be formed with the caller so that the caller must specify whether they are expecting the return value in radians or degrees? Seems maybe yes. But that requires a parameter, though changes nothing else about what the angle is in relation to the Triangle.
So the UAP is not getting through here.
Art
Note that passing an argument is not the only way to tell an object stuff like "my preferred unit of measure." That could also be regarded as a change in state, and be handled with another attribute, e.g.:
Triangle.anglemeasure = 'degrees' # set default class attribute mytri = Triangle((30,60,90)) # instantiate using degrees mytri.anglemeasure = 'radians' # change state on instance mytri.C # consult angle 1.5707963267948966 mytri = mytri * 2 # double size -- angles unaffected mytri.anglemeasure = 'degrees' # change reporting unit mytri.C # consult angle (again) 90.0
I'm not claiming this approach is in any ultimate sense better. I'm merely pointing out that this is another approach. Kirby

Hello EDU-SIG, CS enrollments seem to be dropping drastically everywhere. Many factors probably are at fault (dot-com bust, off-shoring hype), but there seem to be others. One in particular is that so few HS graduates seem ready analytically to join in. This is a problem to discuss elsewhere, I suppose, but I was wondering if you could point me to info (such as cp4e - I've only heard the name) that can be considered to help the cause. I'd like to know how to better recruit from the secondary schools, and also how to influence them to better prepare students. I know Kirby is deep into this. I'd like to know what I can do as a college professor. The demand for CS expertise isn't going away, and the jobs are starting to come back now, but with fewer locals to fill them, off-shoring will only increase. I'd like to see our citizens consider CS as viable as business or law. I mean, someone has to do the "real work" :-). Honestly, I can't imagine a field that better combines both sides of the brain with a service ethic and a dimension of fun than CS. But it looks like so much nerd-ness or drivel to the uninitiated. Any ideas would be appreciated. -- Best regards, Chuck

On Wed, Oct 12, 2005 at 08:25:56PM -0600, Chuck Allison wrote:
Hello EDU-SIG,
CS enrollments seem to be dropping drastically everywhere. Many factors probably are at fault (dot-com bust, off-shoring hype), but there seem to be others. One in particular is that so few HS graduates seem ready analytically to join in.
...
Honestly, I can't imagine a field that better combines both sides of the brain with a service ethic and a dimension of fun than CS. But it looks like so much nerd-ness or drivel to the uninitiated.
Any ideas would be appreciated.
I noticed a profound shift occur at Glencoe High School in Hillsboro, Oregon between 1985 (when I graduated from there) and 1995-1998 when I visited there to give talks for national engineering week. In one memorable experience, I spoke to the Biochemistry students, in the same classroom where I had taken that same class a decade earlier. These were the top 20 math and science students in the school. I asked how many of them wanted to become engineers. I got zero responses. I was floored. Based on my experience of the past, I had expected least a handful! I said "engineering is a good career, it pays good money, why are you not interested?" One kid raised his hand and said "It's too hard." Another volunteered, "Yeah, I have a friend who is an engineering student and he has to work all the time." I was dumbfounded. It appeared as if these kids thought there was a hard road to success and an easy road to the same success, so planned to take the easy road. Chuck, we are up against a more difficult problem than just making CS look cool. CS is fun, of course, but it is also hard work, there is no disguising that. If the rising generation doesn't have the work ethic, there is really no substitute. In my experience, I noticed that among the successful American-born engineering students, a significant number of them had been raised on farms, where they had to get up at 5am every morning to milk the cows. In other words, they knew how to work. So what did I do? When I lived back in Oregon, we moved out to the country and we had goats and chickens, and my boys went out with me morning and evening to milk the goats. Now that we live in a different environment in North Carolina, I have taken a different route and have the boys help me in our home publishing business. They have gotten pretty good at binding books. (Just a little plug: anyone who buys my book is contributing to my children's education in multiple ways.) David H -- David Handy Computer Programming is Fun! Beginning Computer Programming with Python http://www.handysoftware.com/cpif/

Hello David, This makes so much sense it's scary. Except I don't know how to explain myself. I was a deprived city-slicker who did not know how to work. College woke me up. But to be brutally honest, I didn't have anything else to do but go to college, and I had no other area of strength besides mathematics, so that's where I started. Not typical, I suppose. But I totally agree - the work ethic is diminishing. But if we can "wake some up" like I was awakened, we can grab a few good ones, no? Now that you mention it, we took special pains to teach our children to work (without a farm - they had to earn what they got). My son is now a stellar Ph.D. candidate in M.E. at U. of Mich. My daughter is a devoted mother of two and a culinary artist. Food for thought (sic). As an interesting data point, most of our students are older and/or married and/or working, so we're doing okay there. It's getting them into the program in the first place that's the problem. But I'm sure that across the country many bail because of the work issue. Good insight. Wednesday, October 12, 2005, 9:45:02 PM, you wrote: DH> On Wed, Oct 12, 2005 at 08:25:56PM -0600, Chuck Allison wrote:
Hello EDU-SIG,
CS enrollments seem to be dropping drastically everywhere. Many factors probably are at fault (dot-com bust, off-shoring hype), but there seem to be others. One in particular is that so few HS graduates seem ready analytically to join in.
DH> ...
Honestly, I can't imagine a field that better combines both sides of the brain with a service ethic and a dimension of fun than CS. But it looks like so much nerd-ness or drivel to the uninitiated.
Any ideas would be appreciated.
DH> I noticed a profound shift occur at Glencoe High School in Hillsboro, Oregon DH> between 1985 (when I graduated from there) and 1995-1998 when I visited DH> there to give talks for national engineering week. In one memorable DH> experience, I spoke to the Biochemistry students, in the same classroom DH> where I had taken that same class a decade earlier. These were the top 20 DH> math and science students in the school. I asked how many of them wanted to DH> become engineers. I got zero responses. I was floored. Based on my DH> experience of the past, I had expected least a handful! I said "engineering DH> is a good career, it pays good money, why are you not interested?" One kid DH> raised his hand and said "It's too hard." Another volunteered, "Yeah, I have DH> a friend who is an engineering student and he has to work all the time." I DH> was dumbfounded. It appeared as if these kids thought there was a hard road DH> to success and an easy road to the same success, so planned to take the easy DH> road. DH> Chuck, we are up against a more difficult problem than just making CS look DH> cool. CS is fun, of course, but it is also hard work, there is no disguising DH> that. If the rising generation doesn't have the work ethic, there is really DH> no substitute. DH> In my experience, I noticed that among the successful American-born DH> engineering students, a significant number of them had been raised on farms, DH> where they had to get up at 5am every morning to milk the cows. In other DH> words, they knew how to work. So what did I do? When I lived back in DH> Oregon, we moved out to the country and we had goats and chickens, and my DH> boys went out with me morning and evening to milk the goats. Now that we DH> live in a different environment in North Carolina, I have taken a different DH> route and have the boys help me in our home publishing business. They have DH> gotten pretty good at binding books. (Just a little plug: anyone who buys my DH> book is contributing to my children's education in multiple ways.) DH> David H -- Best regards, Chuck

-----Original Message----- From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On Behalf Of Chuck Allison Sent: Thursday, October 13, 2005 12:02 AM To: David Handy
As an interesting data point, most of our students are older and/or married and/or working, so we're doing okay there. It's getting them into the program in the first place that's the problem. But I'm sure that across the country many bail because of the work issue. Good insight.
I think this is an interesting datapoint. Kids grow up in the US, just slower. Among the reasons, I think, that things like Law attract so many brighter students is that no commitment to it is required before graduate school. One can be a sort of dissolute undergraduate dabbling in any of the softer, less demanding Liberal Arts, knowing that one is not ready to commit to any difficult and demanding course of study - and then "hit a books" in a serious way first as a graduate student. Business School is another example. There is nothing equivalent in the sciences. The structure is such that one can only go down that road if one makes the decision to do so early - as a practical matter before many students are ready to make such a commitment/decision. Even if, given time, that is the decision they might be likely to make. Because by the time they might, they are prerequisited out of the game. Science programs, including computer science programs, that kicked in later in a student's career might help as a work-around. Art

On 10/12/05, David Handy <cpif@handysoftware.com> wrote:
On Wed, Oct 12, 2005 at 08:25:56PM -0600, Chuck Allison wrote:
CS enrollments seem to be dropping drastically everywhere. Many factors probably are at fault (dot-com bust, off-shoring hype), but there seem to be others. One in particular is that so few HS graduates seem ready analytically to join in..
I noticed a profound shift occur at Glencoe High School... ... I asked how many of them wanted to become engineers. I got zero responses. I was floored. ... Chuck, we are up against a more difficult problem than just making CS look cool. CS is fun, of course, but it is also hard work, there is no disguising that. If the rising generation doesn't have the work ethic, there is really no substitute.
In my experience, I noticed that among the successful American-born engineering students, a significant number of them had been raised on farms,
David H
chuck, david, yes, this is very disturbing indeed. as a society, i think we are definitely "falling behind." it's true that most HS grads are *not* ready for the rigors of engineering in college. i too, graduated HS in 1985 when it wasn't all that bad. when i completed grad school 10 years later, i did notice that the *majority* of graduate students in the CS dept were born overseas. it's not that we *don't* have the talent, but that they have been diverted elsewhere. sadly, i don't see this trend reversing anytime soon, and yes, this will make offshoring even more attractive to employers. i (mostly) joke that in 20 years from now, i'll be flipping burgers. i hope that it doesn't get to that point. if we lose our ability to innovate, that's the end of the US as we know it. this country is founded on innovation and hard work -- does this come from the farmland too? i feel that we are definitely losing the edge in everything science and math-oriented. people are not taking care of themselves... we are getting fat and lazy, letting other people do the dirty work for us. in a way, this applies to your argument. why should i do the hard work when someone else will do it for me (and more cheaply). we can only slow it down with wonderful tools like python. jeffrey elkner and other educators have seen better retention rates in their classes, but still, i don't want this to be just a stem in the tide. somehow, good-paying, hard-working, and smart need to be attractive to people as something that they want to be. we don't offshore our medical services right? there still need to be doctors; their presense is locally required. unfortunately, that isn't necessarily true for engineering. oh, and to answer your original inquiry, here's a link to CP4E: http://www.python.org/cp4e/ -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2006,2001 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com
participants (5)
-
Arthur
-
Chuck Allison
-
David Handy
-
Kirby Urner
-
w chun