Calvin Freitas: Front-End Engineer Extraordinaire

Abraham Lincoln & Leadership

Authored by Calvin Freitas on December 22nd, 2014

In November 2014, I finished reading “Team of Rivals: The Political Genius of Abraham Lincoln” by Doris Kearns Goodwin. The book covers Abraham Lincoln and his cabinet members. Fabulous book! Well written. It develops and shows the personalities, characters, and actions of the men and women closest to Abraham Lincoln, his cabinet, and administration leading up to and through the American Civil War.

This post catalogs leadership principles and character qualities that stood out to me while reading the book.

Leadership Principles & Characteristics


Lincoln forgave men who didn’t deserve it. He conferred positions on men who he had no reason to honor based on their behavior towards him. This served him well; he earned many lifelong friends and trusted allies through this behavior.

During one of his senate races, Lincoln sacrificed himself and his delegates to ensure his party would win the race. The grateful Lyman Trumbull ended up helping with his presidential candidacy later.

He awarded Chase with the Chief Justiceship despite Chase’s presidential ambition and attempts to harm Lincoln’s reputation while seeking the nomination for the Republican Party when Lincoln ran for his 2nd term.

Chase quoted scripture from the Bible, but was blind to his own character flaws and the harm he did his fellow cabinet members and the President.

Lincoln gave Stanton the Secretary of War Department position despite Stanton having insulted him during a patent trial in Cincinnati years earlier.

Do not criticize a servant to his master

In context, Lincoln was telling somebody not to criticize one of his cabinet members and quoted a verse from Proverbs 30. This can be applicable in a modern work context as well. If a manager is pleased with the work if his employee and you have complaints to bring, you may be cursed by the manager.

Push for progress at the right pace and right time

Lincoln constantly gauged the opinions of the people – the common folks, soldiers, politicians. He pushed for progress and moved towards emancipation, but as President he moved slower than the radical Republicans wanted, and faster than conservatives.

Lincoln befriended Frederick Douglass and this friendship helped him to improve his perception and views regarding black men.

Cabinet Balance

He balanced his cabinet geographically and from disparate segments of the Republican Party. He did this to achieve unity and hold the party together. He used these men for their amazing talents.

Montgomery Blair revolutionized the postal service. Gideon Welles modernized the navy. Salmon P. Chase helped fund the war via the Treasury. William Henry Seward negotiated with foreign powers and contributed key insights to Lincoln. Edward Bates fought important legal issues for the administration. Edwin M. Stanton brought together a mighty military force.


Lincoln deferred to the views of his cabinet members when they told him he was wrong and had good reason for it.


Lincoln told stories to make a point. He used the anecdotes to make a point that would otherwise take much more time or resonate less with the hearer.

Humor, poetry, and stories helped Lincoln to relax.

Sum of the Man

Lincoln had many good qualities one can learn about and take as examples for living. I aim to apply these character qualities in my own life and have had opportunities to consider and attempt to implement them since reading the book.

Re-learning to play the piano

Authored by Calvin Freitas on September 1st, 2014

I bought a used Krakauer piano in March from a family who was moving and ready to let it go.

Krakauer Piano

I took lessons for a few years in middle-school beginning around sixth grade. In my first year of high school, I told my mom, “I’m way too busy for this” and ceased playing or practicing — much to the regret of my older and wiser self.

For Easter this year, my mom bought me “Alfred’s Basic Adult Piano Course” as it’s a book she’s used with adult learners in the past when she taught piano lessons. I’ve been enjoying it and have gotten through about one quarter of the book so far. So far I’ve re-learned things like timing (4/4 and 3/4), notes (quarter, half, three-quarters, full), and right and left hand starting positions (C & G). I’ve learned things I never knew before like several different chords (C, G, F, C Major).

My goal is to play hymns from the Cantus Christi hymnal we use at my church.

I will learn and play fun songs, too. Today, I ordered piano sheet music from Sound of Music, Super Mario Bros, and Star Wars to help me towards this end.

I’ll let you know how this goes.

How To Learn the Piano as an Adult
* Step 1: Stop Waiting
* Step 2: Get a piano (or keyboard)
* Step 3: Get the piano tuned (if it’s real)
* Step 4: Start Playing

Configuring AWS IAM Policy for S3 Bucket and CloudFront

Authored by Calvin Freitas on August 29th, 2014

Here’s an IAM policy you can use to grant a specific user or group rights to an individual S3 bucket and CloudFront. Unfortunately, CloudFront can’t be restricted by resource (such as distribution ID) so you have to grant access to all resources, but you can give rights to just one S3 bucket.

Initially, I ran into trouble setting up this policy because I only granted rights to “bucketname” and not “bucketname/*” as you can see below.

I encountered this on the path to setting up AWS hosting w/ S3 and CloudFront for a static website.

  "Version": "2012-10-17",
  "Statement": [
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": [
      "Effect": "Allow",
      "Action": "cloudfront:*",
      "Resource": "*"

“ARN” is the Amazon Resource Name. The general formats are the following:

  • arn:aws:service:region:account:resource
  • arn:aws:service:region:account:resourcetype/resource
  • arn:aws:service:region:account:resourcetype:resource

In the case of S3 resources, the format is “arn:aws:s3:::mybucketname” and “arn:aws:s3:::mybucketname/object”.