• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Representing the ancient tab card

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I searched around the ranch, and this seems like the right place to ask this. If not, please feel free to move or delete it.

I want to write some simulators of old computers. Some of those old computers used punched cards, sometimes called tab cards, tabulating cards, IBM cards, Hollerith cards, or unit records. Below, I provide some of what I know about such cards, including many areas that I suspect there are important things I do not know now, and might have to know before a particular system can be simulated. How do you recommend the classes and interfaces be organized? I'm particularly interested in the reasons for your recommendation, and in alternative suggestions from different people.

The most common punched card is the size of a US dollar bill before the new deal and 140 cards to the inch thick. It has 80 columns, and each column has 12 positions for rectangular holes to be punched. Cards come in many different colors, with many thousands of printed designs. Additional printing can be added by a machine called an interpreter, printing a symbol that represents the data in a particular column, or is a generated value. The interpreter characters are wider than a column on the card so they can not line up with the columns. Smaller printed representations of the data can be provided by a keypunch machine when the card is first punched. For extra confusion, cards from the keypunch machine with the print feature turned on are also called interpreted. A corner was usually cut off to assist in efforts to have all the cards in a collection face the same way. Some cards had an additional notch to indicate they had been checked or
verified. Some cards could be separated into two parts, and at least the larger part read as a turn-around document. These were commonly used for billing, sent whole; the customer kept the smaller part as a receipt and returned the larger part with payment. IBM had a standard punched card code, essentially defined by their keypunch machines. Computers differed in how a given character was represented in memory. The code defined numerals, upper case letters, and a few special symbols. There was also column binary, where three columns of twelve bits made a 36 bit word for the mainframes of the era. With the introduction of the IBM System/360 in
1964, the card code was expanded to 256 defined codes, many without a corresponding graphic representation.

Remington Rand had a similar card, probably on the same card stock. It had round holes and 90 characters of data. I do not know anything about the codes used. In the late 1960s. IBM introduced a new card design. It was about the size of a credit card, used eight tiny holes for each character and had room for 96 characters.

Once a card was punched, it was usually added to a file or deck of cards. The deck of cards was often converted to a magnetic tape file by an auxiliary machine or small computer.

So, how should I represent this bit of ancient history in Java? Thanks for your ideas.
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why don't you first share some of your ideas for a Class design? You certainly have shared a bunch of information.

...smells like an advanced homework assignment. If it is, you should attempt to do it on your own instead of eating off of anothers creativity
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Representing the ancient tab card


You'd better not use the word "ancient", or some of our veterans might feel depressed
 
Charles Bradley
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My request is not related to a homework assignment, but I agree with the approach usually taken at Java Ranch to help students work out the solution on their own so they learn from the experience. I'm a retired software engineer that started programming digital computers in 1960. As part of my "mind rot delay project" I've been taking courses at a local University, mostly graduate math courses, but last year I tried Java. I'm not really comfortable with Java yet; the "greenhorn" label fits for Java, and for OO topics. The simulators I'm considering are for very old machines, most do not have interrupts, some do not even have index registers, some had vacuum tubes. The few that had disk storage provided 5 to 10 megabytes in a package the size of a washing machine. If all goes well, I'll put the simulators on a web site I expected to call "Ancient Computer Lab". Based on my age and the fact that I've not even seen a tab card in the wild in over 30 years, "ancient" is a reasonable adjective, but I'm willing to change to any more politically correct term if it will encourage participation. I'll post a possible class hierarchy as soon as I can. Please resist any temptation to suggest the minimum of changes that will make it barely adequate. Thanks.
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Charles Bradley wrote:So, how should I represent this bit of ancient history in Java? Thanks for your ideas.


Charles

I would suggest you create an abstract class named "Card", which will serve as the super class for all of the different types of cards. Sub-classes would be name something like "RemingtonRandCard". Then create a "Hole" class that has the field "private boolean punched = false" and related methods. Each card needs to have a collection of "Hole" objects. Each Hole object would be located/accessed by it column and row values. In other words, the Holes are like the cells of a spreadsheet, expect they don't hold values but are just punched up unpunched. Note that the collection of Hole objects would be defined in the Card superclass but the amount of Holes (ie. how many rows and columns) would be controlled by the sub-classes.

I'm sure you have wounderful memories of droping a stack of cards. Since you cannot draw a diagonal line across these cards I suggest adding a "private int position" field and related get/set methods so that you can maintain the order of a set of cards.
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Christophe Verré wrote:

Representing the ancient tab card


You'd better not use the word "ancient", or some of our veterans might feel depressed



Get offa my lawn!
deck.jpg
[Thumbnail for deck.jpg]
Hollerith Cards
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic