Marcus Aurelius II

Begin the morning by saying to thyself, I shall meet with the busy-body, the ungrateful, arrogant, deceitful, envious, unsocial.

You know people with these tendencies exist. You know you encounter them on a regular basis. You know you sometimes suffer the same flaws. It is important to recognize that interacting with these people is not just inevitable but in many cases essential for getting through your day. Recognize that people have these flaws and be cordial with them. Also know that because you will encounter these people, allowing the interaction to own your emotions causes unnecessary suffering in your life.

This quote also sums up Stocism pretty well through the lens of interaction with others. Things that are not within your power to control should not be within the power to control you. Set yourself up for success each day by recognizing the world as it is and navigate through it.

 

Marcus Aurelius I

Nature has given to men one tongue, but two ears, that we may hear from others twice as much as we speak.

 

Digital Hoarder

The computer allows me to collect a massive amount of digital junk: Music, pictures, musings/ramblings. I tell myself that it’s not hoarding until I refuse to let them go and I tell myself I could delete this trash at any time, but I still hold on because storage is cheap and I enjoy thumbing through my collections occasionally.

I’ve started deleting stuff that I haven’t looked at in over a year and it’s been pretty useful. If nothing else, it’s a mental exercise in letting go of stuff I don’t need and taking stock in the things I have that I do need.

In addition to my collection of digital junk, I collect quotes from books. The Kindle is horrible for me because I can just highlight a quote and move on. There’s an ebook called “My Clippings” that has piles of quotes that, at the time, struck a chord in me. Looking back, some of them seem so trite or out of character that I wonder what compelled me to save them in the first place.

In an attempt to re-assess my quote collection, I’ve decided to go through them, share them here, and write a few thoughts.

The first few quotes to document come from Enchiridion by Epictetus. His writings form the genesis of Stoic philosophy which I stumbled into after reading a book called Go Suck a Lemon by Michael Cornwall. His book outlines Emotional Intelligence and some tools for better seeing things as they are and managing your emotions when things are not as you would like. One of the professors she references points to an Epictetus quote that summarizes the point of the book reasonably well and definitely came as a Eureka moment for me.

I find people are not disturbed by things but by their view of things.

Again, from this quote I read Enchiridion, Meditations by Marcus Aurelius, and Seneca’s Letters From a Stoic. All three authors have completely different life experiences but all express a common theme which I’ve found extremely useful for finding direction and sure-footedness in my life. I still struggle here but at least I have some pillars to lean against when I feel lost.

For today, I’ll just catalog the quotes I pulled from Enchiridion. Perhaps I’ll do a write up on some of them later or just a write up on Stoicism in general.

 

When you have decided that a thing ought to be done and are doing it, never avoid being seen doing it, though the many shall form an unfavorable opinion about it. For if it is not right to do it, avoid doing the thing, but if it is right, why are you afraid of those who shall find fault wrongly?

 

Nothing is superior to magnanimity, and gentleness, and the love of mankind, and beneficence.

 

A man ought to know that it is not easy for him to have an opinion (or fixed principle) if he does not daily say the same things, and hear the same things, and at the same time apply them to life.

 

As a goose is not frightened by the cackling nor a sheep by bleating, so let not the clamor of the senseless multitude alarm you.

 

What we ought not to do, we should not even think of doing.

 

Deliberate much before saying or doing anything, for you will not have the power of recalling what has been said or done.

 

 

It Feels Like Fall

I’m sitting outside my neighborhood coffee shop, enjoying the beautiful weather. It’s dry, mid-70s, with a slight breeze. This is not a typical Atlanta summer day.

Anyways, I’ll probably have some technical things to post soon. I’m working on building out a standardized configuration for Atlassian applications as we upgrade to Data Center Edition for our various applications. To make it as difficult and as nerve racking as possible, I’m starting with Bitbucket.

It feels like fall, so here’s some Mogwai.

 

Who’s Actually Using Bitbucket?

I recently had to deal with an Bitbucket user issue where people were being added to a JIRA group automatically that granted r/w access to Bitbucket. Nearly half of the people who were in this group had never even logged into Bitbucket, but they counted against our license seats. We were running dangerously close to running out of seats and had only hours to spare. Rather than focus on the problems that lead up to this situation, I’d rather focus on the core question “Who’s actually using Bitbucket?” and how we regained nearly 1000 seats.

Problem #1: How many people are actually using Bitbucket?

In order to cast a wide enough net to find everyone, our metric was “Who’s ever logged into Bitbucket?” To do that, we queried the database (MySQL) and exported the results to CSV. Below is the query and what the resulting output looked like.

select cua.attribute_value, cu.user_name from cwd_user_attribute as cua
inner join cwd_user as cu on cu.id = cua.user_id
where cua.attribute_name = "lastAuthenticationTimestamp";

The resulting CSV looked something like this:

attribute_value,user_name
1497642118994,user_a
1497642069440,user_b
1497642117652,user_c

Problem #2: How do we put these people in a new permissions group?

To solve that, we turned to JIRAs REST APIs. First we created a new group in JIRA, then we wrote a little bit of code to loop through the CSV and add those folks to the group. I need to preface that this snippet was written very hurriedly to solve the problem (I have an ego to protect). This is written in Python 3 and uses the Requests module.

import requests
import csv

url = "https://<JIRA-URL>/rest/api/2/group/user?groupname=group-name"
admin_user = "admin"
admin_pass = "password"

headers = {'content-type': 'application/json'}
post_data = """{"name": "%s"}"""

def make_json(user):
 return(post_data % user)

with open('active_users.csv', newline='') as csv_file:
 reader = csv.reader(csv_file)
 for row in reader:
 user = row[1]
 response = requests.post(url, auth=(admin_user, admin_pass), headers=headers, data=make_json(user))
 if response.status_code == 200 or response.status_code == 201:
 print('{} added to new group'.format(user))
 else:
 print('Failed to add {} to new group'.format(user))
 print('Status code: {}'.format(response.status_code))
 print('API Response:\n\n' + response.text)

There were a few errors, but they seemed to all just be local Bitbucket users. No big deal.

Problem #3: How do we update all of our Bitbucket projects with this new group?

Unfortunately, Atlassian does not provide a way to bulk edit project or repository configurations. This is terrible oversight in my opinion, but is out of scope for this post. Still, though…

To solve this problem, we turned to Script Runner for Bitbucket. We performed the work in this order to prevent anyone from running into errors.

  1. Add the new group to all of the projects.
  2. Add the new group to global permissions.
  3. Remove the old group from global permissions.
  4. Remove the old group from all of the projects.

We used the provided code snippets from Adaptavist. See docs here.

 

 

“The New Mac Book Pro is Too Expensive”

“Apple has lost the plot.”

I’ve been a long time Mac hater. Not a Windows lover, but I never succumbed to the shiny glowing Apple logo nor the monochromatic aluminum cases. I tend towards function over form and in that regard, any ol’ Windows laptop/desktop would do. This began to change when I was issued a MBP for work, though. macOS makes my life as a developer and as an IT “professional” much better.

Obviously, Microsoft and the other PC vendors have caught on to the idea that quality hardware and good aesthetics are worthwhile endeavours.  Just look at Microsoft’s own Surface Book and the success they’ve had. Almost over night, every PC vendor rolled out lines of premium hardware for example: Dell XPS, HP Spectre, Asus Zenbook. Clearly, people want something built to last, with good design, and high performance.

This gets to the point of this writing. The new MBP: Despite it’s questionable port choices, it’s hyper thin keyboard, and it’s half baked touchbar– Is actually a decent value. It’s expensive, to be certain. It’s more expensive than the Windows machine counterparts, too. But it’s NOT double the cost of comparable machines like some folks would have you believe.

For instance, the 15″ MBP with the 2.6 i7 / 16 GB of RAM / 256 SSD / HD+ screen – $2300

Microsoft Surface Pro with essentially the same specs? $2100

Dell XPS 15? $2000.

I’m not convinced that Apple has lost the plot. I realize that Apple is using slightly older hardware, but there is no monumental difference between the 6th and 7th gen Intel CPUs nor are any of these machines true gaming rigs that demand ultimate in GPU performance. I’m just not convinced the choice of chips makes for a substantial argument. I think the other manufacturers have just caught wind and have gotten on board. If you want a premium machine, it’s gonna cost ya.

With that all being said, the availability of the Linux subsystem on Windows, kills the most compelling reason to own a Mac (in my view) as a developer…

 

Spring Has Sprung

 

First Brick of 2017

I completed my first “brick” of 2017 this morning with a friend. For those who don’t know, a brick is basically a bike ride followed immediately by a run. They’re pretty popular amongst triathletes (of which I am not). They’re also awful. Luckily, we took it easy on ourselves with a 25k mile in town ride followed by a 5k run.

I’ve been out of the saddle for a few months aside from short stints on the track so I’m having to force my body back into the very unnatural position of an aero road bike. The first few rides of the year make you think you need a new saddle but the reality is that your body has simply regressed back to a more natural state of being which don’t include hours of routing your body weight through your sitbones.

I also find the transition from biking to running to be particularly tough. As soon as I take off running I’m reminded of three things: 1) Why the hell am I doing this? 2) Did I miss the part where legs converted into Jello? 3) Why does it feel like I’m going to slow??

Unfortunately, I can’t answer any of those things except #3 which is likely just the speed differential of going 3-4 times my running speed only moments early. It’s that feeling you get when you get off the interstate going 80 and are suddenly stuck on 35 mph backroads. You feel like you’re going absolutely no where and the change of pace is frustrating until you rationality that you’re still traveling 35 miles per hour or roughly 10 times a quick as you can walk.

This year I’ve really got to focus on distance riding. There are a few rides I’d like to do. I’m not certain what I’ll be able to do with work and life being what they are but I hope to have at least two bike trips coupled with roughly 50 miles per day.

 

PIVOT!

I don’t use this much.

But I pay for hosting and run for daily backups. It seems like a waste. In typical tech fashion, it’s time for a PIVOT so I can MAXIMIZE MARKET SHARE AND INCREASE PROFITABILITY.

I was able to test how good my backups were today by standing this site back up from exports. I’ve moved hosts to save money and support a smaller hosting provider (AWS to DigitalOcean). I’m happy to say that my previously untested backup scripts worked wonderfully. I was able to reinstall LAMP, drop in the DB and WP files and the site came up on the first attempt.

Going forward, I’ll probably just post more content here that include topics outside of release engineering. I’ve got some cool RE/DevOps type things to post that I’ve been sitting on for awhile. I’ll try to get around to documenting that work and slip it in between ramblings about ethics (my current obsession), new projects, cycling, and just generally revamping this site.

 

Quick Shoutout

I just wanted to give a quick shout out to uptimerobot.com. For what it is, it’s fantastic. I wish the polling interval was better than every 300 sec. but you get what you pay for which is nothing. It’s free. It’s a great tool.