Blog posts
-
Python progression path – quiz
Python progression path – From apprentice to guru is a popular StackOverflow post. To categorize whether a person should take his beginner/intermediate course, one of the commentors posted this question: I can better answer this question after reading Fluent Python. Example 1 and Example 2 deal with immutable and mutable data types – respectively. Let’s…
-
Relearning how to juggle
I learned how to juggle 15 years ago. I remember relentlessly practicing in my room late into the night. Within a week, I was comfortably juggling three balls. Recently, I stumbled across YouTube video of someone juggling four balls and was very impressed. How much more difficult is juggling four balls than three, I thought…
-
Belgium terrorist attack and the media
Belgian was this morning. I send my thoughts and prayers to those in Belgium, but I’m worried about the media’s knee jerk accusations of Muslim terrorists. At the moment, there’s no concrete evidence. But why is the live feed incessantly hinting at ISIS and Muslims? I can’t stay updated without feeling the media is inculcating…
-
AWS Lambda part 2 – packaging and deploying
I received positive feedback on my AWS Lambda presentation in London. This post discusses how to package and deploy your lambda function. I’m sure there are other ways but I wanted something simple. This allows me to maintain separate enviroments (i.e “dev”, “production”). Makefile I use Make to create a package (i.e “sample-app.zip”). The dependencies…
-
Monitoring background processes with SumoLogic
This post discusses one way we monitor our background process – which is different than how we monitor our web services. It’s difficult when you can’t send a request/poll the service. I wanted something more than checking if the process is alive. One solution we came up with is is using syslog with a log…
-
Getting older
I was standing outside the car, wiping the dogs’s feet when I overheard a voice. “Are you a young lady or a man?” Did I hear him right? I continued wiping my dogs’s feet and responded: “Well, HER name is Metric. And SHE’S a German Shepherd.” I wanted to make it clear that that we…
-
Putting your mentor on a pedestal
Last night, I presented (deckslide here) on AWS Lambda at DevOps London Exchange. I really enjoy public speaking, but it wasn’t always that way. In fact, I used to hate it – feared it. I vividly remember an embarassing instance in high school Spanish. My classmate and I had to do a presentation. I got…
-
SpeedCurve Library: Travis CI + coverage + tox
I’m writing a python library (speedcurve.py). At work, we’re using SpeedCurve to track our web performance. SpeedCurve’schangelog reveals can trigger a deployment (and a series of tests). I’m replacing our curl+ansible commands with this. I plan on integrating this with slack as well. This project is heavily influenced by github3.py. I’ve been contributing frequently (plan…
-
Implementing Licenses API for github3.py
I came across this license issue while searching on GitHub. So, I thought I’d give it a shot. I pinged sigmavirus24 in #github3.py seeing if this was a feature I could implement. He gave the thumbs up and I was off. Testing manually first Before any implementation, I always like to get a better understanding…
-
Contributing to github3.py
I’ve always been scared of open sourcing, despite wanting to get involved for a long time? Why? For a long time, I’ve programmed in isolation. But, I did enjoy it. Unfortunately, this leaves little (to none) opportunity for feedback and critism. Afraid of rejection? Afraid of not appearing as smart as I think I am…
-
Mocking boto exception
I was getting so frustrated. I knew how to raise the exception with side_effect=. But, how do you mock the exception? try: connection = connect_to_sqs except BotoServerError as m: if m.error_code == “AlreadyExistsException” To get it to work, I inherited the exception class – BotoServerError from boto.exceptions import BotoServerError class MockBotoServerError(BotoServerError): def __init__(self, error_code) self.error_code…