Sunday, May 26, 2019

Model Railroads and Technical Debt

Model railroading has taught me a lot. I can identify solvents by smell… and get nostalgic when I smell Dio-sol or Dullcoat. I learned how to repair mechanical devices, and convinced someone I might be a keeper when I fixed her CD player. Most importantly, I learned how to be kind to my future self, because I try to remember to make it easy to fix stuff on the model railroad in one year… or in ten years.

That’s a common lesson for model railroaders. Model railroads are long-term, large projects. The model railroad we build is going to last for several years, and we’re going to be expanding and repairing it along the way. The design and implementation choices we make years before will curse us years later. One badly placed switch machine is going to leave us with a sore back every time we repair it. Each time we cut corners wiring, we’re just forcing future-us to try to figure why that blue wire’s hanging loose, or remembering the wire color we used when we didn’t have black wire available. Every bit of track we can’t reach will be our bane every time a locomotive stalls or the track needs cleaning. Every model railroader has that moment of “what was this purple wire for, and where does it go?” early on in the hobby. After that we realize the benefit of using standard colors for wires, providing good access both to the track and to the mechanical and electrical parts below the layouts, the importance of labelling connectors and writing down designs - doing anything we can to avoid past-us making life difficult for future-us.

It turns out that’s a pretty useful skill in the real world, too.

I got to move some equipment I’m running into a new computer room the week before last. After I’d finished wiring it up, I asked one of the IT guys for help with something else. When he came over, he immediately commented on the state of the rack. “Wow, you’re using cable ties. And your wiring is neat - not like that other engineering rack.” He showed me the proper way to cable tie wire loops was with two ties, but he seemed pretty impressed that a software engineer was trying to keep wiring neat. The other rack, which I’d just moved my stuff from, had so many cables coming out the back that I couldn’t reach in to disconnect my machines. To be fair, the other folks in the rack were reconfiguring their stuff daily, and had a lot of connections to support; I was setting mine up for a single, long-term configuration with a much simpler configuration. Google’s original “cork board” server racks - now in the Smithsonian - highlight that you can be pretty successful even with messy wiring.

But model-railroader me was also wiring that equipment in the same way I’d want to wire the model railroad. I remembered the messy wiring on my first model railroad, and the pain I caused future-me. As a result, I made sure to steal cable ties from random benches, chose different colors for all my different cables, and neatly routed the wiring so I could get to the equipment and track down cable paths. Future-me (or future team-mate reaching in that same rack) should have an easier time, all thanks to past-me placing switch machines in inaccessible chambers between sheets of plywood, or tracking down intermittent shorts when teenage-me was splicing together wires with a couple of twists and bit of masking tape for insulation.

We worry about the short-cuts in computer programming just as we do in model railroading or in physical engineering. It’s become a popular topic in software engineering research as “technical debt” - delayed cleanup or quick-and-dirty implementations that complicate or block future changes. There’s even mini-conferences on the topic with research papers titles like “How do Software Practitioners Discount the Future?” Real engineering has technical debt too - think how commuter rail choosing to use low-level platforms (boarding at ground level) might never be able to move to high-level platforms (level surface from platform to passenger car) because of the problems transitioning from one to another. However, software tends to have more of these kinds of problems because everything’s up for grabs in software - we can build stuff any way we want, we don’t necessarily have conventions about how to do common tasks, and it’s often difficult to see those shortcuts from the outside. It’s common to tie together two bits of software with the ugliest, most fragile hack “that’s only needed temporarily”, just as I used alligator clips to temporarily tie together the power for two strips of LED lighting today. That’s less common in more traditional engineering disciplines; as far as I know, petroleum engineers never say “Joe, you sure you want to use cardboard tubes to join those two parts of the refinery while you’re testing?” (If you want a more nuanced argument about technical debt in software, read Kellan Elliot-McCrea’s argument that the term technical debt is mixing up a whole bunch of reasons why we have problems maintaining the things we build.

My current job involves writing tools to help software engineers build better programs: programs to test that the software can be built correctly, runs correctly, and has the performance we expect. Because our team has to have our infrastructure ready so that everyone else can make progress, that means we’re often building stuff as fast as we can, cutting occasional corners, and incurring technical debt so everyone else can build the things we sell. I occasionally take the same shortcuts in model railroading. Occasionally I route wires in ways that’ll make it harder to track down problems, or I’ll avoid adding a terminal strip to save on wire but minimize testing or change possibilities, or I’ll leave a switch machine near a joist where I can’t easily get to it. It’s ok in moderation, and it helps me make progress on the bigger task of building and completing the model railroad I want to build. I’ve been describing technical debt for our tools as us not trying to make future-us suffer too much, but acknowledging that some of our choices will make future-us suffer a little bit. “In ten years, we want to be laughing about the short-cuts we took and the pain it caused, not crying about a shortcut that kept us from meeting our real goals.”

That’s not a bad rule for the model railroad, too. As I was cutting in a new circuit for some LED lights for the lower deck, I wasn’t perfectly happy with how I was routing the wires, but I wanted to get everything completed and back together again tonight because keeping everything running is also a good engineering goal. And with luck, I won’t remember tonight’s short cut; if I do, I’m certain I’ll be laughing about the short cut in a few years once all the fluorescent lights are replaced by LEDs.

Saturday, May 4, 2019

"Hapa's Brewing Doesn't Do Things By Halves!" Says Edith Daley

It’s a crazy time in Silicon Valley right now - lots of construction and new office space, lots of traffic, lots of folks moving in. The 1970’s tilt-ups around our current office are failing to the bulldozer and getting replaced with four stories of apartments and AMD engineering cubicles. Our office manager just moved west from North Carolina, and I can’t imagine how crazy this place seems to her - wide open skies, brown hills, and too damn many verification engineers and JavaScript ninjas. Neighbors fighting neighbors over coding style conventions. French bulldogs with LinkedIn profiles. It’s a common story - if this was the turn of the century, we would have had a bunch of Italian immigrants, fresh off the boat, looking for cannery or farm work, and we would have overheard arguments about the correct way to fix a canning line without stopping the line or losing a finger. If this was the 1950’s, we’d be fighting for seats at the Burger Pit against IBM and Lockheed engineers, while a bunch of drunken Fairchild engineers argued about the best way to dope germanium. Instead, we avoid getting run down by Nvidia self-driving cars or a Google bus, and fight for space at the bar with senior product managers with pugs on leashes.

Silicon Valley overheating means things are changing. In our neighborhood, we’ve lost a couple former orchard farmhouses that survived surprisingly long in the middle of subdivisions- the triple size lots are too valuable for a 1920s 2 bedroom house. The trendy bar out in the country by Saratoga is getting torn down for executive-level houses. The occasional 1950s strip mall goes post-modern, with a bunch of hipsters at Philz waiting for a bespoke cup of coffee to finish dripping. (Geez, just pour the d*mn coffee already!) If you're a friend of older San Jose - whether the 1920's, the 1970's, or the 1990's - this isn't a bad time to be taking a good look at the old stuff you like before it turns into a new apartment complex.

But progress also means some things are getting reused. Paradiso’s Deli, out by the former Del Monte cannery, looks like it’s been reinvented and reopened. Santa Clara is slowly working to reinvent its downtown. And in the former Salsina cannery building off on Lincoln Ave. in San Jose, redevelopment has cleaned up this underused building in what used to be San Jose's western cannery district and turned it into a bike repair, gallery, and beer hall.

Salsina Cannery, 2019

I've written about this building before. It was built in 1918 as Salsina Packing, a cannery founded by Carlo Aiello and Alfonso Lambroso to make tomato paste for the American market, though they quickly branched out into apricots and peaches. Edith Daley, my favorite San Jose Evening News columnist, visited the cannery in 1919; her story led with the headline "Workers at the Salsina Plant Smile Easily". Edith was impressed by the new and impressive building, the friendly management (William Leet bought ice cream for the entire canning staff on the day of her visit), and its well-ventilated interior - a big deal for the usually-hot cannery. She was also a mite confused by the name, asking for Mr. Salsina before being told that Salsina (tomato paste) was the product, not the producer! Salsina hit challenging times in the post-World War I recession. The company was sold to Virden Packing in 1922 to build William Virden's goals for a fruit-and-meat-packing colossus. Virden Packing, over-extended, failed in 1926 and got broken up, but the building appeared unused for quite a while after that date.

Back side of cannery - much more utilitarian

In 1935, the former cannery building appeared as the home of Saint Claire Brewing Company the first local brewery to open after the end of prohibition. Saint Claire disappeared by 1936, and the building was used for a series of businesses: warehouse space for the San Martin winery, a drayage company, and a good ten or fifteen years as a discount furniture store.

But the neighborhood's changed; the former cannery district is now mostly large apartment complexes. Salsina's well-ventilated cannery became studio and retail spaces a couple years ago.

Working end of the brewery

So here I am, sitting in the same cannery where Edith Daley saw “Billy" Leet buy ice cream for the entire cannery crew back in 1919. It’s now Hapa's Brewing. My chance to sit inside shows it's a stylish building both from a model railroad and canning perspective. Concrete floors for ease of cleaning and storing a seasons worth of tomato paste. The sawtooth roof adds interest from above. Concrete walls on the street side, worn corrugated iron on the railroad side. Huge beams holding up the roof so there’s more space for canning equipment. Light rail rolls by much more often than the "Friendly" SP ever serviced the Los Gatos branch. Today's Saturday afternoon crowd provides the background noise to hint at how active the building sounded at its birth. The Sainte Claire Brewing folks who had the building in 1935 would be pleased that the buildings still a happy provider of alcoholic beverages.

Edith’s pleasant description of the building still holds true - “The plant is sunny, well-ventilated, and a pleasant place in which to work.” Definitely true - the sawtooth roof brings in a surprising amount of light, and open loading doors keep it light and airy in today’s moderate May weather. I wouldn’t mind being stuck here in July. I'm not at all displeased about sitting at the bar today.

Freight door from original cannery

A hundred years ago when Edith visited, she found a San Jose where the cannery mostly had Anglo workers. “There’s a dignified high school professor from San Francisco happily at work on the fruit grader. There are sons and daughters of doctor, lawyer, merchant, chief, and they are making from $20 to $25 per week.” Mrs Addington was forewoman, J. Turner watched the incoming fruit and tomatoes to ensure it met Salsina’s quality. With the demographics she saw, perhaps it’s not surprising that Edith found the “little Italian girl- the most prolific of the bunch” so surprising in Campbell a few weeks before. Even for an Italian-run cannery, Italian immigrants on the line were either not easily identifiable, or not newsworthy to Edith’s eyes.

Fifteen years later when the Sainte Claire Brewing company started making local beer, a good fraction of the groceries in San Jose had Italian names... at least for the markets that wanted to sell local beer from San Jose.

(Side notes about the people Edith met in 1919: Mrs. Ludy Addington, 132 Topeka Ave. in the Burbank neighborhood, was a midwest transplant; her husband, Charles, ran a service station at Race and San Carlos in later years, though he listed his occupation as "oil and gas merchant" in 1920. Charles was a Southern Pacific brakeman in 1913. Jacob Turner, from Ohio, listed his occupation as cannery superintendent in 1920. He lived at 529 N. 19th Street with his wife and eight children. By 1930, he was running his own plumbing business. Running a cannery made one very good at quick plumbing repairs, I expect.)

And once you get to modern days, Salsina’s demographics have changed again. All the nearby apartment buildings means that the place is filled with the local twenty-somethings on a Saturday, maybe working at Splunk in Santana Row packing web log data into attractive canned formats, contracting at Google but angling for a full time role at Facebook, or maybe figuring out ways to profit from supporting the masses coming to make the Santa Clara Valley a productive bread basket of technology. The faces are the usual Silicon Valley mix - some Anglo, some Asian, some Hispanic, highlighting just how varied the Santa Clara Valley is. Like Edith, what I’m seeing doesn’t match the true demographics of Silicon Valley; it’s less Hispanic here than San Jose as a whole. The place also doesn’t look like my co-workers - the collection of chip engineers at work who may have been born in India, but decided long ago that the Santa Clara Valley would be their home. Over in Fremont, they’re replacing the Portuguese Holy Ghost parade with Indian festivals. If you show up at Holi, you might get covered in colored pigment. The stories the immigrants tell are the same - new immigrants risking it all to move to the US, the dangers of starting anew in a land without friends and family, and figuring out how to mix traditions from the old country with their new home.

Billy Leet isn’t serving ice cream in the 21st century, but at least Hapa has a taco truck, helping to keep this century’s puff piece writers well-fed.


Hapa's Brewing is at 460 Lincoln Ave in San Jose. It's a popular place, so folks other than me must think their IPA is tasty! No food in the restaurant, but they invite food trucks to stop by many days - check their events. Compare the photos from a few years ago to see how nicely the place has been fixed up. After your beer, walk around the neighborhood and check out the former Standard Oil depot at Auzerais and Sunol, and meander along the Los Gatos Creek trail beside the apartments that replaced the Del Monte cannery.