Opinion

On Mentorship

October 4, 2023 Leadership, Opinion, Personal 2 comments

Ever watched a martial arts movie? There is always a Sensei behind the main character – usually a much more experienced, older, and wiser person willing to share their knowledge. Career, life, or software engineering isn’t exactly the same (maybe metaphorically?), but in the very same way, it is always a great idea to be inspired by and learn things from someone who has already been through the journey you are embarking on.

I don’t think I can give justice to the topic of mentorship holistically (go search the internet for that or ask Bard to generate bullet points for you), though I can share my own experiences. In part this is what mentorship is all about, see if there is anything for you below:

In my early career back in Ukraine I was lucky to get direct exposure to our clients from the USA as this helped with my English but I was also lucky to work with talented and highly energetic technical leader and a Microsoft MVP (most-valuable-professional). He was a lot of inspiration for me and probably was the reason for starting this blog and effectively jump-starting my career (tech blogging was very popular back in ~2010). Moving through my career I met many engineers who were highly skilled, had diverse technical backgrounds (think software for Ferrary F1, or for British military, or high frequency trading, or nuclear energy, etc). So I tried to challenge myself to learn from them. Very specifically, one of the annual goals I had in 2016 was “Learn 12 simple skills from other people. To achieve this goal I will first identify 12 people from the community and those surrounding me and chose some characteristic I admire.” I might not have been exceptionally successful in achieving that particular goal but at least I learned to appreciate that others know cool things I don’t. Once I moved to work for big tech (Amazon & now Google) I normally tried to maintain “official” mentorship relationship(s) via internal mentorship programs/platforms.

My experience with “official” mentors so far has been mixed. As always, it all depends on the person and how two of us connect, but in all of the cases mentors have always provided something of a value to me. It was never-ever time wasted. At the very least, a mentor will help you get an outsider perspective on you situation and answer your questions from different perspective other than your manager might. There is no guarantee that you will agree to what they say or that their recommendations will be ideally applicable to you but it is your job to work through those and figure out the best you can get out additional point of view.

I worked with few of my mentors on my promotions. It is always great to get a mentor one or two levels higher as they have a lot more understanding of what it takes to get promoted to the next level and they might actually be part of promo review process for that level. In fact, I feel like I got a lot of information from one of my mentors I otherwise wouldn’t be able to get from my manager.

Other than promotions, the other area I worked on with my mentors was understanding of my next career moves. For instance, one good advise I got was to always get most out of any situation before making any radical decisions. At the same time, I also got “never moving fish is a dead fish” and other types of advise, all of which have had their impact on me.

Third area of engagmeent with my mentors was in building vision/strategy and presenting it to leadership. A very specific advise (and, maybe, a bit weird) was to actually visualize that I’m that leader I’m going to present the strategy to and try to understand what would that leader pay attention to when listening to the presentation. I was actually asked to role play during mentorship discussion, which felt really weird, but I wouldn’t have tried this if I didn’t have this “weird” mentor.

I know that I’ve been a bit of an inspiration for some engineers in the past and this realization was a great source of energy for myself as well as a motivation to self-improve further. Regretfully I’ve lost a lot of drive to be an example or an inspiration to others. I’ve also find it more difficult to be inspired by someone. Don’t take me wrong, not that there are not enough great people around (if anything, my collegues are one of the best and truly remarkable people), it is probably just me getting older and grumpy. In a way I miss those times but on a higher note writing this blog post helped me recall good times I had and motivate myself to be a more active individual in this regard. I currently have a mentee and keep in touch with few former collegues which whom I exchange career advise.

Looking back at my past mentorship relationships I can confidently say that they helped me. Go ahead and get yourself a mentor and if you have the opportunity, don’t hesitate and take a moment to teach someone something you know, chances are you might benefit in the process as well.


2 comments


My Home Office Setup

October 18, 2020 Opinion, Personal, RandomThoughts 11 comments

First things first, this is not a “how-to” post explaining you the “one right way” of setting up your home office. I am a Software Engineer (you are likely to be one as well) and like yours, my home office setup is probably somewhere in between coding on sofa and science-fiction command center. In this post I’m just sharing what I’ve done to improve my home office situation and what I’m thinking might be worth to improve it even further. I will be glad to hear any feedback or advice you might have on this.

Location

Reducing noises, keeping kids from fighting for your immediate and undivided attention, avoiding kitchen temptations, dog barking or whatever else is applicable to you, might be one of the most important factors for your home office, yet it might be the one you have the least control of. I do not pretend to have a batcave for work from home either. In fact, I started working on sofa when COVID first hit in March and then quickly realized this wasn’t a good idea. Step by step I improved my WFH situation and currently have something reminiscent of an office. I’m renting a relatively large apartment, though it obviously wasn’t designed with a workspace in mind, so I’m using a bedroom. Yeah, a bedroom! I have rearranged the furniture in a way logically separating the room into office and non-office halves. In this post, I am going to show pictures of my office half. (Not too eager to post photos of my bed, especially when it is not made up :)).

Desk and equipment arrangement

I’m in favor of simplicity and minimalism when it comes to my desk. Even when I was going to the office I would usually keep it empty from anything non-essential. So here is my arrangement:

On the left you see my work laptop with two cables. First cable goes to a docking station serving as a power source and connecting the laptop to 300 Mbps internet (seems to be enough ¯\_(ツ)_/¯) as well as to external camera which you can see on the top of the laptop (I will touch on this again later on). Docking station has enough ports to add more peripherals. Second cable connects my work laptop to KVM. If you see, there is a small button in front of the keyboard – that’s KVM switch allowing me to share 34″ monitor and keyboard between laptops on the left and right. Laptop on the right is my personal laptop. I intentionally don’t login with my personal account on my work laptop for multiple reasons (will touch on this later as well). There is also a desk lamp and desk power source located in the right corner mostly for charging devices (2 USB-C, mini-USB, Garmin). I might keep few different sets of headphones on the desk, but usually prefer to keep them in the back of my “office”.

List of Equipment and details

Except of work laptop and few small things, all equipment is something I bought with my own money before I knew my new employer is so generous to give 1000$ to its employees to improve WFH situation [public info]. Below is the list of the equipment I’m using with links to Amazon for reference only – those are not referral links (I’m not trying to make money on your clicks, and this post is not written for that purpose).

Monitor: Dell UltraSharp U3415W 34-Inch Curved LED-Lit Monitor (Older Model) It is a nice wide curved 34″ monitor I can easily use as if I had two with tools like Spectacle on mac or built-in shortcuts on chomebook. The only regret I have is I should have probably went for newer version with more aggressive curve and USB-C support.

Monitor Stand: AmazonBasics Premium Single Monitor Stand This allows me to bring the monitor forward/backward, up/down or change the angle. This is so much better than having monitor placed stationary. It also allows to free up some space on the desk.

Keyboard: Filco Majestouch 2 Ninja Cherry MX Blue Switch 87 Key Mechanical Keyboard Black This is compact super-loud faceless mechanical keyboard. I love this keyboard and find it to be beautiful. It might be too loud to use if you are sharing space with others, so keep this in mind.

Mouse: Logitech® MX Anywhere 2S Wireless Mouse A nice precise mouse, though I often don’t like how it behaves on Chomebook. Not sure if this is an issue with the mouse itself or ChromeOS (and yes I tried to play with the settings).

Logitech MX Master 3. This is a full size and precise mouse. I am glad I replaced the old small one with this one.

Docking station: Dell WD15 Monitor Dock 4K with 130W Adapter, USB-C While docking station is definitely something to have I do NOT recommend this particular one as it is not fully compatible with newer Macs. My monitor flickers when I connect it via this docking station. Here is DELL’s support page on this. I’m using this station for power, internet connection, web-camera, and any further peripherals I will need to add to my work laptop.

KVM: Sabrent 2-Port USB Type-C KVM Switch with 60 Watt Power Delivery After much of extensive search I gave up looking for a docking station that has TWO usb-c power delivery outputs and also works as a KVM. This seems to be non-existent device. So instead, I bought myself a dedicated KVM. It is simple and it works. Power delivery is not always detected on my Pixelbook, so I skip PD option and use another cable to power my personal laptop on the right.

Power: BESTEK Power Strip with USB for charging devices, powering lamp, and occasional plug-in of things at top of my desk. I also use conventional power extender for low-power things under my desk and directly plug into the wall outlet more power demanding devices (monitor, docking station).

Desk Lamp: Swing Arm Lamp, LED Desk Lamp with Clamp, 9W Eye-Care Dimmable Light, Timer, Memory, 6 Color Modes, JolyJoy Modern Architect Table Lamp for Task Study Reading Working Home Dorm Office (Black) Super happy with this lamp – it can be bent in so many ways. I can recommend this one.

Vertical Laptop Stand: OMOTON Adjustable Something to hold my personal laptop vertically and save even more space. Anyway it is so much more pleasant to work on a large monitor (something I’m doing right now).

External Web Camera: Logitech C920S HD Pro Webcam with Privacy Shutter External webcam has its advantages of providing higher quality image with active focus. Unfortunately I probably need to add some swinging arm or a holder to it as right now I’m placing it exactly where laptop’s camera is and don’t think that my coworkers have even noticed a difference. I’m yet to test if mic is better on it in comparison to built-in one. Some people use dedicated external mics and their sound quality is noticeably better.

Backup power and internet connection: I also have two 20K+ mAh external power banks (one of which is enough to jump-start my car) and 20Gb of mobile internet plan. Based on my 4 hour testing this should take me through a full day of power outage. I know this is not ideal, but I’m also not running a data-center at home nor I have a detached house to buy myself generator or a similar solution. In fact, I do not remember unplanned power outage in my building since I live here and a planned one only lasted 4 hours.

Cables: Well… Everyone is ought to have some wire spaghetti under their desk. Right? I didn’t do anything special about the cables. Just tied some of them together so I don’t hit them with my feet.

Desk and chair: Those are cheap IKEA ones. I’m considering to change the legs of my desk to make it height-adjustable standing desk. As of chair, I don’t think mine is great for 8+ hours of sitting in it.

As of 2021 replaced the chair with Autonomous ErgoChairPro.

Ok, back of my “office”

To complete the picture of my office here is what I have just behind myself:

It is another IKEA chair for mental breaks and a bookshelf which has few books but mostly serves for accessing things I would use time-to-time, like keyboard palm-rest, other headphones, cables and few toys (no, I didn’t reassemble and then assemble the Rubik’s Cube – I can actually solve it). I’m also using the most expensive alarm I ever had which supposedly should help me wake up more naturally during winter months but doesn’t.

Last but not least, pull-up bar (BODYROX Premium Pull up/Chin up Bar) which I occasionally use during breaks. I consider it to be part of my home office as I wouldn’t buy it if I didn’t have to work from home.

No Personal things on Work Laptop

As mentioned above, I’m not logged in with my personal account on my work laptop – this means I cannot open personal gmail, facebook, instagram, twitter, favorite news site, whatever. When I actually need to do something personal I have to specifically log-in into my personal laptop, which means pressing KVM button. This small physical constraint and a clear separation not only helps to be fully compliant with whatever policies there are on the use of work laptop, but also helps to be totally focused on work. I find myself almost not switching to my personal laptop at all during working day (I take breaks, though). Additionally I blocked myself out of all of those distracting social media apps on my phone for working hours and limited their use to 15min/day/app with digital wellbing tools on my phone. I’m super happy about this (thank you, Google). In fact, this also helps me close item #23 on my new year’s resolution.

Your Feedback and Advice

I would be enormously happy to receive any advice from you on what I might be missing in my home office setup and what you would recommend. I understand our situations might be different but we are all in this together and if you have something to share please do so!


11 comments


Running a Book Club

October 4, 2020 Opinion, RandomThoughts No comments

This is not a “how to” on running a book club. In fact I know next to nothing about book clubs and to run my first meet I googled what it takes to run such a thing. All of my previous stereotypes of book clubs were of bunch of super-boring people sitting in a circle and silently sipping tea (not coffee). After reading few articles I realized that I still know nothing about book clubs as apparently they could be run in myriad of different ways.

If you follow my blog you would notice that book reviews are one of very common blog posts here (55 of them), probably as common as technical blog posts and posts on success for software engineers. So no wonder I’m interested in reading and discussing books. One other aspect I’ve always been keen on is knowledge sharing. I used to share my knowledge via tech talks based on books and discussions called “design sessions”. It is not that I didn’t want to discuss books directly, but issue was that my audience in majority of cases didn’t read the book and still was interested in a given topic.

Last week I found myself in a situation when probably half of my team has already read or is reading one particular book. With a hint from my colleague, I kicked-off a book club. First meeting turned out to be a really great, fast paced discussion with a lots of engagement. I wasn’t the most active participant and this is awesome. Took notes and spoke only few times.

We went through highlights people remembered from the first chapter and then tried to analyze those, thought of practical applications, shared our related past experiences, and just had a good discussion. I would even call this to be some kind of a team building event – all virtual (in case you are reading this in future and COVID-19 is a thing of the past).

Once in 2012 I tried to organize “Code & Beer” and miserably failed with two people showing up. Arguably I just didn’t make it very clear I bought the beer for everyone :) This time people joined with no snacks but with tons of interest. So, how to run a book club? Who knows… Maybe make sure you have a “critical mass” of people interested in same book.


No comments


On Learning

February 17, 2020 Opinion 2 comments

If you want people to like you, ask them for advice instead of giving one.

Recently I was approached to give advice on learning and improving tech skills by someone not on my team. I agreed, though this was somewhat unexpected that someone would ask me this, like if I were any authority on the topic. “I know shit, why would you ask me anything?” where my initial thoughts. Whatever was the reason we spoke about different approaches to self-improving and especially techniques to deepen one’s technical knowledge.

The things that came from the top of my mind were these, and in this post I will give few thoughts on them:

  • Learning Pyramid
  • Deliberate practice
  • Driving learning activities
  • Dunning-Kruger effect

Learning Pyramid

Learning Pyramid is one one the learning models which stacks learning activities based on the retention rate of knowledge. Here is a table from wikipedia:

Retention rateLearning activity before test of knowledge
90%Teach someone else/use immediately.
75%Practice what one learned.
50%Engaged in a group discussion.
30%Watch a demonstration.
20%Watch audiovisual.
10%Reading.
5%Listening to a lecture.

Source wiki: Learning pyramid

Effectively what it says is that using knowledge, practicing and teaching others is magnitude more effective than reading. When I think about this it seems somewhat paradoxical as often to teach someone or to practice you would actually need to read. The difference I could derive here is probably the timing of when the application of knowledge happens, i.e. if you read a short chapter on something and immediately try to use the knowledge vs. reading 20 chapters and then trying to do something about it.

The below is a technique of learning by Richard Feynman on the same lines. If you don’t know, Feynman was one of bright figures in science world. If you haven’t read “Surely You’re Joking, Mr. Feynman!” I would strongly recommend it.

When I spoke with my colleague, I mentioned that brain processes of information retrieval are different from the processes of information storage. You make it one way road if you only read without practicing. This brings us to the next topic:

Deliberate practice

Not all practice is equal. After years in software I tend to do things the way I’m used to, despite knowing there might be better ways. This is not right as it is always a good idea to step back, see what you can do better, learn it, repeat few times to make it a habit and so on.

While regular practice might include mindless repetitions, deliberate practice requires focused attention and is conducted with the specific goal of improving performance.

by James Clear, from here: https://jamesclear.com/beginners-guide-deliberate-practice

I think looking at your own knowledge gaps, and spending time to explicitly work on those areas is probably the best you can do to improve. Sometimes you would need help to help you understand what the gaps are and what you can work on to improve. Unfortunately, just repeatedly doing what you already know might not help.

Driving learning activities

There are four different kinds of activities that I do at work to help others learn and to learn myself. Unfortunately I’m not sure if I can expand on what they are exactly, but in essence they are about sharing knowledge, encouraging others to share knowledge, discussions around concrete technical topics, and hypothetical problem solving. I encouraged the colleague of mine to do something similar in his team, starting with a small group of interested people and then extending if this goes well.

If you are reading this post and are interested in expanding your technical knowledge it might be a good advice for you – start some learning activity with the group of interested people (teammates, local nerds, etc). The activity could be anything that interests you in particular. This may sound selfish, but you will be the main beneficiary of such activity.

Dunning-Kruger effect

Let’s finish with the Dunning-Kruger effect – you know that plot of perceived knowledge versus actual knowledge over time. Here it is, in case you don’t remember:

https://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect

I’m definitely post “mount stupid” but I have no smallest idea where exactly – maybe still sliding down, who knows. There was time, maybe first 2-4 years into my career when I had enough confidence to give talks, write 100s of blog posts and write an e-book. Now I feel like I don’t know anything. Though, in retrospect, this should not be the reason not to do things. Doing is learning. This is also the reason I started writing more on the blog. So again, if you are still with me, doing things is always better than not doing them (kind of self-evident, I know). Reading is not enough (another sin of mine), applying knowledge is what makes you move forward!

Share in comments how you are working on your learning.


2 comments


Approaching a software engineering problem

January 5, 2020 Career, Opinion, Success No comments

How we approach problems often defines whether we succeed or not or how hard success comes to us!

Me ice climbing

This blog post is my humble attempt to come up with some of problem solving advice for software engineers who are starting in their careers. Why would you listen to me? – You don’t have to. In fact, I would argue, that you shouldn’t take anyone’s advice at glance and at the same time be open to evaluate everyone’s advice and then make up your own mind. I do not have many credentials, other than 12 years of experience as a software engineer in various roles (SDE, Sr. SDE, Tech Lead) and various industries (outsourcing, online entertainment, nuclear energy, e-commerce). My experience is different and success is questionable. I am guilty of making career mistakes and solving problems the hard way. My hope here is that the below could save you from making same mistakes.

Worst mistake

The worst mistake of all is to die with regrets but, as not to get too philosophical, we are talking about software here. So…

It is totally normal to get stuck time to time on problems. If you never ever get stuck it might indicate that you are staying in your comfort zone impeding the speed of your progress. Therefore, imho, one of the worst things you could do to yourself at work is to let yourself stay stuck on a problem without any progress or learning and as a result with no advancement to your future career.

Understanding the problem

The first step to approaching a problem is understanding. You’ve got to identify the issues and envision how the success would look like. Sometimes this might be referred to as “working backwards”. More often than not, there will be preprocessing done by business analysts / project managers / senior engineers which results in some kind of requirements (stories, documents, tasks, etc). Your job as a software engineer is to first understand what is wanted from you. Simply state back to requirement givers in your own words what it would solved problem mean. Once you understand the problem completely proceed to the next step.

Strategizing

The second step is strategizing. You need to come up with a potential solution. You might want to brainstorm on options, evaluate them and try to come up with the best one. Decision matrixes and other techniques might help, but don’t bug yourself too much. At this step you might want to create a plan by breaking problem into smaller tasks. You might work on proof of concept or try one or few things out. I do not believe in plans themselves, but I do believe in planning as it makes you think hard about the approach. It is important not to get stuck in “analysis paralysis” mode, so once reasonable time is spent, move on to the next step even if somehow you don’t feel ready. You will never be fully ready. Take on the problem you’ve got. You might learn some new things when doing so which you didn’t anticipate.

Execution

The third step is approach execution. Doesn’t matter how great plan you had, if you fail to execute you fail. Say, you picked option x and it didn’t work out for you, do you continue to push for x or do you switch to option y, do you give up, do you seek help? What do you do? Do you feel how anxiety creeps in?

From my personal observations generally there are two types of execution: erratic and systematic.

Erratic

Basically you just start bashing the keyboard, throwing different copy-pasted blocks of code and praying it is going to work. This is that kind of approach when “<” didn’t work, so you replaced it with “<=” and it worked, but then you realized that your loop had to start with index 1 instead of 0, and so on. Eventually you arrive at the finish line. I bet that most of us, software engineers, have used this approach and it worked at times but then we felt uneasy about it.

Systematic

You think about each piece of code you write and consequences it is going to have, questioning each line of code and thoroughly testing the code. Why do I use “<” instead of “<=”? Why does the loop start at index 0? Should have I used thread-safe data structure here?How would this button look on small screen? Why does this API accept any number of items? I don’t know about framework ABC, so why not read a doc reference first? And so on – you question everything! This approach might seem like taking much more time and it does, but eventually written software has less bugs, is much more maintainable and truly solves the problem. Arguably, maturity of a software engineer can be recognized by observing them solving problems in this systematic way.

Some other bullet points

  1. Reiterating is fine. Although systematic approach wants you to think about each line of code, you might be overwhelmed to do so at once for larger project. In this case coming up with a “skeleton” solution that does something and then building on top of it (maybe changing few “bones” here and there) is totally fine. This goes along with agile methodology as well. Just don’t scarify quality with “oh, this will be one in the next iteration” and eventually never being done.
  2. Do not just copy-paste. As the joke goes: “Dev1: Damn, copied this from StackOverflow and it still doesn’t work. Dev2: Did you copy from the question or the answer?” Although copy-pasting from other parts of the project or SO, for that matter, is totally fine, what’s not fine is not understanding what you are coping or not questioning the quality of the piece of code you are copying. If the code was written by more senior developer or if most of the project is written “this was” this is not a valid justification to not try to see if anything about it could be improved. As a simple example, a developer before you might have took a shortcut by defining style right in html instead of moving it to a css class in separate file.
  3. “Don’t work hard – work smart” – although true, stinks. Most often I heard this from people who were lazier than others. There might be two types of laziness – a) the one that makes you procrastinate, and b) the one that makes you ingenious in problem solving. I’m fine with b) as long as it doesn’t come at cost of quality of your solution in terms of maintainability. Think of someone doing a+=b; b=a-b; a-=b; to swap two integers because they didn’t want an extra variable and now extrapolate this on on system design of your software where no-one could understand what the hell is going on. Long story short, you need to work hard and there is no way around it.
  4. Pause to learn and deliberately practice. At times you might come around something you haven’t worked with before. Stop! Take a moment to understand what it is. Reading one of two pages of documentation or going through “hello world” tutorial might save you a day or few. As an example, you might need to integrate a library into your project and it may look overwhelming as the project is huge. At this point it is best to implement simplest possible project with the library to understand how it works before spending days integrating it and then not understanding why it isn’t working.
  5. Seek help but do your due diligence. It is totally ok to ask others questions – this is the way to learn. At the same time it might not be appreciated to ask something that can be found online or in documentation with a simple query. Also learn to ask how to ask help http://xyproblem.info/
  6. Time bound. Never get stuck on something for too long. Put some boundaries for specific tasks. If x isn’t working, look at your strategy and unstuck yourself. You might need to escalate this with your manager.
  7. Clearly communicate. Very likely you are working in a team and have a manager. Work on improving your communication so that you can convey your status and whether you are blocked and need help. I would advice against obfuscating your status with needless information – just be honest if you are having difficulties.
  8. Retrospect and analyze if you can improve something for the future. Don’t just take everything at its “status quo”. Say, if environment setup for your project is difficult, and always takes time for engineers go ahead and improve it.
  9. Reasonably document your work. Chances are that someone will have to solve a similar problem or that you will need to explain your work at later stages. Documentation is just a tool to help you out in these situations.
  10. Add your bullet-points/thoughts/disagreements in comments!

Conclusion

It is in my personal view that approaching a software problem consists of 1) understanding the problem 2) strategizing about solutions and 3) execution of the strategy. Observation I have made over the years is that engineers tend to solve problems erratically or systematically. More systematic approach supplemented with the above bullet-pointed guidance might be helpful advice for starting software engineers, but be skeptical as this is purely an opinion. Enjoy and let me know if it helps.


No comments


Embrace the challenge to avoid procrastination

December 22, 2019 Opinion No comments

This post is highly opinionated, personal, and demotivating. Don’t read.

You may be procrastinating at the moment by reading this blog post the same way you do when you scroll Twitter/Instagram/Facebook/Reddit. If you have something more important to do now, do it now! Really, do it!

I don’t mind if you are not going to finish reading – this post is far from perfect. Also it might be the reason why it exists in the first place, since as they say “Perfectionism is a prime cause for procrastination, because demanding perfection usually results in failure.” Last call for action – go and do the thing you are postponing to do even if it won’t be perfect!

That crunch time

A lot of us tend to do everything at the very last moment. Sometimes working in the last moment is intense and very productive. Remember that night before the exam in school? What about crunch time at work not so long ago? If you succeed, last moment triumph has a certain joyful taste to it. If you fail, you feel miserable and crashed.

I remember a time at one of my previous jobs when I sat till 6AM fixing critical bug related to monetary operations, writing tech post and then coming to the office around 12PM like a hero (well at least in my own ego eyes). Moments like that made me happy, but those were my 20s. Now I really want to have my 8 hours of sleep and a sustainable pace of work.

Time management techniques don’t work. Do they?

There are time management techniques that try to address these issues so that you can plan and complete your goals throughout the time. For instance, there is one where you split your tasks into 4 groups like on the picture below.

The idea is to make yourself work on important but not very immediate tasks (B) so you don’t end up with important and urgent ones later on (A). And in no way you want to be working on (C) or (D). The idea is good, but it doesn’t work for me at all, and likely it doesn’t work for some of you.

One other idea is called “pomodoro” requiring you to split your work into 25 minutes of highly intense and focused work. This one mostly works for me but I have rally hard time sticking to it for a long time.

There are tons of other methods to make you work on things you would rather do later, like “East That Frog!“, but my argument is that these techniques suck a big deal just because they assume people are rational.

We are irrational, emotional, impulsive, lazy (ok, maybe not you) and we do not operate like machines. If something is not intrinsically motivating there is very little you can do about it. How about doing it tomorrow? (you know that mysterious place where 99% of human productivity is preserved)

Not suggesting anything

I cannot suggest doing anything as I am not an authority on anything. I know next to nothing about time management. I know next to nothing on motivating people. At the same time we all know what we need to do, but we just aren’t doing it. For instance, there are numerous books, techniques, “gurus”, programs, whatever for loosing weight, but everyone, and I mean everyone, knows that it all boils down to “Eat less, exercise more!” that’s it. Yes, that’s it, and yet despite majority fails. It only works if you fall in love, or, say, you are an actor to take that 10M gig or something else of high intensity. Sad, but true. You must be demotivated by now. Sorry.

Utilize what works

There are some things that work for me even when it is about doing something I don’t want to. Shame to acknowledge, but these are based on opinions of others about me (yes, that thing that we say isn’t important, but at the same time is often the most important to most of us, social creatures). Maybe some something else might be the kicker for you. Below are some things that work for me:

External visibility of progress

I find it helpful to state my commitments publicly. This generates pressure to complete whatever promised as not to look bad in eyes of others.

Self-imposed deadlines

In the past I would sign up for things that I knew I had to do but would always postpone, like that nasty certification exam or language exam or whatever. It works because there is an approaching deadline. On this note:

A rational decision maker with time-consistent preferences would not impose constraints on his or her choices. But if people impulsively procrastinate, and if they also are aware of their procrastination problems […], self-imposing costly deadlines can be strategic and reasonable.

Ariely, Dan; Wertenbroch, Klaus (2002) “Procrastination, Deadlines, and Performance: Self-Control by Pre-commitment” (PDF). Psychological Science.

Challenges

I love being better than my previous self. This works best when it is something measurable, like personal record of some sort. This also works great if others would find it admiring. I know this worked for me really well as for instance I would complete my 200km running challenge in Sep 2016 despite being injured. These days I’m trying to play this game as well. I’m currently in four challenges where I promised to stick to my commitments to four different people. I also have few self-imposed challenges (not sure if these would work).

Hey, you, my reader!

If you have something you want to do, but you’ve been putting off lately, I am challenging you: play a challenge game with someone by promising them to complete the thing you want to do or otherwise you will complete a punishment (let them come up with it), ask the other person to do the same so both of you gain something from the interaction. Make sure it is something you can measure and share, also time bound it (week, two, month).

If we know each other, I would love to play this challenge game with you as well. Get in touch!


No comments


Approach to System Design Interview

October 7, 2019 Design, Interview, Opinion No comments

Designing something like Dropbox or other well known service is one of the standard System Design Interview (SDI) questions at FAANG companies. This post is for self-educational purposes focused on how to approach SDI question. Also this does not represent how any tech company is designing their software or is interviewing candidates. Though, feel free to use it as a guide for your SDI if you find it useful.

I like to break SDI into four phases. You want to get to the last phase when interviewer is making the problem harder by asking you follow up questions.

Scope, Requirements, Interfaces

The most important part that sets the tone for the entire interview is to clarify requirements with your interviewer. Try to understand what functional and non-functional scope of the problem they expect you to cover.

Functionally Dropbox “offers cloud storage, file synchronization, personal cloud, and client software”. You can list these as bullet points during the interview (any device accessibility, automatic file synchronization, file sharing, file storing, backups, team collaboration, security, etc).

Something like Dropbox will have to handle millions of users, have scalable, available, and performant backend. Ask for number of users, active users, devices, etc to be able to estimate required storage, network capacity and understand if partitioning and how much of replication of data is required. This can be used in calculations later on. Something like: 2K (avg. files) * 500Kb (avg. file size) * 1B (tot. users) ~= 1PB (file storage).

It is always a good idea to define interfaces of your system. APIs exposed by server are usually a great way to start. Define interfaces like list of REST calls or just names of APIs.

Component High Level Design

After gathering the requirements and documenting main interfaces proceed to listing major components of the system. You might not be able to list everything, so mentioning that there are other aspects that you not fully covering, but can get back to them when required (examples could be: authentication, payment system, integration with external systems, etc).

At this stage you should arrive at key ideas to solving the design. Key ideas for designing Dropbox could be: split large files into multiple chunks; keep chunk metadata in database locally and sync to server; receive and upload files via synchronization queues.

Once key solution ideas are clear, draw some boxes. It is best to start from top and proceed to details. In our Dropbox example it could be Backend and Frontend. Backend could consist of File Storage, Metadata Database, App Servers and Queues. Our Client could be split into logical parts. Many similar posts (not sure about origin) suggest to split client into Chunker (split files into multiple), Watcher (watches local folders and server for updates), Indexer (processes watcher events), InternalDb (stores metadata).

Component Details

Obviously, it is impossible to cover gigantic system, like Dropbox, in 45 minutes, so you have to focus on few aspects that are important. For instance, you can focus on database design for metadata by drawing tables and their relations, or instead you can focus on how updates will be sent to other devices by drawing sequence diagram, etc.

This could be the best stage to show your depth of the knowledge in one or the other area. More often then not interviewer would be happy to focus on area you are comfortable with and then would ask you follow-up questions to understand the depth of your knowledge and whether you really know what you are talking about or just making things up while throwing buzz-words. It should go without saying that you should not be doing this.

Follow-Ups

It is a very good sign when interviewer starts to make the problem harder as it means you are doing really good. At this stage the interview can go into any direction depending on the interviewer, but often you would need to solve scalability problems (queues, caches, load balancers), availability (replications), or you could be asked to increase the scope of functionality that would make you add new components, etc.

Conclusion

This is my concise view on the parts of SDI, though your experience could be totally different depending on the interviewer, company, level targeted and specifics of a question (like, say, designing fridge controller).

I recommend reading the book “Designing Data Intensive Applications” as it is absolutely great resource to train yourself whether you are preparing yourself for interview or just trying to solidify design skills. You can also try watching youtube videos and googling articles like this.


No comments


It’s all in your head: thoughts on 15 books

September 22, 2019 Book Reviews, Career, Opinion, Personal 3 comments

Metacognition. Seeing with your tongue. Implanting fabricated memories. Superintelligence. Immortality. Dataism as religion. Lobsters and your social status. Number anchoring when negotiating your salary. Amoral deception. Illusion of choice and of free will.

Are you intrigued? You should be. I definitely was impressed by some of the new knowledge gained and ideas covered in few books read recently. This post is a set of short one-four paragraph book reviews. Some books I do recommend and some I don’t though still mention them for my personal record and for entertainment reasons and also to prevent you from reading them. Since this is covering 15 books the post is going to be relatively long. Please bear with me.

Learn better

Key idea: Learning is a skill and you can teach yourself to be better in it.

The author advises 6 steps: value – make learning more valuable by associating it to things you appreciate, target – set learning goals, develop – practice with audience or teach, extend – constantly improve understanding of existing knowledge, relate – create relationship between concepts, and rethink – don’t get overconfident and dive deep to understand ever better.

Quote: “The act of writing is a good example of metacognition because when we think about composing sentences and paragraphs, we’re often asking ourselves crucial metacognitive questions: Who will be reading this? Will they understand me? What things do I need to explain? This is why writing is often such an effective way to organize one’s thoughts. It forces us to evaluate our arguments and think about ideas.”

At times I regret how I was studying at university – I could have been much more efficient had I known that the key is to retrieve the knowledge instead of repeatedly consuming information. My interpretation is that the brain works in such a way that when we consume information it is transmitted towards its storage destination igniting complex neural paths in one direction but to retrieve the information the path has to be ignited in the opposite direction as well or otherwise we risk “forgetting”. This brings us to the next book:

The Brain: The Story of You

The book if full of all kinds of absolutely fascinating facts about inner workings of our brain. Sometimes even slightly creepy. For instance, read this quote below:

Quote: “So not only was it possible to implant false new memories in the brain, but people embraced and embellished them, unknowingly weaving fantasy into the fabric of their identity.”

Disregard if you believe someone can implant fake memories, this book is totally absorbing and exciting read if you are new to neuroscience and psychology and want good introduction. You would get to learn about extreme adaptive capabilities of the brain and other things. As I understand it, effectively the brain is a powerful interpretation machine taking electrical signals as input (from your ears, eyes, tongue, nostrils, skin) and translating them into flow of bioelectric processing that could cause certain chain reactions resulting in physical actions and/or secretion of chemical substances (hormones) by glands effectively making us alive. Since the brain is such a powerful interpreting machine we can work on providing it with other inputs and teaching it to handle those as well. In this way a guy has learned to see with his tongue and even climb using Brainport. This is a real product for people with disabilities consisting of a camera on outside, a pad put on tongue towards which an electric picture is projected. To extend on this, there is nothing that could prevent us from extending capacity of human body.

Or, maybe, instead we can build artificial general- or super- intelligence to help us out?

Life 3.0: Being Human in the Age of Artificial Intelligence

Let’s do versions first: 1.0 – biological when hardware and software evolved, 2.0 – cultural when software is designed and hardware is how it was, 3.0 – technological when both hardware and software are designed. Here “hardware” is human body and “software” is our cognitive abilities to process information.

This book reads almost as science fiction and somehow involuntarily reminds me of movies where robots and humans exist together. The book brings questions of how the society will exist when Artificial General Intelligence becomes a reality. Would we no longer need to work? Would machines try to exterminate us as in Terminator movies or harvest for energy as in The Matrix? I liked be book for bringing all of these interesting questions, entertaining on all kinds of possibilities, and exploring potential solutions to new problems we would eventually have to face and at same time not actually being a fiction.

Can we become super-humans or even gods without the help of AI? Let’s look what the next book says:

Homo Deus: A Brief History of Tomorrow

The key idea is that we eventually become god-like and gain ability to control life and environment and Homo Sapiens goes extinct. We might eventually lose our carbon-based existence and just become information.

I really like the structure of this book taking your slowly from understanding how much progress humanity has made by overcoming such horrible things as plagues, famines, and wars. Then the book sets next goals for humanity such as immortality and eternal happiness. The author then projects his historical knowledge and recent achievements in medicine and technology into what future might bring us.

We believed in gods, science, liberalism, other things. Humanism being the main “religion” of 21th century when we celebrate our own intelligence and experiences, but the final and the last one could be Dataism. You can translate everything into data! Everything. Many people measure their pulse, sleep, etc. People with diabetes wear devices that measure blood sugar levels and inject insulin as needed. People post pics on facebook, instagram nonstop, and tweet like crazy. When I run I measure speed, pace, etc and compare to earlier myself and other runners. Oh… and I write this post. Let’s go further: wondering how good sex with your partner is – easy put data sensors that measure, duration, intensity of orgasm, analyses sweat contents and put it on a plot over period of time and you know all you desire to know and, maybe, even compare to results of others. Sounds weird? I bet, but some real companies produce products like this. Now, let’s put even crazier proposition: Do you even exist if you are not connected to net and there is no digital trace of you? Right now, you would think that you do, but maybe in future ubiquitous data stream of human life becomes their life in itself?

Quote: “Senses and emotions are biochemical data-processing algorithms”

Speaking of biochemistry:

12 Rules for life

Serotonin is natural hormone associated with feeling of happiness. It is antidepressant you can get prescribed if you’ve got depression. In lobsters serotonin is regulating posture – the more serotonin – the more open lobsters posture is – the higher lobster is in its dominance hierarchy. Let’s call them alpha-lobsters (AL). Other male lobsters would know AL are tough ones and would not take on them and female ones would be attracted to AL. Female ALs would also be the ones with all the mating choices. Lobsters existed since 350M years ago (and if you recall 65M for dinos and some 200-300K for homo sapiens). Now the interesting part: the process of regulating posture and social status is embedded in humans the same way as it is in lobsters. Yeah it is very deep inside us, but, damn, crap, no! So the first rule is “Stand straight with your shoulders back”.

I didn’t like the book, though. Except of the very first rule others are not so fascinating and exciting. Not too sure what exactly to make of the first rule or what other rules are teaching us, but the book is quite popular and the author is very interesting personality (Canadian clinical psychologist with strong views), so instead of reading I would recommend to watch this first: https://www.youtube.com/watch?v=-5RCmu-HuTg (start at 3:40) and if you still want to read all 50 shades of grey in the lobster world – go ahead.

10% Happier

Another book I cannot really recommend. Listing here mostly for myself as not to forget. I read it and, yes, it is quite interesting as a story, but not much more. The book is like a memoir of one of the journalists who discovered his way to practicing mindfulness through his personal struggles of finding himself while building his career, reporting at war, craving for drugs (adrenalin, cocaine, whatever), and interviewing notable people, such as Dalai Lama. The only learning form this book is that celebrated people are often deceiving, they are hiding things and are driven by crazy things. The author didn’t motivate me to start meditating – I still think it is not gonna work for me. Somewhat fun read though, waste of time otherwise.

Speaking of deception:

The 48 Laws of Power

Let’s start with a disclaimer: I do NOT praise this book.

This book effectively teaches you how to deceive others and how to work your way to gain power the evil way. Wikipedia says it is a bestseller popular with prison inmates and celebrities. Description on goodread has this “This amoral, cunning, ruthless, and instructive book synthesizes the philosophies of Machiavelli, Sun Tzu, and Carl Von Clausewitz with the historical legacies of statesmen, warriors, seducers, and con men throughout the ages.”

If you want to understand how amoral this is read the quotes here: https://www.goodreads.com/author/quotes/865.Robert_Greene I don’t even want to repost them here.

Key learning: bad people exist and they could intentionally be manipulating you in psychopathic ways just to get what they want no matter what the price or method. It is good to be aware of such things and try to recognize and distinguish between people with genuinely good intentions and those who are evil. Never be a victim.

The subtle art of not Giving a F*ck

One thing that I like about this one is that the author says it is ok to not try being positive all the time. At times people are overplaying it and it is weird when they pretend to be happy. Acceptance of some of the negative experiences is a positive experience in itself.

The book is an easy and extremely entertaining read, especially if you are feeling a bit stressed and worry about too many things. Definite fun. Most of us like fun, so if you are going to read/listen to it do it mostly for that reason.

Algorithms to live by

Fun book for software engineers on how you can incorporate computer algorithms into your everyday life. Just go and read. Super easy reading and wonderful way of spending your time.

Wondering how to sort your clothes and stuff in the most effective way? Like maybe sorting them by type? Nope. Wrong answer. The best way is to introduce Least Recently Used cache, making sure stuff you need the most often is always most accessible.

Go ahead and apply game theory towards making your decisions and design mechanisms for decisions instead of relying on good intentions.

Never split the difference

Ok, finally back to slightly more serious books, and I would go as far as to say that this book is a “must read” before your next job offer negation. The book is written by former FBI agent who worked as hostage negotiator.

It is also probably one of the most practically useful books for people who have office carriers like me and would like to apply negotiation techniques in almost any discussion. More often than not, “No” means “wait” or it means there is something the other side doesn’t want to reveal. Your job is to work through what the other side really wants.

Louder than words

This is a book on nonverbal intelligence. I remember it being intriguing when listening to. We humans are very interested in knowing what others think. They say body language conveys 55% of communication. If this is true then we should benefit from learning to be better at understanding nonverbal messages.

Principles: Life and Work

This is really good perspective on how you can structure your life and work around set of principles. I like the emphasis on always getting all the way to truth by overcoming your emotions, ego, and blind spots.

One of the great and unique notions introduced in the book is idea meritocracy that can be applied at workplace based on the following: radical truth – no filter on what you’re thinking, radical transparency – being super open for entire organization, thoughtful disagreement, believability-weighted decision making.

If you don’t have time for the book just want this great video on how economics works and then look at the principles for success videos. These two should be worth one hour of your leisure time. I really appreciate how Ray Dalio is trying to leave some legacy after him.

Extreme Ownership

This book is written by former US Navy-Seals who fought in Iraq and in essence is partially memoir and partially book on leadership covering 12 principles towards becoming extreme owner and a real leader. The most memorable are the first and the last. The first one is extreme ownership: always take full responsibility for your own and your team’s results, never blame anyone.

Quote: “Implementing Extreme Ownership requires checking your ego and operating with a high degree of humility. Admitting mistakes, taking ownership, and developing a plan to overcome challenges are integral to any successful team.”

The last principle one is discipline equals freedom: conquer your weaknesses, procrastination since being disciplined means being fee. This brings us to another book:

The Power of Habit

Key learning: most of our lives are structured on top of numerous habits and building right habits could propel you really far forward.

Habits have the following structure: Cue (stimuli) + Response (actions) => Reward (resulting sensations). To build a new habit you need to identify the response – which is the core of what you want to be doing, then you need to come up with cues that would repeat and eventually create craving (same timing, same location, same triggers), and then you need to make sure you get the reward or punishment. Once this is done: repeat-repeat-repeat and at one point you won’t be able to resist.

Quote: “Habits are most malleable when the Golden Rule of habit change is applied: If we keep the same cue and the same reward, a new routine can be inserted.”

Thinking Fast and Slow

This one is written by Nobel price winner and is probably based on more research done by author himself than any other book in this list. Not an easy read. I definitely recommend the book, but probably don’t listen to it like I did. Get yourself kindle or paper version.

This is a book on how we think about things in realm of two systems: system 1 – fast processing, lazy, and emotional, automatic, and impulsive; system 2 – slow processing, rational, aware, conscious, and considerate. Although the author didn’t give these parallels I tend to think about system 1 as subconsciousness or based on subconsciousness and about system 2 as that of consciousness.

Default rule. Let me give you one example: I lived in Austria for some 6 years. Had I died in car incident I would have been donor of my organs, same is the case for 99% of drivers in Austria. Now, this number is only 12% in neighboring and culturally similar Germany. This is simply because Austria uses opt-out and Germany uses opt-in system when collecting consent. System 2 needs to put consideration in case of opt-in, while system 1 is happy to skip in case of opt-out.

Loss aversion. We are more afraid to loose something than we are eager on getting more of it. Authors provide numerous examples of loose/gain propositions with exactly same statistical outcomes and demonstrate how people choose option that sounds more safe. Unfortunately in real situations what sounds safer could be irrational and more often than not people actually make the wrong decisions. This is especially important when you make money decisions.

There are many other concepts introduced in the book all backed up by research, evaluation and phrases for remembering in the end of each chapter. Just going over all of these concepts is worth your time as it might help you make better decisions. I am considering rereading kindle version of the book after some time.

Conclusion

Personally I find this kind of books very fascinating and engaging as they provoke profound thoughts on our existence and provide guides towards enhancing our future well being.

Hopefully these short reviews are useful to you and will help you pick your next read.

Thank you.

Would be happy to receive quick recommendations on similar books in comments!


3 comments


Do not misuse or over abstract AutoMapper

November 27, 2016 AutoMapper, Opinion 15 comments

AutoMapper is a great little library every .NET project is using (well, lots of them). I used it for the first time in 2010 and wrote a blog post about it.

Since that time I observed few things:

  • Almost every project I worked on, that needed some kind of object mapping, was using this lib. In rare cases there was some pet library or manual mapping in place.
  • Almost every project had some abstraction over the library like if it was going to be replaced or like different implementation for mapping would be needed.
  • Basic API of the library didn’t change at all. CreateMap and Map are still there and work the same. At the same time performance, testability, exception handling, and feature richness got improved significantly. Last one, in my opinion, is not such a good thing as it leads to the next point.
  • In many of those projects AutoMapper was simply misused as code placed in AfterMap or in different kinds of resolvers would simply start containg crazy things. In worst of those cases actual business logic was written in resolvers.

I have always been of an opinion:

Less Code – Less Bugs; Simple Code – Good Code.

Having seen this trend with the library, I would like to suggest simplifying its usage by limiting ourselves. Simply:

  • Use AutoMapper only for simple mapping. Basically, one property to one property. Preferably, majority of property mapping is done by the same name. If you find yourself in situation when over half of your mappings are specified explicitly in ForMember method it may be the case for doing it manually (at least for the specific type) – it will be cleaner and less confusing.
  • If you have some logic to add to you mapping, do not add it via AutoMapper. Write a separate interface/class and use it (via DI) where your logic has to be applied. You will also be able to test it nicely in this way.
  • Do not abstract AutoMapper behind interfaces/implementations. I’ve seen abstracting this in a way that you need to create a class (empty in many cases) for each mapping type pair and somewhere there would be custom reflection code that initializes all of the mappings. Instead, use built-in AutoMapper Profile class and Mapper.Initialize method. If you still want to have at least some abstraction to avoid referencing AutoMapper everywhere make it simple.

Here is how I’m using AutoMapper these days:

Somewhere in CommonAssembly a very-very simple abstraction (optional):

Somewhere in BusinessLogicAssembly and any other where you want to define mappings (can be split in as many profiles as needed):

Somewhere in startup code in BootstrappingAssembly (Global.asax etc):

And here is the usage:

That’s it. I do not understand why some simple things are made complex.

There is also another advantage of keeping it minimalistic – maintainability. I’m working on a relatively new project that was created from a company’s template, as a result it had older version of AutoMapper abstracted. To upgrade it and keep all old interfaces would mean some work as abstraction used some of the APIs that did change. Instead I threw away all of these abstractions and upgraded the lib. Next time upgrading there simply will be way less code to worry about.

Please let me know if you share the same opinion.


15 comments


Single Git Repository for Microservices

November 14, 2016 Opinion No comments

Just recently I joined a team. We write intranet web application. There is nothing too special about it, except that it was designed to be implemented as micro-services and as de-facto at the moment it is a classical single .NET MVC application. This happened for a simple reason: meeting first release deadline.

The design was reflected in how source control was set up: one git repository per each service. Unfortunately this caused a number of required maneuvers to be in synch and to push changes as team was making scattering changes in multiple repositories. This also made it more difficult to consolidate NuGet packages and other dependencies as all of them were in different repositories.

I think that microservices and corresponding hard reflection of their boundaries in form of source code repositories should evolve naturally. Starting with a single repository sounds more reasonable. If you keep the idea of microservices in you head and nicely decouple your code nothing stops you creating new repositories as you service boundaries start to make shape.

Taking this into account we merged repositories into one. There was only question of keeping source code history. Turns out the history can be easily preserved by employing git subtree command and placing all of the service repositories as subdirectories of a new single repository.

As a result, team is working much more effectively as we do not waste time on routine synch and checking who did what where. 

Conclusion: Theoretically micro-services should be implemented in their own repositories. That’s true, but in practice for relatively small and new project, with only one team working on it, single repository wins.


No comments