Programming for Electronics Engineers

"Rich Grise" <richgrise@example.net> wrote in message
news:pan.2005.01.17.00.49.54.350293@example.net...
On Sun, 16 Jan 2005 16:37:07 +0000, Danny T wrote:

Kryten wrote:

I'm staggered that they bother to produce these massive books (and sets
of
books) for colossal prices.

I'm a Senior Web Developer, and around 80-90% of what I know has come
from the internet (for free)! When I was learning during
GCSEs/A-levels), I couldn't afford to buy books on subjects that may not
make me money, so I used the web. I'd highly recommend it over any book,
since you can read the opinions of a thousand people for free, not one
for Ł30. It's also full of up-to-date information - something a book (in
a non-electrical form) can never rival!

Don't forget Sturgeon's Law: "Nine tenths of everything is crap."

And the Internet corollary: 99% of everything on the internet is crap.

Cheers!
Rich

I think you underestimate the level of crap around.

Ken
 
"Rich Grise" <richgrise@example.net> wrote in message
news:pan.2005.01.17.00.49.54.350293@example.net...
On Sun, 16 Jan 2005 16:37:07 +0000, Danny T wrote:

Don't forget Sturgeon's Law: "Nine tenths of everything is crap."
What about my crap?

Is 10% of it something I don't know about?
 
On Sun, 16 Jan 2005 10:00:06 -0800, John Larkin wrote:

On Sun, 16 Jan 2005 17:18:43 +0000, Danny T <danny@nospam.oops> wrote:

mc wrote:
The starter pack for Visual C# or Visual Basic (about $99) is very nice and
gives you the full power of the .NET Framework.

Is that like a cut down version of Visual Studio?

I use VS at work, but I've grown fond of the new Express packages.
They're lightweight and fast, though still beta (and using the next
version of the framework):

http://lab.msdn.microsoft.com/express/


You have to realize that guys like Jim and I are fulltime circuit
designers. We have an infinite, unlearnable amount of stuff to keep up
with in our own field, and all the work we can handle, often more. If
we do want to write a program to do some math, we need to do it
quickly, without spending a couple years getting up to speed in .NET
and C++ classes and stuff like that.
If you *really* believe this, you should be using APL. It is *the*
engineer's language. Be warned though, it is write-only.

--
Keith
 
On Mon, 17 Jan 2005 02:35:45 +0000, Kryten wrote:

"Rich Grise" <richgrise@example.net> wrote in message
news:pan.2005.01.17.00.49.54.350293@example.net...
On Sun, 16 Jan 2005 16:37:07 +0000, Danny T wrote:

Don't forget Sturgeon's Law: "Nine tenths of everything is crap."

What about my crap?

Is 10% of it something I don't know about?
Not exactly - it's just that part that you haven't _yet_ identified as
crap. :)

Cheers!
Rich
 
In article <pan.2005.01.17.01.03.41.287608@example.net>,
Rich Grise <richgrise@example.net> wrote:
[...]
And I'm pretty sure there's a way to do arithmetic in a shell script.

Under bash:

SUM = $(( $A + $B ))

It only does integers and the spaces have to be there.

--
--
kensmith@rahul.net forging knowledge
 
In article <pan.2005.01.17.03.21.04.752998@att.bizzzz>,
keith <krw@att.bizzzz> wrote:
[...]
If you *really* believe this, you should be using APL. It is *the*
engineer's language. Be warned though, it is write-only.
Back when I did APL, I could read it just fine. You can't read it aloud.
This is the mistake that people make.

--
--
kensmith@rahul.net forging knowledge
 
On Mon, 17 Jan 2005 15:03:09 +0000 (UTC), kensmith@green.rahul.net
(Ken Smith) wrote:

In article <hbtlu0dmar9pi01vpsn512q3d7hh4feusa@4ax.com>,
John Larkin <jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:
[...]
If you run in real mode, under DOS or '98, you can do some simple BIOS
calls to find a PCI card and drag it down into an uncached hole in the
640k-1m real addressing space, then you can flail its registers all
you want. We've even persuaded PCI bus masters to blast block-transfer
data directly into our arrays.

Yes and win98 does the EMM386 stuff so you can access far more than the
640K, page by page and work with large amounts of data if you have to.
PowerBasic does that automatically. It's the DIM HUGE declaration.

Also a DOS RS232 driver running in the "full screen mode" can keep up with
19200 baud data.
57600.


John
 
Ken Smith wrote:

...Borland Pascal.
keith wrote:

...you should be using APL.
Electronics Engineers who are REAL MEN use computer languages that
reflect the structure and management of the average engineering
department. Thus the only choice is to write the main program
in malborge [ http://www.antwon.com/other/malbolge/malbolge.txt ]
with calls to subroutine libraries written in hand-optimized befunge
[ http://en.wikipedia.org/wiki/Befunge_programming_language ]
and with the user interface and communication stacks written in
whitespace [ http://compsoc.dur.ac.uk/whitespace/ ]. This will
give the Electronics Engineer the same basic experience that he
gets while dealing with customer specifications. I challenge
anyone here to write a buggy malborge program. I don't think
that anyone here can do it. Also, be sure to take a close look
at the program labeled "What does a typical Whitespace program
look like?". Yes, it does compile and run despite the apparent
simplicity that far exceeds Pascal. Look at that source code!
What could possibly be clearer? Now look at the section
labeled "You can also read a tutorial" Notice the resemblance
to Forth, but with a much improved syntax?

I, of course, do my programming with a soldering iron. :)

--
Guy Macon <http://www.guymacon.com/>
 
Rich Grise wrote:

Don't forget Sturgeon's Law: "Nine tenths of everything is crap."

And the Internet corollary: 99% of everything on the internet is crap.
Indeed, but lots of books are crap too! It's usually pretty obvious
what's good and bad on the net - if it works for you, it's good :)

--
Danny
 
In article <4oqnu0diqsaq3ssmvjshh6tgsls45rkv0t@4ax.com>,
John Larkin <jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:
[...]
Also a DOS RS232 driver running in the "full screen mode" can keep up with
19200 baud data.

57600.
How many dropped characters per day of full speed data? Are you writing
to the screen too?

If it can truely keep up with screen writes and full speed 57600 baud it
is really impressive. If it does, I'll bet it doesn't use the DOS.BIOS
screen routines. For some reason, they turn the interrupts off for part
of the code.



--
--
kensmith@rahul.net forging knowledge
 
In article <40rnu0hi8dh92ptqb92lhog2fikgbtrtjd@4ax.com>,
John Larkin <jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:
[...]
Borland produced Turbo Basic and B.P. about the same time, so they
have a lot in common under the hood, including the 80-bit floats. I
don't know if the ide's are similar, but I bet they are. The
PowerBasic IDE is written in PowerBasic, incidentally. I keep needling
them to write the compiler in PB, too.
TP and BP are near identical to the eye. BP is a DOS protected mode
program with more features. TP is a slim version that runs in real mode.


--
--
kensmith@rahul.net forging knowledge
 
On Mon, 17 Jan 2005 21:44:08 +0000, Ken Smith wrote:

In article <1gqjkh3.1lx82l9ruvmaaN%bskb@m.a.c.com>,
Bjarne Bäckström <bskb@m.a.c.com> wrote:
Ken Smith <kensmith@green.rahul.net> wrote:

[...]
write('Q = '); readln(q); { Read in the values }
write('P = '); readln(p);

p := abs(p); { The sign doesn't matter }
q := abs(q);

if (p=0) and (q=0) then halt; { Don't use silly values }

That's BAD user interface!

repeat
flag := true;
write('Q = '); readln(q); { Read in the values }
write('P = '); readln(p);
if (p=0) and (q=0) then { Don't use silly values }
begin
writeln('Illegal value(s)');
writeln;
flag := false
end
until flag { = true } ;

That's worse because it doesn't giver the user an escape if he doesn't
happen to know some good values. In this case it is not much of an issue
but if the restrictions were tighter, this would be a very bad idea.
repeat
flag := true;
write('Q = '); readln(q);
if (q=0) or (q > 10000) then
begin
writeln('Q must be between 0 and 10000');
writeln;
flag := false
end
until flag;

repeat
flag := true;
write('P = '); readln(p);
if (p=0) or (p > 10000) then
begin
writeln('P must be between 0 and 10000');
writeln;
flag := false
end
until flag;


Cheers!
Rich

 
In article <pan.2005.01.18.00.14.33.342425@example.net>,
Rich Grise <richgrise@example.net> wrote:
[...]
None intentionally anyway. APL is a great engineering language.

Yeah, but where do you get the 300-key keyboard?
1234567890-= 12
qwertyuiop[] 12
asdfghjkl;' 11
zxcvbnm,./ 10
<Space bar> 1
----
46

The <shift key>, <alt key> and <control key> can be used as a 3 bit value
giving 8 posible states.



46 * 8 = 368

Thats more than the needed 300 keys.



--
--
kensmith@rahul.net forging knowledge
 
In article <pan.2005.01.18.00.11.41.303631@example.net>,
Rich Grise <richgrise@example.net> wrote:
[...]
repeat
flag := true;
write('Q = '); readln(q);
if (q=0) or (q > 10000) then
begin
writeln('Q must be between 0 and 10000');
writeln;
This is still no good because Q and be above 10000 and still work.

You've also added a whole bunch of lines to the program. Is this effort
really worth it? How many times will you use the program before you edit
it into being a function some larger program calls.




--
--
kensmith@rahul.net forging knowledge
 
On Tue, 18 Jan 2005 00:06:42 GMT, Rich Grise <richgrise@example.net>
wrote:

On Mon, 17 Jan 2005 21:44:08 +0000, Ken Smith wrote:

In article <1gqjkh3.1lx82l9ruvmaaN%bskb@m.a.c.com>,
Bjarne Bäckström <bskb@m.a.c.com> wrote:
Ken Smith <kensmith@green.rahul.net> wrote:

[...]
write('Q = '); readln(q); { Read in the values }
write('P = '); readln(p);

p := abs(p); { The sign doesn't matter }
q := abs(q);

if (p=0) and (q=0) then halt; { Don't use silly values }

That's BAD user interface!

repeat
flag := true;
write('Q = '); readln(q); { Read in the values }
write('P = '); readln(p);
if (p=0) and (q=0) then { Don't use silly values }
begin
writeln('Illegal value(s)');
writeln;
flag := false
end
until flag { = true } ;

That's worse because it doesn't giver the user an escape if he doesn't
happen to know some good values. In this case it is not much of an issue
but if the restrictions were tighter, this would be a very bad idea.


repeat
flag := true;
write('Q = '); readln(q);
if (q=0) or (q > 10000) then
begin
writeln('Q must be between 0 and 10000');
writeln;
flag := false
end
until flag;

repeat
flag := true;
write('P = '); readln(p);
if (p=0) or (p > 10000) then
begin
writeln('P must be between 0 and 10000');
writeln;
flag := false
end
until flag;


Cheers!
Rich



--

That's a lot of trouble to avoid a coupe of GOTOs. I never understood
the anti-GOTO religion.

John
 
In article <uamou0pskrveuib4g9c9m3tiv4dp1st3i7@4ax.com>,
John Larkin <jjlarkin@highSNIPlandTHIStechPLEASEnology.com> wrote:
[...]
That's a lot of trouble to avoid a coupe of GOTOs. I never understood
the anti-GOTO religion.
Someone said that GOTOs were a bad thing and everyone believed him.

You can take any program that uses GOTOs and rewrite it as one that is
harder to understand without GOTOs. It is so easy that a program to do
the conversion can be written.

--
--
kensmith@rahul.net forging knowledge
 
John Larkin <jjlarkin@highSNIPlandTHIStechPLEASEnology.com> wrote:
[...]
That's a lot of trouble to avoid a couple of GOTOs. I never understood
the anti-GOTO religion.

Someone said that GOTOs were a bad thing and everyone believed him.
I feel that GOTO can be valid in a certain circumstances.

Such as GOTO <special exit point>.

However people will abuse anything they are offered, so
GOTO <valid local jump>
gets used a
GOTO <any place I damn well please anywhere in the entire program>

Given the scope for appalling abuse, it might be wise to recommend very
sparing usage.

I heard of a guy who's immediate boss (the company boss's son) thought all
code should use GOTO almost entirely, and tried to force everyone else to do
so.
 
On Mon, 17 Jan 2005 18:42:19 -0800, the renowned John Larkin
<jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:

What pantywaist languages. Real men don't program in lowercase.
John
Lower case helps even in assembly. The shape of the letters is easier
to distinguish so you can read it more easily. Of course if you only
*write* and never *read*, it doesn't matter much. ;-)


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
On Mon, 17 Jan 2005 21:52:11 -0500, Spehro Pefhany
<speffSNIP@interlogDOTyou.knowwhat> wrote:

On Mon, 17 Jan 2005 18:42:19 -0800, the renowned John Larkin
jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:

What pantywaist languages. Real men don't program in lowercase.
John

Lower case helps even in assembly. The shape of the letters is easier
to distinguish so you can read it more easily.

No. Listings printed on my fanfold dot-matrix printer are much easier
to read in uppercase.

John
 
On Mon, 17 Jan 2005 19:23:30 -0800, the renowned John Larkin
<jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:

On Mon, 17 Jan 2005 21:52:11 -0500, Spehro Pefhany
speffSNIP@interlogDOTyou.knowwhat> wrote:

On Mon, 17 Jan 2005 18:42:19 -0800, the renowned John Larkin
jjSNIPlarkin@highTHISlandPLEASEtechnology.XXX> wrote:

What pantywaist languages. Real men don't program in lowercase.
John

Lower case helps even in assembly. The shape of the letters is easier
to distinguish so you can read it more easily.


No. Listings printed on my fanfold dot-matrix printer are much easier
to read in uppercase.

John
I don't think I've printed a full program listing in years- last
fair-sized assembly project I wrote would have been close to 300 pages
single-spaced. Sometimes a few pages (one function, perhaps) in 9 pt
on the laser printer so I can pour over it at lunch. Pore over it,
too.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 

Welcome to EDABoard.com

Sponsor

Back
Top