Alpha's Manifesto

A black and white figure's thought-hive

How to create a good pull request

A meta-guide for creating easy to review requests

Code Review: Pull Requests

This has been a common question and a subject of debate since everyone has their opinions on what good code is and what bad code is. Regardless, the pull request is not about the code itself but about the actions of reviewing, adjusting, discussing and assimilating (merging) code, which may be good or bad in itself.

This will be later followed by a set of notes on how to perform a good code review.

Without further ado, let’s start with what is going to be a long article about sending a good pull request.

(Read more →)

Death to Singletons!

Singleton.Instance.SelfDestruct();

Evil Singleton

No, I’m not talking about those that can’t find someone to be with. You’re ok in my book.

One of my favorite question to ask at technical interviews is “Can you tell me advantages and disadvantages of the singleton pattern?” I get varied responses, but while almost everybody can think of the advantages, nobody mentions the problems that come along with it. I’m going to quickly explain what singletons are and then roast them good.

(Read more →)

Testability vs. simple design

Testing requires decoupling

Shooting down dependencies

You may know I’m a proponent for simplicity. I believe that if a particular feature can be achieved with a single if statement, then that’s all that needs to be done. I’m also a proponent of testability, that all code should be easily testable so that we can make sure that it works. As it turns out, these two don’t usually go hand in hand. (Spoiler alert: that’s not true.)

(Read more →)

How to find the problem

Applied skepticism

User minusSeven from the StackExchange community asked a seemingly uninteresting question that happens to be really deep and meaningful: How do you learn programming when you’re stuck and without access to the internet? All the answers there are really good and useful, but I think there’s an underlying theme worth discussing: how a methodical approach should be.

(Read more →)

Automatically logging your timesheets in JIRA

Having the tedious work done for you

Google Calendar To Jira

A while ago I explained how I use Google Calendar as my time-tracking system. I did mention, but did not explain, how I made this into an automatic system of timesheets for JIRA, the system some companies I work for use for time tracking. It just involves Google Docs and a little bit of JavaScript.

(Read more →)

Anecdote: Jaimitos

Life-juice, one slurp at a time

Sudden realization skunk

Back when I was in elementary school, and I might have been around 10 years old, I had a couple of friends with whom I would spend some time around school in-between classes. One of our favorite things to do in recesses, like any other child, was to go to a store and get some candy. We had a particular store crossing the street owned by this man that would make pretty much of his finances thanks to the school nearby, so he was really kind to all of us.

naranjuAround that time as well, one particular “candy” (if you can call it that) was popular. They were called Jaimitos (ha-ee-me-toh, translates to “little Jamies”? ugh), and they were basically frozen juices in a bag that you’d slurp out of it to get refreshed and drink some. I honestly can’t remember if that’s the real name, or that’s just how we would call them. The design was not particularly appealing: it was literally a plastic back that you’d puncture on one side and from there you’d suck the blood out of it. Since it was frozen, you could not get out all of it immediately, so you’d be entertained for a while.

This particular day I was buying some of those with a close friend I had. He had some spare money so he payed one of those for me. The store clerk gave them to him, and he handed one to me. I took it in my right hand, and even before he had finished paying, I was passing it to my left hand since it was freezing me down to the bone.

While we were walking away, I mentioned this as a random thought and a conversation starter.

“Doesn’t it freeze your hand?”, I asked.

“Yes, but I don’t care.”, he replied uninterested.

Silence invaded me, as I had this kind of life-changing epiphany. It never occurred to me that it was a choice for someone to not care about stuff. Could you just do that? This opened so many possibilities for me. So many things in the world that could worry me and I could just choose some of them and not care. Of course, I was a child at the moment, so this didn’t have great implications at the time, but the thought stuck around.

Decades later, it still invades me sometimes. Sometimes it is a temptation, to decide to neglect particular situations that affect me. Sometimes it is a self-inspecting doubt, whether I am ignoring the right situations and actively caring about the ones I should.

I did mention in a previous post how I consider really important to have knowledge management as something in your life. (If you can read Spanish, you can read that post, or if not, let me know so I’ll translate it.) But as a sidenote to that very same post, I think it is really important to decide what you’ll ignore, and what you’ll neglect. Both from a mental and emotional point of view. Make it a choice, and own up to it.

We know we have limited time and limited energy to deal with the world, so if we don’t take such decisions, they’ll be taken for us. And it turns out, it has always been our choice.

In a way, I’m drinking that Jaimito up to this day.