Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #37929

Re: Unexpected Boxing Error at Runtime

From Kiwi User <martin@mydomain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Unexpected Boxing Error at Runtime
Date 2018-01-05 21:52 +0000
Organization albasani.net
Message-ID <p2os3i$s9o$1@news.albasani.net> (permalink)
References (4 earlier) <p2m48h$149e$1@gioia.aioe.org> <p2o4ba$46d$1@dont-email.me> <7mev4dhc2dj9l1i2j8f6n0bn5a6s2f56ko@4ax.com> <p2olhr$75l$1@dont-email.me> <c1bc9d8d-6656-450c-9eb2-42b9efa00678@googlegroups.com>

Show all headers | View raw


On Fri, 05 Jan 2018 12:15:21 -0800, Eric Douglas wrote:

Speaking as someone who was there...

> I would guess most programmers don't plan for overflows.  Division by
> zero usually means data entry error was allowed, or program bug further
> up the program chain.
>
IMO undersizing a numeric variable is a design error, regardless of 
whether it was an analyst or a coder who made the mistake. I agree with 
you about divide by zero, though: its probably due to bad input 
validation but might be a pure coding mistake if it occurs somewhere in a 
complex calculation.

> While some programmers may literally not care about their code 
> ("I won't be here in 20 years"),
>
Yep, seen that too, as well as coders who managed to get the same effect 
by sheer incompetence. 

> some writing code in
> 1975 may have just assumed all their code would be replaced before the
> turn of the century so who cares about a 2 digit year.
>
I think there were two things running in parallel that drove this.

- Very few systems on small computers (think ICL 1901, IBM 360/30 or 
  IBM System/3) were expected to last more than 4 or 5 years. 

- Most systems written in the late 60s/early 70s were batch processing
  systems with the data held on cards or tape. These were often simple
  enough that, especially if a hardware upgrade was involved, rewriting
  the system from scratch was quicker and easier than modifying the
  existing code.

- The source was probably a card deck and may have been lost, damaged
  or reshuffled by dropping and we no longer have a card sorter.

- The old code was written in assembler and five years on, all
  development is now in COBOL or some other high-level language, 
  e.g PL/1, RPG or even BASIC. 

Any or all of these taken together mean that a rewrite from scratch 
becomes the obvious move.
 
Second, the date problem. Back in the 60,70s and even into the 80s six 
character dates were the norm, initially because tape capacities and 
computer memories were both small and slow, so NOBODY used four digit 
years unless the system needed to deal with dates before 1900s or later 
than 2000 because of the perceived cost of handling those two extra 
characters on every date. I can only remember two: one was a payroll with 
a few very old people on it who'd been born in the 1890s. The other was a 
music planning system that needed to know composer's birth and death 
dates because concerts celebrating five year anniversaries of a 
composer's birth or death are popular (this needed to handle dates from 
55BC [Euripides birth] to the present).   

In addition, this thinking tended to be encouraged by the system software:

- operating systems didn't have a real-time clock, so the operator input 
the date as part of booting the computer and, as normally no programs 
needed to know the century, why waste time and memory by making the 
operator type it in and the OS store it.

- Some languages did this too. In COBOL a program got the date by 
executing "ACCEPT SYS-DATE FROM DATE." where the Codasyl language 
definition said that the receiving field (SYS-DATE in this example) had 
to be a six character field which ACCEPT would fill with a date formatted 
as YYMMDD. In passing, as late as 2004 I remember seeing an IBM COBOL 
manual which still specified that the ACCEPT receiving field must be six 
characters.


-- 
Martin    | martin at
Gregorie  | gregorie
          | dot org

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Unexpected Boxing Error at Runtime j4n bur53 <janburse@fastmail.fm> - 2018-01-04 15:16 +0100
  Re: Unexpected Boxing Error at Runtime Eric Douglas <e.d.programmer@gmail.com> - 2018-01-04 07:04 -0800
  Re: Unexpected Boxing Error at Runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-04 10:13 -0500
  Re: Unexpected Boxing Error at Runtime Eric Douglas <e.d.programmer@gmail.com> - 2018-01-04 08:01 -0800
    Re: Unexpected Boxing Error at Runtime Marcel Mueller <news.5.maazl@spamgourmet.org> - 2018-01-04 18:33 +0100
      Re: Unexpected Boxing Error at Runtime Kiwi User <martin@mydomain.invalid> - 2018-01-04 19:29 +0000
    Re: Unexpected Boxing Error at Runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-04 15:09 -0500
      Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-04 21:43 +0100
        Re: Unexpected Boxing Error at Runtime Arne Vajhøj <arne@vajhoej.dk> - 2018-01-04 15:53 -0500
          Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-05 16:06 +0100
            Re: Unexpected Boxing Error at Runtime Gene Wirchenko <genew@telus.net> - 2018-01-05 09:51 -0800
              Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-05 20:59 +0100
                Re: Unexpected Boxing Error at Runtime Eric Douglas <e.d.programmer@gmail.com> - 2018-01-05 12:15 -0800
                Re: Unexpected Boxing Error at Runtime Kiwi User <martin@mydomain.invalid> - 2018-01-05 21:52 +0000
                Re: Unexpected Boxing Error at Runtime Gene Wirchenko <genew@telus.net> - 2018-01-08 11:13 -0800
                Re: Unexpected Boxing Error at Runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-05 16:27 -0500
                Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-06 00:06 +0100
                Re: Unexpected Boxing Error at Runtime Kiwi User <martin@mydomain.invalid> - 2018-01-05 23:57 +0000
                Re: Unexpected Boxing Error at Runtime Arne Vajhøj <arne@vajhoej.dk> - 2018-01-07 20:06 -0500
                Re: Unexpected Boxing Error at Runtime bursejan@gmail.com - 2018-01-08 04:10 -0800
                Re: Unexpected Boxing Error at Runtime bursejan@gmail.com - 2018-01-08 04:31 -0800
                Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-08 16:25 +0100
                Re: Unexpected Boxing Error at Runtime Arne Vajhøj <arne@vajhoej.dk> - 2018-01-08 20:05 -0500
                Re: Unexpected Boxing Error at Runtime bursejan@gmail.com - 2018-01-08 17:55 -0800
                Re: Unexpected Boxing Error at Runtime Gene Wirchenko <genew@telus.net> - 2018-01-08 11:19 -0800
                Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-08 20:40 +0100
                Re: Unexpected Boxing Error at Runtime Gene Wirchenko <genew@telus.net> - 2018-01-08 18:03 -0800
                Re: Unexpected Boxing Error at Runtime Daniele Futtorovic <da.futt.news@laposte.net> - 2018-01-16 02:33 +0100
                Re: Unexpected Boxing Error at Runtime bursejan@gmail.com - 2018-01-22 14:26 -0800
                Re: Unexpected Boxing Error at Runtime bursejan@gmail.com - 2018-01-22 14:33 -0800
        Re: Unexpected Boxing Error at Runtime Arne Vajhøj <arne@vajhoej.dk> - 2018-01-04 19:16 -0500
          Re: Unexpected Boxing Error at Runtime Kiwi User <martin@mydomain.invalid> - 2018-01-05 12:17 +0000
  Re: Unexpected Boxing Error at Runtime j4n bur53 <janburse@fastmail.fm> - 2018-01-05 00:13 +0100
    Re: Unexpected Boxing Error at Runtime Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-01-05 11:05 -0500
      Re: Unexpected Boxing Error at Runtime bursejan@gmail.com - 2018-01-06 06:18 -0800

csiph-web