Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: lectures about "programming methodology"

80 views
Skip to first unread message
Message has been deleted

Arne Vajhøj

unread,
May 5, 2013, 7:48:00 PM5/5/13
to
On 5/5/2013 2:37 PM, Stefan Ram wrote:
> I decided to watch lecture videos from the Stanford
> University about �programming methodology�, which actually
> teach Java.
>
> I was somewhat surprised that the lectures of the renowned
> Stanford university do not have such a high overall
> quality at all.
>
> For example, the lecturer (http://en.wikipedia.org/wiki/Meh
> r*n_S*h*mi, where *=a) wrote on the blackboard
>
> �off by one error�,
>
> but what he meant clearly was an
>
> �off-by-one error�.

That is just to keep Lew away.

:-)

> . Regarding Java, he explained the import statement as if
> this was required to make a class �available�, while it does
> nothing more than to provide a simple name for a class
> instead of its fully qualified name. (To make a class
> available, the �-cp� option of java(c) is used.)
>
> He also explained that Java programs were linked by creating
> a JAR archive for them. (While in fact the creation of a JAR
> archive is not necessary and the linking [that is, replacing
> symbolic references by their referents] takes place when the
> classes are loaded by the JVM, independently of whether they
> come from class files or JAR files.)

First, even the best universities can have some teachers that are
not so good.

Second, I believe that Harvard is more known for Law, Medicine,
Business, Economics than for IT.

Third, some say that the actual education (at bachelor and
masters level - PhD level may be different) is not that much
better at the famous universities than at lesser know
universities and that the benefits of joining is more
about the prestige and the connections one get. As I have never
seen the inside of an American university, then I can not
say if it is true or not.

Arne


Arved Sandstrom

unread,
May 6, 2013, 5:07:34 AM5/6/13
to
On 05/05/2013 08:48 PM, Arne Vajh�j wrote:
[ SNIP ]

>
> Third, some say that the actual education (at bachelor and
> masters level - PhD level may be different) is not that much
> better at the famous universities than at lesser know
> universities and that the benefits of joining is more
> about the prestige and the connections one get. As I have never
> seen the inside of an American university, then I can not
> say if it is true or not.
>
> Arne

That's pretty much true almost anywhere. It obviously depends on the
specific discipline, whether the eventual focus is research as a career
or practical application, and so forth.

But for IT specifically, for preparing students for real work, I've seen
two-year vocational/business schools or community colleges often do a
better job of providing some programming language training and a dollop
of useful software engineering than 4-year CS programs at name universities.

I don't know why anyone would even expect a programming language course,
online or otherwise, offered by any school and typically taught by a
faculty member or TA with less time in real-world programming experience
than hundreds of thousands of professional programmers have, to either
be particularly noteworthy or to be better than the dozens of good or
excellent tutorials that have been on the Web for years.

I think it's pointless to pay $$$ to learn programming languages. What
*is* a good idea to pay money for is some courses in software
engineering, but CS programs don't often offer quality courses in that.
Failing that option, again, no shortage of quality books on the
subject...and simply OJT.

If I were aspiring to a career in IT, which does benefit for HR reasons
if nothing else from a bachelor's degree minimum, I'd take a quality
degree in almost anything except CS.

AHS

Joerg Meier

unread,
May 6, 2013, 6:00:40 AM5/6/13
to
On Mon, 06 May 2013 06:07:34 -0300, Arved Sandstrom wrote:

> But for IT specifically, for preparing students for real work, I've seen
> two-year vocational/business schools or community colleges often do a
> better job of providing some programming language training and a dollop
> of useful software engineering than 4-year CS programs at name universities.

> I don't know why anyone would even expect a programming language course,
> online or otherwise, offered by any school and typically taught by a
> faculty member or TA with less time in real-world programming experience
> than hundreds of thousands of professional programmers have, to either
> be particularly noteworthy or to be better than the dozens of good or
> excellent tutorials that have been on the Web for years.

> I think it's pointless to pay $$$ to learn programming languages. What
> *is* a good idea to pay money for is some courses in software
> engineering, but CS programs don't often offer quality courses in that.
> Failing that option, again, no shortage of quality books on the
> subject...and simply OJT.

Let's not forget that good teaching is about more than JUST the syllabus,
and the best teacher is unlikely to be the one with an autistic level to
detail, and while it would certainly be desireable to have zero mistakes in
the entire course, I would definitely not put it as the #1 priority.

Frankly, if a student trusts that their teacher is the final authority on
the subject matter, they probably aren't ever going to be on a level where
a 100% error free course would make a difference in the first place.

As grating as a teacher making a mistake may be to an outside observer,
what influences whether the students will become adept at the subject
matter is usually a lot less easily defineable.

For example, something I would rate infinitely above "Teacher never makes
any mistakes" would be "Teacher responds well to factual criticism and
repeated my correction in the next lecture".

That being said, I only found the error about linking to be substantial
enough to be worth mentioned at all.

Liebe Gruesse,
Joerg

--
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.
Message has been deleted

Sven Köhler

unread,
May 6, 2013, 9:56:05 AM5/6/13
to
On 05/06/2013 03:23 PM, Stefan Ram wrote:
> He said that a variable had a name. This is not always true
> in Java (he referred to Java, since he is exclusively using
> Java). In Java there also are anonymous variables, like the
> variables of an array.

I know that you are particular precise about thing, but I'm pretty sure,
he will teach that arrays have elements. And he pretty much never
mention the term "anonymous variable" to describe these elements.
To be honest, the notion "anonymous vairable" is really not necessary to
understand how arrays work - and to be honest, your posting is the first
time I read that term.

> He said that the remainder operator �%� can only be applied
> to integers. This also is not true in Java IIRC.

:-) This seems to be a popular misconception. A floating point modulo
operation doesn't seem to feel very "natural" to many people. When I
mention it, they usually ask me for the definition.

> I am actually watching this to learn English pronunciation
> of programming terms (otherwise, I just would read a text),
> and what I /did/ like was that for the word �char� he gave
> the pronunciations of /kA&/ and /k�&/ (where A is the open
> back unrounded vowel and & is the schwar), which I also use
> (/kA&/). Bjarne Stroustrup says it was /tSA&/ (where tS is
> the voiceless palato-alveolar affricate), well, maybe that
> is valid for C++ programmers ...

char is short for character, isn't it?


Regards,
Sven
Message has been deleted
Message has been deleted

Sven Köhler

unread,
May 6, 2013, 10:24:29 AM5/6/13
to
On 05/06/2013 05:18 PM, Stefan Ram wrote:
> Sven K�hler <remove-sv...@gmail.com> writes:
>> To be honest, the notion "anonymous vairable" is really not necessary to
>> understand how arrays work - and to be honest, your posting is the first
>> time I read that term.
>
> The JLS, while being technical, actually sometimes is quite
> easy to read:

Subtext?

> One can open the table of contents, spot chapter �10. Arrays�,
> and immediately read near the very beginning of that chapter:
>
> �An array object contains a number of variables.� (JLS7 10)
>
> �The variables contained in an array have no names� (JLS7 10) |
>
> The expression �new int[ 3 ]� has as its value an array of three |
> variables, but neither this object nor those variables have
> a name.

So apparently I haven't read that part of the JLS. And neither has the
lecturer. And this might me the shock: most people and most lecturers
haven't read the JLS. At least to my experience.

>> I know that you are particular precise about thing, but I'm pretty sure,
>> he will teach that arrays have elements.
>
> �These variables are called the components of the array.� (JLS7 10)

Well ...
So what did the lecturer call them?


Regards,
SVen
Message has been deleted

Joshua Cranmer 🐧

unread,
May 6, 2013, 11:50:14 AM5/6/13
to
On 5/6/2013 7:23 AM, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>> But I have watched only the first lectures so far.
>
> I just watched another lecture and noticed the following:

Keep in mind that this course is probably for people who have never
heard of a programming language before. Excessive pedantry may serve to
confuse rather than elucidate, as I have found when TA'ing
introductory-level computer science courses.

> He said that a variable had a name. This is not always true
> in Java (he referred to Java, since he is exclusively using
> Java). In Java there also are anonymous variables, like the
> variables of an array.

In general programming language concepts, a "variable" is generally a
user-declared construct with a name, so "anonymous variables" are
usually a contradiction in terminology. I did go back to the JLS and
look it up; what it calls "variables" are what C would call "lvalues" or
are more generally called memory locations.

> I am actually watching this to learn English pronunciation
> of programming terms (otherwise, I just would read a text),
> and what I /did/ like was that for the word »char« he gave
> the pronunciations of /kA&/ and /kæ&/ (where A is the open
> back unrounded vowel and & is the schwar), which I also use
> (/kA&/). Bjarne Stroustrup says it was /tSA&/ (where tS is
> the voiceless palato-alveolar affricate), well, maybe that
> is valid for C++ programmers ...

There is no universal agreed-upon pronunciation of "char." The common
pronunciations are "kair" (rhymes with air, like the beginning of
character) and "char" (like the beginning of charcoal).


--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Message has been deleted

Lars Enderin

unread,
May 6, 2013, 12:59:16 PM5/6/13
to
You have a strange extra character in your From header:

From: =?UTF-8?B?Sm9zaHVhIENyYW5tZXIg8J+Qpw==?=
<Pidg...@verizon.invalid>

It shows up as an unknown character below, but as a square containing
hex code 01F427 in the header shown with the post.

2013-05-06 17:50, Joshua Cranmer 🐧 skrev:

--
Lars Enderin

Joshua Cranmer 🐧

unread,
May 6, 2013, 1:28:02 PM5/6/13
to
On 5/6/2013 11:59 AM, Lars Enderin wrote:
> You have a strange extra character in your From header:
>
> From: =?UTF-8?B?Sm9zaHVhIENyYW5tZXIg8J+Qpw==?=
> <Pidg...@verizon.invalid>
>
> It shows up as an unknown character below, but as a square containing
> hex code 01F427 in the header shown with the post.

It is intended to be the Unicode character representing a penguin. I've
taken to including such things to test the resilience of software to
non-ASCII and, in particular, non-BMP characters.

Lew

unread,
May 6, 2013, 2:25:09 PM5/6/13
to
Arne Vajhøj wrote:
> Stefan Ram wrote:
>> I decided to watch lecture videos from the Stanford
>> University about �programming methodology�, which actually
>> teach Java.
>
>> I was somewhat surprised that the lectures of the renowned
>> Stanford university do not have such a high overall
>> quality at all.
>>
>> For example, the lecturer (http://en.wikipedia.org/wiki/Meh
>> r*n_S*h*mi, where *=a) wrote on the blackboard
>>
>> �off by one error�,
>>
>> but what he meant clearly was an
>>
>> �off-by-one error�.
>
>That is just to keep Lew away.

Speaking correct information is never a bad idea.

--
Lew

Martin Gregorie

unread,
May 6, 2013, 3:20:36 PM5/6/13
to
On Sun, 05 May 2013 19:48:00 -0400, Arne Vajhøj wrote:

> First, even the best universities can have some teachers that are not so
> good.
>
Yes.

> Second, I believe that Harvard is more known for Law, Medicine,
> Business, Economics than for IT.
>
A surprising number of the early computers were developed at Harvard.
https://en.wikipedia.org/wiki/Harvard_Mark_I

> Third, some say that the actual education (at bachelor and masters level
> - PhD level may be different) is not that much better at the famous
> universities than at lesser know universities and that the benefits of
> joining is more about the prestige and the connections one get. As I
> have never seen the inside of an American university, then I can not say
> if it is true or not.
>
Well, I sincerely hope all American computing degrees have vastly
improved since the mid '70s. I was working with a guy with a BS in
computer science from one of the lesser NYC schools. He was a good bright
guy, really useful and very capable of learning on the job and
*thinking*. Just as well, too because it turned out that his degree
course had covered little more than COBOL programming and a bit of
elementary systems analysis.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |

Eric Sosman

unread,
May 6, 2013, 3:42:49 PM5/6/13
to
On 5/5/2013 7:48 PM, Arne Vajh�j wrote:
> On 5/5/2013 2:37 PM, Stefan Ram wrote:
>> I decided to watch lecture videos from the Stanford
>> University[...]
>
> Second, I believe that Harvard is more known for Law, Medicine,
> Business, Economics than for IT. [...]

Hey, Arne: What school did you attend, and what's its
reputation for geography?

;-)

--
Eric Sosman
eso...@comcast-dot-net.invalid
Message has been deleted

Arne Vajhøj

unread,
May 6, 2013, 9:16:16 PM5/6/13
to
On 5/6/2013 8:23 AM, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>> But I have watched only the first lectures so far.
>
> I just watched another lecture and noticed the following:
>
> He said something to the effect that the type �int� was there
> to store an int value. I would say that an int /variable/ is
> there to store a value, while the /type/ int can also be the
> type of an expression (like �2�) that is not necessarily
> stored anywhere at run-time.
>
> He said that a variable had a name. This is not always true
> in Java (he referred to Java, since he is exclusively using
> Java). In Java there also are anonymous variables, like the
> variables of an array.
>
> He said that the remainder operator �%� can only be applied
> to integers. This also is not true in Java IIRC.
>
> I am actually watching this to learn English pronunciation
> of programming terms (otherwise, I just would read a text),
> and what I /did/ like was that for the word �char� he gave
> the pronunciations of /kA&/ and /k�&/ (where A is the open
> back unrounded vowel and & is the schwar), which I also use
> (/kA&/). Bjarne Stroustrup says it was /tSA&/ (where tS is
> the voiceless palato-alveolar affricate), well, maybe that
> is valid for C++ programmers ...

And?

None of these items seems particular relevant for teachings
students programming.

Not at a high school in the middle of nowhere. And not at Harvard.

Arne


Arne Vajhøj

unread,
May 6, 2013, 9:25:06 PM5/6/13
to
On 5/6/2013 3:42 PM, Eric Sosman wrote:
> On 5/5/2013 7:48 PM, Arne Vajh�j wrote:
>> On 5/5/2013 2:37 PM, Stefan Ram wrote:
>>> I decided to watch lecture videos from the Stanford
>>> University[...]
>>
>> Second, I believe that Harvard is more known for Law, Medicine,
>> Business, Economics than for IT. [...]
>
> Hey, Arne: What school did you attend, and what's its
> reputation for geography?

Oh shit.

That was about 3000 miles off.

:-(

Arne

PS: They don't teach geography there at all, but I don't think I
can use that as an excuse - I must take the blame for that one.

Arne Vajhøj

unread,
May 6, 2013, 9:38:37 PM5/6/13
to
On 5/6/2013 5:07 AM, Arved Sandstrom wrote:
> On 05/05/2013 08:48 PM, Arne Vajh�j wrote:
> [ SNIP ]
>> Third, some say that the actual education (at bachelor and
>> masters level - PhD level may be different) is not that much
>> better at the famous universities than at lesser know
>> universities and that the benefits of joining is more
>> about the prestige and the connections one get. As I have never
>> seen the inside of an American university, then I can not
>> say if it is true or not.
>
> That's pretty much true almost anywhere. It obviously depends on the
> specific discipline, whether the eventual focus is research as a career
> or practical application, and so forth.
>
> But for IT specifically, for preparing students for real work, I've seen
> two-year vocational/business schools or community colleges often do a
> better job of providing some programming language training and a dollop
> of useful software engineering than 4-year CS programs at name
> universities.
>
> I don't know why anyone would even expect a programming language course,
> online or otherwise, offered by any school and typically taught by a
> faculty member or TA with less time in real-world programming experience
> than hundreds of thousands of professional programmers have, to either
> be particularly noteworthy or to be better than the dozens of good or
> excellent tutorials that have been on the Web for years.

They should not.

Programming at a university should not be seen as a primary
goal but as an illustration for the theory being taught.

> I think it's pointless to pay $$$ to learn programming languages. What
> *is* a good idea to pay money for is some courses in software
> engineering, but CS programs don't often offer quality courses in that.
> Failing that option, again, no shortage of quality books on the
> subject...and simply OJT.

Theory need to be backed by some practical usage for students to
get the point.

Java/C#/C++ is OK for that in my opinion. OCAML/Haskell/Eiffel may
be more "in" in CS circles, but ...

I am sure that it varies, but some universities do try to teach about
software engineering.

Maybe not as good as you may want, but it is a very difficult topic.

And to make a quote from a movie: "Some lessons can't be taught. They
must be lived to be understood.". I don't think even the best possible
course can replace experience for something like that.

> If I were aspiring to a career in IT, which does benefit for HR reasons
> if nothing else from a bachelor's degree minimum, I'd take a quality
> degree in almost anything except CS.

I think CS is OK.

The success of non-CS people with degrees in other natural sciences
and engineering disciplines do show that the way of thinking is a very
big part of what is gained.

Arne

Arne Vajhøj

unread,
May 6, 2013, 9:43:11 PM5/6/13
to
On 5/6/2013 11:50 AM, Joshua Cranmer 🐧 wrote:
> On 5/6/2013 7:23 AM, Stefan Ram wrote:
>> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>>> But I have watched only the first lectures so far.
>>
>> I just watched another lecture and noticed the following:
>
> Keep in mind that this course is probably for people who have never
> heard of a programming language before. Excessive pedantry may serve to
> confuse rather than elucidate, as I have found when TA'ing
> introductory-level computer science courses.

Successful teaching of beginner programmers has very little to do
with correct and complete definitions of things.

Being able to make the stuff interesting and to simplify things
to where the audience can understand it is critical.

Arne



Arne Vajhøj

unread,
May 6, 2013, 9:46:07 PM5/6/13
to
On 5/6/2013 6:28 PM, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>>> But I have watched only the first lectures so far.
>> I just watched another lecture and noticed the following:
>
> Well, I hope you are not annoyed yet. But I just spotted the
> first major software-methodology error! He explained the
> scope of a variable as the lifetime of the variable. It was
> even displayed as text: �Scope: lifetime of variable�. This
> really hurts!
>
> For those of you, who have not yet learned the distinction
> (untested code ahead), after:
>
> class Object
> { /* begin of scope of i */
> final int i; public Object( final int i ){ this.i = i; }
> /* end of scope of i */ }
>
> and then in �main�:
>
> { { final Object o = new Object( 4 );
> java.lang.System.out.println( o ); }
>
> { final Object o = new Object( 7 );
> java.lang.System.out.println( o ); }}
>
> , after execution, there were two instances of �i� (with
> values 4 and 7) that had the same scope (as identifiers),
> but different lifetimes (as variables), and two instances of
> �o� which indeed have different scopes (as identifiers).
>
> A scope is a region of the source text. Identifiers
> have a scope.
>
> A lifetime is a period of time during the execution
> of a program. Variables and objects have lifetimes.
>
> This has no special relation with Java, this is
> software engineering (or �programming methodology�).

I really don't see that as software engineering.

It is a CS exercise in definitions with little practical
benefits.

Arne


Eric Sosman

unread,
May 6, 2013, 11:19:10 PM5/6/13
to
On 5/6/2013 9:25 PM, Arne Vajh�j wrote:
> On 5/6/2013 3:42 PM, Eric Sosman wrote:
>> On 5/5/2013 7:48 PM, Arne Vajh�j wrote:
>>> On 5/5/2013 2:37 PM, Stefan Ram wrote:
>>>> I decided to watch lecture videos from the Stanford
>>>> University[...]
>>>
>>> Second, I believe that Harvard is more known for Law, Medicine,
>>> Business, Economics than for IT. [...]
>>
>> Hey, Arne: What school did you attend, and what's its
>> reputation for geography?
>
> Oh shit.
>
> That was about 3000 miles off.
>
> :-(

Hey, well, I'm sure glad *I* never make silly misteaks! ;-)

FWIW,

- Andrew Yao received his first PhD from Harvard.

- Leslie Valiant taught at Harvard.

- Christos Papadimitriou taught at Harvard.

- Michael O. Rabin teaches at Harvard.

- Kenneth E. Iverson received a Masters degree from Harvard
and taught there for half a decade.

- Stephen Cook received Masters and PhD degrees from Harvard.

- Dennis M. Ritchie received undergraduate and PhD degrees
from Harvard.

- Ivan Sutherland taught at Harvard.

- Butler Lampson did his undergraduate work at Harvard.

- Fred Brooks received the PhD from Harvard.

- Edmund M. Clarke taught at Harvard.

- E. Allen Emerson earned his PhD from Harvard.

If these names seem unfamiliar, look up "Turing Award" and
"Knuth Prize."

--
Eric Sosman
eso...@comcast-dot-net.invalid

Stanimir Stamenkov

unread,
May 7, 2013, 1:50:18 AM5/7/13
to
Mon, 06 May 2013 21:16:16 -0400, /Arne Vajh�j/:

> None of these items seems particular relevant for teachings
> students programming.
>
> Not at a high school in the middle of nowhere. And not at Harvard.

Why was Harvard brought in? Stefan originally mentioned Standford:

> I decided to watch lecture videos from the Stanford
> University...

--
Stanimir

Stanimir Stamenkov

unread,
May 7, 2013, 1:52:16 AM5/7/13
to
Tue, 07 May 2013 08:50:18 +0300, /Stanimir Stamenkov/:
Just saw in another reply it was a mistake.

--
Stanimir

Sven Köhler

unread,
May 7, 2013, 6:45:14 AM5/7/13
to
On 05/07/2013 04:46 AM, Arne Vajh�j wrote:
> I really don't see that as software engineering.

I assume, Stefan is worried that these ideas could stick - regardless of
whether you consider that software engineering or not.

Let "lifetime of a variable" be an attempt, to describe scope "in
layman's terms". However, it gives the students the wrong idea -
especially because there is an actual lifetime of a variable and it is
not identical with the scope. Later on in the lecture, when students
will have to understand object orientation, this wrong idea might make
it difficult for the students to understand important things.

BTW: It is also possible to defend his description of the scope, namely
if you limit it to local variables only (Stefan's counter example was a
field). However, I don't know the lecture. It might be the case, that
fields haven't even been introduced.


Regards,
Sven
Message has been deleted

Sven Köhler

unread,
May 7, 2013, 8:52:26 AM5/7/13
to
On 05/07/2013 03:45 PM, Stefan Ram wrote:
> Sven K�hler <remove-sv...@gmail.com> writes:
>> BTW: It is also possible to defend his description of the scope, namely
>> if you limit it to local variables only (Stefan's counter example was a
>
> For local variables the two concepts differ too. One example
> can already be seen in my code, when one reads the local
> parameter �i� as a local variable. The most famous example
> is the factorial (untested):
>
> int f( final int i ){ return i == 0 ? 1 : i * f( i - 1 ); }
>
> . To understand this, it is vital to understand that �i� has
> only a single scope, but can have many (in this case:
> nested) lifetimes.

That is correct. But then again, I'm not sure how this professor will
explain it. To be consistent with his definition of scope, he might
explain to the students, that there are many "incarnations" of i, each
"living" from the { to the }, i.e. the scope. In his way of thinking,
this might be consistent with saying that the scope defines the lifetime
of i (namely each incarnation of i).


Regards,
Sven

Daniele Futtorovic

unread,
May 7, 2013, 12:07:24 PM5/7/13
to
On 05/05/2013 20:37, Stefan Ram allegedly wrote:
> I decided to watch lecture videos from the Stanford
> University about �programming methodology�, which actually
> teach Java.
>
> I was somewhat surprised that the lectures of the renowned
> Stanford university do not have such a high overall
> quality at all.
>
<snip />

Stefan, allow me to join the crowd in defence of the quack you have
unearthed. After all, we all know that ambiguity doesn't matter in
programming, because the compiler can guess our intent and make things
just right. And getting people interested is all that matters. I mean,
we've all had this colleague, the enthusiastic slob, and we've all loved
to maintain his code. And finally, it is only natural that if, after
having paid for the transmission of knowledge, students want to know how
it /really/ works, they should take the initiative and turn to freely
available resources on the 'net. Perfectly normal.

Nothing to see here, carry on.

--
DF.

markspace

unread,
May 7, 2013, 12:44:11 PM5/7/13
to
On 5/7/2013 5:45 AM, Stefan Ram wrote:

> int f( final int i ){ return i == 0 ? 1 : i * f( i - 1 ); }
>
> . To understand this, it is vital to understand that �i� has
> only a single scope, but can have many (in this case:
> nested) lifetimes.

OK, I have to disagree with this. At minimum, I disagree that
"lifetimes" is the correct word here.

"Copy" is a better word than "lifetime." So is "stack frame." By the
time one wants to talk about recursion, introducing correct terminology
is the best way, imo. We just had a discussion here on c.l.j.p about
concurrency, and folks who can't keep track of what's on the stack and
what's on the heap have a hard time of it. Learning correctly is
important in school.

But I also agree more with the class instructor. "Scope" is the correct
term here. The scope of i is the body of the method f. That its value
may exist elsewhere is completely orthogonal to a discussion of scope.


Message has been deleted
Message has been deleted

David Lamb

unread,
May 7, 2013, 6:01:40 PM5/7/13
to
On 06/05/2013 9:56 AM, Sven K�hler wrote:
> On 05/06/2013 03:23 PM, Stefan Ram wrote:
>> He said that a variable had a name. This is not always true
>> in Java (he referred to Java, since he is exclusively using
>> Java). In Java there also are anonymous variables, like the
>> variables of an array.
>
> I know that you are particular precise about thing, but I'm pretty sure,
> he will teach that arrays have elements. And he pretty much never
> mention the term "anonymous variable" to describe these elements.
> To be honest, the notion "anonymous vairable" is really not necessary to
> understand how arrays work - and to be honest, your posting is the first
> time I read that term.

I've never heard the term "anonymous variable" but I've heard of
"computed names" and "l-values" (for "left hand side of the assignment
symbol", and contrasted with "R-values"). Admittedly all of this was in
non-Java contexts.

David Lamb

unread,
May 7, 2013, 6:10:44 PM5/7/13
to
Whoah, scope versus lifetime is a pretty fundamental distinction.
Admittedly it was more fundamental in old block-structured languages
like Algol, but still...


Message has been deleted

Arne Vajhøj

unread,
May 7, 2013, 9:34:58 PM5/7/13
to
Yep. For some reason I thought it was Harvard.

Arne


Arne Vajhøj

unread,
May 7, 2013, 9:36:39 PM5/7/13
to
What can I say.

Why make one mistake when it is possible to make two in the
same sentence.

:-)

Arne



Arne Vajhøj

unread,
May 7, 2013, 9:37:49 PM5/7/13
to
On 5/7/2013 6:45 AM, Sven K�hler wrote:
> On 05/07/2013 04:46 AM, Arne Vajh�j wrote:
>> I really don't see that as software engineering.
>
> I assume, Stefan is worried that these ideas could stick - regardless of
> whether you consider that software engineering or not.

Yes, but he very explicit called it software engineering.

Arne

Arne Vajhøj

unread,
May 7, 2013, 9:38:38 PM5/7/13
to
Fundamental for software engineering??

Arne


Chris Uppal

unread,
May 8, 2013, 9:44:54 AM5/8/13
to
Eric Sosman wrote:
> - Andrew Yao received his first PhD from Harvard.
>
> - Leslie Valiant taught at Harvard.
>
> [snip...] at Harvard [...snip]
>
> - E. Allen Emerson earned his PhD from Harvard.
>
> If these names seem unfamiliar, look up "Turing Award" and
> "Knuth Prize."

More than slightly disconcerting to realise how many of those names are /not/
familiar to me. Study called for!

Or maybe it's just 'cos they're from Harvard ;-)

-- chris


Thomas Richter

unread,
May 8, 2013, 12:41:09 PM5/8/13
to
On 06.05.2013 14:23, Stefan Ram wrote:
> r...@zedat.fu-berlin.de (Stefan Ram) writes:
>> But I have watched only the first lectures so far.
>
> I just watched another lecture and noticed the following:
>
> He said something to the effect that the type �int� was there
> to store an int value. I would say that an int /variable/ is
> there to store a value, while the /type/ int can also be the
> type of an expression (like �2�) that is not necessarily
> stored anywhere at run-time.
>
> He said that a variable had a name. This is not always true
> in Java (he referred to Java, since he is exclusively using
> Java). In Java there also are anonymous variables, like the
> variables of an array.

Stephan, with all necessary respect, but this sounds very nit-picking to
me. Ultimately, you are correct, but making it this precise is probably
not going to help anyone in class. It typically confuses students more
than it helps.

This said, and looking back at the courses I participated, I learned
most where I found that the teacher was making errors, and where I was
able to follow *despite* such errors because it kept me thinking. I also
had classes where everything was polished, and everything worked
correctly, but while there I always believed to understand everything in
class, I also noticed that the presented information vanished very soon
from my brain.

Thus, please excuse, but a lie for pedagogical reasons is at times more
enlightening than spelling out everything correctly at first glance. As
a teacher, it may make sense of coming back later and explaining
students that, "well, in these and that circumstances, you need to
understand something extra I haven't told you before".

> I am actually watching this to learn English pronunciation
> of programming terms (otherwise, I just would read a text),
> and what I /did/ like was that for the word �char� he gave
> the pronunciations of /kA&/ and /k�&/ (where A is the open
> back unrounded vowel and& is the schwar), which I also use
> (/kA&/). Bjarne Stroustrup says it was /tSA&/ (where tS is
> the voiceless palato-alveolar affricate), well, maybe that
> is valid for C++ programmers ...

In my experience, Americans are much less "language lawyers" than people
in Germany (expecting from your name that you have a German backgound -
at least I have), so one definitely shouldn't be too picky about this
either. Specifically, the cultural background in the US is very diverse,
especially at universities and even with teachers.

So please excuse superfluous or missing hyphens and pronunciations that
are "off" the official one. If there even is such a thing.

So long,
Thomas

Arved Sandstrom

unread,
May 8, 2013, 4:48:50 PM5/8/13
to
Well, in order to be a software engineer you must know how to program.
That's essential. So I'd say that programming concepts that are basic
and fundamental like these two are important at the software engineering
level.

AHS

Arne Vajhøj

unread,
May 12, 2013, 10:17:57 PM5/12/13
to
On 5/8/2013 4:48 PM, Arved Sandstrom wrote:
> On 05/07/2013 10:38 PM, Arne Vajh�j wrote:
>> On 5/7/2013 6:10 PM, David Lamb wrote:
>>> On 06/05/2013 9:46 PM, Arne Vajh�j wrote:
>>>> On 5/6/2013 6:28 PM, Stefan Ram wrote:
>>>>> A scope is a region of the source text. Identifiers
>>>>> have a scope.
>>>>>
>>>>> A lifetime is a period of time during the execution
>>>>> of a program. Variables and objects have lifetimes.
>>>>>
>>>>> This has no special relation with Java, this is
>>>>> software engineering (or �programming methodology�).
>>>>
>>>> I really don't see that as software engineering.
>>>>
>>>> It is a CS exercise in definitions with little practical
>>>> benefits.
>>>
>>> Whoah, scope versus lifetime is a pretty fundamental distinction.
>>> Admittedly it was more fundamental in old block-structured languages
>>> like Algol, but still...
>>
>> Fundamental for software engineering??
>>
> Well, in order to be a software engineer you must know how to program.

In theory no. Software engineering is the process of getting from
requirements to a detailed description of the implementation. The
output does not have to be code.

In practice yes. 99.999% will have to produce code as output. Producing
documentation outlining details of all data structure and control
structures and then later let somebody else convert it to actual
code rarely make sense.

So let us assume that software engineering requires coding.

> That's essential. So I'd say that programming concepts that are basic
> and fundamental like these two are important at the software engineering
> level.

Why?

Some given code does not get better or worse depending on whether
the author know those definitions.

The usual reason to know common terms is to be able to communicate
efficiently.

But is those two terms something that is used in communication
as part of software development?

I doubt that.

Arne

Arved Sandstrom

unread,
May 17, 2013, 6:35:24 PM5/17/13
to
I respectfully disagree. Maybe we are arguing at cross-purposes here,
Arne, I can't conceive of a competent developer not understanding scope
and lifetime. Maybe you don't actually use the words in communication
often, but it's part of your thinking. I probably last used the term
"garbage collection" in a conversation last year, but I think about it
at least once a week.

Scope and lifetime are concepts that fall into the larger categories of
resource management and reliability. At a minimum.

A lot of programmers may not use the terms per se, but you can always
tell the difference between the coders who understand those 2 concepts,
and the ones that don't. And the latter always write worse code. So to
me that makes them essential concepts in software engineering.

AHS

Arne Vajhøj

unread,
May 17, 2013, 6:53:09 PM5/17/13
to
> I respectfully disagree. Maybe we are arguing at cross-purposes here,
> Arne, I can't conceive of a competent developer not understanding scope
> and lifetime. Maybe you don't actually use the words in communication
> often, but it's part of your thinking. I probably last used the term
> "garbage collection" in a conversation last year, but I think about it
> at least once a week.
>
> Scope and lifetime are concepts that fall into the larger categories of
> resource management and reliability. At a minimum.
>
> A lot of programmers may not use the terms per se, but you can always
> tell the difference between the coders who understand those 2 concepts,
> and the ones that don't. And the latter always write worse code. So to
> me that makes them essential concepts in software engineering.

I agree that an understanding of the substance behind the two terms
are necessary for programming - and for software engineering.

My disagreement was only about the necessity of knowing the terms.

I assume that Stefan was talking about the usage of the terms.

As it is possible for a lecturer to get the terms mixed up, but I can
not really see how it would be possible to get the substances
mixed up.

Arne


Arne Vajhøj

unread,
May 17, 2013, 7:02:27 PM5/17/13
to
And I am not considering it useless to know the definitions
either.

I just don't see knowing the definitions as being
part of software engineering discipline.

Arne


Arved Sandstrom

unread,
May 17, 2013, 7:14:00 PM5/17/13
to
Might be a matter of how we interpret the English. To me, "knowing the
definitions" means to "understand the substance".

AHS

Arne Vajhøj

unread,
May 17, 2013, 7:29:12 PM5/17/13
to
> Might be a matter of how we interpret the English. To me, "knowing the
> definitions" means to "understand the substance".

I would say that:
* knowing the definition does imply knowing the substance
* not knowing the definition does not imply not knowing the substance

Arne



lipska the kat

unread,
May 18, 2013, 6:07:14 AM5/18/13
to
On 18/05/13 00:14, Arved Sandstrom wrote:
> On 05/17/2013 08:02 PM, Arne Vajh�ソスj wrote:
>> On 5/17/2013 6:53 PM, Arne Vajh�ソスj wrote:
>>> On 5/17/2013 6:35 PM, Arved Sandstrom wrote:
>>>> On 05/12/2013 11:17 PM, Arne Vajh�ソスj wrote:
>>>>> On 5/8/2013 4:48 PM, Arved Sandstrom wrote:
>>>>>> On 05/07/2013 10:38 PM, Arne Vajh�ソスj wrote:
>>>>>>> On 5/7/2013 6:10 PM, David Lamb wrote:
>>>>>>>> On 06/05/2013 9:46 PM, Arne Vajh�ソスj wrote:
>>>>>>>>> On 5/6/2013 6:28 PM, Stefan Ram wrote:
>>>>>>>>>> A scope is a region of the source text. Identifiers
>>>>>>>>>> have a scope.
>>>>>>>>>>
>>>>>>>>>> A lifetime is a period of time during the execution
>>>>>>>>>> of a program. Variables and objects have lifetimes.
>>>>>>>>>>
>>>>>>>>>> This has no special relation with Java, this is
>>>>>>>>>> software engineering (or �ソスprogramming methodology�ソス).
Software Engineering covers the whole process of getting from a
statement of requirements written in natural language or more accurately
the natural language of the problem domain to a working, maintainable
system.

A methodology describes that process in detail and provides methods and
guidelines to aid that process. Many different methodologies can produce
a working, maintainable system from the same statement of requirements.

Scope and lifetime are programming language concepts that need to be
understood in the context of the chosen language. The 'definition' of
scope and lifetime as technical terms does not change with the language.
The 'implementation' of the rules of scope and lifetime does.

What is the 'definition' of scope ... visibility might be a good
descriptor. What is the 'definition' of lifetime ... how long something
is available for reference is one possible description.

How can you understand the implementation of scope and lifetime if you
don't understand what the words mean?

Anything that concerns the production of a system is Software
Engineering, a methodology is a more abstract concept and implies the
ability to create working, maintainable code. To create working,
maintainable code you need to have an understanding of the language you
are using, otherwise it's just hacking, hacking is not software engineering.

Just my opinion and apologies for butting in.

lipska

--
Lipska the Kat�ソス: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
0 new messages