In the beginning,
the Universethis Newsletter was created. This has made a lot of people very angry and has been widely regarded as a bad move.- Someone, probably
They say the process of becoming the best version of yourself is to take a step, so here we are! After blogging for some time with decently successful results, I figured the next step would be to spam send you some helpful tips, interesting posts & articles, and other things that help me get through each week.
This newsletter aims to provide transparency into my life as a software engineer and to share some of the tips & tricks I've picked up over the years. Hopefully, you can learn some technical details concerning engineering and some personal lessons I've picked up along the way. With this, I hope you can see similarities in your own life and engineering work as we grow together.
Hopefully, you liked this first edition newsletter. If not, then let me know, and I'll adapt it to be better! I appreciate you getting this far, and I really hope this is the beginning of a new medium to engage with others.
Last week's win was participating in my team's holiday on-call schedule. I joined Heroku back in September and this was one of my first chances to really take on the responsibility of on-call. With these little wins, I hope to join the Primary Rotation to help my team members by taking some of that burden from them.
Last week's struggle was more personal in that my holidays were derailed after catching COVID. It definitely made a few days of really rough cold symptoms, but it was made worse because I mayyy have also given it to the rest of my family. Thankfully, we are all healthier now and can hopefully try to have a Christmas 2.0 🎄 in the next few weeks.
I have no posts for you this week because COVID knocked me off my feet for a few days. So while I finish cleaning up some drafts to be published, feel free to read some of the following:
git
command & workflow cheat sheet by Tobias Quante will hopefully help you remember the different commands while working with the version control tool.The Counter
class in the collections
module is a valuable tool to quickly count the number of times each unique element exists in a list1.
from collections import Counter
# -- Beginner Example --
# Count how many times a number appears in the list
items = [1, 2, 5, 1, 1, 5, 3, 6]
counter = Counter(items)
print(counter)
# {1: 3, 5: 2, 2: 1, 3: 1, 6: 1}
# -- Intermediate Example --
# Count letter occurrences in a string
text = 'The cat ran fast'
letter_count = Counter([char.lower() for char in text if char.isalpha()])
print(letter_count)
# {
# 'a': 3, 't': 3, 'h': 1, 'e': 1,
# 'c': 1, 'r': 1, 'n': 1, 'f': 1, 's': 1
# }
# -- Advanced Example --
# Determining "peak" hours given datetimes and charting them
from datetime import datetime
dates = [...list of datetime objects...]
date_count = Counter([
date.replace(hour=0, minute=0, second=0, microsecond=0) for date in dates
])
# Generate x axis "tick" labels and associated count values
sorted_date_counts = sorted(date_count.items(), key=lambda date_entry: date_entry[0])
ticks, values = zip(*sorted_date_counts)
# Plot the chart
import matplotlib.pyplot as plt
date_ticks = matplotlib.dates.date2num(ticks)
plt.xticks(rotation=50)
plt.plot_date(date_ticks, values, linestyle='solid')
plt.title('Date Breakdown')
plt.show()
Learn more about the collections.Counter
class and some examples here.
Be the person you needed when you were younger.
- Ayesha Siddiqi
Take care, everyone!