Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

2024 Participants: Hannah Ackermans * Sara Alsherif * Leonardo Aranda * Brian Arechiga * Jonathan Armoza * Stephanie E. August * Martin Bartelmus * Patsy Baudoin * Liat Berdugo * David Berry * Jason Boyd * Kevin Brock * Evan Buswell * Claire Carroll * John Cayley * Slavica Ceperkovic * Edmond Chang * Sarah Ciston * Lyr Colin * Daniel Cox * Christina Cuneo * Orla Delaney * Pierre Depaz * Ranjodh Singh Dhaliwal * Koundinya Dhulipalla * Samuel DiBella * Craig Dietrich * Quinn Dombrowski * Kevin Driscoll * Lai-Tze Fan * Max Feinstein * Meredith Finkelstein * Leonardo Flores * Cyril Focht * Gwen Foo * Federica Frabetti * Jordan Freitas * Erika FülöP * Sam Goree * Gulsen Guler * Anthony Hay * SHAWNÉ MICHAELAIN HOLLOWAY * Brendan Howell * Minh Hua * Amira Jarmakani * Dennis Jerz * Joey Jones * Ted Kafala * Titaÿna Kauffmann-Will * Darius Kazemi * andrea kim * Joey King * Ryan Leach * cynthia li * Judy Malloy * Zachary Mann * Marian Mazzone * Chris McGuinness * Yasemin Melek * Pablo Miranda Carranza * Jarah Moesch * Matt Nish-Lapidus * Yoehan Oh * Steven Oscherwitz * Stefano Penge * Marta Pérez-Campos * Jan-Christian Petersen * gripp prime * Rita Raley * Nicholas Raphael * Arpita Rathod * Amit Ray * Thorsten Ries * Abby Rinaldi * Mark Sample * Valérie Schafer * Carly Schnitzler * Arthur Schwarz * Lyle Skains * Rory Solomon * Winnie Soon * Harlin/Hayley Steele * Marylyn Tan * Daniel Temkin * Murielle Sandra Tiako Djomatchoua * Anna Tito * Introna Tommie * Fereshteh Toosi * Paige Treebridge * Lee Tusman * Joris J.van Zundert * Annette Vee * Dan Verständig * Yohanna Waliya * Shu Wan * Peggy WEIL * Jacque Wernimont * Katherine Yang * Zach Whalen * Elea Zhong * TengChao Zhou
CCSWG 2024 is coordinated by Lyr Colin (USC), Andrea Kim (USC), Elea Zhong (USC), Zachary Mann (USC), Jeremy Douglass (UCSB), and Mark C. Marino (USC) . Sponsored by the Humanities and Critical Code Studies Lab (USC), and the Digital Arts and Humanities Commons (UCSB).

Code Critique: FLOW-MATIC

I'd like to return us to some code we've looked at during past CCSWG's, bringing in the perspective of our Week 1 discussion

Name of program: FLOW-MATIC DEMO?
Name of author/s: Grace Hopper
Year circulated/published: 1955-59
Programming language: FLOW-MATIC (aka B-Zero or or Business Language version 0.

Code snippet:

1.  INPUT INVENTORY FILE-A PRICE FILE-B ; OUTPUT PRICED-INV FILE-C UNPRICED-INV 
2.        FILE-D ; HSP D .
3.    COMPARE PRODUCT-NO (A) WITH PRODUCT-NO (B) ; IF GREATER GO TO OPERATION 10 ;
4.        IF EQUAL GO TO OPERATION 5 ; OTHERWISE GO TO OPERATION 2
5.    TRANSFER A TO D .
6.    WRITE-ITEM D .
7.    JUMP TO OPERATION 8 .
8.    TRANSFER A TO C .
9.    MOVE UNIT-PRICE (B) TO UNIT-PRICE (C) .
10.  WRITE-ITEM C .
11.  READ-ITEM A ; IF END OF DATA GO TO OPERATION 14 .
12.  JUMP TO OPERATION 1 .
13.  READ ITEM B ; IF END OF DATA GO TO OPERATION 12 .
14.  JUMP TO OPERATION 1 .
15.  SET OPERATION 9 TO GO TO OPERATION 2 .
16.  JUMP TO OPERATION 2 .
17.  TEST PRODUCT-NO (B) AGAINST ZZZZZZZZZZZZ ; IF EQUAL GO TO OPERATION 16 ;
18.      OTHERWISE GO TO OPERATION 15 .
19.  REWIND B .
20.  CLOSE-OUT FILES C ; D .
21.  STOP . (END)

Description of how the code operates: (I'll post @damonlorenbaker's gloss below). Also, I should note that @benallen has written on FLOW-MATIC extensively.

Explanation of how you regard the code:
FLOW-MATIC was a programming language, featuring English language tokens, that preceded COBALT and was made by Grace Hopper and her team. A number of us have read this code as a sign of early thoughts on using English-like tokens and well as one of the ways early developers of programming languages attempted to cater to non-programming managers.

Discussion questions: How do we interpret this code through a feminist or gender-based approach?

Comments

  • Here's a gloss by @damonlorenbaker

    (0) INPUT INVENTORY FILE-A PRICE FILE-B ; OUTPUT PRICED-INV FILE-C UNPRICED-INV FILE-D ; HSP D .
    Oh hai! We're going to read in two files ( A and B ), we're gonna write out two files(C and D), I have no clue what HSP means

    (1) COMPARE PRODUCT-NO (A) WITH PRODUCT-NO (B) ; IF GREATER GO TO OPERATION 10 ;IF EQUAL GO TO OPERATION 5 ; OTHERWISE GO TO OPERATION 2 .
    I'm going to compare the product-no field of the first thing in A with the product-no from B (the data stuff gets specified in a different file using a different language, don't worry about it) and do one of these three things:

    A ) If the the product-no of A is less than B, then we do this stuff:

     (2)  TRANSFER A TO D .
     (3)  WRITE-ITEM D .
     (4)  JUMP TO OPERATION 8 .
    

    which means "copy the item from file A to File D and write the results to tape/card" then we go down to operation 8 below

    B ) If product-nos of A and B match, then we do this stuff:

     (5)  TRANSFER A TO C .
     (6)  MOVE UNIT-PRICE (B) TO UNIT-PRICE (C) .
     (7)  WRITE-ITEM C .
    

    Which means "we move the item from A to file C and assign it the unit-price for the item in file B that we are looking at. and write that to tape" and proceed down to operation 8 just like the section above did. Unit-Price is another field of the data in the files that is specified somewhere else in a completely different language.

     (8)  READ-ITEM A ; IF END OF DATA GO TO OPERATION 14 .
     (9)  JUMP TO OPERATION 1 .
    

    This says "read in the next item from file A, if that was the list item in the file then go to operation 14 below, otherwise go back up the to operation 1 above to compare that new"
    Notice both of these advance forward one item in file A and don't do anything in file B. This is important when dealing with tape/card because you need to move through the files once and in order and it's faster to burn a bunch of cycles on stupid comparisons than it is to try to move backwards on tape and there isn't enough memory to just store them in RAM.

    C) if the product-no of A is greater than the product-no of B, then do this stuff

    (10)  READ ITEM B ; IF END OF DATA GO TO OPERATION 12 .
    (11)  JUMP TO OPERATION 1 .
    

    This moves file B ahead by one, and if it is at the end it jumps to operation 12, otherwise we go back to 1 and start over to work our way through.

    This is where it gets ugly.

    (12)  SET OPERATION 9 TO GO TO OPERATION 2 .
    (13)  JUMP TO OPERATION 2 .
    

    so if we have reached the end of file B and haven't reached the end of file A we need to do something weird. Change the thing it does in line 9 to GO TO Operation 2 and then go to operation 2. This sets up a little feedback loop where each move through A is compared with that last value of B until A finally runs out.

    This part below happens only when file A runs out of entries, file B might have some more things in it at this point because there are a couple ways to get to this section.

    (14)  TEST PRODUCT-NO (B) AGAINST ZZZZZZZZZZZZ ; IF EQUAL GO TO OPERATION 16 ;
         OTHERWISE GO TO OPERATION 15 .
    

    From what I can guess this says 'if the last value we got from B is equal to "000000000000" (not just 0 but a blob of 12 zeros which is either a value assumed to have been written as the last value to file b or a default empty file response, dunno, and either way it's a weird idiom) that means B is at the end too so don't worry about it and just skip ahead to operation 16

    (15) REWIND B .

    Be kind, Rewind so file B will back in it's starting point the next time this or any other subroutine that reads from it needs it.

    (16) CLOSE-OUT FILES C ; D .

    We're done outputting things to files C and D so write whatever end stuff we need to do with them. We don't rewind those tapes because they are the output and we wouldn't want someone to come in and see them at the beginning and think they were blanks set up for them to write over our precious data.

    (17) STOP . (END)

    Stop executing this routine and go back to doing whatever you were doing before. The end needs to be there for when this is being read in from tape or cards so it knows that is where the useful stuff ends as it is reading in the info that makes up this program.

Sign In or Register to comment.