Sergey Maskalik

Sergey Maskalik's blog

Focusing on improving tiny bit every day

This is my first attempt at reviewing my yearly progress. Inspired by James Clear’s yearly reviews, and similar to a sprint retrospective in Scrum methodology, it’s an opportunity to look back and see what things worked that I should continue doing or where I can improve. In addition, because I have a hard time remembering things I did in prior years, having a point of reference will be valuable for my future self.

The idea is to answer the following three simple questions:

  1. What went well this year?
  2. What didn’t go so well this year?
  3. What did I learn?

What went well this year?

Reading. Last year stumbled upon a great book on reading itself, How to Read a Book. Prior to reading it, my reading was at the elementary level. With the new knowledge acquired from this book and with practice, hopefully I can progress into analytical reading and beyond. Finally, this book also inspired me to look into books with topics outside of my current interest and difficulty and provided techniques on how to approach hard subjects.

On a different note, I picked an excellent tip from one of the interviews with Derek Sivers on how to retain information. In order to remember ideas from the books that he reads, he takes his notes and publishes them on his website. This gives him the ability to access his notes from anywhere. Finally, he has a habit of reviewing his notes for a random book every morning. After struggling with remembering information from books for a long time, I’m eager to try his approach and have already published a few book notes myself.

This year I read: The Three-Body Problem, Joyful Wisdom: Embracing Change and Finding Freedom, Awareness, Stillness Is the Key, A Guide to the Good Life, Atomic Habits, C++ Crash Course, How to Read a Book.

Overall it wasn’t a stellar year in terms of volume, but rather it’s my approach to reading, improving depth and retention that I am most excited about.

Traveling. I had a great time in Hawaii on the island of Maui with my wife and daughter. It was great to spend a couple of weeks at the beach and swim in the warm waters. One of the highlights was when we took a side trip to the Big Island and went snorkeling in the crystal clear waters with beautiful fish and corals. My wife and I were amazed to see my daughter, almost two years old, fearlessly jumping into the water from the boat and swimming in the deep water with her floating device.

Exercise. Besides having many bouts of back spasms and getting sick more than usual, I was able to come back to my workout routine and be more or less consistent. When we traveled I wasn’t able to exercise and actually experienced craving, which was very encouraging.

Workouts per month in 2019

Month Workouts
January 8
February 16
March 19
April 12 (sick)
May 2 (travel)
June 4 (sick)
July 7
August 13
September 8 (back)
October 12
November 3 (sick)
December 7 (sick)
Total 111

What didn’t go so well this year?

Health. I was sick more than usual this year. Perhaps my immune system is not strong enough, so when my daughter gets sick there is no way I can avoid the germs. Also my sleep has been a bit broken because I tend to wake up many times. I have been experimenting with different things. The latest sleep improvement approach I’m trying at the moment is to keep the temperature down using a sleep system, which hopefully can help me stay asleep. This past year was also stressful at work, so that could have also contributed.

In addition, I’ve been plagued with multiple instances of back spasms. I found a promising book, Pain Free, that I’m in the process of implementing. Finally, Peter Attia M.D. has a set of videos on proper movement, which I’m also planning to practice this year.

Writing. I didn’t publish a single blog post last year. I urgently need to improve my written communication and strongly believe that the only way to do it is through practice. This year’s main goal is to build a writing habit (Q1), and then scale up my writing slowly to two articles per week.

Products. While I’m very fortunate to work at a great company and enjoy what I do, the downside of it is that I don’t build equity, and at the end of the day, I don’t own anything that I build. These past two years, I was solely focused on my day job, so this year I want to change that. I want to start out small and build a small mobile application for fun and to get into a habit of working on side projects.

What did I learn?

Focusing on systems rather than goals. Goals are great but they alone don’t help if you don’t have a system on how to implement them. I think that was my biggest failure point in the past. I would focus on pure willpower and motivation, work extra hard on a new goal, and then eventually burn out and stop. I think designing a system where I can focus on building a habit first, slowly, one day at a time, and then eventually scaling out effort should help me be consistent over the long term. Finally, the most important point of the system is to make it easier to work even when you are not motivated, or you don’t feel like it.

This also somewhat aligns with what I learned from Stoic’s teachings. You want to set internal goals, or goals that you can achieve, rather than external goals, something that is outside of your control. For example, building a successful business is an external goal because there are a lot of things that are outside of your control, and if you set a goal like that you most likely set yourself up for disappointment or frustration. On the other hand, setting aside thirty minutes a day and working on something to the best of your ability is something that is totally up to you and is achievable.

Writing things down is important. If I want to retain ideas from books, I have to write them down and review them periodically. It is a shame that this year I bought a book and could not tell if I had read it before or not. It had only been four years since I bought it. I think I can get an exponential amount of benefit if I can retain this information, otherwise I’m only getting a small amount of benefit. The same goes for podcasts and audio-books. I enjoy consuming the content, and there are many great insights, but all those wash away very fast if I don’t write down the ideas and action steps.

Financial independence. One way to achieve financial independence is to save 25x of your yearly expenses. The choices we make in regards to our lifestyle get us either further or closer to independence. A closet full of clothes would definitely give you something new and exciting to wear every day, but it may cost you six months of your life. That luxury car may cost you years of sitting in the office at a desk and doing something that you don’t enjoy. Every purchase we make is trade. We trade our time, a non-renewable resource, for things that we don’t need. For myself, I would rather spend this time on something that I can enjoy, like spending more time with my family or working on things that interest me.

Sleep. Quality sleep is super important for many aspects of our wellbeing, including recovery, cognitive performance, and immune function. I’ve been tracking my sleep over the past year with an Oura ring device and it made me aware of the following things that impact my sleep:

  • Alcohol. This one is pretty obvious, but I didn’t realize that having a few drinks before bed elevates your heart rate for the entire night, similar to a light walk. Having your heart work overtime through the night when it should be resting is probably not doing a lot of good. It also negatively impacts very important deep and REM sleep.

  • Big dinner or dinner with lots of carbohydrates within three hours of bedtime. Having pasta for dinner will keep my heart rate elevated for the first half of the night, affect my deep sleep and cause me to wake up in the middle of the night.

  • Caffeine in the afternoon or evening. This affects heart rate variability and REM sleep.

  • Late screen time. This affects deep sleep and overall quality of sleep. When I was younger I used to play a lot of video games late into the night; little did I know that this was really bad for my health and athletic performance.

  • Sporadic bed time. Going to sleep later than usual will significantly decrease sleep quality by reducing deep sleep.

  • Movement. Consistent exercise will decrease the resting heart rate and improve overall quality of sleep. This is pretty obvious but good feedback.

The bottom line. I learned a lot of good things last year which will hopefully help me to grow in the future. This year, I’m planning to implement what I’ve learned and make it a year of building new good habits.

Thanks for reading and happy new year!

Atomic Habits

I really enjoyed this book, and I would highly recommend it to anyone who is trying to work on something that requires a lot of effort. By establishing tiny, incremental improvements in our lives, the benefits will accumulate and grow, like a financial investment. Eventually the investment will reach a critical point, and you will see a massive change. The author, James Clear has an interesting solution on how to form a habit, you want to make a daily task super easy. For example, if you are trying to be a more consistent writer, your initial goal would be just sitting down to write for two minutes every day until you’ve established a habit. Only after you’ve made it your habit to write a little bit daily, can you progress to increase the difficulty of the task..

The entire book is full of many other great techniques and stories. After implementing the author’s suggestions in my own life over the last month, I can already tell that they work better than pure motivation. There were many days when I didn’t feel like performing the task at all, but by just telling myself that it’s super easy and it would take just a few minutes, I was able to complete it. I’m looking forward to continuing to work on building my habits, and if my writing habit works, I will report on the progress.

A Guide to the Good Life: The Ancient Art of Stoic Joy

This book was highly recommended by Tim Ferriss on his podcast, and it quickly became one of my favorites. Stoic philosophy provides ancient wisdom that is still relevant today. It explains that without a coherent philosophy of life, humans are more likely to default to pleasure maximization and distractions that will lead to squandering time, or worse, pursuing something that would not fulfill us in the end. Because Stoic philosophy is based on logic, a lot of it makes sense and does not require you to believe in something abstract or intangible.

Stoics believed that the key to happiness is to prevent ourselves from taking for granted things that we already have. Because a lot of human unhappiness comes from a desire to have more, if we practice appreciation for all the things we worked so hard to get, we can trade desire for enjoyment. In addition to being grateful, another technique would be to imagine losing the things that we already have. This would also make us appreciate our existing situation and not take things, relationships or our health for granted.

Another great piece of wisdom that I really enjoyed was the importance of setting achievable goals. Achievable goals mean, if I play a tennis match, winning the match would be outside of my control, and therefore would not be an achievable goal. Why? Because I cannot control my opponent or the environment; for example how good of a player she is, or if the sun is in my face. Rather than focusing on winning the match, my goal should be to play at the best of my ability, whichis something I could certainly achieve. By setting achievable goals, we prevent ourselves from getting disappointed and as a consequence discouraged and frustrated. In Stoic philosophy achievable goals are also called internal goals, versus external goals something that I don’t have control over.

I hope you enjoy this book as much as I did and that your life will be more joyful and fulfilling.

C++ Crash Course

After more than a decade of working with managed, high level languages, I needed to work on a cross platform project written in C++. I quickly discovered that it was hard to find a good reference on modern C++ without it being too overly complex or having to learn previous versions first. This book filled the gap that I had, and I would highly recommend it to any experienced programmer picking up C++ for the first time.

Flour Water Salt Yeast: The Fundamentals of Artisan Bread and Pizza

I give this book honorable mention because after reading it, I was able to consistently bake great tasting and looking bread. I love my carbs and a lot of times bread bought from the store does not satisfy me. If you’ve never baked bread, it is a great exercise where you can step out of your comfort zone and practice your beginner’s mind. It was also fun learning about the fundamentals of bread baking, with its different flower types, fermentation, and hydration.

bread picture

I’ve recently updated a tiny utility script (sqsmover) that I wrote when I was learning Go Lang that moves AWS SQS messages between queues. After three years, it is still a userful tool when I need to move messages between queues. I feel like it could be useful to others who use SQS and deadletter queues because at one point something is going to fail and your messages will end up in the deadletter.

In order to polish it, I’ve included the following features:

Help menu

sqs mover help menu

Region flag

Original version had region hardcoded in the code and needed a code change if you used a different region, oops. I’ve modified to allow region to be overwritten as a command line flag and default to us-west-2.

FIFO queues support

When sending messages to FIFO queues MessageGroupId is a required field, and because it is not part of the message you have to explicitly copy it from the original message to the destination. Finally every message in the FIFO queue has a deduplication id. It’s either explicitly set by the caller or automatically hashed based on the message content. Because I want to support all FIFO queues, deduplication id is also copied when moving messages.

Installation

Updated installation options with homebrew tap install brew install mercury2269/homebrew-tap/sqsmover for macOS, shell script for macOS, Linux, or OpenBSD. And compiled binary for Windows. No longer in order to install the app you have to have Go Lang installed locally and issue a go get ... command. This was pretty easy to do with awesome goreleaser project and companion godownloader. GoReleaser automatically creates binary releases and publishes it to github while GoDownloader will create a bash script for one line installation.

Intuitive error messaging

It sucked when your script fails and you don’t know what went wrong, so I’ve included a lot more user friendly error messages that should help users with figuring out what needs to be done.

error

Progress indicator

For the first version app I used to just output every message moved to the screen. This is not very useful if you have thousands of messages. A better user experience is to include a progress indicator.

progress indicator

Future work

At the moment the utility is using a batch download and upload which moves about 10 messages at a time. It’s pretty fast if you need to move few thousand of messages but if you have a million stuck in the deadletter queue I could imagine it could take a while. To speed up, I’m thinking to introduce multiple receiver and consumer threads and allow users to specify how many threads to use.

That’s it let me know if you come accross any issues using github, thanks!