Grace

One of our family cars slid on a wet curvy road and took out someone’s brick mailbox. (Everyone is fine. No one was hurt.)

Talking with the affected homeowner, she said that was about the 8th time that someone had had some kind of wreck in her yard. I know she had to be thinking “Are you kidding me? Again?”

But what she did was offer a hug and say “I’m so glad that you are not hurt.”

She’s probably facing a couple of weeks of hassle to fix something that wasn’t her fault, but I was blown away by the grace she offered us. I would love to think that I would be as graceful as she was to us if the roles are reversed, but I’m not at all confident that would be the case.

At a moment when she had every right to yell and complain, she made a bad night a little better than it could have been by being human. It was really humbling and inspiring.

Grace is a really wonderful thing, if you can manage it. I hope to be able to pay it forward.

Authentication vs. Authorization

These aren’t just “10 dollar words” that both start with the letter “A”. If you have an application, you need to understand the difference between these two things.

Let me try to explain this way. Not too far from where I live is a semi-famous (infamous?) bar called the Flora-Bama, so named because it’s on the state line between Florida and Alabama. For purposes of this, imagine that the drinking age in Florida is 18 (it’s not) and that the drinking age in Alabama is 21 (it is). (The Flora-Bama is pretty big and I think there are bars on both sides of the state line. Let’s assume that’s true.) In this scenario, if you’re 19 – you can buy a beer from the bar on the Florida side, but not from one on the Alabama side.

Imagine the doorman out front is checking IDs and putting wristbands on everyone – yellow if you’re 18-20 and green if you’re 21+. That’s authentication. He checked your ID and identified you but didn’t make any decisions about what you could and couldn’t do.

If a yellow-banded 20 year old walks up to an Alabama-side bar, the bartender there will refuse to serve the patron based on the color of the wrist band. This is authorization. The bartender doesn’t check the ID again, but just makes an authorization decision based on the previous authentication.

You can (and in many cases probably should) outsource your application’s authentication function. When you see sites let you “Login with Google” or “Login with Facebook”, that’s what’s happening. They are letting Google or Facebook handle the authentication, but the actual site still has to decide what the user is permitted to do.

The simplest ramification of “outsourcing authentication” is – one less password for your site’s users to remember. More importantly, if you aren’t storing passwords – they can’t be stolen if your data is breached. Of course, you’ll need to decide if all of your users are likely to have a Google or Facebook account (or whatever service you choose to trust to authenticate).

Comfort Zones

A few days ago, I was walking into the downtown Chick-fil-A close to where I work. Outside was a man in a wheelchair. At first, I thought he was a panhandler, but then I realized he had a sign hanging on his wheelchair with a web address. This caught my attention.

His name is Donnie. Turns out – he has cerebral palsy and sells candy to support himself. (This is his web address if you want to find out more about him. If you’re so inclined, consider supporting him.) I was very inspired by his story.

As I was thinking about his story and how he probably got started selling candy, one of the things I was struck by was “he doesn’t really get to have a comfort zone”.

It made me realize what a luxury having a comfort zone is. A luxury is something that’s nice to have, but that you don’t need. I wonder what we all (especially I) could accomplish if we realized that we don’t have to stay in our comfort zones.

WordPress plugin for Google Analytics

I’ve used WordPress for years. Everytime I’ve gone looking for a plugin to include the tracking code for Google Analytics, what I found was overkill so I wrote my own.

It adds one field to the General Settings screen to let you enter your Google Analytics Tracking ID. That’s all there is to it.

You can download it from https://wordpress.org/plugins/technicality-google-analytics/ .

Pronouns

I’ve noticed that frequently when communication is unclear, the problem is pronouns. More specifically, the pronoun not having a clear antecedent.

“It’s not letting me …”

I work in technology and many times, clients and end users don’t know the correct name to call something, so I hear a lot of “it” used to describe something without it being clear what “it” refers to.

I understand not knowing the correct names of things. When I take my car to the mechanic, the shoe is on the other foot. I try to make up a term (“the curvy thing”). Even if it’s not the technical name, that’s a better antecedent than just saying “it” without context of what you’re referring to. Frequently, there have been several things mentioned earlier in the discussion and “it” isn’t clear enough.

Adventures in phone number porting

We were recently helping a client port some numbers from a traditional telecom carrier (Spectrum) to a VOIP carrier. The scheduled time for the transition came and the PBX was configured to receive calls from the new VOIP trunk. We tested calling the phone numbers and they showed up in the PBX as expected, so all seemed OK.

A few days later, the client (a medical imaging center) called and said “a referring physican is trying to fax something to us and they’re saying that our number is out of service. I called the number and got fax tones so I assumed the doctor’s office just made a mistake.

But – this kept happening. After days of troubleshooting (the client is successfully receiving faxes from other senders all during this time), I was finally able to reproduce the problem calling from one particular phone line. It finally occurred to me that the line I was calling from was a Spectrum line and we had just ported the number away from Spectrum. We checked with the location that was having trouble faxing our client, and – sure enough, they had Spectrum phone lines as well.

Apparently when Spectrum ported the number out, it worked for the rest of the world but if you were originating a call inside the Spectrum voice network – some configuration hadn’t been changed so from that point of view – it thought this was still an “internal” (to the Spectrum network) call but there was no active line there. Hence – the “this number is out of service” recording.

It took a couple of weeks of working with different people at Spectrum to get this corrected, but they finally did. This definitely falls in the Murphy’s Law category (“whatever can go wrong, will go wrong”). I didn’t even know this was a thing that could wrong.

Posted in IT

AWS Load Balancers and HTTPS

I was helping a client with his web server that is hosted in AWS (Amazon Web Services) EC2. He had gotten a certificate to enable HTTPS but it wasn’t working.

AWS offers free certificates, but you can’t install them into the EC2 web server. In this case, he had set up a load balancer in front of the web server and the Certificate Manager certificate was set up there. This means that when the end user browses to this website, the browser is really talking to the load balancer and load balancer is talking to the web server and passing information back and forth.

I made some assumptions about how he had set up the load balancer forwarding so it took me awhile to get my arms around what was going on. I was configuring the Apache web server to do redirects in the .htaccess file. He wanted to force browsers to use HTTPS and wanted to make “www” his “authoritative URL”, meaning if someone typed “domain.com” into their browser, it would redirect them to “www.domain.com”. (This is a good idea for SEO. Google doesn’t assume/realize that domain.com and www.domain.com are the same website.)

http://domain.com was redirecting perfectly to https://www.domain.com, but http://www.domain.com was not redirecting to https://www.domain.com. I finally realized that the load balancer forwarder was configured via HTTPS and incoming HTTP and HTTPS traffic was forwarding to the webserver over HTTPS, but the load balancer was communicating back to the browser on whatever protocol they came in on. I set up the load balancer to communicate with web server using HTTP and then the redirects flowed properly back to the browser.

It’s easier to configure the load balancer to communicate with the web server using HTTP and just handle the encryption in front of the load balancer.

Posted in IT

Hosted PBXs require fine-tuned firewalls

I’ve been working with a client who has moved to a cloud based VOIP PBX server. In general, I’m a fan of this (and just about anything “cloud”) – but, there are a lot of firewall configurations that need to be just right to make this work well.

This is particularly true if you only have a single server at the hosting data center. Multiple phones at your physical location talking to a server on the other side of your Internet connection is tricky.

A better configuration involves a secure VPN connection between your physical location and your hosting provider. If they’re offering is a single server, they may not be set up to do this. Take a look at setting up a small network inside Amazon Web Services (AWS), Microsoft Azure, or Google Cloud. You should be able to setup a VPN between your physical location and any of these. Once that’s done, from your PBX and phones’ point of view – they are communicating on the same network which is much more straightforward.

Explaining NAT (Network Address Translation) is beyond the scope of this article, but that’s the complicating difference that the VPN eliminates.

Posted in IT

.Net/Web development challenges with Time Zones (Part 2)

This situation is completely obvious to me in hindsight, but I have to confess – I never thought about this until a couple of weeks ago.

As I talked in about in Part I, cloud computing increases the likelihood that servers are in different time zones than users. It seems like the simple solution to this is to store date/time values in UTC (what we used to call Greenwich Mean Time, or GMT).

If the server’s time zone is set to UTC, this works pretty well. If you send date/time data to the browser in JSON, Javascript running in the user’s browser will adjust it to the local time zone for you. (If you’re sending the date/time value in HTML text, you have to do this yourself.)

The other day I was debugging an application from my development computer, where the time zone is not set to UTC. (I live in Central time zone.) Time values that I had saved to the database in UTC were not being displayed in the browser correctly.

It finally dawned on me that even though I used C#’s DateTime.UtcNow to generate the time originally, the datetime value stored in the database had no concept of which time zone it was in and that when my computer read the value from the database – it assumed that the datetime value was in my computer’s time zone (Central) as opposed to UTC.

In C#, the solution to this problem involves the DateTime.Kind property. I’ll confess – I had never heard of this or used it. By using the SetKind method, you can tell the system whether or not a DateTime is in local time zone or in UTC. Once I started using this, the time values on the browser began displaying correctly.

I’ve been programming a long time and this issue had never occurred to me. Hopefully it has occurred to you, but I’m betting there are at least a few people who read this who are in the same boat as me. Whether or not you’re using C#, this concept (what time zone at DateTime value is stated in) needs to be addressed in an application where servers and browsers are in separate time zones.

Reaction to Transparency

I caught myself having (what I thought was) an interesting reaction to some online posts recently. I’m telling the story here because I think there might be a little insight into human reaction.

Someone (I don’t remember who) posted a book recommendation on Twitter a few days ago. Apparently by the time I saw the post, it had “gone viral”. The author subsequently posted something along the lines of “If I would have known what kind of reaction that was going to get, I would have added an Amazon Affiliates tag to that link”.

If you don’t know, Amazon’s Affiliate program is basically a commission program. If enough people that click on your special link buy something, you’ll get a little bit of a commission.

At this point, I specifically looked to see if the link had an affiliate tag in it. I don’t know why, but I had a feeling of “you’re not going to sneak one past me.” I was interested in the book but didn’t decide to buy it at that point.

A couple of minutes later, I saw a subsequent post from the same author that also linked to the book on Amazon, but this time he said something like “Here’s one with an affiliate tag included. It won’t cost you any more and why should we give Bezos all the money?” My reaction was completely different this time. I clicked the link and bought the book immediately. I think the decision was more about wanting to participate in the fun (like now we were working together to put one over on them) than because my desire for the book had changed.

It was interesting to me how blatant transparency completely changed my reaction.