Howdy, Stranger!

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

In this Discussion

Participants: Derya Akbaba * Ben Allen * Natalia-Rozalia Avlona * Kirill Azernyi * Erin Kathleen Bahl * Natasha Bajc * Lucas Bang * Tully Barnett * Ivette Bayo * Eamonn Bell * John Bell * kiki benzon * Liat Berdugo * Kathi Berens * David Berry * Jeffrey Binder * Philip Borenstein * Gregory Bringman * Sophia Brueckner * Iris Bull * Zara Burton * Evan Buswell * Ashleigh Cassemere-Stanfield * Brooke Cheng* Alm Chung * Jordan Clapper * Lia Coleman * Imani Cooper * David Cuartielles * Edward de Jong * Pierre Depaz * James Dobson * Quinn Dombrowski * Amanda Du Preez * Tristan Espinoza * Emily Esten * Meredith Finkelstein * Caitlin Fisher * Luke Fischbeck * Leonardo Flores * Laura Foster * Federica Frabetti * Jorge Franco * Dargan Frierson * Arianna Gass * Marshall Gillson * Jan Grant * Rosi Grillmair * Ben Grosser * E.L. (Eloisa) Guerrero * Yan Guo * Saksham Gupta * Juan Gutierrez * Gottfried Haider * Nabil Hassein * Chengbo He * Brian Heim * Alexis Herrera * Paul Hertz * shawné michaelain holloway * Stefka Hristova * Simon Hutchinson * Mai Ibrahim * Bryce Jackson * Matt James * Joey Jones * Masood Kamandy * Steve Klabnik * Goda Klumbyte * Rebecca Koeser * achim koh * Julia Kott * James Larkby-Lahet * Milton Laufer * Ryan Leach * Clarissa Lee * Zizi Li * Lilian Liang * Keara Lightning * Chris Lindgren * Xiao Liu * Paloma Lopez * Tina Lumbis * Ana Malagon * Allie Martin * Angelica Martinez * Alex McLean * Chandler McWilliams * Sedaghat Payam Mehdy * Chelsea Miya * Uttamasha Monjoree * Nick Montfort * Stephanie Morillo * Ronald Morrison * Anna Nacher * Maxwell Neely-Cohen * Gutierrez Nicholaus * David Nunez * Jooyoung Oh * Mace Ojala * Alexi Orchard * Steven Oscherwitz * Bomani Oseni McClendon * Kirsten Ostherr * Julia Polyck-O'Neill * Andrew Plotkin * Preeti Raghunath * Nupoor Ranade * Neha Ravella * Amit Ray * David Rieder * Omar Rizwan * Barry Rountree * Jamal Russell * Andy Rutkowski * samara sallam * Mark Sample * Zehra Sayed * Kalila Shapiro * Renee Shelby * Po-Jen Shih * Nick Silcox * Patricia Silva * Lyle Skains * Winnie Soon * Claire Stanford * Samara Hayley Steele * Morillo Stephanie * Brasanac Tea * Denise Thwaites * Yiyu Tian * Lesia Tkacz * Fereshteh Toosi * Alejandra Trejo Rodriguez * Álvaro Triana * Job van der Zwan * Frances Van Scoy * Dan Verständig * Roshan Vid * Yohanna Waliya * Sam Walkow * Kuan Wang * Laurie Waxman * Jacque Wernimont * Jessica Westbrook * Zach Whalen * Shelby Wilson * Avery J. Wiscomb * Grant Wythoff * Cy X * Hamed Yaghoobian * Katherine Ye * Jia Yu * Nikoleta Zampaki * Bret Zawilski * Jared Zeiders * Kevin Zhang * Jessica Zhou * Shuxuan Zhou

Guests: Kayla Adams * Sophia Beall * Daisy Bell * Hope Carpenter * Dimitrios Chavouzis * Esha Chekuri * Tucker Craig * Alec Fisher * Abigail Floyd * Thomas Forman * Emily Fuesler * Luke Greenwood * Jose Guaraco * Angelina Gurrola * Chandler Guzman * Max Li * Dede Louis * Caroline Macaulay * Natasha Mandi * Joseph Masters * Madeleine Page * Mahira Raihan * Emily Redler * Samuel Slattery * Lucy Smith * Tim Smith * Danielle Takahashi * Jarman Taylor * Alto Tutar * Savanna Vest * Ariana Wasret * Kristin Wong * Helen Yang * Katherine Yang * Renee Ye * Kris Yuan * Mei Zhang
Coordinated by Mark Marino (USC), Jeremy Douglass (UCSB), and Zach Mann (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.