Working the problem

From An Astronauts Guide to Planet Earth by Chris Hadfield:

Feeling ready to do something doesn’t mean feeling certain you’ll succeed, though of course that’s what you’re hoping to do. Truly being ready means understanding what could go wrong – and having a plan to deal with it. You could learn to scuba dive in a resort pool, for instance, and go on to have a wonderful first dive in the ocean even if you had no clue how to buddy breathe or what to do if you lost a flipper. But if conditions were less than ideal, you could find yourself in serious danger. In the ocean, things can go wrong in one breath, and the stakes are life and death. That’s why in order to get a scuba license you have to do a bunch of practice dives and learn how to deal with a whole set of problems and emergencies so that you’re really ready, not just ready in calm seas.

For the same sort of reasons, trainers in the space program specialize in devising bad-news scenarios for us to act out, over and over again, in increasingly elaborate simulations. We practice what we’ll do if there’s engine trouble, a computer meltdown, an explosion. Being forced to confront the prospect of failure head-on – to study it, dissect it, tear apart all its components and consequences – really works. After a few years of doing that pretty much daily, you’ve forged the strongest possible armor to defend against fear: hard-won competence.

Our training pushes us to develop a new set of instincts. Instead of reacting to danger with a fight-or-flight adrenaline rush, we’re trained to respond unemotionally by immediately prioritizing threats and methodically seeking to defuse them. We go from wanting to bolt for the exit to wanting to engage and understand what’s going wrong, then fix it.

Early on during my last stay on the ISS, I was jolted to consciousness in the middle of the night: a loud horn was blaring. For a couple of seconds I was in a fog, trying to figure out what that unpleasant noise was. There were four of us in the American section of the Station then, and like prairie dogs, we all poked our heads up out of our sleep pods at the same time to look at the panel of emergency lights on the wall that tell us whether we should be concerned about depressurization, toxicity or some other potential fatal disaster. Suddenly all of us were wide awake. That deafening noise was the fire alarm.

A fire is one of the most dangerous things that can happen in a spaceship because there’s nowhere to go; also, flames behave less predictably in weightlessness and are harder to extinguish. In my first year as an astronaut, I think my response to hearing the alarm would have been to grab an extinguisher and start fighting for my life, but over the past 21 years that instinct has been trained in, represented by three words: warn, gather, work.

“Working the problem” is NASA-speak for descending one decision tree after another, methodically looking for a solution until you run out of oxygen. We practice the “warn, gather, work” protocol for responding to fire alarms so frequently that it doesn’t just become second nature; it actually supplants our natural instincts. So when we heard the alarm on the Station, instead of rushing to don masks and arm ourselves with extinguishers, one astronaut calmly got on the intercom to warn that a fire alarm was going off – maybe the Russians couldn’t hear it in their module – while another went to the computer to see which smoke detector was going off. No one was moving in a leisurely fashion, but the response was one of focused curiosity; as though we were dealing with an abstract puzzle rather than an imminent threat to our survival. To an observer it might have looked a little bizarre, actually: no agitation, no barked commands, no haste.

The next step is the gather, so we joined the Russians in their part of the Station to start working on the problem. How serious was the threat? So far, all the signs were reassuring. We couldn’t smell smoke of see flames. Maybe one little wire had melted somewhere, or the detector was responding to dust. We talked to Mission Control in Houston and in Moscow, but as we investigated, checking the module where the detector had been triggered, it seemed more and more likely that we were dealing with a simple malfunction. Finally, everyone agreed that it had been a false alarm, and we headed back to our sleep stations. An hour later, when the fire alarm sounded again, we repeated the warn, gather, work protocol just as before. The response was similarly calm, though not perfunctory – possibly something had been slowly smoldering for the past hour. As it turned out, nothing had. The detector was a lemon, that’s all. I remember thinking, “That was a little like a sim, only better, because now I get to sleep.”

I doubt anyone’s heart rate increased by more than a beat or two while we were dealing with those fire alarms, even during the first minutes when the threat of a raging inferno seemed most real. We felt competent to deal with whatever happened – a sense of confidence that comes directly from solid preparation. Nothing boosts confidence quite like simulating a disaster, engaging with it fully, both physically and intellectually, and realizing you have the ability to work the problem. Each time you manage to do that your comfort zone expands a little, so if you ever face that particular problem in real life, you’re able to think clearly.

Sense-making list-making

From the “The MetaCryptoVerse”, which triggered my oft-observation that civic tech too-frequently regresses to resource directories (lists of services):

…what happens when our institutions become just lists. Lists scattered across a network of databases.

You see we are attune to the idea of data disrupting paper. What we are not attune to is this idea of data disrupting space. Or more accurately how information architecture is disrupting architecture. Banks become lists, manifest as a collection ATMs, PC and smartphones. Office blocks become lists manifest as web pages and mobile apps. Hospitals become lists manifest as patent records and augmented beds. Government agencies become lists manifest as web pages and pdfs. Libraries become Google. Which is to say they become lists. Our clubs and churches or more accurately our communal meeting places become Facebook pages. Which is to say they become lists. Our shops become lists. Be they Amazonian or iTuna. Or schools and colleges become Moocs. Which is to say they become lists.

Now these are ideas. Conceptual models. Thought experiments. Dare I say TEDs? worth exploring. What happens when our world evolves from the bucket list to a bucket full of lists?

What would this new architecture look like? How do we interact with these new spaces? And what are the types of games we will be playing to occupy our days? What is it like to live life as an endless fractal narrative? What will be the sum of our days? The sum of experiences in this brave new world? Of life lived as a bucket full of lists. Virtual or otherwise. Just how will these lists shape our behaviour? Regulate our emotions? Facilitate our transaction? Engineer our experiences? Provoke our responses? Design our Desires? Juxtapose our inner tensions? Manipulate our self image? Game our expectations?

We discovered these are conversations worth having… with others.

Let the Record Show: A Political History of ACT UP New York, 1987-1993

I discovered the ACT UP organization in the wake of Occupy, when I became friends with Michael Petrellis, who I met through my church.

This book is a wonderful approach to documenting an organizing: powerful, tragic, and practical.

When preparing the ACT UP Oral History Project, Jim and I looked at two Holocaust archives for guidance. The Shoah Foundation, organized by Steven Spielberg, had a structure that did not fit our needs. Designed to counter Holocaust revisionism, in which people who did not commit the Holocaust deny that it ever occurred, the project had hundreds of interviewers focused on a list of predetermined questions. We felt that the interviews were designed to emphasize the moments of trauma, of oppression and atrocity. As important as this was, we were more intrigued by a small archive financed by the Fortunoff department store family that investigated who each person was before the Holocaust, and then how they were impacted by the turn of events. This approach really appealed to us for a number of reasons. The primary purpose of the ACT UP Oral History Project, and of this book, is not to look back with nostalgia, but rather to help contemporary and future activists learn from the past so that they can do more effective organizing in the present. We wanted to show, clearly, what we had witnessed in ACT UP: that people from all walks of life, working together, can change the world.

The story of access in ACT UP is the story of a collective that intended to do good, and actually did in fact truly make the world a better place. Inside those accomplishments are realities of a human dimension: people who do great things also do bad things, sometimes out of bias and supremacy, and sometimes out of vulnerability, fear of demise, the desire to live, or all of the above. And when white people, and men, do things out of bias and vulnerability, people with less access pay a price. Sometimes that price is stress, or being forced to strategize, or being blindsided as a way of life. Sometimes that price is exclusion from treatments, from participation in decision-making, or from the machine of power. Sometimes that means death, and sometimes that means long-term and systemic deprivation for the collective as well as the individual. When we evaluate how we have spent our lives, we have to look at our cumulative impact, not at the moments of failure or bad faith. Assessing this history is not a game of call-out. Instead, it is an effort to really understand and make clear how the AIDS rebellion succeeded, and to face where it failed, in order to be more conscious and deliberate, and therefore effective, today.

This book contains a lot:

  • “Drive and commitment, invention and felicity, a focus on campaigns, and being effective are the components of movements that change the world.
  • “A small, very crucial group of individuals had spent their time in ACT UP observing and analyzing the full range of meaning and impact of ACT UP as a whole, and developed organizational overviews, which permitted broad analysis, recognition of large tropes, and a grasp of strategic reach. But most often, ACT UP did not theorize itself…. Direct action was a concept by which theoretical discussion was not separate from action. Of course, individual ACT UPers were influenced by theory. A number of young video activists had studied in the Whitney Museum Studio Program. Many older activists came from highly theorized earlier radical movements, and some members, like Douglas Crimp, wrote theory. But on the floor of the Monday-night meeting, theory was never debated unless it was tied to creating actions, or to setting active campaigns. As Maxine Wolfe, one of ACT UP’s most influential leaders, would say, when planning and carrying out an action, “theory emerges” as a concrete result of actual decisions that are being made for real-life application. Instead of the Gramscian concept of “praxis,” which is the application of theory into practice, ACT UP first chose a practice—an action—and then evolved a theory necessary to make it work toward our larger goal of “direct action to end the AIDS crisis.” In this way campaigns were structured as a series of interconnected actions, designed to produce a larger outcome. ACT UP would never just do a demonstration, zap, or action to stand on its own. These public expressions were designed to build to the next step. That’s why every event had a sign-up sheet, or leaflets announcing further actions, and participants were informed of the next step in the series on any specific issue. Every action included a component of giving participants and observers something else to do. In this way, energy was not wasted, and events had purpose, as part of a larger schema. Not wasting energy, effort, or goodwill was essential to being effective in a movement of people who literally did not have time.”
  • “Gregg got together with Charles Stimson and Ortez Alderson, an activist from Chicago who had moved to New York to become an actor and who was working in Black gay theater with Assotto Saint. They decided to get together to “do a kind of activism that was not necessarily authorized by the large group.” They were annoyed by what they felt was a slow pace as ACT UP grappled to develop their perspective. They called themselves “MHA,” which actually didn’t stand for anything, but had flexible uses. For example, they used “Metropolitan Health Association” in order to get a meeting with Stephen Joseph, the health commissioner of New York City. At that time, Joseph was talking about various kinds of punitive measures against prostitutes. He had engaged in some “very panic-causing kinds of rhetoric” about the threat that people with AIDS, for whom he was considering internment and other repressive measures, caused to the general public, particularly around tuberculosis. MHA showed up. “We said, ‘We’re the Metropolitan Health Association.’ They said, ‘Please come in.’” They were in a large conference room with Stephen Joseph. It quickly became apparent, though, that MHA was not any kind of interborough health consortium. They started asking Joseph about the slow pace in the city’s response to AIDS. When Joseph realized that they were AIDS activists, Gregg and company were arrested and the story appeared in the press. At the next ACT UP meeting, Gregg remembers rising and saying, “Look, you can just do this. You don’t have to go to the large group to get authorization. In fact, it’s better that the large group is not involved with these kinds of actions because they don’t have to be held accountable. So you can just do stuff. ACT UP is just this place we all meet on a weekly basis to talk about strategy and prioritize issues.” He remembered saying over and over again, You can just do this. Just go out and do this. And people were very enthusiastic. This happened at the same time that the concept of affinity groups, which were inherently autonomous from the larger body, was gaining more popularity in ACT UP.”
  • “I remember having this kind of conscious realization that if you stood up and said exactly what you meant and didn’t trail off into some kind of rambling incoherence, which is often the style of many people in meetings, that actually your opinion would be respected or at least heard.”
  • “The Media Committee’s job was to make sure the press covered the action. How do you get the press to pay attention? Ann laid out the fundamental points of doing media for a radical political movement: Well, first of all, you do plan an action that is interesting enough, that you think the press is going to care about it. But you have to woo the press. You have to find a way to get them there. Some of that is about writing a press release that you send to the press that’s interesting enough to make them look at it and say, Oh, I better go cover that—that’s going to be important or interesting or crazy, and will make good pictures and put wild people on television. But we also know that the press doesn’t generally read press releases, so don’t expect to get the press there, just by sending them a press release, because they’re going to throw it in the wastebasket, and you’re just going to have to do it all over again. So you have to call them. And you have to find the right person to speak to. So you have to know how to call a newspaper or television station and say—not ask to speak to a specific person, but say—I’m calling about this, who should I speak to? And let them tell you who to speak to. Then you have to know how to talk to that person, and how to present [the issue]. And you do it first by asking them questions, and saying, What do you know about this? What’s your opinion of such and such? Rather than just throwing something at them. And then, lead them into being interested about this, and say, Well, what you may not know is such and such. Or, We’re doing this, that you might find interesting, and sort of make them think it’s their idea to come do this, rather than haranguing them or lecturing them about—You should be there, and you should be covering this. That will make them sit home, guaranteed. Part of infiltrating the media’s messaging was through simple education, in the hopes of getting our message, and not the state’s, or the corporation’s, across. “The press was so stupid and so lazy, that they would come to every demonstration and ask one question: Why are you here? That was it. And they had no understanding of any issue, and no ability to ask questions about any issue. Ninety-five percent of any news story is what the reporter is saying. The sound bites are a very tiny part of any story. I would tell people, Watch the evening news, and time how much of a story is the reporter’s narration, and how much is the sound bite, and you’ll find that the sound bite is a very small portion of the story. So it’s far less important for you to come up with the right sound bite than it is for you to talk to the reporter before they do the story and educate them, so they will reflect your point of view in their narration.”…“And one of her well-known insights is that you’re not talking to the media, you’re talking through the media.”
  • “Like many women in ACT UP, Anne-Christine came from the reproductive rights movement, which heavily influenced her perspective on AIDS activism. “I actually think it was the closest to the reproductive rights work, because it was the angriest. People in reproductive rights were really angry. I didn’t think the people in the peace movement were as angry at all. I thought that they were sort of morally high ground in the peace movement, but I don’t feel like there was the same direct stake. And I think with AIDS, it was such a direct thing, because people were terrified … Coming out of Haiti, where a lot of people had died and were dying, it felt much more urgent to me. And so it was compelling in that way”
  • “There were two groups of people in ACT UP. There were the groups of people who thought that until they had AIDS, they thought that the government was out there, and working for them. And I went to an affinity group meeting with this guy, I don’t remember his name; and he said it, quite clear. And he was really serious. He said, I can’t believe that my government let me down. I had a good job, I had plenty of money. But when I got sick, the government let me down. I wasn’t getting the services, I got treated like a pariah. Then there was the other group—and it wasn’t only people of color; but there’s another group, I think it’s more of a class thing—who knew that the system stunk, and the system had been letting them down, for years … People with insurance were definitely feeling something different than people going in with Medicaid … There were people that socialized in ACT UP who would never, ever, in a million years, if it wasn’t that situation, even talk to each other on the street. “But I think that’s the thing that held the group together so long, and made it work. Even people you didn’t like in ACT UP, right—you would support them in some way, because you had the same issues … People were dying, it was urgent; a lot of people in the group were dying; and this was it. There was nowhere else to go but ACT UP. And I think some people came to ACT UP or they would have jumped out windows if they didn’t come to ACT UP, because it was also, in a way, some kind of therapy for people coming there. Whether you were rich or poor, that was one of the only places you could talk about your condition, your friend’s condition, whoever you were taking care of. That was the only place to talk about it. And I think that made an alliance that would have never happened anywhere else … And the anger was there. Everybody was pissed. They weren’t getting the services; most people were still treated like pariahs, in the beginning.”
  • “And so César articulates for us that ACT UP and its relationships are, as Matt Brim notes, not just a model of activism but a model of making sense of the problem that activism is trying to address, and the problem that lingers in the lives of individuals, long after the activism creates some kind of positive permanent change. Activism is, consequentially, the process of making sense of one’s experience of the problem that collectively we have transformed. It creates order, demystifies, and allows an understanding of systems that otherwise feel overwhelming and unaddressable.”

Over-rapported

I have thought and referenced a theme from this Foreign Affairs piece on Afghanistan “Why America Can’t Build Allied Armies” quite a bit (highlighting mine):

U.S. military advisers are taught to prioritize their relationships with their counterparts, as “trust and confidence define how well the advisor will be able to influence the foreign security force.”

Many U.S. military advisers come to view interpersonal rapport with partners—once a tool presumed to increase influence and shape partner behavior—as the very goal of advising. When persuasion fails, advisers are instructed to avoid any steps that might jeopardize the relationship.

…The military is aiming to minimize bureaucratic headache and implement the standard operating procedures it can sustain, even if those procedures are untethered from its own theory of victory.

Five years on food stamps

This reflection of my experience on GetCalFresh is dedicated to the memory of Andrew Hyder who taught me a lot about living out and protecting team values every day.

Plus: We are the team; Extreme Programming are the values

We are not the website. From the beginning, there was an opinionated directed emphasis on building healthy team norms and values. These principles and doctrines were from “Extreme Programming Explained”; the values were legible and strongly reinforced by team leadership. All of the things we have created (websites, text messaging, document processing, research) were outputs not artifacts and never the goal. There was a strong emphasis on “And the friends we made along the way.”

Plus: An experience of critical inspiration

This was always an exercise in pattern matching what we were trying to achieve in the benefits space to Bay Area tech ecosystem structures and practices. Early debates of products and services, jobs to be done, design principles, disruption (“making the status quo untenable”), leverage, and the thing itself we were building: a funnel-based, outreach machine that disintermediated the benefits process. It was a practical act of constructive criticism of the tech and tech culture around us that recognized mastery of existing forms before we inevitably depart and transcend them (“shuhari”).

Plus: Incremental growth is a hell of a drug

A growth engine, an “engine that eats barriers”. It demonstrated that a line that went “up and to the right” could itself pay the organizational story tax. While we celebrated partnership wins, there was a focus on growing client outreach unbounded (“permissionless”). As software engineers, we were achieving the Agile principle that working software, in the hands of users, was the primary measure of progress.

58 counties was an incremental goal, that was out of reach but attainable, which made planning and decision making tangible, though not easy. It helped align the team and gave direction to planning out the next steps and necessities.

Delta: Maintain Client Success as the centerpole during growth

I think of “scaling” entailing both size and health. Early on, “Client Success” was the unifying intention of everyone (“close the participation gap”). Everyone was exhorted to use their whole selves to help clients receive benefits. I remember being mindblowingly told “you have their phone number, call them” when I observed clients hit technical or process barriers; I did, again and again. Technology was in the truest sense an extension of our embodied capacity to help.

As time went on the client success function became less of a critical inspiration, and instead came to feel closer to the status quo: handling the overwhelming externalities of the service, rather than the service being the multiplier of our puny human abilities. I feel a responsibility to help balance “we don’t need to help ourselves” with “put on your oxygen mask before helping others”; and “leave a seam” with “a stitch in time saves nine”.

And “success” felt narrowed with a refocusing towards “Systems Change” and the subjectless “Build with”. My desires for lighting escalation paths (“click here to talk to a supervisor; a director; your state representative; the FBI”), and consciousness-raising (“20k people in your county also had their benefits denied this month too”) remain unfulfilled.

Plus: Small teams can do big things

From me starting as the first outside hire, to me rolling off the team, we helped more than 8M people receive $5.3B in benefits. And the team continues on without me: I feel missed, unnecessary, and proud of both. Small, directed (North Star: “close the participation gap”; Mission: “use the principles and practices of the digital age to improve how the government serves the American public and how the public improves government”) teams, can do things together that far exceed the capacity of any one individual, and also outperform teams multiples of their size. It has been an amazing journey.

Bullshit Jobs

Recommended by Rob, and part of a milieu that also included The Real World of Technology and Breaking Stuff at Work with a synthesis along the lines of “technology squeezes the lower-middle manager roles (sergeant/foreman), not the upper managers”. But that’s not what Bullshit Jobs is about.

Apart from the essay, the best part for me was a description of how we haven’t replaced the feudal system, just layered onto it.

It has some critical bits about open source being the fun bits done for free, and the paid job is unsatisfying duct taping it together. Which doesn’t track for my immediate experience (at least not what is blame on open source specifically), but the lines between “analyst/integrator” and “engineer” is real mushy sometimes.

It’s a quick read, and I think is good contemporary cannon (aside: I wonder what Rushkoff is up to?). Besides briefly and self-consciously touching on UBI, it left me with an anxious “Yep!” that maybe didn’t need 350 pages to achieve.

This is a powerful argument for human freedom. Most of us like to talk about freedom in the abstract, even claim that it’s the most important thing for anyone to fight or die for, but we don’t think a lot about what being free or practicing freedom might actually mean. The main point of this book was not to propose concrete policy prescriptions, but to start us thinking and arguing about what a genuine free society might actually be like.

There was quite a bit about feminization of work:

One might say that men will always take for themselves the kind of jobs one can tell stories about afterward, and try to assign women the kind you tell stories during.

And distinctions between Michel Foucault’s power and domination (or Sarah Schulman’s conflict and abuse):

…unlike actual BDSM play, where there’s always a safe-word, when “normal” people fall into the same dynamic, there’s never such an easy way out. “You can’t say ‘orange’ to your boss.” It’s always occurred to me this insight is important and could even become the basis for a theory of social liberation.

OOP the easy way

I came to this book with certain hopes that were left unfulfilled, but I read it in a few hours and enjoyed it.

Fulfilled: cuts to the core that Object Oriented Programming conceptually starts with sending messages to objects, and the internals of how those objects respond (methods, delegation, class hierarchies, etc.) is an implementation detail best deferred/ignored as long as possible. This was something I already agreed with in a sort of stubborn System 2 Thought Process (“no brain, think about it the other way”) when designing code, and it was lovely to have that reinforced as a thing to do.

Unfulfilled: The human ergonomic benefits and how to think about objects in a deeper way than arguing the importance of the left part of the sentence (message sending) over the right (object/language implementation). This hope (for a better mental bicycle than “no brain…” ) came from the introduction:

Because OOP is supposed to be a paradigm, a pattern of thought, and if we want to adopt that paradigm then we have to see how different tools or techniques support, damage, or modify our thoughts.

And the hope was reinforced by enjoyable ripostes like this:

A contributor to this objects-as-data approach seems to have been the attempt to square object-oriented programming with “Software Engineering”, a field of interest launched in 1968 that aimed to bring product design and construction skills to computer scientists by having very clever computer scientists think about what product design and construction might be like and not ask anybody.

Yeah!

An argument that I wanted explored more is that the aligning the way we think about the user-machine interface with the way we think about the programmer-implementation interface is ergonomic (building the muscles, deepening the mental groove):

It means relinquishing the traditional process-centered paradigm with the programmer-machine relationship at the center of the software universe in favor of a product-centered paradigm with the producer-consumer relationship at the center.

And…

Behaviour-Driven Development marries the technical process of Test-Driven Development with the design concept of the ubiquitous language, by encouraging developers to collaborate with the rest of their team on defining statements of desired behaviour in the ubiquitous language and using those to drive the design and implementation of the objects in the solution domain. In that way, the statement of what the Goal Donor needs is also the statement of sufficiency and correctness - i.e. the description of the problem that needs solving is also the description of a working solution. This ends up looking tautological enough not to be surprising.

… The theme running through the above is that sufficiency is sufficient. When an object has been identified as part of the solution to a problem, and contributes to that solution to the extent needed (even if for now that extent is “demonstrate that a solution is viable”), then it is ready to use. There is no need to situate the object in a taxonomy of inherited classes - but if that helps to solve the problem, then by all means do it. There is no need to show that various objects demonstrate a strict subtype relationship and can be used interchangeably, unless solving your problem requires that they be used interchangeably. There is no need for an object to make its data available to the rest of the program, unless the problem can be better solved (or cheaper solved, or some other desirable property) by doing so.

… Some amount of planning is always helpful, whether or not the plan turns out to be. The goal at every turn should be to understand how we get to what we now want from what we have now, not to already have that which we will probably want sometime. Maybe the easiest thing to do is to start afresh: so do that.

I agree with a “just get on with it” argument and I’m seeking a deeper practice of metacognition than powering through.

By the end, OOP the easy way argued for the need to start seeing if the true paradigm of OOP is actually any good, and that left me back where I started before the book. I wished it had done that work of “asking anybody” already.

Hopes and wishes aside, it was an enjoyable technical read, mainly because it’s dishy, referring and discarding concepts by their progenitors name. This could be criticized as vagueness if one is not invested in learning the personalities involved (for example, a concept is breezily described as “Meyer-ish”), and that kept me moving forward.

Software models

Stickynote drawing of a chart in which understanding of the business domain grows, and understanding of the modeling in code sinuisoidally approaches and departs from it.

Software design has been in my thoughts lately. Particularly agile software design, in which the game is to re-design working software in response to changing business requirements in response to learnings from working software.

1. I was recently talking to a colleague about what I call “Strict” Technical Debt, which is how Ward Cunningham originally defined it (not YAGNI or Skimping according to Ron Jeffries). Dave Rupert pulls out the following quote from Ward Cunningham, as “Technical Debt as a lack of understanding”:

“If you develop a program for a long period of time by only adding features but never reorganizing it to reflect your understanding of those features, then eventually that program simply does not contain any understanding and all efforts to work on it take longer and longer.”

2. This sentence from SICPER’s “Aphorism Considered Harmful” about the phrase “Make it work, make it right, make it fast”:

So actually it looks like I had the wrong idea all this time: you don’t somehow make working software then correct software then fast software, you make working software and some inputs into that are the abstractions in the interfaces you design and the performance they permit in use.

Or as I interpret it: make it functional, then make the software design be an appropriate representation and model of the business/problem domain, and then make it appropriate/ergonomic for future developers to use or maintain.

3. I left this comment on Jason Swett’s “Why I don’t buy “duplication is cheaper than the wrong abstraction”:

…The statement I use is “code duplication is better than the wrong business abstraction”.

A lot of these statements/concepts come out of Agile, Object-Oriented Programming, and Extreme Programming recognize that there are two things evolving unevenly: the understanding of the business domain, and then laggingly, the development of the code that models the understanding of the business domain.

A better expansion here as I understand the concept would be “duplication of code is acceptable if the proposed extraction/abstraction does not meaningfully model the current understanding of the business domain”.

The power of the statement, as I use it (and as I see these things go from Agile/OOPS/XP) is to push someone to get closer to the business domain (and the user) in their thinking/proposals/justifications and as a counterweight to DRY. The problem with these things is when they get imposed as a criticism, rather than the starting place of a conversation.

I think you give solid advice:

Don’t try to make one thing act like two things. Instead, separate it into two things. If you feel reluctant to modify someone else’s code, ask why that is.

It asks you to be interactive

From the introduction to Sarah Schulman’s Conflict Is Not Abuse: Overstating Harm, Community Responsibility, and the Duty of Repair:

Nan Alamilla Boyd helped me to understand that my lack of academic training makes me literally “undisciplined.” This news was very freeing, and a gift I wish I had been handed decades before. I now am able to ask you to read this book the way you would watch a play: not to emerge saying, “The play is right!” but rather to observe that the play reveals human nuance, contradiction, limitation, joy, connection, and the tragedy of separation. That the playwright’s own humanity is also an example of these unavoidable flaws. These chapters are not homogenous. As a creative writer I have long understood that form should be an organic expression of the feelings at the core of the piece. Each chapter here serves a different function and that is represented in its tone, genre, style, and form. Some are journalistic, some analytical, some are speculative, others abstract, some are only feelings. As a novelist, I know that it is the cumulative juxtaposition that reveals the story. This is not a book to be agreed with, an exhibition of evidence or display of proof. It is instead designed for engaged and dynamic interactive collective thinking where some ideas will resonate, others will be rejected, and still others will provoke the readers to produce new knowledge themselves. Like authentic, conscious relationships, truly progressive communities, responsible citizenship, and real friendship, and like the peace-making that all these require, it asks you to be interactive.

And:

“Differentiating between Power Struggle and Power Over,” Hodes explained, “is the difference between Conflict and Abuse.” Abuse is Power Over and Conflict is Power Struggle.

[…]

What we have instead is a devolved definition of personal responsibility, which constructs avoidance as a right regardless of the harm it does to others. This negative standard persuades some people to feel that being uncomfortable signals that they are being Abused, because they don’t have the option of describing themselves as Conflicted. So asking a distressed person if they are unsafe, or rather, uncomfortable, angry, or hurt provides them with an alternative idea that might fit better with their actual experience. It not only elicits helpful information, but encourages the individual to start to think about themselves in a more adult, complex, and responsible manner.

[…]

Lesson: never, ever decide that you know who someone is, what they did, their objective, context or goal, how they feel or what they know, until you ask them. And not asking means a direct investment in not understanding the truth.

And:

“Mainstream Domestic Violence advocacy,” Hodes said in a correspondence later that year, “is committed to assuming that the victim is telling the truth, and any exploration around that trope is met with heavy resistance. Historically, that makes sense for a host of reasons. But this analysis is not about disbelieving, it’s about pinpointing where the problem lies.” One of Hodes’ many valuable suggestions is to lower the bar for what must happen in a person’s life for their suffering to be acknowledged. “The current paradigm is encouraging all of us to think we are in abusive relationships,” Hodes explained. “And if you are not in an abusive relationship, you don’t deserve help. Being ‘abused’ is what makes you ‘eligible.’ But everyone deserves help when they reach out for it.” This is a strikingly humane idea: that the collapse of Conflict and Abuse is partly the result of a punitive standard in which people are made desperate, yet ineligible, for compassion. This is a non-cynical reading of a human condition in which people who have suffered in the past, or find themselves implicated in situations in which they are afraid to be accountable, fear that within their group acknowledging some responsibility will mean being denied their need to be heard and cared for. So they fall back on the accusation of Abuse to guarantee that they will not be questioned in a way that confirms these fears.

TIL: ActiveRecord transactions roll back on Ruby Thread abort

I learned that ActiveRecord would roll back transactions when inside an aborted thread. It’s implemented right here, in ActiveRecord’s connection_adapters/abstract/transaction.rb:

def within_new_transaction
  # ...
ensure
  # ...
  elsif Thread.current.status == "aborting" || (!completed && transaction.written)
    # The transaction is still open but the block returned earlier.
    #
    # The block could return early because of a timeout or because the thread is aborting,
    # so we are rolling back to make sure the timeout didn't caused the transaction to be
    # committed incompletely.
    rollback_transaction
  # ...
end

How did I end up here? I recently implemented a feature in GoodJob to track active processes in the database using ActiveRecord. These database queries occur in a background thread where I also use the same database connection for GoodJob’s Postgres LISTENing. It looks something like this (pseudocode):

Concurrent::Future.execute do
  process = Process.create
  loop { listen_for_notify }
ensure
  process&.destroy!
end

While working on one of my Rails projects that use GoodJob (https://dayoftheshirt.com), I noticed that Process records were not cleaned up as I expected running when GoodJob async inside of Rails Server/Puma locally and exiting. Inspecting the logs, I saw this:

TRANSACTION (0.1ms)  BEGIN
GoodJob::Process Destroy (0.3ms)  DELETE FROM "good_job_processes" WHERE "good_job_processes"."id" = $1  [["id", "320de861-4c84-4f8c-ba3e-2e08a8ef0469"]]
TRANSACTION (0.1ms)  ROLLBACK

Huh. I did some Googling and found some references to rollback behavior, and asked in the Rails Link Slack, but nobody knew. This caused me to dig in ActiveRecord, where I found the behavior implemented.

I was still confused because I had never seen this behavior in GoodJob when building out the feature. But after much head-scratching, I realized that I hadn’t followed GoodJob’s README instructions for integrating with Puma, which ensures that GoodJob is gracefully shutdown before Ruby aborts threads at exit:

# config/puma.rb

on_worker_shutdown do
  GoodJob.shutdown
end

MAIN_PID = Process.pid
at_exit do
  GoodJob.shutdown if Process.pid == MAIN_PID
end

Mystery solved.


Newer posts Older posts