The Artima Developer Community
Sponsored Link

Weblogs Forum
Programming with "Duh" Typing

370 replies on 25 pages. Most recent reply: Aug 8, 2007 9:54 AM by James Watson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 370 replies on 25 pages [ « | 1 ... 19 20 21 22 23 24 25 | » ]
James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Programming with "Duh" Typing Posted: Jul 31, 2007 6:50 AM
Reply to this message Reply
Advertisement
> > You being pretty forgiving by addressing only the point
> > that Achilleas wants to argue.
> >
> > What he keeps avoiding is addressing the other parts of
> > our argument. Most of the life of an application will
> be
> > spent in maintenance and I believe that most of the
> cost
> > of an application is in maintenance and enhancements.
>
> Dynamic typing can make maintenance faster: you run the
> program, you pause it, you modify it, and when the results
> are satisfactory, you run the tests and if the tests are
> successful you release the code.

What makes you think that's faster than automation?

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Programming with "Duh" Typing Posted: Jul 31, 2007 6:51 AM
Reply to this message Reply
> > A day and a half later the thing bombs out because in a
> > rarely executed branch he typed inptu_vector instead of
> > input_vector.
> >
> > That's not exactly fun...
>
> So you mean the code that bombs out was not tested?
>
> oh, the horror! :-)

He's talking about testing.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: word games Posted: Jul 31, 2007 10:25 AM
Reply to this message Reply
James Watson wrote

> > Where is it commonly understood that 'correct' means
> > "meets all requirements"?
>
> On earth. You should visit sometime.

Why didn't you provide a Google define url for "correct"?

http://www.google.com/search?hl=en&q=define%3A+correct&btnG=Search

How strange! There's no mention of requirements, let alone "meets all requirements".


> The definition of specification that would apply here
> would be: "precise documentation of requirements." I love
> that you accused me of 'quarreling over definitions'.

The definition of specification that would apply here would be a definition of software specification - not some random jumble of general definitions from other fields.


> Do you mean, a software application with no requirements
> is correct? Or more clearly, a software application with
> no requirements cannot be incorrect. ...

I mean your indulging in absurd word games, without any relevance to what we know or don't know about programming.

Petrik de Heus

Posts: 19
Nickname: p8
Registered: Jul, 2007

Re: Programming with "Duh" Typing Posted: Jul 31, 2007 10:30 AM
Reply to this message Reply
> A day and a half later the thing bombs out because in a
> rarely executed branch he typed inptu_vector instead of
> input_vector.
>
> That's not exactly fun...
>
> In a statically typed language the error would have been
> caught. Any decent Java IDE would have underlined it as
> soon as it was typed.

Right, and you'd have an error in Java as well if you actually had a method called inptu_vector and accidently autocompleted the wrong method name.

Petrik de Heus

Posts: 19
Nickname: p8
Registered: Jul, 2007

Re: word games Posted: Jul 31, 2007 10:38 AM
Reply to this message Reply
http://en.wikipedia.org/wiki/Test-driven_development#Requirements

"Test-driven development requires that an automated unit test, defining requirements of the code, is written before each aspect of the code itself."

http://nspec.tigris.org/

"Test Driven Development isn't brilliantly named, it hides the fact that TDD is a specification process, not a testing process. Unit tests are about testing, automated tests are about testing, TDD is about specifying.
BDD and NSpec have shed the test oriented terminology in favour of a specification friendly nomenclature. As an exercise in Neuro Linguistic Programming, it is hoped that this change in language will help frame more specification oriented thoughts."

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: word games Posted: Jul 31, 2007 12:10 PM
Reply to this message Reply
> There's no mention of requirements, let alone
> "meets all requirements".

It doesn't say anything about specifications either. You proposed that specification was the criteria to judge whether something is correct. I was merely pointing out that there is a common understanding of the relationship between requirements and specification. I merely did this because of your bizarre argument that requirements are not related to correctness. I generally wouldn't need to point out such trivial facts in a sane and rational discussion.

> > The definition of specification that would apply here
> > would be: "precise documentation of requirements." I
> love
> > that you accused me of 'quarreling over definitions'.
>
> The definition of specification that would apply here
> would be a definition of software specification -
> not some random jumble of general definitions from other
> fields.

So do you believe that in software engineering we use normal English words in ways that are incompatible other fields, including engineering?

What definition do you think 'specification' has in our field, exactly? Or alternately what do you think the definition of 'requirements' is in our field? You don't do 'requirements gathering' or have never seen the results of this (generally called 'the requirements')?

It was you that quoted 'specification' as the criteria for correctness.

> > Do you mean, a software application with no
> requirements
> > is correct? Or more clearly, a software application
> with
> > no requirements cannot be incorrect. ...
>
> I mean your indulging in absurd word games, without any
> relevance to what we know or don't know about programming.

You are the one trying to redefine words in order to prove your argument. Trying to make up a new definition for the word 'correct' is an absurd word game.

There is no doubt in my mind that the term requirements is understood to include a formal specification of requirements and a number of assumed requirements such as 'runs without crashing' by anyone who speaks English and has worked for any significant time in the software industry. In any real sense of whether the software is 'correct' would be derived from the required properties and functions of the software (a.k.a 'the requirements') and not based on whether it passes a test.

The concept that passing all tests makes the software correct is patently absurd. If the program crashes are you seriously going to argue that it is 'correct' because it passed all tests? Testing is a way of trying to gauge the correctness. It doesn't define the correctness of software unless you requirements are specified as passing a number of tests which would severely limit the kinds of requirements that could be defined. Testing is equivalent to an experiment, which in scientific terms is a 'test of a hypothesis'. The experiment does not define the hypothesis.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: word games Posted: Jul 31, 2007 12:21 PM
Reply to this message Reply
> http://en.wikipedia.org/wiki/Test-driven_development#Requir
> ements
>
> "Test-driven development requires that an automated unit
> test, defining requirements of the code, is written before
> each aspect of the code itself."

It's not feasible to write tests to verify all software application to 100% confidence. In fact for most it's not possible. Turing proved this mathematically a long time ago.

You can pose your requirements as tests, but you are basically limiting what can be included in the requirements.

How would you define the behavior of a web-browser as a series of tests? How about even just a SAX parser? Do you really think it would be easier to understand what is required of a program if all you were given were a set of tests to run?

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: word games Posted: Jul 31, 2007 12:40 PM
Reply to this message Reply
For reference:

http://en.wikipedia.org/wiki/Requirements_analysis

http://en.wikipedia.org/wiki/Requirement

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: word games Posted: Jul 31, 2007 12:51 PM
Reply to this message Reply
Plus this, if you have a IEEE membership:

"IEEE recommended practice for software requirements specifications"

http://ieeexplore.ieee.org/Xplore/login.jsp?url=/iel4/5841/15571/00720574.pdf?isnumber=15571&prod=&arnumber=720574&arSt=&ared=&arAuthor=

Petrik de Heus

Posts: 19
Nickname: p8
Registered: Jul, 2007

Re: word games Posted: Jul 31, 2007 1:05 PM
Reply to this message Reply
> How would you define the behavior of a web-browser as a
> series of tests? How about even just a SAX parser? Do
> you really think it would be easier to understand what is
> required of a program if all you were given were a set of
> tests to run?

I'd be a lot more confident to build something close to what is expected if I were given tests instead of a requirements document with the usual ambivalence. There would also be a lot less discussion about correctness and interpretation. Either the tests pass or they fail.

And if it works for jRuby...

"Testing in jruby is based on two seperate unit test suites. The first and foremost is rubicon (http://rubyforge.org/projects/rubytests). This
is the same test suite that ruby uses to verify the interpreter is running correctly. The second is our own unit tests via ant/junit/minirunit. This test suite is mostly for tests that we cannot or do not want to submit to rubicon (a good example is tests involving java integration)"
http://svn.codehaus.org/jruby/tags/jruby-0_9_0/docs/README.test

Petrik de Heus

Posts: 19
Nickname: p8
Registered: Jul, 2007

Re: word games Posted: Jul 31, 2007 1:15 PM
Reply to this message Reply
> For reference:
>
> http://en.wikipedia.org/wiki/Requirements_analysis
>
> http://en.wikipedia.org/wiki/Requirement

From your links:
"Requirements must be measurable, testable, related to identified business needs or opportunities, and defined to a level of detail sufficient for system design."

"Most requirements should be testable. If this is not the case, another verification method should be used instead (e.g. analysis, inspection or review of design). Testable requirements are an important component of validation.

Certain requirements, by their very structure, are not testable. These include requirements that say the system shall never or always exhibit a particular property. Proper testing of these requirements would require an infinite testing cycle. Such requirements are often rewritten to state a more practical time period."

So requirements must be testable?

Erik Engbrecht

Posts: 210
Nickname: eengbrec
Registered: Apr, 2006

Re: Programming with "Duh" Typing Posted: Jul 31, 2007 2:03 PM
Reply to this message Reply
> > You being pretty forgiving by addressing only the point
> > that Achilleas wants to argue.
> >
> > What he keeps avoiding is addressing the other parts of
> > our argument. Most of the life of an application will
> be
> > spent in maintenance and I believe that most of the
> cost
> > of an application is in maintenance and enhancements.
>
> Dynamic typing can make maintenance faster: you run the
> program, you pause it, you modify it, and when the results
> are satisfactory, you run the tests and if the tests are
> successful you release the code.

That's not a function of dynamic typing but rather having a fully interactive development environment. As far as I know only Smalltalk and Lisp have that.

Erik Engbrecht

Posts: 210
Nickname: eengbrec
Registered: Apr, 2006

Re: word games Posted: Jul 31, 2007 2:16 PM
Reply to this message Reply
> > How would you define the behavior of a web-browser as a
> > series of tests? How about even just a SAX parser? Do
> > you really think it would be easier to understand what
> is
> > required of a program if all you were given were a set
> of
> > tests to run?
>
> I'd be a lot more confident to build something close to
> what is expected if I were given tests instead of a
> requirements document with the usual ambivalence. There
> e would also be a lot less discussion about correctness
> and interpretation. Either the tests pass or they fail.

The problem is in most cases the people defining requirements would never be able to create workable tests, so the need for requirements documentation doesn't go away.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: word games Posted: Jul 31, 2007 2:47 PM
Reply to this message Reply
James Watson wrote

> > There's no mention of requirements, let alone
> > "meets all requirements".
>
> It doesn't say anything about specifications either. You
> proposed that specification was the criteria to judge
> whether something is correct. I was merely pointing out
> that there is a common understanding of the relationship
> between requirements and specification. I merely did this
> because of your bizarre argument that requirements are not
> related to correctness. I generally wouldn't need to
> point out such trivial facts in a sane and rational
> discussion.

1) No, you were not "merely pointing out that there is a common understanding of the relationship between requirements and specification". You made a statement about "correct" and "correctness" [Jul 30, 2007 8:43 AM], quibbled about the need to define those terms [Jul 30, 2007 9:28 AM], and claimed the unwritten definition in your head was the same definition used by the vast majority of English speakers [Jul 30, 2007 2:03 PM].

You claimed "I am talking about 'correct' in the way it's defined by the vast majority of English speakers" [Jul 30, 2007 2:03 PM] but so far you have not provided a single example of 'the commonly understood "meets all requirements"' [Jul 30, 2007 12:50 PM].

All of that was before you mentioned "the relationship between requirements and specification" for the first time [Jul 30, 2007 3:00 PM].


2) Now you falsely claim that I have made a "bizarre argument that requirements are not related to correctness". Where exactly am I supposed to have made that argument?


-snip-
> You are the one trying to redefine words in order to prove
> your argument. Trying to make up a new definition for the
> word 'correct' is an absurd word game.

I am indeed the one who understood that words mean different things to different people, and so made clear to Cedric how I understood what he had written [Jul 26, 2007 2:51 PM].

You seem to be insisting that the definitions in your head don't need to be stated because somehow they are the real definitions, and any other meanings are redefinitions or new definitions.


> There is no doubt in my mind that the term requirements is
> understood to include a formal specification of
> requirements and a number of assumed requirements such as
> 'runs without crashing' by anyone who speaks English and
> has worked for any significant time in the software
> industry. In any real sense of whether the software is
> 'correct' would be derived from the required properties
> and functions of the software (a.k.a 'the requirements')
> and not based on whether it passes a test.

It's commonplace for someone to have no doubt and yet still be wrong.

http://en.wikipedia.org/wiki/Dunning-Kruger_effect

> The concept that passing all tests makes the software
> correct is patently absurd. If the program crashes are
> you seriously going to argue that it is 'correct' because
> it passed all tests? Testing is a way of trying to gauge
> the correctness. It doesn't define the correctness of
> software unless you requirements are specified as passing
> a number of tests which would severely limit the kinds of
> requirements that could be defined.

I wrote - 'When we say "correct" I think we're saying that the program corresponds to the spec as defined by our tests...' [Jul 26, 2007 2:51 PM] - and you dismissed it out of hand "The definition you attempted to apply to 'correct' is circular." [Jul 30, 2007 11:03 AM].

Apparently you like it better when you say it - "It doesn't define the correctness of software unless you requirements are specified as passing a number of tests ..."

Erik Engbrecht

Posts: 210
Nickname: eengbrec
Registered: Apr, 2006

Isaac and James Posted: Jul 31, 2007 3:28 PM
Reply to this message Reply
Why do I suddenly feel like I'm sitting in court or congress instead of in a tech forum discussing programming languages?

Flat View: This topic has 370 replies on 25 pages [ « | 19  20  21  22  23  24  25 | » ]
Topic: Programming with "Duh" Typing Previous Topic   Next Topic Topic: Python 3000 Plea for Help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use