Friday, August 26, 2016

Another Bittersweet Goodbye

About two years ago we first said goodbye to our first foster placement, a delightful baby boy, J. Thanks to the mercy of time passing, our thoughts have turned from grief to hopefulness. We have no actual knowledge of how he is doing but that’s how it works.

Since then we’ve had many more kiddos come through our home. We do our best each time to give them love in whatever form they need – attention, kindness, patience, nutrition, dental, medical, etc. – and we are genuinely happy to see them reunited with their families.

About a year and a half of the last two years has passed with a pair of toddlers, a boy and girl, A and I. No matter how you measure it this is a long time: birthdays, seasons, holidays. Half their lives. It’s not supposed to, but that's often how it works.

Today we say goodbye.

This goodbye bears no resemblance to the first one I shared. It’s more like all the ones since: mostly sweet, mostly happy, a little sad, and planned. We had no idea what was happening with J two years ago when he was suddenly taken from our home to live with a relative. In the void of knowing what to expect we got too close. In the years since we’ve prepared ourselves for the reality that most of the time these kiddos go home and it doesn’t have to make sense. This personal growth has come through hard-earned experience, and through the council of many wonderful friends who exhibit a love for foster children we admire.

We say goodbye to A and I for what we hope is the last time. I hope their family provides them the home that every child deserves. I hope we don’t see them again because to see them again will mean that trauma has cruelly visited them again.

And while we’ve learned to weather the acute pain of the goodbye, this placement is hard for us in a new way: the pain has been chronic. This has been a long placement. It warms my heart to see how far they’ve come in our care, but the investment in their lives has been taxing for us and our bio kids. It’s been so difficult! And so rewarding! Life is messy; that’s how it works.

Goodbye, A and I.

We’re taking some time off.

(And SO many thanks to the many amazing families that have helped us these past two years with love, support, respite and food. We couldn’t do any of this without you. Thank you.)

Tuesday, March 8, 2016

The term 'Invoke-AzureResourceAction' is not recognized as the name of a cmdlet

In case you are getting this ungoogle-able error when using "Invoke-AzureResourceAction":
Invoke-AzureResourceAction : The term 'Invoke-AzureResourceAction' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
You're might be using some out of date docs. Try "Invoke-AzureRmResourceAction" instead (add the "Rm").

Oh, and if you then get this (because you're automating things):
Invoke-AzureRmResourceAction : Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
Try adding "-Force" to run the command without prompting for interactive confirmation.

Tuesday, March 24, 2015

Fixing "500 : undefined" error in Swashbuckle/Swagger

Suppose you include XML docs to make your Swagger/Swashbuckle docs even better via the option:

  c.IncludeXmlComments(Path.Combine(HttpRuntime.BinDirectory, "Das Docs.xml"));

And things work great locally. But then you publish to a webserver, an Azure Website, etc. and you get an error like this:

  500 : undefined http://your-site:80/swagger/docs/v1

You probably already enabled the generation of the XML documentation file, but did you do it for the Release configuration? Since you're here, probably not. Fix that and you'll be all set.

Thursday, January 15, 2015

They don't make a greeting card for that

Wife and I became licensed foster parents late last year. In early November we took our first placement into care, a three day old baby boy. He is awesome.

He has lived with us as our foster son for the last nine weeks. He is so, so awesome. I talk about him a lot.

Thing 1, Thing 2, and Thing 3 adore him. He is their foster brother.

At 1:45 pm today we learned that he'll be going home to live with a relative tomorrow. Wife cried. I raced home.

We are conflicted. We knew this would likely happen; we were told that 85% of kids go "home." And we're glad for him, his relative, and his birth mother! This is the best thing for him! But we're sad, too.

We're heartbroken. We're experiencing profound loss that most people can't understand.
"He's not your son," people must think. 
We are all he's ever known.
We started packing up his things. I held him. I cried.

We are grieving.


On Sunday Wife and I were on a panel at a foster care and adoption support group. We shared how wonderful it is being foster parents. We nodded unknowingly along with others who shared about the loss they've experienced as kids went home.

We know now. We were warned. We are not ready.


Wife took him to book club so the book club could say goodbye. They've read three books with him in tow. They know him well. They're crying, I'm sure.

Meanwhile I took our other kids to the store to get a card for Wife, for his relative, or for him. I don't know. I wept in the aisle and left empty handed. There's no card for this. He'll be gone, but not gone.


Tomorrow we cannot do. But we will. We will bathe and dress him. We will feed him. We will play and read to him. We will take him to the doctor for a previously scheduled appointment. Then we will pack up his things, his keepsakes, the cards all the Things have made for him, the special pacifier he likes, and give him to his social worker. She will take him to his relative.

We will never see him again. This child that we have held, comforted, and raised as our own will be gone.

And we will cry some more.
"You shouldn't get attached," people must think.
Maybe not. Attachment is best for him, even if it hurts us.
And I hope. I hope we will work through our grief and forget how hard this is right now. I hope I forget how painful it is to type these words as I wipe my face after every sentence. Because then we can do it all over again for the next beautiful child that needs our home, if only for a little while.

Tuesday, July 8, 2014

Make way for a unique key constraint by renaming/updating duplicate rows in SQL Server

If you want to add a unique key constraint or index to a table that might have duplicate records you're in for some fun. You can either delete the duplicates, or fix the data to make them unique.

Suppose you have a table "Widgets", which should be unique on SupplierId and Name, but isn't. This tsql script will update the duplicates by appending a "(1)", "(2)", etc. to the Name, thus satisfying the proposed UKC:
  SupplierId INT NOT NULL, 

INSERT INTO @Widgets (Id, SupplierId, Name)
VALUES (1, 1, 'WidgetA'),
       (2, 2, 'WidgetA'),
       (3, 3, 'WidgetB'),
       (4, 3, 'WidgetB'),
       (5, 3, 'WidgetC'),
       (6, 3, 'WidgetC'),
       (7, 3, 'WidgetC')

SELECT * FROM @Widgets

;WITH cte AS
  FROM @Widgets

UPDATE cte SET Name = Name + ' (' + CONVERT(varchar(10), rno) + ')'
WHERE rno>1

SELECT * FROM @Widgets
You ought to be able to run all that and get these results in SQL Server:

Adapt to your needs :).

Saturday, November 2, 2013

Understanding (That There Exists) An Opposing View

If you are passionate about anything, chances are you’ve found yourself wondering “how in the world could that person believe x about an issue?!”, where x is avoiding semicolons in javascript, using tabs instead of spaces, being pro-gun, anti-cupcake, etc.

I used to find some of those moments very stressful. I’d be sitting there with lots of “evidence” and “research” to support my position, fuming about some idiot who can’t use apostrophes correctly and is frickin’ ridiculous with his/her hyperbole and logical fallacies…and get nowhere.

I finally figured out a little exercise that helps me in those tense situations: I just consider that the other person probably sees me as just as insane as I see him/her. That other person is more or less like me (rational, thoughtful, educated, kind, etc.) but disagrees with me the same way I disagree with him/her. And that’s fine.

“But I’m right!” you say.

Maybe you are. So what? Go tweet about it with loud, emphatic language! What good is that going to do? It makes you look like an ass when you’re right, and an ass when you’re wrong. Save your energy and hope that your noncombativeness will be reciprocated. To quote Dale Carnegie (more from him in a minute), “You can't win an argument. You can't because if you lose it, you lose it; and if you win it, you lose it.”

A baby step on the way to figuring all this out was more or less the development of a coping mechanism. I made a decision to not engage in fruitless debate. I noticed that many arguments I was having on Twitter and Facebook were fruitless…so I just stopped enabling myself to get all worked up over things 140 characters at a time.

Later, I had a realization when a friend help a position I found to be indefensible. As friends often do, we had an easy, dispassionate conversation. Neither of us won over the other person and that wasn’t the goal—we were just friends talking. That is when the real trick I described above sunk in: me and that other dude are similar.

Then this happened again when I was listening to a podcast I’d been listening to for a long time. My views usually line up well with the host’s (I listen for entertainment, not education). But then he passionately, and repeatedly started taking a position I am strongly opposed to. I literally said “Whoa, what?!” to myself the first time I heard it. Then I went though the whole exercise: this crazy smart, well informed guy has an insane position on this issue. Whoa! But that’s ok!

Now, suppose you actually want to change some hearts and minds on an issue. That’s really, really hard, and I’m not going to tackle that here. I can recommend these two books I recently finished, though: Switch and How To Win Friends and Influence People (aka HTWFAIP).

Both titles walk you through the basics of understanding problems, working with people, and affecting change. They use lots of anecdotes, guidelines, and tips.

If you’re not familiar with either, you might be surprised to hear that I found Switch to be more mechanical and duplicitous than HTWFAIP. It seems to focus more on the steps necessary to analyze situations and maneuver others into your line of thinking (or outright manipulate them). It also helpfully provides a framework for approaching and solving problems, and a vocabulary for talking about them. This has been very useful at work—we read it as a group and now refer to it and use its terms all the time.

HTWFAIP on the other hand sounds like it’d be all about subterfuge but is actually entirely genuine. It has a slightly different goal of getting people to like you and it encourages this almost exclusively by teaching you to be a nicer person. Seriously! It offers many tips and admits that they will be effective only if you are sincere.

Relating this back to the post, here’s another Dale Carnegie quote from HTWFAIP about arguments:

“I have come to the conclusion that there is only one way under high heaven to get the best of an argument— and that is to avoid it. Avoid it as you would avoid rattlesnakes and earthquakes.”

Both are good, easy reads, and great for groups. I suggest reading FTWFAIP first, then Switch.

Monday, September 9, 2013

Notify New Relic of Deployments with Chef

You can tell New Relic about your deployments and they’ll add vertical lines to the graphs at the corresponding times. This is super helpful as the (often dramatic) impact of a deployment becomes easy to grok.

The documentation on the Events > Deployments page is very helpful, but I still had to tinker with my message to New Relic’s API to get it to work. Here’s what I ended up with:

At the end of my recipe, post to the API with the http_request resource:

http_request "notify_new_relic" do
  action :post
  url ""
  headers "x-api-key" => "#{node["newrelic"]["apikey"]}"
  message "application_id" => "#{node["newrelic"]["appid"]}"

I’m loading the key and application id from attributes. And it works (this is dev…no traffic there :))!


This was crazy simple to do, though it might be better implemented as a report handler. If you go that route please share.