Overlooking London through an airplane window

Learning every week – 6th and 13-Mar-2020

For the first time since I started, I missed a week. My travels and schedule caught up with me eventually. No matter, I’m here today and I hope to keep my last week’s miss what it was–an exception. Given my travels, I don’t have a lot to write about these days not because I didn’t learn much, but because I wasn’t as disciplined in documenting everything as I usually do. Learning then is not about how much you are exposed to information, but what you do with it.

The astute reader among you might have noticed that I use one of my photos that represents my week. These past two weeks I have been in London and I have had a variety of experiences. It’s difficult which one to pick and so I am just going to go with a photo that shows London from the air with the Thames visible along with a few landmarks like the London Eye, The Shard, and The Tower Bridge.

Pythagorean Triples

My first learning was a rather humbling one. I have mentioned before that I use Exercism’s awesome collection of exercises to learn Go. One of the extra exercises I came across was to find a Pythagorean triple based on some unusual conditions. Unfortunately, I couldn’t solve it in an optimal way. I am sure I can solve it by brute-forcing it but I don’t want to do that. Mathematical methods of generating triples use other inputs than what I am expected to have in the exercise. Maybe I am missing something obvious in the documentation or I am just supposed to brute-force this. Either way, I left the exercise alone (the only exercise I am not solving in my course so far). Even though this was a failure, I learnt a lot of different things, and I am proud of that.

Security issues with the target attribute

I remember reading this somewhere before but I had forgotten. I instinctively just type out `target=”_blank”` to all links I want to open in a new window. In the thread, I found a comprehensive article on what the effects are and how to fix them. It’s not very complicated and the takeaway is straightforward–don’t use the target=”_blank” attribute to open links in a new tab/window.

Work-family balance

This is from an episode on the Manager Tools podcast. At the outset, it was interesting to me that they used “work-family” instead of “work-life” balance. In hindsight, it is obvious. Work is part of life and “work-life” balance never made sense to me for the lack of a better word. I’m not saying “work-family” is a perfect replacement. There is also a personal side of life which I wouldn’t consider “family”. They don’t either but words matter. To that end, “work-family” is significantly better than “work-life”.

As a remote engineer, the importance of having a separation between work and non-work life is not lost on me. All the same, the perspectives shared on the podcast were enlightening. The first thing they say is that there is no question of balance because work and family are not even in the same league. Coming from Manager tools, this was very interesting. There is also a lot of discussion about how it is not about managing time (which cannot be managed), but about managing priorities. I am very familiar with this idea and hence there was nothing striking for me in that discussion, but it’s worth a listen.

I’ll just leave this with the Yellow M&M analogy they describe. To understand how work and family priorities compare, imagine taking a yellow coloured M&M and hold it up against the sun so that it completely blocks the sun. From your perspective, the M&M and the sun are the same size. This is how work and family priorities appear to us–equal. But the M&M is several orders of magnitude smaller and insignificant compared to the sun. That’s really how your work priorities compare to your family priorities. I do think this is an exaggeration but it is a useful visualisation of how work and family priorities compare.

Greener web development

I attended a PHP Meetup in London where there was a talk on greener web development. Admittedly, I was not feeling up to the trip I would have to take to reach the meetup venue but I made it. And I am glad I did. I expected the talk on greener web development to be mostly theory and abstract ideas of impractical ideas to help avert climate change. It was that but it was much more relevant and action-oriented. Since the meetup was in London, Ciaran McNulty personalised all information, statistics, and action items to people living in the UK, or specifically, software engineers in the UK. Even though I don’t live in the UK, I could relate to what I could do. I live-tweeted the entire session (or most of it) with my commentary and you can also get the slides.

Concurrency in Go

In my Exercism course on Golang, I have reached exercises which deal with concurrency in Go. I went back to my training materials to start reading up on how it works in Go. I am learning about goroutines, channels, and mutexes in Go which help in writing concurrent logic and communicate between separate goroutines.

Another thing that surprised me in Go, albeit not about concurrency, was how Golang constants have arbitrary precision. I was trying to shift-left an integer 64 places and I thought it wouldn’t work because uint64 is 64 bits long. But it worked perfectly. I only tried it based on a mentor’s suggestion. I keep thinking of how much I would have missed if I didn’t pick the mentorship and just solved all the exercises. I could have missed a lot of useful tricks and best practices.

This is it for this week. See you in a week!





One response to “Learning every week – 6th and 13-Mar-2020”

  1. […] happened again. I missed sharing my learnings before last week and almost missed again. But better late than […]

Leave a Reply

Your email address will not be published. Required fields are marked *