How to Set Up Local HTTPS Development

I spent a little time during the last week figuring out ways to debug HTTPS issues locally, and wanted to share. My end goal was to run HTTPS with valid wildcard SSL certificate on a Rails server locally (most of this is not Rails-specific.)

Why this is useful

I wanted to do this so that I could see which pages had partially insecure content or looked incorrect when using HTTPS. If your “secure” page loads a stylesheet or image or JavaScript file in an insecure manner, you could leak private user information, etc. You can see whether you are really secure by looking in the URL bars of modern browsers.

However, we only had a valid SSL certificate in production for a client project that I was working on. If I tried to look at the staging server or a local server with HTTPS, I would get a pretty ugly error and the browser would just tell me that the certificate was not accepted. Plus, I wanted to be able to make changes and see the effects locally without needing to push to staging (increasing the feedback loop speed is always high on my list of priorities.)

Setting up the SSL certificate

I followed the instructions at Heroku’s Self-Signed SSL Certificate post. I created a script which looks like this (to automate):

Read on →

Using Asocial Media Effectively

I found a hack recently that allows me to provide value to people following me on social media without actually interacting with them. I call it “Asocial Media.”

The tip

I may sound like Buffer’s number one fan after this post, as today’s tip basically boils down into: buffer your social media posts in times of great productivity, so that you don’t get sucked in and waste a lot of time looking at cat pictures.

This tip is for when you don’t want to get out of the flow of what you are doing but feel a burning need to share something. Basically, if you find a cool link, instead of tweeting it out right away, I put this in my Buffer queue and then it automatically gets tweeted out. If I’m churning through email or blog post reading and I find something noteworthy, same deal. Basically it allows me to continue with what I am doing and not accidentally lose twenty minutes by looking through status updates.

Read on →

What Losing At Online Spades Taught Me About Business

I used to work somewhere where there was a very active and visible gaming culture. Some of the games were virtual, but a large portion of them were physical or based on physical games. Monthly game nights featured strategic board games which took several hours to play. Think Risk, but more complicated. At lunch every day, there was usually at least one table playing card or board games of some sort. Spades, hearts, and games most people have never heard of were standard fare. The players at lunch were all quite analytical. Card counting was common. If you weren’t aware that your six of diamonds was going to win the trick when it was played, the other three people in the game probably knew and could recall the last three tricks played. The games were quite competitive.

My game of choice was spades. I liked that it was a very strategic game. You could play the same hand several different ways depending on what other people had and bid, and what the progression of the hand turned out to be. In this environment, I probably won more games than I lost, so I fancied myself a good spades player.

Read on →

Why Only 12% of People Succeed at Their New Year's Resolutions

According to the Wikipedia article on this subject, the failure rate of New Year’s resolutions is 88%. In this article I’ll give you solid reasons why most New Year’s Resolutions don’t work, and how to make adding, changing, or removing any habit easier.

Limited executive function

Everyone from judges to dieters to engaged couples make worse decisions as the day goes on. (I have been feeling the “engaged couples” one lately.) As the article states, this is because we use glucose when making decisions and do not replenish it. After a certain amount of glucose loss, the brain stops trying to think of tradeoffs, and instead does whatever is easy. For the purposes of this blog post, consider glucose to be equivalent to willpower or executive function. I use executive function and willpower somewhat interchangeably.

I think that managing habits with willpower is a very effective way to improve personal and organizational performance.

Capacity for change in behavior is like a muscle, and it can be exercised by applying willpower. Using willpower effectively is a skill. The capacity for change can be expanded by stressing the system and letting it recover. Too much stress and not enough recovery leads to poor results. See The Power of Full Engagement for more along these lines. Especially insightful is the idea of managing energy, not time. More on this in a bit.

Willpower as it relates to habits

The way most people try to change is to list about twenty things that they want to change and make them ambiguous. They try really hard for a couple of weeks, and then say that this whole “change thing” isn’t really what they are into. Maybe they don’t have enough willpower, they think…

I think willpower in and of itself is mostly overrated. Willpower is good for getting you to start something, but not usually very useful for following through. I think of it like adrenaline. It’s good for fight or flight and pulling trapped babies out from under cars, but you cannot sustain that level of effort for a very long time. Willpower depletes quickly. To try to will yourself to write every day is difficult. To instead set up a habit based on a routine makes it far simpler. So I use the willpower to think about and create the routine that I want and begin forming the habit, and when the habit is formed it does the rest.

Consider brushing your teeth. Most people in the modern world brush their teeth at least once a day without needing to think much about it. They normally have a routine of “after I eat breakfast, I brush my teeth”, or “after I get dressed, I brush my teeth”, or “before I go to bed, I brush my teeth.” This habit has been practiced regularly for a long time, and they do it every day. The associations are very strong. It takes basically no executive function to be able to do this. Brushing my teeth is the gold standard of habits, as far as I can tell. I can be half drunk and tired and still want to brush my teeth.

Routine lowers the need to use willpower. You don’t want to have to will yourself to brush your teeth. If you have to think about it much, you’ve already lost. Eventually you will lose interest or forget or just not want to do it.

Applying willpower for useful things

Taking this realization to more concrete or useful areas…

Read on →

Change Where You Work

There are many books out there on effecting change in an organization. But what if effecting change is not the most effective strategy?

A Story

Imagine for a moment that you have recently heard about a new recursive development technique called “DDD Driven Development.” The proponents of DDD (a recursive acronym) claim that it speeds up your development cycles by increasing feedback, but only anecdotal data exists so far. Some groups have claimed it led to higher system reliability and development speed, others the opposite.

As team lead, you pick up the premier DDD book and read through it. The arguments, while not airtight, seem to indicate that at least some aspects of the approach would be useful in your organization.

You play around with the techniques in a personal project, and then pitch using DDD on a pilot project. The project goes mostly smoothly, and most of the team members agree that it was useful. A couple dissent, and you can see that it might be difficult to get buy-in from other engineers in the organization who are not as open to change.

Read on →