HDTenEightyP/NetNews huggingface dataset:
From: tholle16@ursa.calvin.edu (Tim Hollebeek)
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Organization: Calvin College
Date: Mon, 28 Sep 1992 12:54:13 GMT

tm8t+@andrew.cmu.edu (Tod McQuillin) writes:

>jfr@RedBrick.COM writes:
>>						      Why would you EVER
>> use NUMBERS in a program.  Except in TWO places: inside quoted strings
>> and on the right side of #defs (or the equivalent depending on the
>> language).

>Have you thought this through?  Do you really think that

>	x *= TWO;
>or
>	#define DOUBLE(x) ((x)*=2)
>	DOUBLE(X);

>is preferable to just

>	x *= 2;
>?

No, no, no.  He just meant using numeric characters inside of symbols.
Literal constants are ok.
--
--------------------------------------------------------------------
*******     Tim Hollebeek  ==> tholle16@ursa.calvin.edu      *******
Conscience is the inner voice that warns us somebody is looking
		-- H. L. Mencken
From: mike.mcaulay@spacebbs.com (Mike Mcaulay) 
Newsgroups: comp.programming
Subject: Calling all EGA/VGA gurus!  Please read!
Date: 28 Sep 92 20:00:00 GMT
Distribution: world
Organization: SPACE BBS - Menlo Park, CA - 10 Lines + 4gB - 415-323-4193
Reply-To: mike.mcaulay@spacebbs.com (Mike Mcaulay) 



I don't know if this is appropriate for this group, but I am pretty
desperate, so here goes:

I am in the process of porting a piece of code from VGA Mode 13h (320 X
200, 256 colors) to VGA Mode 12h (640 X 480, 16 colors).  I have art
that has been algorithmically converted to 320 X 200, 16 colors then
touched up by hand.  I am expanding this art by doubling all of the
pixels on the fly when I load the images into memory from disk, and
leaving 40-pixel-tall blank strips at the top and bottom of the screen.
Hence my final image size is 640 X 400.

My problem is that my blit routine is slow.  I am presently using write
mode 0 (byte-at-a-time) and addressing each of the 4 bit planes
separately.  Since I am inexperienced with Mode 12h and EGA-format
graphics in general, I am wondering if I am missing something.  My
understanding is that in mode 12h I do not have access to page flipping.
Is this correct?  If so, does anyone out there have any suggestions for
fast algorithms for moving rectangular regions from main memory to the
screen in this mode?  BTW, as far as the registers go mode 12h behaves
the same as the old EGA mode 10h (640 X 350, 16 colors) for anyone who
has worked with 10h.

I am under rather severe deadline pressure, so prompt advice of any kind
would be greatly appreciated.  However I don't have any choice about
this -- as kludgy as it sounds (is) I *have* to do it, so please spare
the flames.

Please e-mail me as I do not regularly read this group.

Thanks!

M.
                                                                                                                  
Newsgroups: comp.programming
From: gillies@m.cs.uiuc.edu (Don Gillies)
Subject: Re: Need Book Reviews on Sedgewick's Algorithms Books
Organization: University of Illinois, Dept. of Comp. Sci., Urbana, IL
Date: Sun, 27 Sep 1992 04:27:48 GMT

I think "Algorithms in C" is a good book.  I also liked "Algorithms".
This is one of the first theory texts written primarily as a cookbook.
Although many of the algorithms are toys, not suitable for use in a
production environment (i.e. the linear programming algorithm), it is
an impressive book because much of the code is very simple and tight.

P.S. the book lacks LZW data compression and the floyd algorithm for
digital image processing.  These algorithms are so popular that this
is a major omission.

- Don
-- 



Newsgroups: comp.programming,comp.sys.mac.programming,comp.sys.mac.pascal,comp.pascal
From: tholle16@ursa.calvin.edu (Tim Hollebeek)
Subject: Re: Help Needed : Turbo Pascal
Organization: Calvin College
Date: Sun, 27 Sep 1992 16:23:32 GMT

And while we are on the subject of Turbo : I ran turbo pascal 1.1 on a
IIci running System 7.1 yesterday, and all of the menus were screwed up.
There was about 50 points of whitespace between letters, e.g.

+------+
| File |
+------+-----------+
| ...              |
|                  |
|                  |
|                  |
| Q         u      |
+------------------+

etc.  When I switched back to the finder, everything was fine.  It looks
to me like turbo is somehow putting some bogus values in the SpExtra
field or something.  Has anyone else seen this before?

--
------------------------------------------------------------------------------
Tim Hollebeek      ---     tholle16@usurp.calvin.edu
------------------------------------------------------------------------------
Hi! I'm not a real .signature virus ... but I play one on the net.
Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c
From: jfr@RedBrick.COM ()
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Organization: Red Brick Systems, Los Gatos, CA
Date: Sun, 4 Oct 1992 20:57:06 GMT

In article <kaufman.718082916@Xenon.Stanford.EDU> kaufman@CS.Stanford.EDU writes:
>geoff@ITcorp.com (Geoff Kuenning) writes:
>
>>(2) It is generally poor practice to use numeric constants (other than
>>0, 1, occasionally 2, and [*very* rarely] certain bit masks) in the
>>body of program code.
>
>How about the following:
>
>GMST = 24110.54841 + (8640184.812866 + (0.093104 - 6.2e-6 * Tu) * Tu) * Tu;
>
>which is the equation for the relationship between Greenwich mean sidereal
>time and Universal time. (or was in 1985).  I could also post the equation
>for the nutation of the Moon, which has 19 terms.  Surely you don't expect
>someone to define constants for each of them...

  Someone pointed out to me in one of the MANY MANY (thank you all very
  much :-) posts I have received on my obviously controversial position,
  that many formulae are simply best expressed in their native numerical
  form.  I agree.  I have not done much "application" programming recently
  and have not used such formulae in programs in a long time.  I would
  have no objection where the purpose of using numbers is to clearly
  express the problem.              

  On the other hand, in system software programming, there are very few
  formulae where the actual numbers are meaningful (and more importantly,
  are always constant).  The few situations generally involve 0 or 1 and
  I think I have come to agree that using those numbers, particularly to
  start loops or indexes, is acceptable.  I still resist the idea of
  using numbers in the names of variables except where that is accepted
  use of the variables (for instance, in geometric programs, I could see
  the use of (x1,y1) and (x2,y2) as point representations because this
  is common use).  

  Jon Rosen
Newsgroups: comp.programming
From: pdh@netcom.com (Phil Howard )
Subject: filling a BST from random and sorted data
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Tue, 6 Oct 1992 04:50:44 GMT

Does anyone have any references for an algorithm suitable for filling
in a binary search tree from data that in some cases will be in random
order and in some cases will be sorted in ascending sequence?  I'd
like to approach the average tree search access times as would be
expected from random input.

In most cases there will be no accessing of data nor deletion of data
from the tree before the tree is filled, however there will be some
occaisional cases, so such an algorithm will either need to have the
tree in a usable state between each insert operation, although it does
not need to be optimal until after all the data is inserted.

If you think something other than a BST is what I need to do, I'd like
to hear your suggestion (can't say I will use it, but I would certainly
consider it).
-- 
/***********************************************************************\
| Phil Howard  ---  KA9WGN  ---  pdh@netcom.com   |   "The problem with |
| depending on government is that you cannot depend on it" - Tony Brown |
\***********************************************************************/
From: dave@cs.arizona.edu (Dave Schaumann)
Newsgroups: comp.programming
Subject: Re: reference counting garbage collection
Date: 4 Oct 92 22:09:07 GMT
Reply-To: dave@cs.arizona.edu (Dave Schaumann)
Organization: University of Arizona

In article <NICKEL.92Oct4185459@desaster.cs.tu-berlin.de>, nickel@cs (Juergen Nickelsen) writes:
>How does reference counting garbage collection (RCGC) deal with
>circular data structures? 

It doesn't.  In fact, every time it's been presented to me, it's always been
with the caveat that "this doesn't work on circular structures".

On the other hand, if cycles in your structures are fairly rare, you could use
reference-cound collection with an occasional call to a mark-and-sweep
algorithm to catch the stragglers...

-- 
The security of the Enterprise is of Paramount importance.
                        -Jean Luc Picard, stardate 45965.3
From: tb0o+@andrew.cmu.edu (Todd Keenan Bowman)
Newsgroups: comp.programming
Subject: Learning Pascal...
Date: 5 Oct 92 19:30:19 GMT
Organization: Software Engineering Institute, Carnegie Mellon, Pittsburgh, PA


I'm trying to learn how to program in Pascal.  The software I plan to use will
be Symantic's THINK Pascal.

What I need to know is whether or not there are any good Pascal instruction
books that I can use to self-teach myself Pascal in conjuction with the THINK
Pascal software. I want something that starts off assuming the user has no
experience (although I do have some) and works up to a fairly high level.

Any suggestion will be greatly appreciated

todd
tb0o+@andrew.cmu.edu
Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c
From: mike.mcaulay@spacebbs.com (Mike Mcaulay)
Newsgroups: comp.programming
Subject: DOS DEVICE DRIVER QUERY
Date: 5 Oct 92 10:09:00 GMT
Article-I.D.: spacebbs.1984.714.uupcb
Reply-To: mike.mcaulay@spacebbs.com (Mike Mcaulay)
Distribution: world
Organization: SPACE BBS - Menlo Park, CA - 10 Lines + 4gB - 415-323-4193

I'm looking for a surprisingly obscure piece of information: does anyone
know how a DOS device driver accesses it's command-line at boot time?
It's obviously some offset from some pair of the registers, but I can't
find the exact location anywhere.

E-mail me please if you know.  Thanks!

M.
From: schmidtg@iccgcc.decnet.ab.com
Newsgroups: comp.programming
Subject: Calculating a CRC of other CRCs
Date: 5 Oct 92 10:30:12 EST



I am looking for a mechanism to quickly compare two programs.  Each program
will reside on a different CPU and the programs may be large, so a direct byte
by byte comparison would be too time consuming.  I only need to know whether
the two programs are identical or they are different -- I will not be generating
difference listings.  I would like to use a CRC computed on the entire program
as a means of comparison.

In addition, the program is organized as "chunks" and a chunk may be
independently edited.  However, when the chunk is edited, I would like to
avoid having to recalculate the CRC for the entire program.  I would like to
somehow "incrementally" update the CRC based on a small change.  I doubt this
is possible, so an alternative is to calculate a CRC for each chunk and then
calculate the CRC for the entire program by calculating a CRC on all of the
"chunk CRCs".  In that way, I can avoid having to examine the entire program
each time a chunk has changed.

However, I don't know how reasonable it is to calculate "a CRC of other CRCs".
There may be some statistical pitfalls in doing this which may reduce the
effectiveness of the CRC and introduce the possibility of error.

Does anybody have any thoughts on this?


Thanks in advance,


Greg Schmidt		schmidtg@iccgcc.decnet.ab.com
Newsgroups: comp.programming
From: kevin@drogges.tti.com (Kevin Carothers)
Subject: Re: Costs per line of code
Organization: Transaction Technology Inc.
Date: Mon, 28 Sep 1992 05:38:26 GMT

In article <19lu8pINNkhm@rodan.UU.NET> avg@rodan.UU.NET (Vadim Antonov) writes:
%In article <-191659999@hpopd.pwd.hp.com> richi@hpopd.pwd.hp.com (Richard Jennings) writes:
%>If a software engineer costs (say) US$150000/year [1], including all overheads
%>and she writes 10 lines of code per day [2]
%
%Wow. Wow. I'd love to join that organization. I'd f* off all those
%overpaid executives :-) Why nobody pays me US$60 per line? And i'm
%not a Pascal or COBOL programmer -- my job is writing device drivers,
%a bit trickier stuff than spitting out payrolls!
%
%Life is unfair, i guess.


H A   H A    H O   HO!!!!!
This is such a typical, stereotyped (ie; myopic) view.
 
After spending ten years writing device drivers for DMA and programmed I/O
devices (for disks, MUXes, and data acquistion devices),  I too thought 
going to applications would be a breeze.

Looking back, I remember that the only real problem I had with 
programming device drivers was dealing with having to pull answers from
anal retentive hardware engineers who thought they were god's gift 
to computer science, and thought that programmers are scum under 
their shoes.  
 
Medium to large  banking applications involve thousands, sometimes
millions of context rules involving data dictionaries about 200 MB's +
in size.  An interstate payroll application is HUGE. A lowly ATM is a
monster application (dozens of different customer transactions
involving eleven different devices, with about a hundred different
error conditions per device. With very little margin of room for
screwing up a customer dispense or deposit operation). 

It's very easy to get caught up with thinking that "my programs are more
complicated than yours"  especially when you don't know what the payroll
or applications programmer is doing.

Such is the stuff that ALL prejudices are made of.

--
Kevin Carothers   {psivax,philabs,retix,quad1}!ttidca!kevin
From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe)
Newsgroups: comp.programming
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Date: 6 Oct 92 06:33:24 GMT
Organization: Comp Sci, RMIT, Melbourne, Australia

In article <14909@goanna.cs.rmit.oz.au>, ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
> What we really want for things like this is the proposed Ada interface,
> where you can say how many "things" there are in a complete circle, e.g.
> 	tR := atan(X => r.X, Y => r.Y, Cycle => 360);

I don't know whether Sun invented it or whether they got it from a BSD
version, but they provide functions

	sinpi(x)	= sin(pi*x)
	cospi(x)	= cos(pi*x)
	tanpi(x)	= tan(pi*x)
	asinpi(x)	= asin(x)/pi
	acospi(x)	= acos(x)/pi
	atanpi(x)	= atan(x)/pi
	atan2pi(y,x)	= atan2(y,x)/pi

where pi is, in effect, represented to infinite precision.  I don't know
whether these functions are faster than the usual ones, but they _could_
be.  This gives us another choice:

	#define atan2d(y,x) (atan2pi(y,x)*180.0)

	#define sind(x) sinpi((x)/180.0)

and so on.  I still prefer the Ada interface, but if the <trig>pi()
functions were adopted in other C libraries we'd be able to write a lot
of code without ever mentioning a numerical value for pi at all.
-- 
RMIT policy requires the use of Gender Inclusive Language in all publications
and in all information conveyed to students, staff, and potential job
applicants.  Lapses into English are the sole responsibility of the author.
The Constitution of Australia does _not_ guarantee Freedom of Speech.
Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c
From: alex@bilver.uucp (Alex Matulich)
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Organization: W. J. Vermillion - Winter Park, FL
Date: Mon, 28 Sep 1992 23:37:10 GMT

In article <1992Sep28.003421.1246@RedBrick.COM> jfr@RedBrick.COM () writes:
>
>The problem I started thinking about is WHY IN THE WORLD WOULD ANYONE
>USE SHORT INTS IN A PROGRAM, particularly one done for a workstation-level
>machine (i.e., large memory model, etc).  I can see the need for memory
>conservation to some degree, but certainly there is no performance
>benefit on most machines today (there may even be a performance penalty

Well, I use short ints for two reasons:

1) I know how big they are on each machine I use.  The fact that a short is
   the same size on 680x0 and 80x86 machines is helpful, whereas ints are
   different.  This is important when porting code between these two
   architectures.

2) The compiler documentation says that array indexing is quicker with
   short ints (even though the natural int size is the same as a long).

I think it really depends on whether the processor has optimal instructions
for handling half-word data.

-- 
 _ |__  Alex Matulich    alex.matulich@oau.org
 /(+__>  Unicorn Research Corp, 4621 N Landmark Dr, Orlando, FL 32817
//| \     UUCP:  alex@bilver.uucp   {peora|ge-dab|uunet!tous}!bilver!alex
///__)     Internet:  alex@bilver.oau.org | alex%bilver@peora.sdc.ccur.com
Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Date: 4 Oct 92 04:48:21 GMT
Organization: Computer Science, University of Melbourne, Australia

mcdonald@aries.scs.uiuc.edu (J. D. McDonald) writes:

>In article <1992Oct2.083136.11412@ITcorp.com> geoff@ITcorp.com (Geoff Kuenning) writes:
>
>>(1) It is generally a mark of weak programming
>>(2) It is generally poor practice
>>(3) It is *always* poor practice
>
>Sigmund Freud had a name for people who think like the above, and
>its not very pretty: Anal Retentive.

Your quote is completely out of context, and your conclusion is ludicrous.
Just about everything that Geoff Kuenning said was spot-on.
He preceded his advice with the words

|| All of the following statements are guidelines;  there will always be
|| exceptions to them:


I have *never* seen programmers use named constants in a situation where
they should obviously be using literals, but I have seen the converse
error *far* too many times.

-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Newsgroups: comp.programming
From: ivan@erich.triumf.ca (Ivan D. Reid)
Subject: Re: Daylight saving time (UK)
News-Software: VAX/VMS VNEWS 1.41    
Organization: TRIUMF: Tri-University Meson Facility
Date: Tue, 29 Sep 1992 06:44:00 GMT

In article <1992Sep28.082815.24600@rtf.bt.co.uk>, bonnaud@rtf.bt.co.uk (Neil Bonnaud) writes...
> 
>Just a couple of replies so far - both state that the date is set arbitarily
>by government but within bounds.
> 
	I don't know if there's a rule or not.  If there isn't, the UNIX system
manager here either: a) came in earlier than me on Sunday; or b) is smarter
than the VAX managers and set up some timed process to adjust the clocks.

>OK then - a follow up question from me - am I right in thinking that
>a) for the UK the clocks go forward from 1AM to 2AM and back from 2AM to 1AM?

	This may or may not be true; everywhere I've lived (Oz, NA, Europe)
the changes are 0200<->0300.

>b) other countries using daylight saving time change at the same time?
> 
	No.  Europe changed on Sunday; UK changes in ~1 month, and NA on yet
a third date (look on P1 of last weekend's Herald-Tribune if you can garner a
copy).  The southern hemisphere is even more messed around.  Oz changed
the date of its spring change some years ago to accommodate the Adelaide GP!

Ivan Reid, Paul Scherrer Institute, CH.     			ivan@cvax.psi.ch
Xref: sparky comp.programming:2726 comp.lang.c:14193 comp.lang.pascal:5680 comp.lang.objective-c:555
From: exuptr@exu.ericsson.se (Patrick Taylor)
Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c
Subject: Re: NO NUMBERS! (or even SHORT INTS!)
Date: 28 Sep 92 15:30:59 GMT
Organization: Ericsson Network Systems, Inc.
X-Disclaimer: This article was posted by a user at Ericsson in North America.
              The opinions expressed are strictly those of the user and
              not necessarily those of Ericsson.

In article <1992Sep28.003421.1246@RedBrick.COM> jfr@RedBrick.COM writes:

>So I suggest a coding standard: numbers should be barred from use in
>variable and type names.  Only letters can be used.  Numbers can only
>appear where you define manifest constants (#def, const, etc.) to 
>names and inside strings (where they generally do no harm).  

>Any comments?

But, Jon, what about all my loop variables (i1,i2,i3,i4)  ;-)

 ----------------------------------------------------------------------------
    "This must be Thursday.  I never could get the hang of Thursdays"
                                                       - Douglas Adams
  - Patrick Taylor                                       (Arthur Dent)
    Ericsson Network Systems
    exuptr@exu.ericsson.se                       "Don't let the .se fool you"
    or exuptr@ZGNews.Lonestar.Org, exu.exuptr@memo.ericsson.se
Newsgroups: comp.programming
From: jcook@goober.cs.Colorado.EDU (Jonathan E. Cook)
Subject: Re: Costs per line of code
Organization: University of Colorado, Boulder
Date: Tue, 29 Sep 1992 16:50:14 GMT

In article <1992Sep28.084445.25202@rtf.bt.co.uk> bonnaud@rtf.bt.co.uk (Neil Bonnaud) writes:
>
>Personally, I beleive that programming is an art form and cannot be measured
>in mere numbers.  It's like trying to value a painting based on the number
>of brush strokes used to produce it or the area of canvas it covers.
>
>Neil Bonnaud

Well, a painting exists and is created *only* for the artisitic value,
while a program must be able to supply the user with a deterministic
set of actions / results. 

Yes, good engineering and design *can* produce something appreciable
as art, but that is *not* its primary purpose. 

Until we convince programmers that they are engineers just like EE or
ME, etc are, we will never be able to reliably build large systems.

Sorry, no smileys, this is serious,

Jon.





Newsgroups: comp.programming
From: dbarker@spang.Camosun.BC.CA (Deryk Barker)
Subject: Re: reference counting garbage collection
Organization: Camosun College, Victoria B.C, Canada
Date: Tue, 6 Oct 1992 02:39:37 GMT

In article <1992Oct4.220907.1053@organpipe.uug.arizona.edu> dave@cs.arizona.edu (Dave Schaumann) writes:
>In article <NICKEL.92Oct4185459@desaster.cs.tu-berlin.de>, nickel@cs (Juergen Nickelsen) writes:
>>How does reference counting garbage collection (RCGC) deal with
>>circular data structures? 
>
>It doesn't.  In fact, every time it's been presented to me, it's always been
>with the caveat that "this doesn't work on circular structures".

Try D.R. Brownbridge: Cyclic reference counting for combinator
machines. Springer-Verlag, LNCS201 (1985). It *is* possible under
certain circumstances, I quote abstract (without permission):

'This new algorithm deals correctly and automatically with the kind of
cyclic (i.e. self-referencing) structures which arise in a combinator
graph reduction machine. By extending the standard reference count
algorithm, cycles can be handled safely at little extra cost. Cyclic
reference counting uses one extra bit per pointer and per object and
one extra reference count per object. Extra computation amounts to
inspection of the objects in a cyclic structure from time to time
before the structure becomes free. In the absence of cycles, no
computation overhead is incurred. When executing some typical
recursive programs, the number of objects inspected is approximately
equal to the number of new objects used during execution.'

Deryk Barker, Computer Science Dept., Camosun College, Victoria B.C.

Newsgroups: comp.programming,comp.lang.c,comp.lang.pascal,comp.lang.objective-c