New tech blog and post

I have launched a new blog to cover topics related to technology, software and other more technical stuff. It is to leave this blog free to host contents related to my personal growth, insights, feelings and fiction.

You can check the first post of the tech blog here. It is a technical article that introduce you to Microservices.

Reflecting on my first pair programming interview

For those who don’t know what is pair programming, it is basically a software development technique where two developers/software engineers work together on the same machine. At any one time, one would be doing the actual programming and the other would be reviewing the written code. In both cases, communication between the two developers/engineers is very important.

Pair programming is usually done at some companies who want shipped codes or software that has fewer defects. After all, defects on shipped code could mean higher cost in terms of quality checks and troubleshooting.

And for some companies pair programming is also done as one of the interview stages. One of the purpose is the interviewer to figure out if you are suitable for the position. Interviewees are judged on their soft skills such as communication, ability to problem solve, plan and think critically, and technical capabilities. Another purpose would be to determine if the interviewee is able to work with other developers in the company.

Pair programming interviews are also there for the interviewees to understand who they are working with and how they may have to work in the company. It’s a good chance to find out if he or she is suitable for the applied role.

For me, despite working as a software engineer for five years now, I have never done pair programming. Most of the time, I work alone or in a team. And when it comes to interviews, the toughest kind I get are those where you have to do technical quizzes, solve programming challenges or do whiteboard problem solving.

So having to do a pair programming interview for the first time is both exciting and scary. And sad to say, I didn’t pass the interview.

Towards the end of the interview, the interviewer gave some really honest and constructive feedbacks that are helpful for my personal growth. I thank him for that and for the time he spent on me.

At the same time, I feel really shitty about the interview failure, which is expected. But my mood is now about to fall off the cliff. For some context, I have been struggling with burnout for months, depression and forms of anxiety for the last four. My mood was only just stabilising after three weeks of anti-depressants.

Don’t get me wrong, I’m not looking for any sympathy nor trying to guilt trip anyone. I’m just sharing what I am feeling and have been through.

So what went wrong and could be better?

Low to average technical skills

My JavaScript fundamentals are weak. I was having issues with lambda and anonymous functions as well as some other fundamentals like passing of data. It prevented me from figuring out the solutions to some of the problems I encountered. The last time I did any decent amount of JavaScript was two years ago and even then, I only used the surface of what the language is capable of.

Making matters worse, I had to work with ReactJS, which is a JavaScript framework for developing UI. I also have to work with Redux, which is another JavaScript framework for state management. And it was no fault of the interviewer. I indicated that I want to do frontend development with ReactJS during the previous interview with one of the company’s employee.

At the end, a couple of hours spent every night for the past four days to learn ReactJS and Redux simply isn’t going to cut it.

But it doesn’t change anything. If I still want to be a frontend developer and be good with ReactJS/Redux, I have to keep learning and practice. And develop some apps using those frameworks along the way.

Failure to comprehend actual requirements

This is really on me. I was given the chance to read about the requirements and end goal of the exercise. The key focus areas were listed down in the document. But for some reason, I didn’t realise that I hadn’t really read and understand the whole thing before jumping in to come up with a solution. I could only attribute it to stress and anxiety.

Due to that, the solution I came up with was half-baked and caused major problems further down the development process.

Therefore, I really have to work on improving my resilience to stress and directing the brain to focus better. This is the only way for me to be able to understand future situations more clearly and come up with a better solution.

Overengineering

In software development, there are three principles that all developers should follow for higher productivity. They are:

  1. DRY => “Don’t repeat yourself”
  2. YAGNI => “You aren’t going to need it”
  3. KISS => “Keep it stupid simple or “keep it simple, stupid”

And because of my failure to comprehend the actual problem, my half-baked solutions caused me to violate principle 2 and 3. There were additional React components that I created that weren’t necessary and made the codebase more complex.

I’ll admit that I violated those two principles a lot of time during my five years of software development experience. It is because I like to provision for future uses. Breaking those principles served me well so far because I have experienced scope creep that requires components or functionalities that I thought of in advance and had implemented. That means, I didn’t need to spend extra effort to develop and refactor my code later.

Going forward, I really need to train myself on going for the simplest and fastest solution to any problem.

Took too long and prevented successful gauge of my skills

Because of overengineering, it took me more than twenty minutes to develop the application foundation. After which, I had to redo some of my codes in order to support certain functionalities that I have overlooked because of my failure to read and comprehend the requirements. More time was wasted.

Therefore, I was unable to implement the other features of the application that would have allowed the interviewer to determine my understanding of ReactJS and Redux.

Final thoughts

Self-awareness is actually a very important skill to have. With it, you might be able to determine if you are suitable for a given role or job.

In my case, the combination of my highly-sensitive nature, under-developed stress resilience, highly self-critical and low self-esteem meant that I hadn’t really been able to function at the level required for a so-called experienced software engineer who’s been at this job for at least five years. I’m simply not ready yet to take on roles that require me to be a consultant or a quick thinker.

The other thing that I figured out was that the number of years of experience isn’t really a good gauge of your skills. The interviewer did point out that despite my years of experience, I still wasn’t able to grasp ReactJS even after 24 hours (spread over four days) of reading and practice. He implied that he was able to pick up the framework within two days instead of four.

With that, it could mean that either my fundamentals are very weak or that I’m simply not smart enough to pick up something fast. Or maybe both. For the former, I could work on it by going to read and study the fundamentals again. For the latter, well, I can only work harder than most to achieve the same skill level.

Either way, I’m just glad that I’ve been through it and knows what’s out there. There are valuable lessons to be learnt here, which is all that matters.

My thoughts on Light vs Dark Mode when using Mac OS Mojave

Dark mode is a feature that basically flip the colour palette of all UI elements on your computer from light colours like sliver or white to dark grey and black.

With dark mode, the most visible change is the overall theme and text. It changed the text colour from black text on white background to light grey on dark background. User interface (UI) elements like windows, popup dialogs, and buttons use dark grey for its background with light grey icons and text. Because of that, the whole UI don’t distract a user from what they are working on. When working on a computer for long period of times, dark mode also doesn’t strain the eyes too much and reduce fatigue.

So I believe there are a substantial amount of creators, be it artists, programmers or writers, who prefer the use of dark mode over the traditional light mode because they have to work at their computer for long period of time and want to be able to focus on the content they are creating.

For me, as a programmer and writer, I also prefer dark mode because of the reasons mentioned above.

But I didn’t start out using that because there was never such an option on the earlier version of Windows. Back then, I always thought whatever Microsoft gave was good enough, starting from Windows 95 to Windows 8. So I read, wrote and coded using dark text on white background for as long as I remembered. It was only until 2015 when I started tinkering with the integrated development environment I used for software development to use dark mode after I found some articles on why it’s better. And it was only one of the few applications that I used that allowed for customisation without fear of breaking the whole operating system. Since then, I have never quite gone back to using light mode or light themes when writing or coding.

However, I continued to use light themes for the whole operating system even after jumping into Apple ecosystem because I didn’t quite want to tinker with the operating system.

Apple finally decided to add Dark Mode support for Mac OS with the release of Mac OS Mojave. We should applaud them for it since they did spend quite a fair amount of resources to implement dark mode properly for Mac OS. As the saying goes, “To do it is easy but to do it right takes effort.”

Well I didn’t hesitate and make the switch upon the release of that OS update.

Here is the Finder application on the Mac. For those who never used a Mac before, Finder is basically the Mac OS version of the File Explorer on Windows.

The first is the light mode. Look at how everything looks so bright, maybe a little cheery and not so dull.

And here is the dark mode version. It looks cool and professional on first sight.

And here is iTunes on the Mac.

In light mode, the whole application does look a little glaring and bright because of the white background. The music albums doesn’t look as enticing. It just give you the feeling that everything is of equal importances.

The whole experience changes in dark mode. The music albums simply pop out. They bring your attention to them and you can forget about the rest of the stuff. This is where I thought dark mode is well implemented.

Finally in the writing application that I predominantly use, iA writer. It supports both light and dark mode.

In light mode, the dark text on white background looks fine. It’s like what majority of us experienced when browsing the web and reading on printed reports. But if your monitor brightness and contrast are set high, then it can be very glaring.

And on dark mode, everything feels different. Definitely less straining on the eyes. With that, I swear I could write for hours and hours. My attention are all brought to the text on the screen and not the blank canvas around it.

It all sounds fine and good. Dark mode is the best if you want to get work done and get into the zone quickly. But here’s the kicker. After using dark mode for several months now, I’ve come to realised I didn’t like dark mode as much as I thought.

Yes, dark mode looks cool and professional but it’s a depressing sight. It gives you the impression that life is boring. Everything is all about work and no play. And on the Mac OS, certain aspect isn’t done as well as you thought.

For example, when you combine dark grey with translucency like the one you see when you open up the Finder, it makes the dark colours look a little washout and doesn’t look as futuristic or cool as you thought it should. Furthermore, the colour mix Apple chose for the various UI elements made everything looks boring too. Other than the usual blue, dark grey, light grey, and the traffic light buttons at the top, there isn’t much else to spice up the overall UI.

Here are some example of dark mode/theme that I thought are well done. They are themes for the Linux operating system.

https://www.addictivetips.com/ubuntu-linux-tips/best-dark-themes-for-linux-in-2018/

Look at the vibrant colour selections. Some of them don’t use dark grey for the background of the various windows. They go with something that’s slightly more bluish. And there isn’t much translucency to be found on these linux versions. There’s nothing wrong with translucency. But if you want to do it, do it only when it’s light mode because translucency kind of represent openness and joy. When you do it for dark mode, it gives conflicting signals like how can you be dark while being open or joyful.

Lastly, the dark mode hasn’t really been helping with my mood lately.

So I’ve decided to switch back to light mode when it comes to using the operating system and my creative tools. I want to feel happy when I’m using my computer. Don’t want it to suck the joy out of my life. It’s depressing enough.

Writing on a touchscreen is just…

Writing is still writing no matter the platform. It’s all about getting the words out, to give them a physical form be it on the screen or on paper. You can write on a piece of paper using a pen. You can write using your smartphone. You can write on your laptop or a desktop computer.

But what I have discovered is that writing on a touchscreen just feel weird and difficult. Some people no doubt won’t have any problems. It’s just not the thing for me.

I got the iPhone X. With its 5.8 inch, nearly edge-to-edge display, it’s way bigger than the iPhone 6s and 7 plus display I used in the past. That means with apps like iA Writer, I can see way more of the text with the keyboard below. The Super Retina HD display meant that text are sharp and clear. Writing on that device had been a joy.

Yet, whenever I tried to write long form, like a short story, my fingers do get really tired from attempting to hit the keys. My fingers are rather fat. Combine that with hyperhidrosis, it means either wrong keys are pressed and I need to hit delete or that the key presses aren’t registered like it should. It slows down my writing by a lot, which is irritating in a way if your thoughts is faster than the words appearing on the screen.

The other issue I have with typing on a touchscreen was the lack of tactile feedback. This is one of the reason why I prefer to write using a keyboard. The sound my finger hitting the keys and the clacky feel when you press the key just feels so good. I know you could enable haptic feedback on the phone such that every key pressed will give you a vibration. But that vibration is missing when you set the phone to silent mode via that switch. Not only that, vibration requires the motors in the phone to work hard and cause faster battery drainage. For the iPhone X, that vibration mode is no more and what you get is simulated keyboard clicks, something that you won’t hear if your phone is on permanent silent mode.

The third issue I have is having to deal with the weight of the device while typing. I know smartphones are small and consider rather light. After all you carry it in your pockets everyday. But it does become heavy when you are holding it in your hands for long period of time as you type. And that particular use case happens quite often if you are writing a long article, an essay or stories. Notes taking is fine actually because those are short burst action and probably won’t be doing it over 1 or 2 hours.

So those three reasons are why I will always prefer to write on a keyboard. And in order to do writings on the go, a portable typing machine is needed. Thus, I decided to reuse the 13inch MacBook Pro (2015) that was in storage. The 15inch MacBook Pro that I’m currently using is just a tad bigger and heavier than what I would like. You know what? Without the keyboard cover, typing on that classic chiclet keyboard is rather delightful. I could type equally fast on it.

And now I’m curious about what’s the primary device that you use to write everyday? And why.

Nintendo Switch follow-up review

A few days ago I got myself a Nintendo Switch, did a basic unboxing and gave my initial thoughts.

Since then, I’ve been playing Diablo 3 on it and with it, I can better determine the pros and cons of the device.

First is the audio. Even though the speakers are capable of producing stereo sounds, at three-quarter of volume setting, they still sound a little weak when it comes to the higher ranges and bass. They aren’t as crisp or punchy as I would like. Maybe it’s because I’m spoilt by the speakers found on the iPhone X and iPad Pro where playing music through those would make you want to move and dance along.

And if you are attempting to play games on the device in a rather noisy environment, chances are you won’t be able to enjoy the audio properly. But the good thing is that it has a 3.5 mm audio port for you to connect an earphone, headphone or maybe even speakers to it as you play. That way, you can use a sound-cancelling earphone or headphones when you in a noisy environment or when you don’t want to announce to the whole world you are gaming in public.

There is one good thing when you attempt to raise the volume higher than 3/4 of the way when an earphone is connected. The device will actually warn you about possible ear injury when it’s too loud. And it actually stop me from attempting to push the volume any higher to compensate for noise generated by the train as it moves.

The other thing I found problematic with the audio was its lack of support for bluetooth audio. I use AirPods with my iPhone whenever I’m outside to listen to music, take on phone calls, etc. There are times when I want to play games on the Switch but I found myself having to put the AirPods back into storage and pull out the 3.5 mm wired earphones from my back before I could start playing. To play Switch I need to switch my audio output device. Nice one. To me, it’s just a hassle. That means I could I only take out the Switch when I’m seated or in a less crowded area. And if I’m on the train, I would have a hard time pulling out the earphone from my bag since it would be pack with people especially during rush hour. It was during moments like this I just wish there’s support for Bluetooth audio. And yes, I’ve been spoilt by Apple’s seamless experience when it comes to their products.

Next is the display.

Although you won’t be able to see individual pixels when you play games due to the 237 pixels per inch 6.2inch display, it’s just not that bright. So when you play games in a bright environment, you may have to increase the brightness. In turn, it will drain the battery faster and reduce your overall play time. But I didn’t go that route so I have to find a corner that’s darker to play my games or squint my eyes.

But I definitely like the screen size. It’s the sweet spot. Come to think of it, the iPhone XS Max also features a 6.2 inch display that’s nearly edge to edge. But sadly, the notch just is too distracting especially if you are gaming on it. Besides, the iPhone doesn’t have games like Diablo 3, Xenoblade Chronicles 2 or even Doom on it. So that’s where the comparison ends.

The other issue was the lack of P3 colour gamut. Considering that we are now into 2018 and since then there has been various consumer-grade devices featuring P3 colour-gamut capable display starting with the iMac back in 2015, I don’t see why Nintendo didn’t put that in. It could have help to make Mario and friends look way more vibrant and colourful.

Lastly, it’s the bezel. It’s rather big by 2017 standard. Maybe Nintendo could find a way to reduce the bezel by another 10% or 20% and make use of those free space. When that happens, it would be more enjoyable.

The other thing I want to mention is the battery life. Even though it’s advertised that it can allow up to 6 hour of game time, when I was playing diablo 3, I find the device down to 15% of battery after about 4 hours. And that was spread across the whole day since I only play games while I’m on the train or when I get home. I can’t imagine what it would be like if I’m playing games like Doom (2016) on it.

But so far, I didn’t face the problem of running out battery when I’m on the go. Even then, I don’t really need to fear because I got myself a 20,000 mAh Power Bank that is more than capable of charging up a Nintendo Switch over USB-C. Based on the specification of the power bank, I can charge the device up to three times.

Now, despite all the so call flaws I mentioned, I still love the device because it is the only one so far that allow me to use conventional buttons to play serious games on the go. I just never quite like using touchscreen to play games because of the lack of tactile feedback. I want to know and feel that I have pressed a button. And it’s really satisfying when the game you play is all about button smashing. A touchscreen display can never give you that.

And if Sony Or Microsoft can develop and release their own version of the Switch with Xbox One X processing power that runs on battery in the same form factor, it could be really interesting. Imagine playing Horizon Zero Dawn on a handheld device without any graphical sacrifice.