Silver bullets

silverbullet

In folklore, a bullet cast from silver is often the only weapon that is effective against a werewolf, witch, or other monsters.

https://en.wikipedia.org/wiki/Silver_bullet

I’m not sure how many of us in tech are hunting werewolves, witches, or monsters, but there are A LOT of us looking for silver bullets. Take one look around at the world of software development and operations today and it’s baffling. A perfect example of what I’m talking about can be found in this CircleCI blog post, which sounds like nonsense but actually sums up the current state of software development and operations quite nicely. Maybe we’re not looking for silver bullets. Maybe we’re looking for the gold bullet, then the platinum bullet, then we move onto missiles, bombs, etc. It never ends.

I’m not talking about the evolution of technology as a whole. We have a desire to always learn and progress. What we have in software development and operations today is a hyper spin cycle of the next shiny object. Very little of it gets mature enough before it’s thrown out in favor of the new-new silver bullet. Unlike the last silver bullet, this one will kill werewolves AND witches. If you’re a software engineer caught up in this never ending hype you can find yourself using all the latest and hottest tech with so much complexity it will melt the minds of mere mortals. This happens rather easily because the hottest tech often comes from companies like Google, Facebook, Netflix, etc. who are solving extremely large and complex problems. They are generously (and often strategically) open sourcing a lot of that work, which turns into the hottest tech of the month club. But most of us are not solving problems at that scale. When we take their tech and apply it to our problem we can easily find ourselves with a lot of moving parts when only a few would likely suffice for our problems. Multiply this problem by the output of the firehose of “innovation” happening. I put innovation in quotes because what comes to us in the guise of innovation is often a company’s hope to ever so slightly improve upon a good enough solution and take away market share in the process. Even when there is legit innovation, the benefits of adopting a brand new stack or even layer in the stack are questionable when weighed against building upon a solid foundation.

Again, to get the best grasp of what I’m referring to, read the CircleCI blog post. It’s short, funny, and maddening all at once. We need to stop the never ending pursuit of the silver bullet and figure out a more sustainable way to build great services people find value in. Otherwise, I’m afraid we’re spending too much of our time porting or, worse, figuring out how to port existing stuff that works well onto something that is now deemed “better”.

Chat 🤖s

Fred Wilson has a short post on the state of chat bots. Surprise, surprise – chat bots haven’t taken over the world. One of the main culprits? Artificial intelligence (AI) and natural language processing are not there yet. I’m happy to see these posts that combat much of the hype surrounding chat bots and take a more realistic look at where we’re at and where we might be headed.

I do think chat bots will continue to see growth, both in the number of people using them and in the capabilities of the bots and platforms that host them. With so many people using text messages (in whatever their choice of messaging service is), it makes sense that a lot of interactions should happen within the messaging/chat context. I’m mostly impressed with bots targeting teams/groups at this point, but I might be biased. Bots make a lot of sense in that setting because they can quickly help everyone in the group. A simple example would be the group lunch. Getting agreement on when and where to eat can take a miracle. There are bots to help simplify that process. Again, a simple example, but there are many more out there where teams are more productive due to having information and the ability to take action on something within the flow of a chat. Little to none of this requires AI or natural language processing. Those technologies are getting a lot of attention and investment. It’s only a matter of time before chat bots make use of them in a way that makes sense.

Are chat bots THE NEXT BIG THING? Probably not. They’re a nice step in making chat smarter and better. I think they’ll grow in importance for some use cases and shrink for others. As Fred pointed out in his post, it’s (already) past the hype cycle for chat bots and into the figuring it out phase.

DynamoDB and Botkit

emojination_64I recently built (on top of the Botkit framework) and launched a Slack chat based game, emojination. I started out running emojination on Heroku. It was cheap and fast to get up and running there. Heroku does some really nice things for developers that shields the complexity of Amazon’s AWS. However, once I had emojination running well enough on Heroku, I wanted to learn AWS better. I knew about some of the services at a high level and used some of them on projects operationally, but I had never built anything on top of them myself.

I could run everything on “native” Amazon AWS services except Redis, which I was using for Botkit’s storage. While Amazon has a Redis based service, it is meant for caching. I could run Redis on EC2, either running the setup myself or using a 3rd party that makes it simpler to setup and maintain. While those options were reasonable, I wanted to see if I could make use of Amazon’s DynamoDB, since it’s a perfect match for the job (a key/value store), doesn’t require ops overhead on my part, and comes with some AWS free tier incentives. Yep, lock me up in the trunk and throw away the key.

The only problem was that there wasn’t a Botkit storage module for DynamoDB. There was one for Redis, MongoDB, Firebase, etc. but no DynamoDB. Seeing as I have near zero Node.js skils, I thought, “how hard can it be to create the DynamoDB Botkit storage module?” Not too hard, as it turns out, except for the part where I need to still figure out how to get the tests passing where promises are involved. The bulk of my time was spent figuring out how DynamoDB worked and what the options were in regards to npm DynamoDB modules. I ended up using the Dynasty module, which has a nice promise based approach. I found a few surprises along the way working with DynamoDB, but everything is running smoothly now, with emojination using it for both read and write operations.

The end result is there is now a botkit-storage-dynamodb module available for all who are interested in using DynamoDB with their Botkit based bot. A small contribution that has helped me learn quite a bit in a short period of time. ❤️

One little problem setting up Cloudflare SSL via cPanel for a site

I’m not going to give a full tutorial on how to setup Cloudflare SSL for a web site using cPanel for its hosting management. There are better resources for that. However, I did run into an issue that took me a while to track down and I wanted to capture that here in hopes that it saves someone else some time.

I had everything setup on the Cloudflare side and added the keys to cPanel for my domain but received the following error:

The system did not find the Certificate Authority Bundle that matches this certificate

There was a spot in the cPanel SSL setup page for adding the CA Bundle but my Google searches weren’t returning what I needed. Somewhere along the way I finally ran into my answer, which can be found at this Cloudflare support page. Once I added the Cloudflare root certificate from that support page, my site was enabled to serve up pages via HTTPS.

Note: I setup another domain for SSL via this same setup and didn’t have to enter the Cloudflare root certificate again.

Calling a Slack Web API method from a slash command app

I’m currently trying to build a little Slack app. The (Botkit based) app is a “slash command” that also needs access to the team and user info Slack web API methods.

I ran into a problem where I needed an access token that Botkit stores in its users object store. The issue is that when I need to use the access token to call the Slack web API methods, I need to find that token. I wanted to lookup that access token via the team_id that is passed in through the slash command message, but I couldn’t if the token is in the users object store, with the install user’s ID as the key.

Here is an example of what I had in the Botkit users and teams object stores after a user installed my app:

botkit:store:teams
{"id":"T1DDTABCD","createdBy":"U1DDKABCD","url":"https://someslackteam.slack.com/","name":"slack-team-name"}

botkit:store:users
{"id":"U1DDKABCD","access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c","scopes":["identify","commands"],"team_id":"T1DDTABCD","user":"johndoe"}

When my app gets a message, it doesn’t have access to the install user’s ID, but it does have the team ID. I needed to pass in that “access_token” for the web API calls like this:

var token = ''; //Need the access token
var options = {
  user: message.user,
  token: token
}

bot.api.users.info(options, function (err, response) {
            var user = response.user;
            var username = user.name;
});

My workaround was to get the access_token from the install user during the install process and store it with the team. This is what that code looks like:

controller.setupWebserver(process.env.PORT, function(err, webserver) {

  controller.createWebhookEndpoints(controller.webserver);

  // Used for app install url/login
  controller.createOauthEndpoints(controller.webserver, function(err, req, res) {
    if (err) {
      res.status(500).send('ERROR: ' + err);
    } else {

      // Need to store the user access_token with the team for easy access later
      var teamID = req.identity.team_id;
      var userID = req.identity.user_id;
      controller.storage.users.get(userID, function(err, user) {
          var token = user.access_token;
          if (err) {
              console.error('users get err: ' + err);
          }
          controller.storage.teams.get(teamID, function (err, team) {
              if (err) {
                  console.error('teams get error: ' + err);
              }
              team.access_token = token;
              controller.storage.teams.save(team, function(err) {
                  if (err) {
                      console.error('teams save err: ' + err);
                  }
              });
          });
      });
      res.send(templates.appInstallSuccess);
    }
  });
});

That happens once during install and adds the access token to the teams record:

botkit:store:teams
{"id":"T1DDTABCD","createdBy":"U1DDKABCD","url":"https://someslackteam.slack.com/","name":"slack-team-name", "access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c"}

botkit:store:users
{"id":"U1DDKABCD","access_token":"xoxp-49999999999-49999999999-59999999999-7e05d2266c","scopes":["identify","commands"],"team_id":"T1DDTABCD","user":"johndoe"}

I could then call the Slack web API like this:

controller.storage.teams.get(message.team_id, function(err, team) {
        var token = team.access_token;
        var options = {
            user: message.user,
            token: token
        }
        // Call users.info Slack web API to look up user info
        bot.api.users.info(options, function (err, response) {
            var user = response.user;
            var username = user.name;
});

Notice I’m calling the teams storage and passing in the message.team_id to look up the team for the user who submitted the command.

The one thing I was never told

 
During the last 2+ years, since being hit by a driver of an SUV while I was riding my bicycle, I was advised on a lot of things – a lot of important things. There was lots of medical and dental advice, and I’m thankful for it. There was quite a bit of legal advice, and I’m thankful for that too. But there was some advice I never received: You need to account for the mental and emotional toll.

I spent so much of my time focused on the “next step” in my recovery that I neglected the mental and emotional side of the equation. I felt “OK” – or so I thought. All attention was paid to the physical and legal components of recovery, and meanwhile, I was pushing forward on near empty without realizing it. I never saw a counselor. I never talked to anyone who asked me questions that would press me a bit beyond, “how’s your body healing?” The doctors I saw never advised me to talk to anyone or to at least be aware of some potential pitfalls beyond the physical. I’m starting to realize that all that trauma, all that stress that comes with recovering from such an event over many months, and all that pressure I put on myself to “get back to normal ASAP” has caught up to me.

I don’t write this to lay blame on anyone. I’m writing this for those who may come across this post as they struggle through their own recovery. Go talk to a counselor. Go talk to someone who will ask questions that friends and family aren’t likely to ask because they don’t even know to ask them. Acknowledge the struggle is beyond what you feel physically, the endless appointments, the non-stop focus on getting back to “normal”. You likely won’t even realize you need to talk to someone, but you do.


I’m capturing my journey towards recovery after being hit by an SUV while riding my bicycle on February 8th, 2014. I’ve learned quite a bit along the way and want to share those lessons. I’m not a doctor, lawyer, or any other sort of expert in this area. Any insights I provide along the way should be taken as my insights to my particular situation. In other words, seek professional counsel if you find yourself in similar circumstances. See more here.

It’s just like riding a bike

 
The most popular (and annoying) question I was asked shortly after being hit by an SUV while riding my bicycle was whether I was going to ride my bike again. My wife was asked that question too – a lot. I think she hated the question more than I did. My response was often made with a sly smile and then something not so clever like, “If you were in a car crash, would you drive again?” I wanted to ride again ASAP. My wife was slightly less enthusiastic. She’s the one who got the call that I had been hit by an SUV. She’s the one who saw me battered and bloodied in the ER. She’s the one who had to deal with picking up the pieces for months afterwards. I didn’t care what anyone else thought about me riding again except my wife. If she really (REALLY) didn’t want me to ride again, I would stop. We talked about it and eventually came to the agreement that I would ride, even though she wasn’t going to ever love the idea. To this day, I text her before every ride, letting her know where I’m riding and about how long I think it’ll take. If she’s away from the house, then I also text her when I get back. If I don’t send those text messages – I’m in trouble – big trouble.

I don’t remember a thing about getting hit. Doctors have told me it’s best that I don’t remember, otherwise I’d likely experience PTSD symptoms of some sort. I didn’t have any fear of riding with traffic. What I did have hesitation about was riding in quieter neighborhoods with lots of side streets entering from my right, similar to the place where I got hit. My first time back on the saddle was Thursday, April 17, 2014 – a commute to and from work. My body didn’t feel too good, but mentally and emotionally it was great to be back out there. I didn’t ride a lot in those early days. My physical therapist said it was fine to ride (he was also a fellow cyclist), but to not over do it. He said being in that riding position was going to be a bit painful for a while. He was right. My neck bothered me the most, but my shoulders and left wrist also didn’t feel too good early on either. I eased back into riding. I was happy to be able to ride at all, especially only a little over two months after being hit.

Continue reading “It’s just like riding a bike”

Let’s get physical

 

I had to wait to start physical therapy until the cast on my left wrist came off. That took a little over six weeks. I needed physical therapy mainly for my wrist, my left (fractured) clavicle, and right separated shoulder. My neck went along for the ride, though it probably gave me the most problems through the year (2014) I got hit. It didn’t feel “normal” until the end of 2014, maybe the start of 2015. Looking back, I should’ve pushed hard on the doctors to do something about my neck. Lesson learned.

Physical therapy (PT) was a pretty foreign concept for me. I remember spending a brief amount of time in high school getting my knees looked at due to tendonitis, but there wasn’t much “physical” there aside from some ultra sound sessions. In total, I did about eight weeks of PT, with each week including three 1.5 hour session days. Each early morning session started the same: heat, ultra sound on my wrist and both shoulders, and then stretches with the physical therapist. From there I would head over to the fitness area of the facility and do the equivalent of riding a bike with my hands. I’d crank away with my arms for ten minutes before starting any exercises. I felt like a real pro.

Continue reading “Let’s get physical”

With (more than) a little help from my friends

I like to think that I’m in control of much more than I am. Getting hit by that SUV while riding my bike and having to recover from that has been a harsh reminder of how little control I have. It’s also been a reminder of how thankful I am to have people in my life who care about and for me. Below are just some of the people who helped me during a great time of need.

My wife has probably suffered through this more than me. She had to see me shortly after I got hit, covered in blood, laying on an hospital ER bed, looking like a zombie. She was the one who drove me to endless doctor and dentist appointments. While most people didn’t see me much for a month after being hit, my wife saw me everyday and did her best to get me anything she could to help me. She had to answer the endless questions about how I was doing, what the status of “our case” was, etc. After a while, it all wears you down. Through it all, my wife, Kelly, was there for me and continues to be there for me, even as I know I wreck her nerves by continuing to ride my bicycle. I love her very much.

The king of hurt
Special thanks to my daughter who gave me the title of “The king of hurt” during the early days of my recovery.

There were numerous people from Zappos who went above and beyond to help me and my family during our time of need. There were Rachel and Susan who took our kids out for the day to have some fun. There were numerous people who provided meals. Others provided cards and other gifts to help cheer me up. A number of people stepped up and filled in to handle my absence at work. There is one person who stands out most of all, Mr. Ken. Yes, Mr. Ken. His name comes after he told some of us a story where he was on vacation and all the hotel staff called him, “Mr. Ken.” The name stuck. Mr. Ken came to the hospital and got the honor of watching me puke blood into a bucket. He visited later on when (honestly), I didn’t feel like seeing anyone, but was really happy to see him. He checked in on me, got my computer for me, kept me in the loop on stuff going on at work. He made sure I knew that if I needed anything, anything at all, he was there for me. Many thanks to Mr. Ken for all his support and help along the way.

Last, but not least, I need to thank those from our church, Spring Meadows Presbyterian, who provided meals, prayer and some practical advice along the way. While I didn’t eat much during that time, my family did and every meal that was provided was one less thing my wife had to deal with.

I had a lot of help along the way. I am truly thankful.


I’m capturing my journey towards recovery after being hit by an SUV while riding my bicycle on February 8th, 2014. I’ve learned quite a bit along the way and want to share those lessons. I’m not a doctor, lawyer, or any other sort of expert in this area. Any insights I provide along the way should be taken as my insights to my particular situation. In other words, seek professional counsel if you find yourself in similar circumstances. See more here.