Tuesday, March 18, 2014

Of Work And Play

52


Two years after giving up my 'child labor' job at the branch grocery store, how would my first 'of age' job turn out?
My first official morning of work for the grocery store chain I arrived a half hour before the store opened, as requested. The elder cashier 'Hazel' was there and her job this morning was to teach me how to be a bagger. Even though I had been doing it for years, I didn't let on and listened as she explained opening the paper bag and sitting it up, using heavy square items to fill the corners, with lighter boxed or heavy bagged items to fill the center, then light or fragile stuff on top. I was cautioned to make sure the weight was evenly distributed between the bags and not have one that was too heavy and one that was too light. While it was a nice thing to do for the customers, it was a better thing to do for us as we baggers carried out most customers' groceries.
Once that lesson was done, I asked what other things I'd be doing. I got a blank look back for a moment until I realized bagging was the only thing I'd be doing, and then she came up with something: I could get her a cup of coffee from the Deli department. I did and I soon learned that employees could also get a free, freshly fried doughnut or two. Not being one for coffee, I picked the cinnamon sugar doughnuts, not the powered type but granules of sugar laced with sharp bits of cinnamon all held on by the remaining thin layer of frying grease. When fresh, as you bit into it the center wasn't yet solidified and just melted in your mouth; it was a great way to start one's morning... Though my doctor of today would strongly disagree with that.
And so Saturdays and four weekdays after school including the Friday evening hours, I bagged with my two friends, Pete and Van, along with some other baggers, some full-timers and some upperclassmen from my High School. Part social and part frenetic with a touch of hijinks, in a rural setting where you already knew everybody, bagging and taking out their groceries was a chance to visit and catch-up on the latest gossip with the locals. As the customers almost always came in waves, there were the quieter periods when us baggers would visit amongst ourselves or occasionally 'have fun'. During the high inflation early eighties we'd anticipate how much a customer's bill would be based on the groceries they bought. I actually found it worked best just to figure the average cost of what would fit in a bag and work out the total based on how many bags there were. A bag of groceries first averaged $12, then $15, $18, $22, and then $25 when I finally left three years later. One dead afternoon, I was bored with visiting amongst ourselves so I grabbed a shopping cart and went into the backroom to get some leftover stock and flush-out the shelves, as I would have at the branch store in earlier years. After about forty-five minutes the assistant manager of the store noticed me and asked me who told me to do this? I said no one, that since it'd been quiet I thought I'd keep busy. I was told I shouldn't do that and to stay put unless somebody told me otherwise. I said 'okay' and returned to the backroom with the remaining stock and left it there. So, the rule at the main store was not to show initiative.
At the start of the school year I discovered that Zack had bought the machine code manual for the Trash-80; as all the great games now included machine code I thought I'd buy my own copy only to discover it was hundreds of dollars, not twenty-ish as the Level II BASIC manual had been. So I asked Zack if I could borrow the manual overnight on my days off from bagging to study it, he said I could but I had in fact found our first store in town that offered self-serve photo copies for a per page price. As the machine code manual was loose leafed, three-ring bound, this made it easy and the store clerk let me copy the whole manual over a series of weeks as long as I let other customers who showed up go first or cut in. I agreed. When this rarely happened I looked around the rest of his store. A new store in a new two-story shopping strip that had opened in town, he wasn't sure what would sell best and keep him in business, so he sold some record albums, he had the copier and he also had a few selves filled with this new thing: Hollywood movies on video tape for rent. As I didn't know anyone with a video tape player, I couldn't see that becoming a profitable side of his business and would just browse the albums for myself.
As I soon found out, his store was the social center of the shopping strip and word got around that a kid who knew how to program computers was showing up there from time to time. As a result, once someone found me while I was copying, and another time the store clerk gave me the name and upstairs suite number of someone interested in my help. The first of these two people was a guy in the Land Use Office for our growing town. The town had gotten a Trash-80 computer as it was to 'help him' at his job, but he hadn't a clue what to do with it. So I found out what his job entailed: Keeping track of the parcels of land in town, Who owned them, Where they were located, And the estimated taxes per parcel. So I made a program to let him enter that data into the computer, list it from memory, search it and most importantly save it at the end of the day. As he had a Level II machine with sixteen kilobytes of memory and only a cassette recorder for storage, I recommended saving during his lunch break as well, given the time it would take and the annoyance if the power went out mid day and he'd lose any new stuff he had entered in the morning hours. For my help, I got treated to a couple of meals and in return gave him a tape of some of my best games to play with during his free time.
The second person needing help was a guy who made dentures for a living. He would be sent casts of a patient's gums and photos of them when they had teeth and he would individually select teeth to match those that showed from supplied family photos, while choosing from stock molars for the back as he made the plates. A solitary business for him, he needed his Trash-80 to keep track of patient names, dental offices, estimated & final costs and the arrival & estimated delivery dates. It was a simple variation of the program I'd made for the land use office on the same tape based computer set up. I did get to add some calculation functions to it so it could keep track of how much money he'd have coming in by the end of any given week as his income depended on intermittent flows of business. It also had a reminder function after he loaded up his tape at the start of the morning to list those clients still due to have their teeth done and by which dates. Unlike the land use office, his was a more of a pay and be paid business and he insisted on paying me for my work. I only asked for a hundred and in return gave him a tape of my best games... The next time he saw me he gave me the tape back saying he'd spent the first day with it playing games and not working. He realized it would be too tempting and put him out of business if he kept it. I wonder if this had happened to the land use office guy as, when I went to look him up the following year, I found he had lost his job and they were no longer using any computer in their office.
Still, word of mouth spread and I started to have people show up at the grocery store to talk with me about what they needed. One time a guy wanted his machine to translate messages into Morse code, which was easy, but he also wanted it to listen to a tape of code and translate it into English. That was much harder as, I first made it listen to its own output and got that to translate reading it back, but when listening to man made code, it failed as there was so much variation in by-hand coding rhythms. Rather than translate as it heard it, I finally came up with the computer storing measurements of the beeps it heard, then had it crunch the numbers afterwards and make its best guesses as to which beeps were 'dots' and which ones were 'dashes'. This solution worked pretty well, still the guy had wanted it to translate what it heard on the fly, but I just couldn't crack that nut given my skill at the time unless the man made code fit a consistent pattern.
Another guy had made a plug-in device that would allow the computer to light-up a set of L.E.D.s and while he could send it numbers to show a light pattern manually, he wanted a shell program to let him feed it a string of numbers and hold times and play light patterns on the L.E.D.s like music. This took a bit to get my head around, but I finally figured it out and gave him a variation of the database program I'd made for the land use office and the denture making guy. But instead of adding and sorting people, it allowed him to enter and arrange his numbers. I then added a secondary listing function where it sent the listing to the light device thus making it play his visual tunes. Once happy with each tune, he could save the number data to tape and load them up again to play or tweak at a later date.
In fact, most programs people found me to make for them could be resolved with a variation of my tape-based database program and while I liked the novelty of people from as far away as ten miles hunting me down at the grocery store for my help, I was starting to find this a bit boring when it came time to put the code together. So, fueled by the great games I'd seen that Summer and the photo copied machine coding manual, I devised my magnum opus. Let's call it 'Star Quest', a real time graphics based game, the player's job was to fly from star to star and assess their systems, looking for life on each planet encountered. Once in a while you'd find members of a bad alien race and blast them off the planet from orbit, other times they might be innocent natives so you had to be careful. No Trash-80 program approached this level of complexity in the game with such variation in play and it only took me two and a half years of experimentation and test versions to finally nail it down as a playable game. But the harder part was making it fun to play as well. I'll spill more on this work later as it laced through so many other twists and turns of my life.
I was saving money from my new job so I could buy myself my own Trash-80 computer to have at home. Doing the math, I found I wouldn't save up enough until the start of Spring. Having seen many television shows of people getting advances on their salaries, it occurred to me to go to the store owner and ask if I could do that. Joe said they didn't do such things, but then he came back to me with the money a day or two later. As he had known me for years, and known my mother even better, he had gotten a loan for me from the local bank under his name and all I had to do was pay it off by the end of the school year. I greatly thanked him and placed my order by phone with the out of town Radio Shack. When I got the phone call that it had arrived, I drove up to get it but the manager wouldn't sell it to me as I didn't look like he imagined I would from the sound of my voice on the phone. So I used logic on him and asked how likely it would be that I was a stranger who happened to show up at the store with twelve hundred dollars worth of cash and by chance know the name of someone else who had reserved a computer for that much money. He looked at the handful of cash and decided not to argue. I had my first computer and was the second kid in my class to have one!
Zack Hatch took me on three more computer fair trips, two in the Fall and one early the next year. By springtime he seemed distracted by something and he didn't invite me on any more trips.
Toward the end of the school year, the Principal came to me and asked if I could write a program for the school. Each year students would get to go into the class selection room and pick out cards for what classes they'd want to take for the following year. In years past, they would give priority to the high scoring students of previous years and then the staff would pick and choose among themselves which student would go first for those at the same level. Legal concerns had been expressed about the possibility of bias in this process and so they wanted to make the student selection totally random this time. My job was to produce a list of random numbers that they could then use to find which students went first. I clarified, ''You mean you want me to make a program to contain the student names and then give them out in a random order?'' No, for it wouldn't be right for me to see that resulting list and know ahead of time who went first. They had already assigned numbers to us students and just needed a randomized list of numbers to match us against.
I agreed, but at the same time I was curious if I could guess which numbers we had each been assigned and have that list of numbers favor my friends and give them an earlier slot along with myself in the listing. But what numbers were they using for the students? After thinking about it, I went to the office and asked to update 'my card'. Each student's contact information was kept on a four by six card in the office in case the staff needed it. Stored alphabetically in long drawers it was for office use only, but a student could request to update theirs from time to time when there was a new phone number or home address. As I placed the grocery store number down as my work number I noticed a three digit number written at the top right corner of the card. I remembered mine and guessed those were the numbers the school was going to associate with us for the random list. I chose seven friends and recommended that, if they wanted a better chance for an early selection of classes, to 'update' their cards and let me know what their number was. An eighth student heard about this and asked to be included, which I did in order to keep him quiet...!
Now it was simply a case of figuring out how to make a complete list of randomly ordered numbers. While most computers have a random number function that you can call, it would often produce duplicates and typically not get to a specific number for a long time after producing many duplicates of earlier numbers. This wouldn't work on a randomized list of all needed numbers. So my first idea was to keep track of which numbers had already been listed, and then ignore their duplicates when they happened. But this resulted in a program that made the listing ever slower and slower as the pile of numbers it had to check against grew and grew until finally the random number function was constantly running to guess that one last number that hadn't been listed yet. This would take hours.
Then I came up with the idea of: Instead of keeping track of the numbers already picked, I'd keep track of the numbers that hadn't been picked yet! How would that help, you ask? I had the computer think up a list of all the numbers from one until the total needed, placing each one of these numbers into a box referenced by its number. Thus ''1'' was in box 1, ''2'' was in box 2, etc. The program remembered the last box number, lets say 500 with ''500'' in it. Now the random number function was called to pick a number between 1 and 500. It picks 132, the computer looks into that box and lists ''132'', but then places the number from box 500 into the box for 132. I now knew I only had 499 numbers left to pick and thus had the random number function pick a number from 1 to 499. As it lists numbers, the number of boxes to keep track of shrinks and thus the program runs faster and faster as it goes, not slower and slower. It was like pulling a card randomly from a deck and, each time, the deck of cards got smaller. With some additional logic, the number boxes associated with my friends would be picked 'by chance' at specific points in the first third of the listing: Perhaps their number had already been randomly chosen, if so a lucky higher number was pulled out of their box instead. I humbly had my number come up just shy of halfway through the listing so as not to make anything obvious.
As the school computer didn't have a printer, I passed the program to my classmate Jonathan who had a printer attached to his computer at home. He brought in the list the next morning and we handed it to the Principal. He seemed very happy. But when the class selection queue was posted with the student names attached, it turned out the staff apparently hadn't been using the numbers listed at the top of the student cards. Still, my eight students had their names randomly elsewhere in the top half of the list and they gave me credit for it even though it had truly been by chance, and my name was just below the middle of the list. When one of the students asked me why I had myself listed so far down, I told him I hadn't wanted to raise suspicions...




impatient? Paper, eBook
help me break even: Shop 

No comments:

Post a Comment