inkel

Software programmer interested in SRE, DevOps, Machine Learning and Augmented Reality.


Advent of Code 2020: Day 1

1min.

I did it! I was finally to solve both Day 1 challenges in Clojure! And it only took me four days!

As said in my previous post one of the reasons why I’m participating in this years Advent of Code is because I want to learn Clojure, and while at times I felt frustrated because I couldn’t find the solution, I’m happy that I did. As with everything, in hindsight, the solution is obvious now. Not that while the problems were similar, both solutions are quite different, and I think they showcase my improvement with the language and functional way of thinking.

I’m looking forward to Day 2 challenges, and I hope to solve them in less than four days!


inkelinks S01E02

1min.

Issue #2 of my newsletter was delivered today. I’m really enjoying curating links and sharing them with friends!


Advent Of Code 2020

1min.

For years I’ve been a fan of the idea behind Advent of Code:

…an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

For a variety of reasons I’ve neglected participating in past editions, but this year I’ve finally decided to give it a try.

The biggest reason behind the decision to join this year was that for the longest time I had the desire to become proficient in any of the many LISP languages out there, particularly in Clojure, so I saw this as a chance to get more familiar with it, learn something more about it, and having fun while doing so.

There are already 2 puzzles going on, and I haven’t even started, but when I do I also plan to publish everything into my GitHub account.


inkelinks S01e01

1min.

The first issue is inkelinks is out! Feel free to check it, and subscribe if you haven’t done it yet!


I have a newsletter now: inkelinks

1min.

One thing I like to do is collect links for reading later, and let’s be honest, who hasn’t? I also usually share some interesting links with folks at work, where I made myself the fame as the links provider. So that got me thinking: why not creating a newsletter where I can share these links with a broader audience? So thank you to Buttondown I now have a newsletter for you: inkelinks.

Besides the newsletter I’ll be posting the links on this blog too, for those who prefer it that way. But I suggest using the form below so you don’t miss any weekly links!



If that doesn’t work for you, you can still subscribe from the newsletter homepage.


Am I a gamer now?

2min.

For years I disliked playing games. Never before in my life I had a gaming console, and the last game I played from start to end was The Secret of Monkey Island. But a couple of years ago I decided to buy a PlayStation 4 and I’m extremely happy with that decision. The main reason was of course to start playing myself, but also to raise my kids in a house where gaming is “normal”.

Why did I wait so long?!

I don’t think I’m a hardcore gamer, not even close, but since I bought my PS4 I play at least one hour almost every night, as a way of cooling off my mind before going to bed. I find it very relaxing and entertaining. I mostly play solo games, the idea of working online with others doesn’t attract me, as I take this time as a me time and I don’t want to engage with others. I know that I’m missing lots of fun, or so I’ve been told, but I’m happy with this decision.

Over the course of the upcoming months I’ll try and leave some “reviews” on some of the games I played so far:

  • Horizon: Zero Dawn
  • God of War
  • Uncharted Saga
  • The WItcher 3
  • Detroit: Becoming Human
  • Mass Effect: Andromeda
  • Spider-Man
  • Rise of the Tomb Raider
  • The Last of Us
  • Dragon Age: Inquisition

I cannot finish this post without saying this: the very first game I played, Horizon: Zero Dawn, I fell in love with the character, the world, and the story behind it:

Horizon: Zero Dawn

Uses This

7min.

I always liked the interviews at Uses This, I find it really interesting knowing other people’s setups. And given that I do not foresee them interviewing me anytime soon, I went ahead and wrote my own.

Who are you, and what do you do?

I’m Leandro López, better known on the Internet as inkel (all lowercase). I work as a software developer at Theorem, mostly doing backend programming but also dabbling in operations when needed. I’m interested in programming as a science, machine learning, DevOps (whatever that means), and keeping systems running.

What hardware do you use?

My main machine is a MacBook Pro 2015 15", which I love. I’ve also have a secondary Dell XPS with Windows 10. Meh.

I, like everyone else, do not like the new butterfly keyboard, and because of that I’m using a Keychron K2 as an external, mechanical keyboard; I love this keyboard, it’s clickly but not too loud, it can connect to up to 3 devices and seamlessly change from one to the other by pressing a couple keys. The only thing I miss in this keyboard is a Touch ID reader.

For a long while my hands travelled from the K2 to my MBP touchpad, and that was becoming tedious. I love the touchpad, but buying an external one was costly in Argentina, and thus I bought a trackball for the first time in my life, as I also wanted to give them a try. I’ve got a Logitech Ergo MX and boy am I happy with it. It didn’t take me too long to get used to it, and while it’s not the same as the touchpad, it is customizable so I can do many things without leaving my hand off the trackball. Still, I would like for it to have a couple more buttons so I can customize it even more.

As I work in a 100% remote company, calls are something that happen almost daily. For that reason I use mostly Apple EarPods, they work just great. At my office I’ve a pair of Logitech G533, which sounds great and are wonderful, but have two main issues to my taste: 1. they are not Bluetooth, you need a USB receptor connected to your computer; 2. after 15 minutes of audio silence (i.e. no audio coming through the speakers), it powers off, which is troublesome if you are doing a presentation and the rest of the audience is muted; I’ve already felt the pain of talking and talking and talking and people trying to tell me they couldn’t hear me but I couldn’t hear them either because the headset was off. Sad emoji. I’ve also bought a pair of Philips SHB3075, they are comfortable and 100% Bluetooth, but for some reason they don’t work well with my MBP, so I’ve them paired with my iPhone.

When mobile I use an iPhone 8, one that needs a change because my screen shattered. I started using iPhones since the iPhone 5 and never looked back. They are fast, pretty, and just work, as anything from Apple. Are they expensive? Yes. Are they worth it? Hell yes.

I prefer reading physical books than ebooks, nevertheless, I’ve an iPad Mini mostly for just that. It’s a great device with an excellent size for reading and taking from one place to another, without being a fullsized iPad.

Last but not least, as a developer I spend most of my days sitting, and I’m over 40, so a good chair is more than just luxury. Because of that I own a Erasmo Onix, and my life (and back) has been happier ever since. I cannot stress enough how much I recommend to spend serious money on a good chair.

And what software?

On my main computer, macOS as the operative system. It’s pretty, it works, it makes me happy. But I know I’ve to upgrade to Catalina soon.

Given I’m a developer, most of the things I write happens in Emacs. My init.el is far from perfect and I’ve neglected updating it for a long time. Sometimes I use Visual Studio Code (VSCode) or Visual Studio for Mac, but I always end up coming back to Emacs.

When I’m not on Emacs, I spend most of my time in a few iTerm2 tabs. I’ve tried other terminals like kitty, and while much faster, it’s definitely nowhere near in UX. Besides using tabs I also use tmux a lot. A LOT. My tmux.conf is adequately updated to my tastes, although it could use some improvement. Yes, I’ve heard about iTerm and tmux integration; no I haven’t tried it. I use Bash. I’m super comfortable with it, so I’m not looking to change to another shell in the short term.

Writing Markdown is something I find myself doing every so often, and for that, I use Typora. It’s beautiful, elegant, fast, I love it. I might switch to Bear, though, as I’ve been trying it on my cellphone and it works really well, even without the Pro features; I might upgrade to Pro soon, still haven’t decided. This blog is using Typora for the content and Hugo as the static site generator.

My other computer runs Windows 10. Windows as an operating system has improved a lot over the years, but it’s still, in my opinion, not very developer friendly as an operating system. For writing code, Visual Studio is undoubtedly one of the best IDEs there is, although of course mostly tied to developing within the Microsoft platform. I also have VSCode installed: sometimes I just need something that loads fast for quick edits. SQL Server Management Studio is another great tool though it feels a bit dated. CLI is where I feel Windows fails the most, and while the new Windows Terminal looks promising, it still lacks the smooth UX that other terminal emulators like iTerm2 have. The Windows Subsystem for Linux (WSL) is another great addition to CLI on Windows, but again, still a bit clunky.

Languages are varied: I really enjoy writing Ruby, love toying with Go, have enough fun to work with .NET Core and C#. I like to have as much infrastructure as possible described using Terraform. And I really, really love writing scripts using Bash, AWK, sed, curl, and jq.

Last but not least is The Cloud. Nothing surprising there: GitHub for own and Open Source code, and some work related stuff. Amazon Web Services and Microsoft Azure for hosting stuff.

What would be your dream setup?

I’d love to get my hands on one of the newer MacBook Pro 16" with at least 32 GB of RAM and an SSD of at elast 1TB. I don’t think I’m going to try a new mechanical keyboard for the time being, but the Keychron K8 looks like a good future replacement. Similar with my mouse, I’ll continue with my Logitech Ergo MX, but also looking forward to get an Apple Magic Trackpad 2.

I’d like to improve my communications setup, probably by getting some AirPods Pro, or a cool Bluetooth headset.

My office needs some love, and due to the Covid-19 pandemic I’m not even going, but once back I’d like to have one or two external monitors, and a good microphone. I don’t have anything in mind yet, though.

As said my phone needs a change, and I’m looking forward to buying an iPhone 11. I’d also like to leave my computer at the office but still having something portable and comfortable at home where I can do some coding, and that’s why I’ve an iPad Pro in mind.

I want to have my office devices accessible from home, and thus I’m looking at using Tailscale. I’ve only heard amazing things about them.


PowerShell grep

1min.

I kept forgetting how to perform the equivalent of grep(1) in PowerShell. The simple answer is Select-String. It is aliased to sls.

ipconfig | Select-String 192.168

I should probably add a permanent alias.


How do I organize my work blocks

5min.

After publishing my previous Working at Theorem: a typical workday article a co-worker asked me the following:

Can you go into the details of what happens during those “work” blocks? Do you frequently check slack_email or only check them occasionally? Are you heads down for parts of the day? Do you have dedicated “help_review others” time or does it happen ad-hoc?

This is an interesting question, so here are the answers.

Checking email / Slack

I approach these two differently. Email is something I check only when I don’t have any other task or when I’m in a break. I don’t have alerts or notifications when a new email arrives, so it’s a task that only happens in an active way. I consider email as the best asynchronous communication tool available, thus I treat it that way. I’ve several different filters that labels or archives emails as they arrive so when I check them I don’t have to lose precious time triaging everything that I’ve received.

Of course working 100% asynchronously is an utopia when working in a team that interacts with an external customer, so synchronous communication is a must; at work we use Slack for this. I’ve enabled notifications although I’ve also muted several channels that only generate noise or are mostly for announcements. I could leave those muted channels, however they are still important and I check them a few times throughout the day, usually after catching up with email.

I try to be conscious of how much affects others when mentioning them on Slack, so I try to keep usage of @here at a minimum, @channel only when it is urgent or very important; using @everyone is completely off the table, unless a catastrophe happens. And when it comes to direct messages I always try to send initially only one message: a greeting plus whatever question or comment I’d like to communicate; this way the other person can quickly decide to dedicate some time to me or not.

Code reviews

A big part of my day consists of reviewing pull requests created by other members of the team. I’m not going to go into the details of how you should behave when doing PR reviews, there are already hundred of posts dedicated to that: this is how I approach this task, YMMV.

First I start by reading the title and description. If those are good and informative then I’d approach the review in a better mood: good programming is mostly about communication, so I held prose to the same standards as code.

Second I look at each commit individually. Writing clear and well scoped commits makes reviewing easier, as you can better understand the author’s intentions. PRs with just one or two gigantic commits are a bummer and from time to time I try and teach people to write smaller commits next time.

Last but not least I look at the code in detail. The first things I look for is overall structure: is the code properly indented or doesn’t violate the rules and standards set for the project? Then I look at the semantics, trying to understand each decision, expecting to see well named variables and methods, easy to follow flow control statements, etc. I can be very nit picky at times, so I have to keep me at bay of not becoming an asshole. And yet there are times when you need to become one; luckily is not something that I need to do often.

PR reviewing is an opportunity for both the author and the reviewer’s growth as programmers and communicators. Treat it like as a learning experience and not as a chore.

Time management

With the current pandemic my working conditions changed quite a bit, even when I was already working remotely. The biggest change was on time management. When I worked from my office, I had some dedicated time for things like checking emails and Slack, for deeply diving into any tasks I was working on, and for reviewing code. Now those dedicated time chunks are gone, so I try to manage my time as follows:

  • Checking emails and Slack is something I do first thing in the morning, before and after lunch, and during any coffee- or cigarette-break;
  • Working on assigned tasks in 20 minutes chunks. Nowadays is hard to find long stretch hours of work, 20 minutes is a good compromise between I want to do something and gonna check the kids, have a break.
  • PR reviews: I usually do them after the above mentioned 20 minutes. In the past I also scheduled this way, but after 40 minutes/1 hour instead.
  • Lunchtime is something I’ve cleared out in my calendar, daily from noon to 1pm, so we have some routine for the kids. This I try to keep on schedule, so it doesn’t conflicts with my calendar. Of course it doesn’t always happens but so far it hasn’t been a problem.

Endnotes

As you can see I haven’t shared any truth revealing insights, though I hope it helps others getting more organized. This schema works for me; it might work for you or don’t work at all.

Interesting in working with me? Check our careers page and apply to any of our current openings. We are waiting for you ;)


Migrating DNSimple ALIAS records to AWS Route53

2min.

Last week I was tasked with migrating a DNS zone from DNSimple to AWS Route53. Overall it was pretty straightforward except when I had to migrate two ALIAS records. This is a special type of record that’s not part of the DNS specification, so there was no direct alternative.

Subdomain

Say that you have a subdomain www.example.com that was using an ALIAS record pointing to www.example.net. This is by far the easiest to move, as it implies replacing the TXT record defining the alias for a CNAME.

Apex domain

This is were it gets complicated. If you had an ALIAS for example.com to example.net you cannot replace it with a CNAME, because apex domains do not support that. The solution is to use an A record, which loses the value of an alias you would need to keep updating the IP address of the destination of it ever changes.

Summary

As you can see it’s not that complicated to migrate ALIAS records to AWS Route53, however, they do have some limitations. I’ve went from this

www.example.com. 3600 IN TXT "ALIAS for example.net"
example.com.     3600 IN TXT "ALIAS for example.net"

to this

www.example.com.    3600    IN  CNAME   example.net.
example.net.        3600    IN  A       192.168.14.52

and achieved the expected results, though we now need to keep an eye on the IP address of the destination.