Who gets higher salary a Java Programmer or a C++ Programmer?

L

LR

Ben said:
LR said:
(e-mail address removed) wrote:
{...]
Do the programs provably work? To the same extent that an
engineer could "prove" that the bridge they designed will work?
There is a whole branch of computer science that is dedicated to
"program provability". In the practical world, the theory gave
rise to what is called "design by contract", by which you define
formally the specifications of your program with
pre/postconditions, invariants, etc. You can mathematically prove
that your program will work by those means. This is used in any
sensible environment that needs absolutely reliable softwares.
Absolutely reliable? Suppose you have a customer who wants a formal
proof that the program you've written will halt. Can you provide
that?
Yes, absolutely reliable. The program is proven to be correct in any
way. The proof can be given in the form of mathematical notations.
I'm not sure you responded to my question, so please allow me to
restate it. Suppose you have a customer who wants a formal proof
that the program you've written will halt, can you provide that?

You could provide a formula for the number of instructions that will be
executed as a function of the inputs (or the size of the inputs).

Isn't that math?

It's
considerably harder to put bounds on the number of cycles because of all the
crazy things modern CPUs do to try to execute a program faster and the
possibilities for introducing bugs at the hardware level. But yes, it's
absolutely possible to write a program that will provably, given a bug-free
processor, halt within a certain number of instructions. If the program
uses recursion this can be done as a proof by induction. If the program
uses iteration it needs to be broken into basic blocks and then proof by
induction can be applied.

Note that the "halting problem" asserts that there is no algorithm that
determines whether an arbitrary program halts in finite time. For specific
programs this can be very easy to determine.

I'm sorry, I'm not sure what you're saying in context. Are you
suggesting that there's some way to distinguish between programs that
can be proven to halt and those that it can't be proven for?


[example of a program that can be proved to halt snipped]

LR
 
L

LR

Ben said:
And you'd be wrong.

Really? Why? I'm waiting for a reason.
There are plenty of mathematical principles applied. In fact, let's play
YOU name a principle and we'll give you an example (I already used proof by
induction in another response in this thread).

I've given several examples of scientific principles in this thread.

I'll repeat them here for your convenience.

F = ma is a scientific principle. I^2*R=W is a
scientific principle. Hz = 1/(2*PI*sqrt(L*C)) is a scientific principle.
And I repeat, I admit I had to pull out my copy of Marks for that last
one. It's a been a long time since I needed it.



LR
 
L

LR

Ben said:
There is a lot of computer programming going on that doesn't involve
engineering. But that doesn't mean that no software is engineered.

Perhaps I haven't been clear. I see no evidence that there is "software
engineering" any more than computer science is a science.

I conclude that no software is engineered. People may be following some
formal procedure. If a cobbler wanted to s/he could follow a formal
procedure to make shoes too and it wouldn't be engineering, unless there
is some application of scientific principle to design of the shoe. Cooks
do this all the time. It's called a recipe, but they don't call it food
engineering. That is, unless someone is actually designing the food
relative to some physical process. Software is a mathematical construct
and I do not believe it is amenable to these sorts of applications.

However, I've asked, and if someone can point out an application of
scientific principle to software development, then I'll have to change
my opinion.

LR
 
L

LR

Paavo said:
Obviously you have not done MFC programming ;-) If you tried that, it
would become clear that programming (at least in this environment) is an
experimental discipline. You set up experiments to determine how the
library (MFC) behaves under some simulated conditions; you keep the
records and try to infer some general rules from that; then you attempt
to construct your own software according to the rules you have found, in
the hope that it will function to some extent also in other space and
time points.

Lot's of programming is done this way.

Sounds like physics+engineering to me ;-)

What is the physics part? If that were actually there, then this would
be software engineering, because you'd be applying a scientific principle.

A cook might experiment with the mixture of spices in a dish. Is that
engineering?

Seriously, in every case you
don't have a full control over the environment, it's engineering (my 2
cents definition ;-) If you have full control, then it's mathematics.
Regarding to programming, full control would mean computers with infinite
memory and infinite speed.

I'm sorry, but I don't agree in the slightest with this conclusion. Or
else we have very different views of what control is. But since you can
write programs with the same functionality in assembler or C++ I think
the programmer has control. I've worked on machines with 256 bytes in
machine code and I had control.

Gosh, some computers didn't even any "memory" aside from disk storage,
so I'm told.

If that was the case, programming would be
indeed reduced to a branch of mathematics or logic.

What part of it isn't?

Any mathematically
correct algorithm, however slow or memory-consuming, would qualify as a
valid and usable program. As we are not there yet, programming needs
engineering approach.

I don't think that an engineering approach to something doesn't mean
that it's engineering. I've already said in this thread that
programmers can learn quite a bit from engineers. I don't think that's
in dispute. What is in dispute is if this _can_ result in an engineering
discipline.

LR
 
L

LR

Martin said:
That's quite wrong. The engineers who designed the Tay and the Tacoma
Narrows bridges ignored wind and look where that got them.


I'm sorry, but what is quite wrong? I completely fail to understand how
your response contradicts anything I wrote above. Please explain,
because I utterly bewildered by your response.

LR
 
L

LR

Captain said:
A blind man may wait for many years after asking someone to show him
the path, though he had received a prompt response.


Well then, help me see. I might be slow and require repetition. Please
show me the scientific application that is used in the development of
software.


LR
 
L

Lew

LR said:
Simply because I disagree with you doesn't mean I'm a troll. But then
I'm quite used to having people bend words in ways that fit their
misconceptions. Isn't that what this discussion is about, at least in part?

And a master of it yourself.
 
L

Lew

LR said:
Well then, help me see. I might be slow and require repetition. Please
show me the scientific application that is used in the development of
software.

Why? This was done already and you twisted definitions and begged questions
so that you could reject what people said. What would make it different this
time?
 
L

Lew

LR said:
Software isn't engineered, so I believe your statement is based on a
false predicate. Or at least it hasn't been demonstrated to my
satisfaction that there is such a discipline.

Circular reasoning. You believe that software isn't engineered, therefore
statements that evidence otherwise violate your belief and must be "based on a
false predicate" in your world view.
 
L

Lew

LR said:
Perhaps I haven't been clear. I see no evidence that there is "software
engineering" any more than computer science is a science.

And yet the evidence has been placed before you repeatedly in this thread.
I conclude that no software is engineered. People may be following some

You conclude based on that it was your premise and that's the end of it.
However, I've asked, and if someone can point out an application of
scientific principle to software development, then I'll have to change
my opinion.

Which they did, and yet somehow you haven't changed your opinion.
 
B

Bill

When I was young, or at least younger than I am now, I was taught that
engineering is the application of scientific principles. This makes me
curious to know, what scientific principles are being applied in the
development of software?

LR

I teach my students that software engineering is the study of tools and
techniques (methods) that are used in the development of large software
systems. Anyone developer not familiar with software engineering
principles should not be a leader (IMO).

Bill
 
J

James Kanze

It can work well, I worked on a couple of projects within
Alcatel, all of these were multi-national. The company had a
policy of multinational teams at that time (late 80s) with all
written communication (including meeting minutes) in English.
That caused a few grumbles when there were no native English
speakers at meetings! Female software was an interesting
concept for the English members to grasp...

My experience was late '80s and Alcatel, too, but I don't think
I would have characterized it as "working well". This was not
long after Alcatel had taken over ITT (SEL in Germany); in
addition to national cultural differences, the ex-Alcatel and
the ex-ITT units had a completely different corporate culture.
Not to mention the resentment on the part of many of the Germans
about their company having been "taken over".

Language was also a problem; this was the first time using
English for the French team, and although English was the
official language of ITT even before the merger, the Germans
didn't seem that used to it either. I can remember more than
one meeting (supposedly in English) at the beginning where I
didn't understand a word. The French and German collegues
claimed to have understood each others English, however, which
was the important part. Except that when I discussed what had
been decided with them later (in their own language), they'd
understood something completely different.

(I might add that I've worked with Alcatel on international
projects later, and the situation was greatly improved.)
 
J

James Kanze

Ben Voigt [C++ MVP] wrote:

[...]
I'm sorry, I'm not sure what you're saying in context. Are
you suggesting that there's some way to distinguish between
programs that can be proven to halt and those that it can't be
proven for?

He's saying that for a given set of requirements, you can write
a program which provably meets those requirements. Whether
"halting" is part of those requirements or not---if halting is
part of the requirements, then you write the program in a way
that it can be proved to halt.

Of course, unless provable halting (or anything else) is part of
the unnegociable requirements, it might be poor engineering to
do so. Engineering is a lot about finding cost-efficient
solutions (as opposed to pure science, where cost is not a
factor).
 
J

James Kanze

Argument by appeal to authority?

Not really. He's arguing about the definition of a word.
Definitions are determined by use. He's siting a use. And all
uses aren't equal---the use he cited was by a professional group
of engineers, generally recognized as such. Which has a bit
more weight that citing just one random individual.

[...]
So far it hasn't helped me except as more evidence that there
isn't any scientific principle being applied in this so called
engineering disciple.

As we say in French: "Il n'est pire sourd que celui qui ne veut
pas entendre." (There's none so deaf as those who don't want to
hear?)
 
J

James Kanze

So if it's defined that way, then that's what it is?
I wonder why the definition of what engineering is seems to
have changed.

It's not changed. The concept engineering includes many
aspects; he's just accenting a different one.

The _American Heritage Dictionary_ gives:

The application of scientific and mathematical principles to
practical ends such as the design, manufacture, and
operation of efficient and economical structures, machines,
processes, and systems.

That certainly covers software engineering. The term
"scientific and mathematical principles" is broad, and covers a
lot more than just physical laws like Archimedes' principle. Or
even mathematical proofs of programs. The entire sentence above
makes it clear that it also applies to the process, for example.
Every good shop I've seen makes extensive use of statistics, for
example, in evaluating their process. And controlled testing,
which is the basis of all scientific methodology. And code
review, which is a form of peer-review such as is used in all
scientific journals. Software engineering is all about the
"design [...] of efficient and economical [...] systems", using
"scientific and mathematical principles" in a practical way.
You can't get more "engineering" than that.
 
J

James Kanze

Ben Voigt [C++ MVP] wrote:

[...]
I've given several examples of scientific principles in this thread.

I'll repeat them here for your convenience.
F = ma is a scientific principle. I^2*R=W is a scientific
principle. Hz = 1/(2*PI*sqrt(L*C)) is a scientific principle.
And I repeat, I admit I had to pull out my copy of Marks for
that last one. It's a been a long time since I needed it.

Those are NOT scientific principles. They're just formula. How
and when you use them would be controled by various scientific
principles. How you know that the formula applies would be
controled by scientific principles. But the formula itself
isn't a principle.

And the principle which says that you use F=ma to determine the
force, given mass and acceleration, in a limited set of
circumstances (low speed, non-quantic mass, etc.), and which
causes you to understand that the results aren't exact, but are
probably close enough, is the same sort of principle as those
which govern software engineering. (I.e. analysis of the
surrounding conditions, to determine whether the techniques I'm
using to determine quality are "close enough".)
 
J

James Kanze

Yes, that's right. Programmers don't worry about things like
power outages. Although they may have to worry about
incomplete transactions. But the physical world is more or
less besides the point. Usually.

In a certain sense, by definition. The boundary with the
physical world is the boundary of what is usually considered
software. But of course, software isn't developed in a vacuum,
and someone will have to decide how to map the physical world to
the software's inputs and outputs. (As a simple, very low level
example: on most systems I've worked on, the hardware debounces
key contacts---on one, the hardware engineers weren't aware that
keys bounce, so we debounced them in software.)

[...]
But I think I made it plain that engineers don't consider the
entire physics of the bridge. They might not consider fluid
interactions or wind loading or some such. The parameters are
likely to be driven by budget, customer requirements or
perhaps good practice.

Well, you certainly hadn't made it plain, but that is, IMHO, a
critical element of engineering. Parameters driven by a number
of pragmatic constraints. In a similar way, well engineered
software will be in budget and on time. That's how you measure
the quality of engineering (along with meeting requirements, of
course). Good engineering delivers a product (in the largest
sense of the word) which meets the requirements, in budget and
on time, using rigorous (i.e. scientific) techniques which
ensure that this will be the case.
I don't think testing all the possible interactions is
possible for most software. Consider a fairly simple program
that reads inputs for say 64 boolean variables and has at
least one conditional branch for each variable.

It depends on the software, but in general, yes. Testing can
only show that the software doesn't work, never that it works.
(But that's really true of just about every complicated system.
How do you test a bridge?)
And yes, I once did speak to a EE who told me that the
software his company wrote was fully tested for all possible
inputs.

It's possible for a small subset of software. An isupper
function for ASCII characters, for example.
But that isn't done. AFAIK ever. I don't think there's enough
time in the universe to do that. Not even for all the likely
cases.

No. In the end, designing bridges is just like creating
software. You can't test all possible cases. In the case of
bridge design, you can't even analyse all possible cases; you
can generally get a lot closer to it with software, but there's
still a costs-benefits trade-off involved. If the evaluation of
these trade-offs is done using a serious, scientific
methodology, we speak of good engineering. If it is done by
guessing, or not done at all, we speak of bad engineering (or no
engineering). Both for software or for bridges.
Yeah, that's it then. Except math is not a science.

Of course it is. It's the queen of sciences.

And computer science is a science. Or are you going to claim
that computer science doesn't exist, too.
I won't. But engineers aren't precluded from doing design, in
the sense of aesthetics rather then physics, are they?

My point is just that scientific principles are only a small
part of engineering.
Not always successfully though, the attempt to streamline
steam locomotives in the early to middle 20th century was a
bit misguided, wasn't it? At least from an engineering
standpoint.

That I don't know. Given the coefficient of penetration of a
typical steam engine, it would seem that almost anything would
help. But the real motivation was commercial, I think.
(Some of this raises several interesting questions that go
beyond the scope of this discussion. EG, I've read statements
by a few engineers who write something similar to: If it looks
right it will fly. Or steam, or sail, or whatever it is
they're designing for. I've heard programmers say something
similar. But then I'd expect cobblers and coopers to have
something similar to say. Why something looks right is left as
an exercise. ;) )

Personally, that DOESN'T sound like good engineering to me. But
the reverse might be true: if it is well designed, it will look
good.
And speaking of Eiffel and aesthetics let's not forget that
statue standing in NYC's harbor.

Which wasn't by Eiffel (although Eiffel's company did the
engineering for the internal structure to hold it up).
Oh I agree that there's more to engineering than the
application of scientific principle. But that is the heart of
the matter. Without that I don't think that it's engineering.

I'd prefer the expression "scientific method" to "scientific
principles". The word "principles" can be understood at too
many different levels.
I agree that there are similarities. Even though you haven't
said it explicitly, I think there is quite a bit that software
developers can learn from engineers. But I don't quite see
how software development is engineering. I suspect they are
fundamentally different. I've sometimes wondered if perhaps
software development isn't little more like making movies.

I find software development to be very, very much like
architecture or bridge engineering (and probably a lot less like
chemical engineering---or even electrical engineering).
 
C

courpron

(e-mail address removed) wrote:
[...]
If "halting of the program" was in the user requirement specifications
of the software, then yes. Since the software was developped using
design by contract, it can be proved to meet the specifications. If
the specifications was impossible to meet for one reason or another,
the software couldn't have been developped using formal methods.

So then, not all software can be produced using formal methods?

It depends if you mean hypothetical softwares, or softwares that can
be practically produced to fulfill the specifications.
In the first case, obviously not all softwares (using formal methods
or not) can be made in practice, for the same reason that not all
problems are computable.
If, in practice, a software X can be produced to fulfill the
specifications, then another software Y using formal methods can be
produced according to the same specifications.

Alexandre Courpron.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top