Saturday, August 22, 2009

Giving up a year of my life

To save the rest of it.

That's what the doctor told me I have to do to cure this cancer.

I have a daughter that will need me in her life, so that is the plan.

I spent the past week at Sloan. Taking tests. Speaking with doctors.

And crying... a lot of crying.

It is a surreal experience. Trying to understand the complicated schedules and make sense of how my family can manage life without mom.

And not just without mom. Life with a cancer patient.

I'll be treated as an outpatient at Sloan on a clinical trial.

My treatments with be 3 week cycles of chemotherapy for about a year. Typically the cycles are 2 weeks of treatment and 1 week of rest. During my week of rest, I will have to go in for tests.

When I have radiation, it will be 6 weeks with no break. This does not change the chemo schedule.

Some treatments are an hour. Some are ten.

I live about 1.5 hours away from Sloan with no traffic.

So every day is 3 hours longer, just for driving. Probably a little more.

3 hours of being stuck in the car and potentially very ill.

My initial reaction was defeatism.

My next reaction was complete and total fear.

I have a daughter and husband who need me. Who love me.

I am determined to make this work.

I will stay in a hotel on the long days.

I will coordinate a schedule of driving with my family and friends. I hope to have enough people to call when I cannot make it to the city and someone will help.

In the event that falls through, I will use a car service. The sustainability of this option is low for its cost and the emotional drain of being alone. I hope it is a rare thing.

I will sleep in my own bed. I will get to see my daughter and husband everyday.

I will remain positive and strong.

This year of my life. The year I had cancer. The year before I was a cancer survivor starts now.

Monday, August 17, 2009

Talk about rare

The morning has been hectic. First, I went to the ENT who did my surgery (and found my lovely growth) to remove the packing in my nose -- 6 feet of guaze!! I feel about 100x better!

My husband, Matt, and I went to breakfast and mid coffee found out I have embryonal rhabdomyosarcoma. A rare childhood cancer. Weird, right?

Living in New York, I am lucky to be close to Sloan Kettering hospital and thankfully they have an oncologist who specializes in this cancer. He happens to be a pediatric oncologist but I'm a little woman, so I should feel at home with the kid size chairs :P

Matt is dropping off the pathology today, and hopefully by my appointment on Wednesday we'll have a plan of action.

Saturday, August 15, 2009

wunda's world upsidedown

The last few months I've been battling sinus problems.

First guess was an infection, but the antibiotics did not help. My dr thought I needed a longer rx, but since we weren't sure it was infection, I opted to wait and see. Allergies were also a possibility.

Some days, I felt broken -- though I figured running after Kaylee and getting little sleep were to blame.

I went to an ear, nose and throat dr last Tuesday.

He took one look into my nose and his reaction was distressing. I don't remember exactly, but once you hear cancer, you don't hear much else.

He said the chances were small, but we should do testing quickly, to alleviate any fear.

That day I had a CT scan. That afternoon he called and brought my husband and I back to the office.

The results were easy enough to see -- the sinus cavities on my left side were filled. He said it looked a lot like an antrochoanal polyp (one side and really big). It could also be a fungal infection... and of course the possibility of cancer was looming in the room.

One thing was definite. It was big and needed to be removed.

Surgery was scheduled for Friday. He would do a biopsy and then depending on the result, stop or remove the benign tissue.

As soon as I woke up from surgery, I asked the time -- one surgery would be longer than the other... It was less than two hours. My mom and husband were by the bed and someone told me it was malignant.

Although my first reaction was "are you sure?" I was calm. The fear of what could be was replaced with reality. Cancer. I was not surprised. I had all week to prepare. I'm sure the drugs from the anesthesia helped me stay calm.

I've known many who have battled cancer.

I lost my father, my husbands aunt, my uncles wife, my grandfather, my sister's mother in law.

I know survivors too -- two uncles, my aunt, a few friends, parents of friends.

What are the chances I would be added to the list? When I was a little girl, I was a bit of a hypochondriac. I was always worried I had cancer. As I got older, my fears subsided.

When I went to the doctor last Tuesday, the last thing on my mind was cancer. I had just given birth and nurse my baby? How could a diseased body support such miracles?

I will know more about a diagnosis on Monday. The weekend is going slow.

I am nursing my daughter as much as I can. The idea of early weaning is heartbreaking. I fear she will grow up without a mother. I am thankful she is only 1 as she will not remember. She may not remember me. I hope I can live on in her through the bonding relationship we've created and the stories and memories people around her hold close.

And of course, I am not calling it quits -- I don't even have a diagnosis, or 2nd opinion. My strategy is the same I used to run a marathon. If I felt tired, in pain or I couldn't go on, I would ask myself, "can you finish the next mile? just up to that next tree? will you be disappointed if you stopped because you know you had it in you to keep going?"

As long as there is a chance (even a fools hope) and I can make it to the next tree, I will. I will come through this a survivor, regardless of my mortality.

I am scared. Writing is an easier form of communication. I say the word cancer with tears in my eyes and a closed throat. I write it with ease. I am thankful for this outlet.

Friday, August 7, 2009

Ensure test coverage when refactoring to mocks

Using real dependencies in your tests will lead to pain. A lot of pain.

Most likely, your test fixtures lack coverage, test the wrong class, be difficult to read and don't do what they say.

Eventually, your team will decide to abandon testing or introduce mocking/stubbing.

Refactoring your existing tests will be a major endeavor.

It will be tedious and repetitive.

You will feel like you are wasting time.

You will have a strong urge to rush.

To help you out, I've outlined the steps needed to refactor a test to mocks. I've noted steps that are easy to skip (yet still important) with *

1. Make a copy of the TestFixture -- call it TestFixtureNameWithMocks -- this will ensure you do not lose test coverage and can commit often.

2. Comment out all tests

3. Delete the setup code

4. Take a moment to read the first test
  • Does this test actually test anything? (if not, figure out what it should be testing and get it working right in the original fixture first!)*
  • Does it verify state of the CUT?
  • Does it verify state of a dependent (or dependent of dependent of dependent...)?
  • Does it do more than one verification?
6. If there is more than one verification, determine how many tests you actually need.

7. If your test relied on the state of a dependent, verify that behavior is tested in the correct test fixture (i.e. the dependent's!). If not, you need one, use this test as an example. Create a failing test now, before you forget. If you have a rabbit hole of dependents, make a test for the top dependent.*

8. If needed, break out the test into multiple verifications -- select one to do, comment the rest.

9. Uncomment test and rewrite using mocks/stub. You will find that some tests are quite different. Some similar. Some will require refactoring of the CUT or dependents to make mock friendly.

10. Run the test and verify it passes. If it does not, figure out what preconditions are missing -- check the CUT and old test. Keep doing this till it passes.

10. Comment out code that is being tested.*

11. Run test, verify it fails for the right reason. If it does not, check the test and verify your assumptions. Make it fail for the right reason!*

12. Uncomment code, verify it passes. If you didn't change code in 11, you can skip this step -- I am paranoid and usually do it anyway :)

13. Repeat for every test in the fixture (and any new tests you find). Pull out common setup if needed. Rename tests since the original names will most likely need it :P

14. Remove old test fixture and rename new one.

If you made it this far imagine how long rewriting one test takes. In the best case you still need to run each test at least 2 times.

Now imagine doing this for more than one class.

How about for how many tests exist by the time our tests are painful enough to require this change.

If done right, this will take a lot of time. If we do it wrong, we take great risks and have tests that give us a false sense of security.

Clearly, if we want to continue delivering end user value, we cannot do this all at once.

Here is one way to do this:
1. Whenever a test is updated (bug fix, enhancement, refactor), update the test fixture to use mocks.
2. Have a policy where it is ok to have 2 fixtures for 1 CUT (one with mocks and one without) to encourage people to start using mocks w/o the overhead/context switch of a big refactor. Stress that finishing the refactor takes precedence over starting new work.
3. Let everyone on the team know that it is expected to take time and include that in commitments and estimations.
4. Remain disciplined

Good luck!!