Mary Dickson Diaz

Code, Life, Learning

the unhappy path


Mount Rainier as seen from Seward Park, 9/9/15

(Heads up: this post deals with a health issue of a personal nature, invoking a metaphor from my experience learning Behavior Driven Development (BDD) testing. I felt it was important to share my experience, not only with friends and family but with others, internet searchers, who might be facing something similar. If that makes you uncomfortable or seems too intimate based on our limited relationship, feel free to give this one a pass.)

In my class we’ve been studying behavior-driven development (BDD), a relative of test-driven development (TDD), which takes an approach of: let’s write tests first that describe how we want our app to behave, and then write the code to make those tests pass.

So for example, here’s a simple test excerpt for the main section of my in-progress portfolio page:

feature "CanAccessStaticPages" do
  scenario "on the index page" do
    visit ""
    page.must_have_content "Mary Dickson Diaz"
    page.wont_have_content "hookers and blow"

You can program your tests to click on things and fill in information to test, say, posting a blog post, or a log-in/log-out function. “Or you could just go click on stuff and see if it’s working” –yes but writing the tests in advance, and keeping them updated, saves immense developer time and energy over time, over changes, and when coding on teams and to scale.

In testing, we start with “the happy path” — Test, we say, go to this location, fill in some information that we expect will be valid, and ensure that what we think the app should do and the user should experience in this situation is what actually happens.

Following that, we test “the unhappy path” — what if someone tries to log in with the wrong password? With an unregistered email? If someone tries to create an account with invalid or duplicate information?  We test to make sure that the app functions as we expect it will in those situations, too.


In a span of less than two weeks I went from learning I was pregnant (and all the mixed emotions surrounding that surprise–a welcome one, but still a surprise) to facing the Worst Case Scenario: an ectopic pregnancy.

From the first doctor’s visit I knew there were Flags: I was having a lot of cramping and spotting, common symptoms in early pregnancy that often resolve themselves but can also be indicators of more serious problems. The blood work would tell more, so I gave the first of many blood draws to come to track my human chorionic gonadotropin (hCG) levels — in a healthy early pregnancy, these double every 48 hours. I also had an ultrasound done, which concluded nothing good or bad. Just nothing to see. I was told that I’d need to keep getting blood drawn and checking in as things could go in three ways at this point: 1. a normal pregnancy, 2. variations on a miscarriage, or 3. an ectopic, or “tubal” pregnancy, where the egg implants itself outside of the uterus– rare, but important to rule out as quickly as possible, due to the possibility of a potentially fatal rupture.

Of these, the third option–that a pregnancy could possibly kill me–had never crossed my mind as we considered growing our family. Having a baby is scary enough, losing a baby is sad: all these emotions seemed like plenty to process without overt concern for my own health.

Over the next week my hCG count went up, but slowly–not doubling–and by the time I saw the doctor again it was evident that we would have to rule out a viable pregnancy this round. He set up an appointment for the next morning with an OB/GYN, and I insisted on going alone for the visit. “You can come to the follow-up,” I told my husband. “I want to establish a doctor/patient relationship first.” This was foolish because he wound up taking a cab out to meet me anyway, after the prognosis was made.

For the first ultrasound, Josh was with me, and we were able to watch everything on the screen. The second time, I am alone, and they don’t let me see the screen. Only later, the technician and the OB/GYN huddled over images on the screen, measuring, conferring together in language I don’t understand, and she tells me finally, turning, resigned, “we think it’s ectopic.”


We test the unhappy path to make sure things work as expected. The doctor tells me that this early, the options are surgery, or we can try a shot of methotrexate to remove the growth, and she recommends the latter as it stands a good chance of success. As the day progresses, multiple people ask me how I’m doing, and I tell them that I feel like I’m in pretty good hands considering that it’s the Worst Case Scenario. This is the unhappy path passing tests.

I’m not out of the woods yet, and I’m sad, but not as sad as I might be if I had been pregnant without complication long enough to more fully establish the idea of Our Baby. I’m grateful to the team of doctors and caregivers at Swedish Medical Center who took care of me and Josh every step of the way with transparency, empathy, and professionalism. I called five different insurance-approved medical centers the day I took a positive pregnancy test, and of those to whom I requested an appointment ASAP for positive pregnancy test plus cramps and bleeding, one turned me away completely, three offered to schedule me an appointment in 4-6 weeks, and only Swedish responded: “Let’s get you in right away. Can you come today?”

What else to say?

The day we got the third set of hCG results, the ones that showed with no uncertainty that this was not going to be a viable pregnancy, the sun was shining and the mountain was out. I asked Josh if we could go down to Seward Park to take in the view and some fresh air. To get to the path, you walk through a playground filled with kids and parents at play. Josh gave me a pained look as we passed by, and I laughed, asking “whose lousy idea was this.” We sat on a bench and annoyed some geese and laughed and cried together in the sunlight.


It’s not the first pregnancy we had hoped for, but I’m grateful that we have each other and that this is only the beginning of our journey.


  1. I’m very sorry for your loss. I’m so glad you were able to find a medical provider to take your concerns seriously. Many good thoughts being sent for both of you!

  2. Oh, Mary. So sorry you had to go through this. You tell your sad story in a beautiful way. Thanks for sharing and hugs to you.


Leave a Reply

© 2023 Mary Dickson Diaz

Theme by Anders NorenUp ↑