Re: supporting second tier OSes

Peter da Silva (peter@nmti.com)
Sun, 10 Sep 1995 17:15:29 -0500 (CDT)

> > 
> > My answers would be "HP, and beat on my developers to write portable
> > code", "What's the next most common UNIX box in that list?", and "After
> > a couple of rounds it should be a matter of typing "make"..."

> That's the right answer, but to the wrong question.

> Everyone ought to be writing portable code, but POSIX.1 by itself won't
> do the job because it's woefully incomplete.

I don't see the word "POSIX" above. I said "UNIX".

Well, you might well ask, how does one know if one has written portable UNIX
code? My solution is to have people on staff who've got a few gnarly ports
under their belt and use them as auditors. If they can port from Xenix-286
to SunOS to System V to OSF/1 then they're probably OK.

It's an art, yes. But it's an art well worth learning.

[ hmmm first o' security god said 1. thou' shalt write bug free code. Must we
no also be required to write write portable, bug free code ? Let me go consult
my god! B) Btw Just to make myself clear, I refering to a non-existant entity 
not labeling anyone a security god! - RuF]

> I'd be inclined to believe that there is a large cost of developing for
> each new platform that cannot be avoided, even by using the best possible
> software engineering practices.

I suggest you sit down with "Software Tools", then create a virtual interface
for each of the not-yet-standardized capabilities you need. This has a cost,
too. Probably more than doing a single port, because it's pretty close to
what you do in a port and you're covering a lot of things you wouldn't have
to do in any given port... though by working them up front you avoid the cost
of doing the design twice.

That's what we did here, and while our "fortran shell" and "PLM shell" and
so on provide a pretty horrible pseudo-OS, they've made the code damn
portable. We've gone from 36-bit 1s-complement Unisys hardware to SunOS
and Digital UNIX (32 and 64 bit, 2s complement, byte oriented, big and
little-endian). After that effort the differences between UNIX variants is
minor.

When I started work here ten years ago I'd been through a number of disasters
where porting had pretty much been ruled out by poor design. I was so happy
to find a company that cared enough about writing portable code to actually
do it rather than just conforming to inadequate standards.