Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #61590 > unrolled thread
| Started by | bob gailer <bgailer@gmail.com> |
|---|---|
| First post | 2013-12-11 11:01 -0500 |
| Last post | 2013-12-13 16:21 +0000 |
| Articles | 17 — 10 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Experiences/guidance on teaching Python as a first programming language bob gailer <bgailer@gmail.com> - 2013-12-11 11:01 -0500
Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-11 08:27 -0800
Re: Experiences/guidance on teaching Python as a first programming language Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-11 16:36 +0000
Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 03:45 +1100
Re: Experiences/guidance on teaching Python as a first programming language Roy Smith <roy@panix.com> - 2013-12-11 20:42 -0500
Re: Experiences/guidance on teaching Python as a first programming language Larry Martell <larry.martell@gmail.com> - 2013-12-11 21:07 -0500
Re: Experiences/guidance on teaching Python as a first programming language Roy Smith <roy@panix.com> - 2013-12-11 21:31 -0500
The increasing disempowerment of the computer user (was: Experiences/guidance on teaching Python as a first programming language) Ben Finney <ben+python@benfinney.id.au> - 2013-12-12 13:21 +1100
Re: The increasing disempowerment of the computer user Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-12-12 02:35 +0000
Re: The increasing disempowerment of the computer user Ben Finney <ben+python@benfinney.id.au> - 2013-12-12 13:35 +1100
Re: The increasing disempowerment of the computer user Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-12-12 10:59 +0000
Re: The increasing disempowerment of the computer user David Hutto <dwightdhutto@gmail.com> - 2013-12-14 00:44 -0500
Re: Experiences/guidance on teaching Python as a first programming language rusi <rustompmody@gmail.com> - 2013-12-11 19:52 -0800
Re: Experiences/guidance on teaching Python as a first programming language Chris Angelico <rosuav@gmail.com> - 2013-12-12 15:20 +1100
Re: Experiences/guidance on teaching Python as a first programming language bob gailer <bgailer@gmail.com> - 2013-12-12 11:51 -0500
Re: Experiences/guidance on teaching Python as a first programming language Larry Martell <larry.martell@gmail.com> - 2013-12-12 16:18 -0500
Re: Experiences/guidance on teaching Python as a first programming language Frank Miles <fpm@u.washington.edu> - 2013-12-13 16:21 +0000
| From | bob gailer <bgailer@gmail.com> |
|---|---|
| Date | 2013-12-11 11:01 -0500 |
| Subject | Re: Experiences/guidance on teaching Python as a first programming language |
| Message-ID | <mailman.3908.1386777719.18130.python-list@python.org> |
On 12/11/2013 3:43 AM, Chris Angelico wrote: > When you tell a story, it's important to engage the reader from the > start...explain "This is how to print Hello World to the > console" and worry about what exactly the console is (and how > redirection affects it) Highly agree. I was once given FORTRAN course materials and an assignment to teach this course. The first morning was spent on how to construct expressions! No context as to what a program was or what it might do or how to run it. As soon as that class was over I rewrote the materials so the first morning was how to write and run(batch job submission) a program that read a record, did a simple calculation and wrote the results. I certainly felt better about teaching this way. Asides: One student (PhD in Physics) looked at X = X + 1 and said "no it doesn't". Another wrote his first program. I took one look at it and saw the mistakes. I explained how to walk thru the program step by step. He exclaimed "In that much detail?".
[toc] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-12-11 08:27 -0800 |
| Message-ID | <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com> |
| In reply to | #61590 |
On Wednesday, December 11, 2013 9:31:42 PM UTC+5:30, bob gailer wrote:
> On 12/11/2013 3:43 AM, Chris Angelico wrote:
> > When you tell a story, it's important to engage the reader from the
> > start...explain "This is how to print Hello World to the
> > console" and worry about what exactly the console is (and how
> > redirection affects it)
> Highly agree. I was once given FORTRAN course materials and an
> assignment to teach this course. The first morning was spent on how to
> construct expressions! No context as to what a program was or what it
> might do or how to run it.
> As soon as that class was over I rewrote the materials so the first
> morning was how to write and run(batch job submission) a program that
> read a record, did a simple calculation and wrote the results.
Kernighan and Ritchie set an important "first" in our field by making
"Hello World" their first program.
People tend to under-estimate the importance of this:
Many assumptions need to be verified/truthified/dovetailed
starting from switching on the machine onwards for this to work.
And its quite a pleasurable sense of achievement when it finally holds
together -- something which is sorely missing in the Dijkstra approach.
However when we have an REPL language like python, one has the choice
of teaching the hello-world program as:
print ("Hello World")
or just
"Hello World"
The second needs one more assumption than the first, viz that we are in the
REPL, however on the whole it creates better habits in the kids.
[BTW: From the theoretical POV, imperative programming is 'unclean' because
of assignment statements. From the practical POV of a teacher, the
imperativeness of print is a bigger nuisance in students' thinking patterns
]
> I certainly felt better about teaching this way.
> Asides:
> One student (PhD in Physics) looked at X = X + 1 and said "no it doesn't".
Yes thats one issue in most modern imperative languages that the older generation
(Pascal-family) did not have, viz that assignment looks like equality.
> Another wrote his first program. I took one look at it and saw the
> mistakes. I explained how to walk thru the program step by step. He
> exclaimed "In that much detail?".
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-12-11 16:36 +0000 |
| Message-ID | <52a89474$0$29992$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #61598 |
On Wed, 11 Dec 2013 08:27:23 -0800, rusi wrote: > [BTW: From the theoretical POV, imperative programming is 'unclean' > because of assignment statements. From the practical POV of a teacher, > the imperativeness of print is a bigger nuisance in students' thinking > patterns ] +1 on this Trying to teach newbies to use return rather than print in their functions is one of the more difficult parts of teaching beginners. -- Steven
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-12-12 03:45 +1100 |
| Message-ID | <mailman.3915.1386780355.18130.python-list@python.org> |
| In reply to | #61598 |
On Thu, Dec 12, 2013 at 3:27 AM, rusi <rustompmody@gmail.com> wrote:
> However when we have an REPL language like python, one has the choice
> of teaching the hello-world program as:
>
> print ("Hello World")
>
> or just
>
> "Hello World"
>
> The second needs one more assumption than the first, viz that we are in the
> REPL, however on the whole it creates better habits in the kids.
How is the bare string creating better habits? The only time I've ever
been happy with bare strings having functionality[1] is in shell-like
languages (including REXX; the one time I built a REXX system in which
bare strings weren't executed as commands was a MUD, where command
handlers could use bare strings to send lines of text to the client,
and I wasn't happy with that - an explicit function would have been
better). I'd much rather teach a function that produces clean output
than depend on the REPL for Hello World. Now, depending on the REPL
for *expressions* is quite another thing.
>>> 1+2
3
That makes perfect sense! But it's using Python as a calculator, not
as a programming language. Python blurs the line a bit, but for
teaching programming, I'd use programming style even at the REPL:
>>> print("Hello, world!")
Hello, world!
ChrisA
[1] I don't have anything to footnote here, I just felt like having one.
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2013-12-11 20:42 -0500 |
| Message-ID | <roy-7CFB3C.20423211122013@news.panix.com> |
| In reply to | #61598 |
In article <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com>, rusi <rustompmody@gmail.com> wrote: > Kernighan and Ritchie set an important "first" in our field by making > "Hello World" their first program. Yup. > People tend to under-estimate the importance of this: > Many assumptions need to be verified/truthified/dovetailed > starting from switching on the machine onwards for this to work. At the time that they wrote it, very few people who used computers ever got anywhere near the power switch :-) But, the point is valid. To get "Hello, world" to print, you've got to figure out a lot of stuff. Predating the whole agile movement by two decades, it is the quintessential MVP. It compiles and runs. The rest is just adding features and fixing bugs.
[toc] | [prev] | [next] | [standalone]
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2013-12-11 21:07 -0500 |
| Message-ID | <mailman.3950.1386814058.18130.python-list@python.org> |
| In reply to | #61643 |
On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <roy@panix.com> wrote: > In article <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com>, > rusi <rustompmody@gmail.com> wrote: > >> Kernighan and Ritchie set an important "first" in our field by making >> "Hello World" their first program. > > Yup. > >> People tend to under-estimate the importance of this: >> Many assumptions need to be verified/truthified/dovetailed >> starting from switching on the machine onwards for this to work. > > At the time that they wrote it, very few people who used computers ever > got anywhere near the power switch :-) Nope. Long before that I was working on computers that didn't boot when you powered them up, You had to manually key in a bootstrap program from the front panel switches. (And no, this is not a takeoff of the Four Yorkshiremen sketch.)
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2013-12-11 21:31 -0500 |
| Message-ID | <roy-DB0F64.21315111122013@news.panix.com> |
| In reply to | #61647 |
In article <mailman.3950.1386814058.18130.python-list@python.org>, Larry Martell <larry.martell@gmail.com> wrote: > On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <roy@panix.com> wrote: > > In article <a34ada67-aa04-4f4d-b26d-e941cee03c4c@googlegroups.com>, > > rusi <rustompmody@gmail.com> wrote: > > > >> Kernighan and Ritchie set an important "first" in our field by making > >> "Hello World" their first program. > > > > Yup. > > > >> People tend to under-estimate the importance of this: > >> Many assumptions need to be verified/truthified/dovetailed > >> starting from switching on the machine onwards for this to work. > > > > At the time that they wrote it, very few people who used computers ever > > got anywhere near the power switch :-) > > Nope. Long before that I was working on computers that didn't boot > when you powered them up, You had to manually key in a bootstrap > program from the front panel switches. Or put a boot card in the reader and hit the IPL button :-)
[toc] | [prev] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2013-12-12 13:21 +1100 |
| Subject | The increasing disempowerment of the computer user (was: Experiences/guidance on teaching Python as a first programming language) |
| Message-ID | <mailman.3952.1386814915.18130.python-list@python.org> |
| In reply to | #61643 |
Larry Martell <larry.martell@gmail.com> writes: > On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <roy@panix.com> wrote: > > rusi <rustompmody@gmail.com> wrote: > > > >> Many assumptions need to be verified/truthified/dovetailed > >> starting from switching on the machine onwards for this to work. > > > > At the time that [Kerningham & Ritchie] wrote [the C programming > > language], very few people who used computers ever got anywhere near > > the power switch :-) > > Nope. Long before that I was working on computers that didn't boot > when you powered them up, You had to manually key in a bootstrap > program from the front panel switches. That's done by the *operator*, not the user. Most people who *used* those computers worked at terminals at a distance, and usually separated by a locked door, from the computer's power switch. > (And no, this is not a takeoff of the Four Yorkshiremen sketch.) The pendulum swings back and forth. Computer users are once again blithely handing all their agency and choice back to centralised operators (so-called “could computing”) who follow an agenda not of those users's choosing. Just as in the bad old days of 1960s centralised computing, complete with computer operators who dismiss the needs of their users. And who hold unquestionable authority to dictate how the computers may be used, regardless what the users want to do. Only, now we get worldwide unaccountable surveillance as part of the deal. But you tell the users of today about that, and they don't believe you. -- \ “If nature has made any one thing less susceptible than all | `\ others of exclusive property, it is the action of the thinking | _o__) power called an idea” —Thomas Jefferson | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2013-12-12 02:35 +0000 |
| Subject | Re: The increasing disempowerment of the computer user |
| Message-ID | <mailman.3954.1386815745.18130.python-list@python.org> |
| In reply to | #61643 |
On 12/12/2013 02:21, Ben Finney wrote: > Only, now we get worldwide unaccountable surveillance as part of the deal. > Whereas the 1920 UK Official Secrets Act required all international cable companies operating on British terrority to submit copies of all their traffic (both dispatched and received) within ten days of transmission. Now there's accountability for you. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2013-12-12 13:35 +1100 |
| Subject | Re: The increasing disempowerment of the computer user |
| Message-ID | <mailman.3955.1386815750.18130.python-list@python.org> |
| In reply to | #61643 |
Ben Finney <ben+python@benfinney.id.au> writes: > Larry Martell <larry.martell@gmail.com> writes: > > > On Wed, Dec 11, 2013 at 8:42 PM, Roy Smith <roy@panix.com> wrote: > > > rusi <rustompmody@gmail.com> wrote: > > > > > >> Many assumptions need to be verified/truthified/dovetailed > > >> starting from switching on the machine onwards for this to work. > > > > > > At the time that [Kerningham & Ritchie] wrote [the C programming > > > language], very few people who used computers ever got anywhere near > > > the power switch :-) > > > > Nope. Long before that I was working on computers that didn't boot > > when you powered them up, You had to manually key in a bootstrap > > program from the front panel switches. > > That's done by the *operator*, not the user. Most people who *used* > those computers worked at terminals at a distance, and usually separated > by a locked door, from the computer's power switch. > > > (And no, this is not a takeoff of the Four Yorkshiremen sketch.) > > The pendulum swings back and forth. Computer users are once again > blithely handing all their agency and choice back to centralised > operators (so-called “could computing”) who follow an agenda not of > those users's choosing. Hmm, interesting Freudian slip there. I meant “cloud computing”, of course. That's where the computer owner pretends their service is always available and easy to access, while having terms of service that give them unilateral power to kick you off with no warning, no explanation, no accountability, and no recourse. -- \ “All television is educational television. The question is: | `\ what is it teaching?” —Nicholas Johnson | _o__) | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2013-12-12 10:59 +0000 |
| Subject | Re: The increasing disempowerment of the computer user |
| Message-ID | <52a9972d$0$29992$c3e8da3$5496439d@news.astraweb.com> |
| In reply to | #61653 |
On Thu, 12 Dec 2013 13:35:37 +1100, Ben Finney wrote: > Hmm, interesting Freudian slip there. I meant “cloud computing”, of > course. That's where the computer owner pretends their service is always > available and easy to access, while having terms of service that give > them unilateral power to kick you off with no warning, no explanation, > no accountability, and no recourse. Now Ben, you know that's not true. Everybody has the only recourse that matters: buy the company and make them do what you want them to do. How hard could that possibly be? -- Steven
[toc] | [prev] | [next] | [standalone]
| From | David Hutto <dwightdhutto@gmail.com> |
|---|---|
| Date | 2013-12-14 00:44 -0500 |
| Subject | Re: The increasing disempowerment of the computer user |
| Message-ID | <mailman.4110.1386999895.18130.python-list@python.org> |
| In reply to | #61695 |
[Multipart message — attachments visible in raw view] — view raw
Three word response...Conglomerate business intelligence. On Thu, Dec 12, 2013 at 5:59 AM, Steven D'Aprano < steve+comp.lang.python@pearwood.info> wrote: > On Thu, 12 Dec 2013 13:35:37 +1100, Ben Finney wrote: > > > Hmm, interesting Freudian slip there. I meant “cloud computing”, of > > course. That's where the computer owner pretends their service is always > > available and easy to access, while having terms of service that give > > them unilateral power to kick you off with no warning, no explanation, > > no accountability, and no recourse. > > Now Ben, you know that's not true. Everybody has the only recourse that > matters: buy the company and make them do what you want them to do. How > hard could that possibly be? > > > > -- > Steven > -- > https://mail.python.org/mailman/listinfo/python-list > -- Best Regards, David Hutto *CEO:* *http://www.hitwebdevelopment.com <http://www.hitwebdevelopment.com>*
[toc] | [prev] | [next] | [standalone]
| From | rusi <rustompmody@gmail.com> |
|---|---|
| Date | 2013-12-11 19:52 -0800 |
| Message-ID | <f9c5c5e5-c299-41ed-89c3-8bb79171f638@googlegroups.com> |
| In reply to | #61643 |
On Thursday, December 12, 2013 7:12:32 AM UTC+5:30, Roy Smith wrote:
> rusi wrote:
> > Kernighan and Ritchie set an important "first" in our field by making
> > "Hello World" their first program.
> Yup.
> > People tend to under-estimate the importance of this:
> > Many assumptions need to be verified/truthified/dovetailed
> > starting from switching on the machine onwards for this to work.
> At the time that they wrote it, very few people who used computers ever
> got anywhere near the power switch :-) But, the point is valid. To get
> "Hello, world" to print, you've got to figure out a lot of stuff.
> Predating the whole agile movement by two decades, it is the
> quintessential MVP. It compiles and runs. The rest is just adding
> features and fixing bugs.
Which comes back full-circle to where we started: if
main() { printf("Hello World\n"); }
is the foundation on which other programs are built, then later excising
the print(f) is a significant headache -- at least for teachers as Steven
also seems to have found.
If instead the print was presented more as a 'debug' -- when something
goes wrong stick a probe in there and figure the problem -- then
leaving it there would be as unacceptable as a car mechanic giving you
your keys with the hood open and parts lying around.
Anecdote about the great mathematician Gauss: He was asked why
his writings were so devoid of motivations/explanations. He answered:
Do you leave the scaffolding after the building is built?
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-12-12 15:20 +1100 |
| Message-ID | <mailman.3958.1386822056.18130.python-list@python.org> |
| In reply to | #61656 |
On Thu, Dec 12, 2013 at 2:52 PM, rusi <rustompmody@gmail.com> wrote:
> Which comes back full-circle to where we started: if
>
> main() { printf("Hello World\n"); }
>
> is the foundation on which other programs are built, then later excising
> the print(f) is a significant headache -- at least for teachers as Steven
> also seems to have found.
>
> If instead the print was presented more as a 'debug' -- when something
> goes wrong stick a probe in there and figure the problem -- then
> leaving it there would be as unacceptable as a car mechanic giving you
> your keys with the hood open and parts lying around.
Console output isn't just a debug feature, though - and if you're
using it as such, you possibly should be using the logging module
instead. It's the most fundamental form of output. It plays nicely
with shell redirection and long pipelines, which means it
automatically lets you work with something larger than memory or even
disk. Imagine starting a pipeline with a decompression step (eg gzip
-d), and ending it with a tight filter (eg grep) - everything in
between could manipulate any amount of data at all, without caring
about storage space. Console output works in the REPL, works in the
default interpreter (other than pythonw.exe which suppresses it),
works across SSH... if your most normal form of output is a GUI,
that's not always true. Console output works without requiring any
other program, too, unlike (for instance) a CGI script, which needs a
web browser to interpret its output. There's a reason many languages
bless it with a keyword.
ChrisA
[toc] | [prev] | [next] | [standalone]
| From | bob gailer <bgailer@gmail.com> |
|---|---|
| Date | 2013-12-12 11:51 -0500 |
| Message-ID | <mailman.4003.1386867097.18130.python-list@python.org> |
| In reply to | #61643 |
On 12/11/2013 9:07 PM, Larry Martell wrote: > Nope. Long before that I was working on computers that didn't boot > when you powered them up, You had to manually key in a bootstrap > program from the front panel switches. PDP8? RIM loader, BIN loader?
[toc] | [prev] | [next] | [standalone]
| From | Larry Martell <larry.martell@gmail.com> |
|---|---|
| Date | 2013-12-12 16:18 -0500 |
| Message-ID | <mailman.4025.1386883110.18130.python-list@python.org> |
| In reply to | #61643 |
On Thu, Dec 12, 2013 at 11:51 AM, bob gailer <bgailer@gmail.com> wrote: > On 12/11/2013 9:07 PM, Larry Martell wrote: > >> Nope. Long before that I was working on computers that didn't boot when >> you powered them up, You had to manually key in a bootstrap program from the >> front panel switches. > > PDP8? RIM loader, BIN loader? Data General Nova 3
[toc] | [prev] | [next] | [standalone]
| From | Frank Miles <fpm@u.washington.edu> |
|---|---|
| Date | 2013-12-13 16:21 +0000 |
| Message-ID | <l8fc5s$i3n$1@dont-email.me> |
| In reply to | #61756 |
On Thu, 12 Dec 2013 16:18:22 -0500, Larry Martell wrote: > On Thu, Dec 12, 2013 at 11:51 AM, bob gailer <bgailer@gmail.com> wrote: >> On 12/11/2013 9:07 PM, Larry Martell wrote: >> >>> Nope. Long before that I was working on computers that didn't boot when >>> you powered them up, You had to manually key in a bootstrap program from the >>> front panel switches. >> >> PDP8? RIM loader, BIN loader? > > Data General Nova 3 IIRC - wasn't that a machine that didn't even have 'subtract' - you had to complement and add (2 steps) ?
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web