What is a software engineer?

R

RobG

entirely subjective.

Of course. You seem more interested in a philosophical discussion
about what is (or isn't) science, I'm not.

Science snobbery probably.

No, an attempt to arrive at a conclusion to this ever more pointless
discussion.

I dont notice trees doing quantum physics. Wat else would it be?

Pointless philosophical theorising?
Actually, its not.
Beacause it leads to a general theory of Knowledge, and enables you to
e.g. pit creationism against science on the CORRECT terms.

Heck, it's all just conjecture in the final analysis. What is correct?
How may circles do you want to turn? Why would I be interested in
discussing science versus creationism? I'm not interested in going
there.
, and see them
for what they are.

You introduced isms, I'm not going to discuss them.
[...]
Ultimately an engineer is a caveman who, with no science at all, ties a
stone on the end of a stick, and bashes idiots who are still looking for
Explanations as to *why* it works, over the head, and eases their
troubled minds that way.
That caveman is not an engineer by my definition. The original
question is "What is a software engineer". My position was that the
difference between an engineer and a tradesman is that the engineer
uses scientific methods to develop solutions. Doing something simply
because it works without any understanding is not a scientific
approach. It might be successful (i.e. it might "work"), but it's not
scientific.
Which is a suitable analogy for developers who have no understanding
of why the code they write works, and therefore no understanding of
when it will fail. Your caveman will be bewildered by the mob who work
out how clubs work and develop suitable defences or superior weaponry.

Sure, but he got there first.

In your hypothetical example created to support your argument. But it
says nothing about whether his actions quality him as an engineer or
not. I say not because his methodology doesn't fit my definition of an
engineer. You say he's an engineer because you say he's an engineer.
That's more akin to faith than reason, it certainly isn't a logical or
scientific conclusion.

[...]
You should note that this is why computer *scientists* are such an
infernal waste of space. They want to know how it all works. Software
engineers don't need to know how it works.
Such broad generalisations are a poor substitute for reasoned
argument. It's absurd to argue that computer scientists are a waste of
space as without them there'd be no computers or software engineers,
or this discussion. Or were computers invented by a bunch of people
connecting a stack of valves together and messing around with them
until the light (literally) came on? Was the first logic circuit
simply chance, or did someone actually design it from first
principles?

Actually the first logic circuits were invented by mathematicians, not
computer scientists,

That is hardly surprising as mathematics is a fundamental tool
required for much of science. That someone calls themselves a
mathematician does not preclude them working in the field of computer
science nor also being called computer scientists.
and the first electronic computer was built by a
post office engineer, because the mathematicians hadn't got a clue how
to make 20,000 valves run for more than a minute without one failing.

So there we have it, an engineer who applied scientific knowledge and
methods to build a device. So you do have criteria for what an
engineer is, you just aren't prepared to supply a definition.

Here's the Wikipedia definition (which is as good as any I can come up
with):

"Engineers are concerned with developing economical and safe solutions
to practical problems, by applying mathematics and scientific
knowledge while considering technical constraints[1][2]"

<URL: http://en.wikipedia.org/wiki/Engineer >

That is pretty consistent with what we've both been saying, except you
want to introduce philosophy into it to remove the word
"scientific" (perhaps you'd also like to remove "mathematics" too).


[...]
Only if you apply the science correctly, can do the massive
calculations, needed, and do actually ask the right questions.

Now you're back to quality. The methodology is the primary criterion,
how well the principles are applied just tells you how good an
individual is at being an engineer. If they are particularly bad at
it, you might stop calling them an engineer. If no scientific
methodology at all is applied, I wouldn't call them an engineer..

In just about every place I've ever worked the actual science underlying
the engineering has been really really small as a part of the overall
project.

At best it shows what the theoretical limits are. At worst it is simply
too long winded to get the answers needed in the timescales available,
and too simplistic to cover all the bases.99% of engineering is trial
and error testing and calculation by rule of thumb, or tables.

Which is, more or less, a scientific methodology. So we're in
agreement, engineers employ scientific methods to develop things.

One pof my professors was a world expert in pre-stressed concrete beams,
He had been for 20 years. I asked him how he could spend 20 years
understanding concrete beams. "Its very complicated", he said, "many
factors to be taken into account, and an awful lot of statistics".

"So how do we manage to use it when we don't fully understand it"

"Oh, we test its to make sure it works" he said. "And there are tables
of the results of all those tests available. Then we add a safety
margin, and that's what we build to"

Not quite the learned science I was expecting with hard clear answers.

But absolutely consistent with practical use of scientific
methodology. Sometimes there is no theory or algorithm for doing
stuff, so experimentation and application of results is all that is
available. It is particularly true in the area of materials science
(or you might prefer it was called materials engineering).

That is true.


That is not.

It is, you described it yourself above. It is exactly what your
concrete beam specialist was doing. He was performing science, that he
calls himself an engineer simply means he likes to identify with the
more practical side of things and apply knowledge to find solutions
rather than looking for more theoretical outcomes.

You obviously haven't been involved in developing things.

I have, and I've never called myself an engineer or scientist. Though
someone tried to call me an "application engineer" once, I didn't like
it. I preferred to call myself a software developer, even though I
wrote very little code. At that time, people who would now be called
"developers" were called "programmers", so developer was apt.

Development is
an iterative process of build-test-redesign until its 'good enough'.

And what is that other than application of a scientific methodology?
You're agreeing more furiously the more you write.

The concepts of e.g. the gas turbine were written up in a paper in 1925,
it was about 1942 before materials technology was good enough to make one.

Which doesn't disprove the hypothesis that engineers employ scientific
methods.


No, in my EXPERIENCE of reality, as a practicing engineer across many
fields, most engineers work most of the time purely by trial and error.

Not purely. They start somewhere, they experiment, they record the
results, they see if it's good enough yet. If not, they attempt to
predict what to do next to make it "better". They don't blindly just
do stuff hoping something just works.

Nothing of what you have written disproves the notion that engineers
apply scientific methods to developing things. They are usually at the
more practical end of invention and innovation, which means a primary
research tool is experimentation (only boffins like Newton and Hawkins
think they can figure it all out in their head).

Some of the greatest human minds have been at once mathematicians,
scientists, engineers and artists - people like Archimedes and
Galileo. Experimentation was fundamental to their learning and
discovery. Archimedes was on the cusp of discovering differential
calculus in 200 BC, now that would have put the Greeks well ahead of
those pesky Romans (if they'd had the engineers to apply the
knowledge, of course). But the Romans managed to kill him while trying
to kidnap him, it took nearly 1,800 years for someone else to publish
similar work.

<URL: http://en.wikipedia.org/wiki/Archimedes_Palimpsest >


[...]
Many a compsci have I seen grappling with code when it was obvious to an
engineer, that there was a hardware fault ;-)

- you can't win a debate by simply defining your protagonist out> of the argument.

I am merely trying to point out, that the scientific disciplines are not
about developing usable artefacts:

I think you simply draw a line and put science on the theoretical side
and engineering on the practical side. You then introduce all sorts of
philosophical argument to show that "east is east and west is west and
never the two shall meet". But they do, and they can exist in perfect
harmony, as Kipling's ballad goes on to explain.

at best they lay the groundwork for
them, and all technological development is tedious trial and error
testing to attempt to fulfil the theoretical promise of what the science
or mathematics actually shows.

I didn't say engineers *are* scientists (though they might be), but
that they employ scientific methods. You seem to think those methods
are reserved for engineers and that their use defines an individual as
an engineer.

At the end of all that, were discussing terminology. You have an
aversion to scientists and don't like the idea that you, as an
engineer, employ scientific methods. Perhaps you'd rather say
scientists employ engineering methods - whatever. We're talking about
the same thing.

The arguments here are essentially spurious, as the the concept of
'correct' code in absolute terms: There is only stuff that works, and
stuff that doesn't. All the 'correctness' doesn't guarantee jack shit,
and has been proven to be that way. Its pure intellectual snobbery by
people who think they know what science is, but don't.

You really have a bee in your bonnet about scientists. Science covers
a vast array of disciplines, some technical and some not. Some areas
are based almost solely on experimentation, others almost solely on
theory. To mire yourself in argument about what is or isn't science is
pointless when looking for a description of what is an engineer. All
I've got from you so far is that an engineer isn't a scientist and
that they employ what I call scientific methods and you call (more or
less) trial and error.

But inherent in that is the requirement to observe and record results,
then apply analysis to determine where to go in the next iteration.
And when you run out of ideas (or money or time), you might take a
leap to some unknown point in the hope it gives a better result
because so far logical deduction has failed. And if you're lucky,
you'll discover not only a suitable solution, but also a theory or
algorithm to help with similar problems in the future, which might be
no more than a more efficient method of trial and error.

That is applying scientific methodology. And the person who did it
might be called an engineer (or scientist, or technician, or
developer, or whatever you think they should be called).

Thomas pointed ears had the only real valid point. If you see a bit of
code you don't understand, you RTFM till you do. If it turns out that it
works DESPITE what the manual says, you are on very thin ice.

But a proper professional engineer wouldn't even do that. He wouldn't
write it in the first place.

How would this hypothetical engineer have known not to do it? Where
did the knowledge come from? You've said engineers work by
experimentation alone, now a criterion is added that they can't employ
any technique or method that isn't popularly known - where is the role
for, or even possibility of, experimentation in this scenario?

Your professional engineer can only be discovered by asking you which
one is the professional engineer, because you won't supply a
definition and apparently they're not allowed to use the very
techniques and methods that distinguish then as engineers.

I've been there, and told my coders 'I dont
care how fucking elegant it is, and how smug you feel having written it,
no one but you understands it, no one has the time to read the obscure
page in the manual where it says it will work, potentially not even the
next browser writers to come along, and frankly you are not the most
essential person here, and I won't have you writing code that makes you
so: There are no prizes for elegance. The prizes go to the humble people
who turn out plain standard workmanlike code that everyone else can
understand and fix, and if that's too dull for you, the door is over
there ->, and if you like intellectual puzzles, do the crossword in your
lunch break'

I can agree with most of that from a pragmatic "get it out the door"
perspective, but you still haven't provided a definition of what a
software engineer is.

THAT is software engineering.

But which person in the above scenario is the software engineer?

The management of people whose egos exceed
their overall understanding and usefulness. They generally have compsci
degrees.

Ah, so in your definition-by-example methodology, being an engineer
also requires management skill. I'd dispute that it is a requirement
of being an engineer, while recognising that it is a very useful skill
to have and that many engineers take on project management roles.

I have participated in project management seminars attended by
engineering project managers who didn't consider that project
management might extend beyond the construction industry. Needless to
say an IT project manager is something of an oddity to them, but they
generally accept me in the end. :)
 
G

Garrett Smith

Asen said:
But `this' still associated with execution context in which been
executed `eval'. With [[Construct]] and [[Call]] method of object who
refer `Function' you create `object' who internal [[scope]] refer
Global Object independent of execution context in who's been called
Function.[[Construct]] or Function.[[Call]]. After that if you call
this `object' without providing `this' value from caller, `this' in
created execution context will be referrer to Global Object. I like
much more that approach with Function construct and call method.

If the this value were undefined, then the global object would be used.

If that is undesirable, then it could be avoided with:

var f = Function("alert(this)");
f.call(f);
What about this in Spider Monkey:

function evalCode(code)
{
return eval.call(null, code);
}

evalCode('var a = 10;');
window.alert('a' in this); //true
window.alert(a); //10

Results:
elert "false"
elert "10"

In ES5-compliant engine, *any* indirect eval would have that result,
using the global execution context.

In non-strict mode, eval such as this:

data = window["eval"]("(" + data + ")");

- create properties of the global object, following ES5 s. 10.4.1.1.

This is explained in ES5 s. 10.4.2, 10.4.2.1, and 15.1.2.1.
 
G

Garrett Smith

Richard said:
Garrett said:
Richard said:
Garrett Smith wrote:
<snip>
IIRC jquery uses window["eval"] in the source code. looking...
[snip]

My impression was JQuery's authors were then going to do whatever
was necessary to fool the compressor in question into not noticing
the - eval - use (and making it unrecognisably indirect should
achieve that). Obviously the sane alternative, of using - new
Function - to create a minimal scope chain function that wrapped
the (now not indirect) eval call, did not occur to them.

I see.

That could be avoided by either Function constructor or a separate,
globally-accssible method:

jQuery.evalString = function(s) {
return eval(s);
};

That function would not be compressed, but it would be so short
that it wouldn't matter.

Recall that as it stands JQurey is wrapped in the inline execution of a
function expression, which provides a 'private' 'global' scope for just
the JQuery code. If your function was defined within that function
expression its obvious - eval - use would prevent any modification to
the Identifiers employed in the 'private' 'global' scope facilitated by
the function expression. That would be a bad thing from the point of
view of code minimisation. If your function were defined outside of the
function expression then the whole becomes less of a discreet single
unit. Opinions on the latter are likely to vary, but I can see
justification in arguing against doing that.

It would be separate, globally accessible. It is less "discreet" in that
there is a "pubic" |evalString| property whose only justification is
based on the need to avoid scope chain modification.
The advantage in the use of - new Function - to create the function is
that doing so will create a function with the minimum scope chain, and
can achieve that even from within the containing function expression. A
'smart' code compressor should be able to see that the lexically
containing scopes (except the global scope, which could never be
modified anyway because that would cost the external API (if you munge
the Identifier - JQuery - the whole library is dead)) could not be
influenced by the code within such a function.

"The" advantage? I count three.
1) minimum scope chain
2) called from same context
3) minification works hack-free

It would be of use to anyone who wanted to dynamically import script
source text. It is a pity that much of the dynamic importing of script
source text that goes on at present is already largely inadvisable.

Importing script source text is possible by assigning a property to a
globally-accessible identifier. Given an |items| object:

"if(typeof items !== 'undefined') {"
+ "items.myNewItem = { name : 'a' };"
+"}";

What is inadvisable?
 
J

John G Harris

A software engineer is someone who does NOT spend two weeks arguing the
finer details of a language, or what a software engineer is.

HE rewrites in code so simple, there is nothing to argue about.

"if that's too dull for you, the door is over there ->" he said : he's a
manager. Unfortunately there are many managers who used to be engineers
who pontificate about what it is to be an engineer.

John
 
G

Garrett Smith

comp.lang.javascript is the correct place to discuss how the language
works. That happens to be important to people who use the language.

Understanding a problem and how to solve it is a fundamental skill for
a software engineer.

This NG discusses mainly problems related to scripting HTML pages in a
browser. This particularl eg of this thread is centered around
discussion of type checking, where it is useful, where an abstraction
is useful, where it fails, what the specifications state.

Realize that c.l.js is an unmoderated NG; flippant remarks can and do
create disruption.
"if that's too dull for you, the door is over there ->" he said : he's a
manager. Unfortunately there are many managers who used to be engineers
who pontificate about what it is to be an engineer.
What he has described as his "management" techniques sound like not very
good characteristics for a manager (or code quality, or pride, or
healthy working relationships).
 
T

The Natural Philosopher

Garrett said:
comp.lang.javascript is the correct place to discuss how the language
works. That happens to be important to people who use the language.

Understanding a problem and how to solve it is a fundamental skill for
a software engineer.

This NG discusses mainly problems related to scripting HTML pages in a
browser. This particularl eg of this thread is centered around
discussion of type checking, where it is useful, where an abstraction
is useful, where it fails, what the specifications state.

Realize that c.l.js is an unmoderated NG; flippant remarks can and do
create disruption.

What he has described as his "management" techniques sound like not very
good characteristics for a manager (or code quality, or pride, or
healthy working relationships).

Believe me, I had to fire that guy. The only guy I ever had to fire.

My staff begged me to do it. He completely destroyed the morale of
people working damned hard to tight deadlines.


It transpired that he was actually writing a science fiction fantasy
online with a bunch on internet geeks. Writing plain code was just too
boring.
 
T

Thomas 'PointedEars' Lahn

Garrett said:
Importing script source text is possible by assigning a property to a
globally-accessible identifier. Given an |items| object:

"if(typeof items !== 'undefined') {"
+ "items.myNewItem = { name : 'a' };"
+"}";

What is inadvisable?

1. There is no `items' object. There is, at most, a property with
that name that stores a reference to an object.
2. What does this have to do with importing "script source text"?
Would you not want to use source code in a template in the same
context in which you included it, as in other languages? The
global meaning should be optional.
3. The spacing. `if' is not a function.
4. The assignment, if `items' refers to a host object.


PointedEars
 
G

Garrett Smith

Thomas said:
1. There is no `items' object. There is, at most, a property with
that name that stores a reference to an object.

uh, "given an items object says there is.
2. What does this have to do with importing "script source text"?
The example posted is a string. That string could have been fetched via
XHR, which can be eval'd. I should have mentioned that.
Would you not want to use source code in a template in the same
context in which you included it, as in other languages? The
global meaning should be optional.
3. The spacing. `if' is not a function.

Did you figure that out all by yourself?
4. The assignment, if `items' refers to a host object.
The intention of the hypothetical example is using a user-defined object
(not a primitive, no, not a host object). That was stated in the
paragraph before the example.

The example did not include a call to eval or Function. The use of eval
or Function constructor was part of the discussion. That should be
clearer now.

BTW, Thomas, I've never cared for your pedantic snits and stop sending
me such emails. One more of those and I'm going to add an email filter.
 
G

Garrett Smith

Thomas said:
1. There is no `items' object. There is, at most, a property with
that name that stores a reference to an object.

uh, "given an items object says there is.
2. What does this have to do with importing "script source text"?
The example posted is a string. That string could have been fetched via
XHR, which can be eval'd. I should have mentioned that.
Would you not want to use source code in a template in the same
context in which you included it, as in other languages? The
global meaning should be optional.
3. The spacing. `if' is not a function.

Did you figure that out all by yourself?
4. The assignment, if `items' refers to a host object.
The intention of the hypothetical example is using a user-defined object
(not a primitive, no, not a host object). That was stated in the
paragraph before the example.

The example did not include a call to eval or Function. The use of eval
or Function constructor was part of the discussion. That should be
clearer now.

BTW, Thomas, I've never cared for your pedantic snits. One more of those
emails and I'm going to add an email filter.
 
T

Thomas 'PointedEars' Lahn

Garrett said:
uh, "given an items object says there is.

You clearly don't know what you are talking about.
The example posted is a string. That string could have been fetched via
XHR, which can be eval'd. I should have mentioned that.

Yes, you should have. In any case, anybody aware of how `eval' would work
in current implementations would never be blindly eval()ing XHR responses,
regardless of what ES5 has to say about it.
Did you figure that out all by yourself?

No, I got me an assistant for that :->
The intention of the hypothetical example is using a user-defined object
(not a primitive, no, not a host object). That was stated in the
paragraph before the example.

It wasn't, fool. Maybe that's what you thought, but not what you wrote.
The example did not include a call to eval or Function. The use of eval
or Function constructor was part of the discussion. That should be
clearer now.

BTW, Thomas, I've never cared for your pedantic snits and stop sending
me such emails. One more of those and I'm going to add an email filter.

You are such a complete idiot. I could have ignored your psychotic rambling
about things you evidently don't have the slightest clue of, I could have
exposed your idiocity in public. But I chose not to, and tried to reason
with you in private instead, in the hopes that you would be a reasonable
person after all. Evidently now, you are not. Go set up your e-mail filter
-- your loss.


Score adjusted

PointedEars
 
R

Richard Cornford

The example posted is a string. That string could have been fetched
via XHR, which can be eval'd. I should have mentioned that.
<snip>

I did wonder what you were on about, and how you expected anyone to
judge the (lack of) advisability of a fragment of code without any
context.

What you are saying is that this is an instruction to act (set the
value of a property) sent from the server to the client, where the
instruction and its parameters are represented by the code that takes
the action.

The problem I would have with that example is that it has implied a
coupling between the code coming from the back-end and the code/
environment on the client while spreading the client-side code across
multiple sources. This is not something that I have ever considered
advisable, and is something that I have seen cause problems.
specifically, if something needs to be changed (in the client-side
code, say) it can either become difficult to change it because of the
trouble/inconvenience/impossibility of changing the server-side code
and/or database entries, or the attempt to make those changes across
the multiple locations fails to update all the relevant code coming
from the server, leaving odd errors popping up when those unaltered
code fragments are sent from the client.

Sending a chunk of code to be - eval-ed on the client is a very simple
way for the server to issue an instruction to the client, but
abstracting the issuing of instructions does not have to significantly
more complex. In the case of your example, what you appear to have is
a conditional instruction to set the value of a property named
'myNewItem' on an object identified as 'items' to a JSON-like (i.e.
pure name/value pair data) object reference, but in addition to that
the code sent has also mandated how that action will be carried out.

View the thing sent form the server as an action to take and a set of
parameters for that action and it should be easy to see how the same
could be achieved with little or no coupling between the server-side
and the client side. The instruction could be sent as JSON such as:-

'{"action":"conditionalAssign","subject":"item","property":"myNewItem'","value":
{ "name":"a"}}'

- and the client-side code can examine that to determine how it is
going to set about carrying out the required action. In this way the
details of how it acts are completely independent of the instructions
to act issued by the server, and so can be freely modified (extended,
etc.) without any need to even look at the code issuing the
instructions.

It is, of course, possible to send sequences of such instructions (say
as arrays of such data) to achieve more complex outcomes on the
client.

Richard.
 

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,083
Messages
2,570,591
Members
47,212
Latest member
RobynWiley

Latest Threads

Top