Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > lectures about "programming methodology"

Reply
Thread Tools

lectures about "programming methodology"

 
 
Arne Vajhøj
Guest
Posts: n/a
 
      05-07-2013
On 5/6/2013 11:50 AM, Joshua Cranmer 🐧 wrote:
> On 5/6/2013 7:23 AM, Stefan Ram wrote:
>> http://www.velocityreviews.com/forums/(E-Mail Removed)-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



 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      05-07-2013
On 5/6/2013 6:28 PM, Stefan Ram wrote:
> (E-Mail Removed)-berlin.de (Stefan Ram) writes:
>> (E-Mail Removed)-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


 
Reply With Quote
 
 
 
 
Eric Sosman
Guest
Posts: n/a
 
      05-07-2013
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 ****.
>
> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)d
 
Reply With Quote
 
Stanimir Stamenkov
Guest
Posts: n/a
 
      05-07-2013
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
 
Reply With Quote
 
Stanimir Stamenkov
Guest
Posts: n/a
 
      05-07-2013
Tue, 07 May 2013 08:50:18 +0300, /Stanimir Stamenkov/:
> 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...


Just saw in another reply it was a mistake.

--
Stanimir
 
Reply With Quote
 
Sven Köhler
Guest
Posts: n/a
 
      05-07-2013
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
 
Reply With Quote
 
Stefan Ram
Guest
Posts: n/a
 
      05-07-2013
Sven Köhler <(E-Mail Removed)> 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.

A method is like an object where the method call is the
construction and the object is auto-destructed at the end of
the call. There even is a name for this object: it is called
the incarnation of the methode (like: instance of a class).
So nested calls can produce many incarnations of one method
at the same time.

 
Reply With Quote
 
Sven Köhler
Guest
Posts: n/a
 
      05-07-2013
On 05/07/2013 03:45 PM, Stefan Ram wrote:
> Sven Köhler <(E-Mail Removed)> 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
 
Reply With Quote
 
Daniele Futtorovic
Guest
Posts: n/a
 
      05-07-2013
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.
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      05-07-2013
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
silly question about Running a script from the command line A.Rock Python 0 04-10-2013 11:21 AM
newbie question about confusing exception handling in urllib cabbar@gmail.com Python 6 04-09-2013 07:11 PM
SICP video lectures Paul Rubin Python 0 02-20-2007 07:08 AM
mcse audio lectures on cd Shane MCSE 3 03-05-2004 05:18 PM
I'm looking for lectures from Cisco Academy kubeusz Cisco 1 01-22-2004 09:57 PM



Advertisments