473,320 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Software bugs aren't inevitable

A work colleague circulated this interesting article about reducing
software bugs by orders of magnitude:
http://www.spectrum.ieee.org/WEBONLY...5/0905ext.html

Some methods they talk about include removing error prone and ambiguous
expressions from their ADA based language Sparc - The example they give
is on why they removed the increment operators x++, x-- .

A bit of googling shows that they have, in the past mentioned Python in
Job specs, but only as one of many languages.

I was wondering what Praxis thought of Python, and how good it would be
if a Praxis engineer gave a critique of Python as a part of a flow for
producing low bug-count software.

In this sidebar to the main article:

http://www.spectrum.ieee.org/WEBONLY...905extsb1.html

It seems that they use one equation from the Z notation model and add
it as a comment to their main programming languages function definition
as a comment, then have a means of automatically testing the comment
against the function body.

This is rather like how doctest can check the test and expected result
given in a doc-string against the implementation given in the function;
indeed I wrote up such an example at work and circulated it amongst the
resident perl mongers. - Gosh it fealt good :-)

So, How do I get feedback from Praxis, Do they already read
comp.lang.py?

Cheers, Paddy.

Sep 12 '05
56 3350
In article <86************@bhuda.mired.org>, Mike Meyer <mw*@mired.org> wrote:
aa**@pythoncraft.com (Aahz) writes:
In article <7x************@ruckus.brouhaha.com>,
Paul Rubin <http://ph****@NOSPAM.invalid> wrote:

Every serious FP language implementation optimizes tail calls and thus
using recursion instead of iteration doesn't cost any stack space and
it probably generates the exact same machine code.


While that's true, one of the reasons Guido has historically rejected
this optimization is because there are plenty of recursive algorithms
not amenable to tail-call optimization.


That seems amazingly silly. Sort of like refusing to hoist function
definitions because not all function definitions can be hoisted. Or
choose your favorite "sometimes-I-can-sometimes-I-can't" optimization.

Since the BDFL is *not* known for doing even mildly silly things when
it comes to Python's design and implementation, I suspect there's more
to the story than that.


Note that I said "one reason". The primary reason is that tail-call
optimization destroys the call stack, which means that exception
semantics would have to change. If tail-call optimization were more
useful, he might be willing to consider the tradeoff, but since it
isn't...
--
Aahz (aa**@pythoncraft.com) <*> http://www.pythoncraft.com/

The way to build large Python applications is to componentize and
loosely-couple the hell out of everything.
Sep 17 '05 #51

"Aahz" <aa**@pythoncraft.com> wrote in message
news:dg**********@panix1.panix.com...
Note that I said "one reason". The primary reason is that tail-call
optimization destroys the call stack, which means that exception
semantics would have to change. If tail-call optimization were more
useful, he might be willing to consider the tradeoff, but since it
isn't...


The prime reason I remember Guido giving, as I reported previously, is that
tail-call optimization is semantically wrong otherwise, given the language
as now defined, and would require a semantic change that he does not want
to make.

Terry J. Reedy

Sep 17 '05 #52
Sybren Stuvel wrote:
... Computers aren't happy. They couldn't care less about the
programming language.


This reminds me of a quote I love (and wish I could cite the
originator):

Don't anthropomorphize computers, they don't like that.

--Scott David Daniels
Sc***********@Acm.Org
Sep 17 '05 #53
On Saturday 17 September 2005 06:03 pm, Scott David Daniels wrote:
Sybren Stuvel wrote:
... Computers aren't happy. They couldn't care less about the
programming language.


This reminds me of a quote I love (and wish I could cite the
originator):

Don't anthropomorphize computers, they don't like that.


Actually, I wrote a long (and very off-topic) reply justifying the
philosophical point that whether or not computers can feel "happy"
is an article of faith, either way, and depends heavily on what
sense you are using for the word "happy" not to mention "feel"
or "be". I thought maybe it would be best to drop it, but since
this bone is still being worried, perhaps it's worth summarizing ...

Fascinating subject, actually. There is a widely held *faith* among
materialist atheists that the criterion for "being able to feel"
is an as-yet undefined, but definable level or form of computing
complexity mythologized as a "true AI". The need for this belief
is an artifact of the materialist atheist belief -- or rather the
disbelief in any form of spiritualism or animism.

I contend that there is no such thing as a "true AI", or a "true
natural intelligence" for that matter in the sense of there being
some sharp line between "sentient" and "non-sentient" matter.

Obviously there is *something* going on, in continuity of memory and
reasoning capacity that has something to do with the objective
capability to react in complex ways, and thus to express one's own
sense of being in a way that is more comprehensible to "others".
Thus far, however, there is no need for any sharp line -- just a
gradually increasing level of intelligent responsiveness.

But, the actual state of sensation? We know nothing about that,
and science cannot illuminate it, because it's not an objective
statement. We by definition cannot know what someone or something
else "feels". We can only know how he/she/it *reacts*.

It seems a simpler and more natural assumption to think that
sensation *pre-exists* the reasoning power to express or remember
that sensation. Indeed, it seems more sensible to regard it as
a fundamental property of matter (or energy or space -- it being
hard to define which bit of reality the soul adheres to, but
"matter" will do for sake of argument).

It's no more unreasonable, I would contend, then, to say that a
computer is "happy" when it acts on data it "understands". If
"thought" is a "mechanism", then a "mechanism" can be "thought".

I do not "anthropomorphize" the machine in that I do not regard
thought as a uniquely Human capacity. That I have some "theory
of mind" for a PC does not mean that I think it's a Human, nor
that I would be stupid enough to credit it with a Human mind's
capabilities.

So I personally find it completely sane and often more natural
to speak of what a computer "knows" or "understands" or in this
case, "is happy with".

But if you really insist on a reductionist, mechanistic explanation,
then my point is simply this: a computer, in order to act on ANY
program, must first be made to act on a prior program (a compiler or
an interpreter -- in addition to the BIOS and operating system which
must first run in order to initiate the said program), which contains
instructions for converting said program into a format which the
computer is able to directly process.

I personally found "the computer is happier with binary" to
be a much more concise and understandable way to say that, but
clearly, some people on the list find it heretical to use any
statement which assigns "agent status" to computers or programs.

But getting back to the point -- the fact that the computer itself
would be "happier" with binary program instructions shows that there
is certainly NO objective, technical sense in which ANY computer
programming language is "inherently" superior.

Programming languages can ONLY be evaluated in "psychological"
terms. The "technical" design of programming languages -- and
indeed ALL systems for describing and characterizing cognition
of all forms is ultimately a "psychological" discipline. It
obviously depends on the function of the mind of the programmer,
and the ability of programmers' minds to process the
information is the *metric of success* of that programming
language.

Given that programmers' minds are neither identical nor
unchanging, it pretty much goes without saying that the choice
of programming language, notation, or technique will be
subjective -- and also changeable.

I said this, because an earlier poster had *dismissed* mere
"psychological" reasons as unimportant, claiming that
functional programming was superior on "technical" grounds.

I hope I have demonstrated that that statement is nonsensical --
ALL statements about programming languages or techniques are
ultimately dependent on "psychological reasons". If functional
programming reduces bugs, then it also does so for
*psychological* reasons.

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com

Sep 18 '05 #54
Giles Brown wrote:
Michael Sparks wrote:
The problem that these sorts of approaches don't address is the simple
fact that simple creating a formal spec and implementing it, even if
you manage to create a way of automating the test suite from the spec
*doesn't guarantee that it will do the right thing*.

<snip>
As a result I'd say that the subject "Software bugs aren't inevitable"
is not true.


I think you can argue (I would) that any behaviour that is in the
specification this "isn't right" is not a software bug, but a
specification error.


To a user there is no difference. If the software doesn't do what they
wanted it to do/asked for, then to *them* the person who is accepting
the software it's a bug. It doesn't matter to them what caused it - be it a
buffer overflow, a misunderstanding of a language feature or an incorrectly
written formal spec, it's still a bug to them.

I'm actually a big fan of formal specification (specifically VDM), but
that doesn't stop me realising that it's not a cure-all, and it's also not
an excuse - if code doesn't do what it was asked to do, it's bust.

Regards,
MIchael.

Sep 19 '05 #55
Terry Hancock wrote:

/a few statements which seem to be there - apparently - just for the sake
of quarreling/
The FP camp (apparently) wants to advance the claim that FP will *always*
reduce bugs. I find that very hard to believe.
Good.
Now go, and talk to some FP people before accusing them of being *so*
sectarian. Your supposition that they claim that FP is always better is
unjustified. Were I more aggressive, I would say: 'sheer nonsense'.
I would not say - as you did - a 'ludicrous sophistry', because it is
not ludicrous. Quite sad, in fact...

Your further posting, about twists and perversion of functional programming
makes me invite you to learn a bit more of FP. It won't harm you, and it
might raise in your spirit the question why in thousands of educational
establishment this programming style is considered good for beginners.
I might agree that thousands of teachers are more stupid than you, but that
they are all perverts, I believe not.

Anyway. In a further posting you comment the "psychological" aspect of
language choice in such a way:
I said this, because an earlier poster had *dismissed* mere
"psychological" reasons as unimportant, claiming that
functional programming was superior on "technical" grounds.


1. I never said that FP was technically superior.
2. I never dismissed psychological reasons as unimportant.

Read it again, please.
Please, stop putting in other people mouths fake arguments, just to
have something to argue about, OK?
FP appeals to many. Well, *why* people who jump into Python from other
languages very often like functional constructs, and dislike the fact
that destructive methods return nothing?...

Jerzy Karczmarczuk
Sep 19 '05 #56
This conversation is rapidly approaching flame-war territory. Just a few
comments before I hope we can put this to bed.

On Mon, 19 Sep 2005 11:39:35 +0200, Jerzy Karczmarczuk wrote:
Now go, and talk to some FP people before accusing them of being *so*
sectarian. Your supposition that they claim that FP is always better is
unjustified. Were I more aggressive, I would say: 'sheer nonsense'.
I would not say - as you did - a 'ludicrous sophistry', because it is
not ludicrous. Quite sad, in fact...


I work with some people who are absolutely infatuated with functional
programming. I can assure you that in my experience, at least some FP
folks *do* say that it is always better. Need I point out that they are
invariably extremely bright, highly educated, academically minded, and
utterly inexperienced with the commercial and practical realities of
real-world development?

I say that as somebody who is fascinated by the concepts of FP, and would
like to see Python at least keep the existing functional programming
constructs, if not expand them. But my reason for doing so is that there
are no magic bullets, not FP, not generators, OO, or any one of a hundred
other programming patterns. The more tools you have, the more likely you
will find one that works for your particular problem.
--
Steven.

Sep 19 '05 #57

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Will Stuyvesant | last post by:
Suppose I want to sell a (small, 1000 lines) Python program. It is a commandline program for database applications and I have a customer. The customer wants to "try it out" before buying. The...
36
by: Andrea Griffini | last post by:
I did it. I proposed python as the main language for our next CAD/CAM software because I think that it has all the potential needed for it. I'm not sure yet if the decision will get through, but...
30
by: Matt Probert | last post by:
Is it just me (probably) or is Mozilla and the newer Firefox full of CSS rendering bugs? I ask, because some strange effects occur with Mozilla and Firefox which don't happen in Opera and dare I...
102
by: Steve Johnson | last post by:
I'd like to hear thoughts on what books, in your opinion, are true classics in the field of software engineering. I read a lot on the topic - at least a book a month for many years. There are many...
1
by: NOSPAM | last post by:
I have been looking for persistence objects software for my projects, and I found several of them.. after trying them out, this one seems to be the best:...
2
by: Shaw | last post by:
We develop ASP.NET based web application for a while, and don’t have defect (bug) reporting and tracking system for development right now. We consider using defect report and track software....
9
by: David Teran | last post by:
Hi, we are currently using another database product but besides some licensing issues we are finding more and more problems with the database. We are evaluating PostgreSQL and it looks quite...
19
by: Alan Silver | last post by:
Hello, Having discovered what I believe to be two CSS bugs in IE7, I have submitted bug reports to MS. AFAIK, these don't get acted on until they receive votes form others to say they are worth...
1
by: jnmitts | last post by:
Hi Everyone. Here's the latest collection of software articles from AllPCNews. Enjoy! :) PHP - Web Application Development http://www.allpcnews.com/2008/09/15/php-web-application-development/ ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.