Buy @ Amazon

Search This Blog

December 27, 2020

12 Tips To Interviewing For Identifying Good Talent

Candidate Interview Photo Sample
Photo by Steve Halama on Unsplash

Interviewing is a job that requires preparation and coordination among various stakeholders. Unfortunately, though in many places that I have been to as part of my Consulting gigs, I have witnessed first-hand on the very many things that go wrong in the preparation and conduct of interviews. In this post, we shall focus on the things to do before, during and after the conduct of an interview to aid better decision making in identifying talent.

  1. Prepare. Know what you want. Do know the expectations of the role you are hiring for.
  2. Prepare Again. A candidate's CV is a window to his world. Fish for things you want from the CV against the job expectation. You may or may not have clarity at this point in time. But you mind keeps working behind the scenes, and this is important.
  3. Prepare Yet Again. Unless you are a recruiter yourself, you wouldn't be the first person to interview the candidate. So, see if you can collect the feedback from earlier interviewers. Why? So you don't overlap what was done in earlier rounds and may want to know the gaps that could or should be filled in. This way, you make the best use of your time with the potential hire, continuing where things were left off in the earlier rounds of candidate interview.
  4. Prepare One Last Time. Once you know the gaps and the areas you may want to double-check, prepare on a set of questions to ask. Frequent and odd silences during an interview would be perceived as company's lack of competence and professionalism.
  5. Start the interview by introducing yourself and the company you represent in a manner that eases the candidate's stress and making him want to join your team. Do not forget that you are an ambassador of your company and thus have the responsibility to present yourself well enough.
  6. Stop examining the candidate. Start exploring the candidate for his strengths and weaknesses. As bonus, you would even encounter red-flags in the candidature. The secret to exploring is having a conversation.
  7. Respect. It is not your choice but an obligation. Throughout the interview, irrespective of the candidate's race, ethnicity, background, or experience level, demonstrate your respect for him/her by being humble. You are duty bound to protect and build the brand of the company you represent.
  8. Do not forget to noting down key observations. Every observation counts. Usually this aids in sharing meaningful feedback about the candidate post the interview to the Talent Acquisition team.
  9. Be mindful of the interview time and try to complete it within time. If you had to extend it, don't drag it much and ensure that the candidate is okay with it.
  10. Just before you end the interview, make sure give room to take questions from candidate.
  11. End gracefully by being thankful to the candidate for his time spent exploring the open opportunity at your company.
  12. Immediately after an interview, re-visit your notes and construct meaningful feedback about the candidate that you can share to the Talent Acquisition team for use by the next round of interview.

Whether or not you hire the candidate; whether or not the hired candidate joins your company; the interview experience should be a win-win. There can't be second thoughts about it.

December 8, 2020

Course Review : Coding for A/B testing: Run more AB tests, find more winners

 

Course : Coding for A/B testing: Run more AB tests, find more winners by Ruben De Boer

Source : Udemy 

My Rating : 3/5

My Review : 

First half is pure basics on HTML, CSS and Javascript, which is not the subject of this course title. The real subject of the course is in the 2nd half and it run's through examples fast, without any introduction of the AB Testing tool.

I would recommend the course be re-structured to explain AB Testing taking 1 or 2 tools as an example. It would be much better that way.

P.S: I took this course on the Udemy business account and have shared this feedback in there as well.

November 23, 2020

Ten Commandments of Egoless Programming

We are nothing but the values we carry. All through my life thus far, I tried to influence people around me with the virtues I value. Thanks to some good reading habits I had inculcated, and the fortune of being in good community of peers and mentors alike, I managed to have read some real good books. This post is about the 10 commands of egoless programming in Weinberg's book. I shall explain the commandments based on my experience here.

So very many decades ago, Gerald M. Weinberg authored The Psychology of Computer Programming. In it, he listed The Ten Commandments of Egoless Programming, which remains relevant even today for us as not just programmers but as team-members.

Weinberg is regarded as a pioneer in taking a people-centric approach to computing, and his work endures as a good guide to intelligence, skill, teamwork, and problem-solving power of a developer. When they appear to inspire and instruct, we find that they can apply to just about every business area, and even to life itself.

Here are the 10 important lessons developers, project managers, and stakeholders would do well to keep in mind during the project lifecycle.

  1. Understand and accept that you will make mistakes.
    Mistakes are rarely fatal in our industry, so find them early, before they make it into production, learn from them, and move on.

  2. You are not your code.
    The point of a review is to find problems. Don't take it personally when one is found. Remember my words, “To err is only human, repeating it is what makes you either evil or insane”.

  3. No matter how much "karate" you know, someone else will always know more.
    Seek and accept input from others. You can learn new techniques if you just ask. Always remember, it is never too late to learn.

  4. Don't rewrite code without consultation.
    It is always a good idea to pair-up and have conversations on the code that you are tempted to re-write because you think it is bad. Your risks are much lesser if the code is backed by Unit tests. The least you can do is get it code reviewed before pushing code to main-stream branch.

  5. Treat people who know less than you with respect and patience.
    Don’t be a bully. Seriously, just don’t be one. Grow up!

  6. The only constant in the world is change.
    Things change, sometime for better and sometimes for worse. There are some things in your control which you can leverage to change things for better. Be the change that you wish for good. Also be willing to accept change for the overall good of the team.

  7. The only true authority stems from knowledge, not from position.
    Don't wield a title like a badge of "rightness." If you want to be loved and respected in an egoless environment, cultivate knowledge. It may or may not lead to authority, but sure leads to love and respect from others.

  8. Fight for what you believe, but gracefully accept defeat.
    Open culture is not being polite in the front and back-bitching in the back. Rise up, voice your concerns, be heard, and make your point of view by doing your homework, all with an intent to help and learn otherwise. You can’t accept defeat, if you carry the burden of your ego.

  9. Don't be "the guy in the room".
    There are so many beer buddies, movie mates, cigarette companions, and what not, who can come together or fight fiercely on any non-professional topics by respecting each other; but definitely not discuss and debate openly, work related matters for team’s betterment. Just don’t be that guy in the room.

  10. Critique code instead of people – be kind to the coder, not to the code.
    Pour your frustration on lifeless things instead of on emotional beings. Corollary, if someone were to show his frustrations on you instead of your work, be a little polite to him, discounting it as emotional down syndrome. I have been on both sides, and so will you sometime. Let us support one another and grow together.

Just to re-iterate, these commandments are still incredibly relevant. Put it to deliberate practice and with time they will bring out a better developer and co-worker in you.

You can get this book from Amazon.

November 20, 2020

Tensegrity In Microservices Architecture

Tensegrity or Tensional Integrity is also known in layman words as Floating Compression. In engineering field, it is the science of building a structure of isolated "compressed components" like bars that connected by "pre-stressed tensioned loose components" like cables or tendons. Any disturbance to a component in the assembly not just alters but brings down the entire structure.

Below is a picture of one such engineering model. Take a deep breadth and try to identify the connectors that help maintain the beautiful engineering model that you are witnessing.


Think of a table engineered by applying Tensegrity principles, like the one above. You may love looking at those crafty products but when it comes to buying it for your daily use, you think of  durability, don't you?

Tensegrity in software product/services is taboo, for it is not a deliberate engineering but a result of neglect or poor engineering. It's manifestation crops up so often in today's buzz-word architecture -- microservices. Every company dreams of building and connecting together a loose set of services as one application overlooking the cons in distributed architecture. Some of the examples of its manifestation are:

  • Consumer service go down when its Producer service is unreachable.

  • Consumer service go down when its Producer service is times out.

  • Consumer service go down when its Producer service returns unexpected response.

I have voiced openly against startups going micro-services first architecture during my consulting days. I still warn them. I am a big advocate for monolith first and then tearing it down into microservices, after you got your domain modelling right and have well defined bounded context. And when you do break it down into microservices, it gives you enough leeway to accommodate your learnings from your short-comings in building distributed architectures. Tensegrity is the very basic thing, that you should watch out for and solve in your engineering microservices architecture by not re-inventing the wheel but by making use of available libraries that resolve these kind of issues.

Remember this as you refactor your monolithic architecture to microservices one,

Moving from monolithic architecture to microservices architecture is shifting complexity from your application to orchestration. Know your strengths and find your balance. 

October 21, 2020

Book Review: Red Yellow Green: What Color is Your Money?

What color is your money? by Noah Gift @ Lean Pub

The book titled, "Red Yellow Green: What Color is Your Money? The survival manual for gig workers and consultants" by Noah Gift is a good and engaging read. I personally have experienced and was diligent enough to escape many a potential predators. Actually, I have come across those predators that are super sweet in talk, popular (don't know if this is a paid for PR thing that is so common these days) for his other works than what he is doing (for example if he is a founder of a tech consulting company, he would have been popular in authoring a book or two), etc. Consulting is definitely a high-risk, high-reward endeavor. It is the same with doing a co-founding venture in a start-up. I would say this is THE MOST  IMPORTANT thing to watch out for during the course of your engagement. The author is in fact polite but firm in pointing this one out, which is my favorite of all. I wish the author cites an example or two of the things on how one could be deceived, to make it more sticky in the minds of a reader. I do think that the author needs to add more content on the later chapters in similar lines with some examples to make it more motivating and interesting.

All said, I would recommend you give this one a read, for it is worth your time and who knows, it might save you from the possible predator. An experience with a predator can be so unnerving or at the very least bitterly frustrating experience. I have always managed to escape this making Legal as integral part of my ventures.  

Lastly, this review is based on the rough-cuts of this work-in-progress book that was made available in O'Reilly's SafariBooksOnline.

October 11, 2020

My Experience With Expo For React Native



Note: I'm assuming Managed Workflow with Expo to leverage the max out of their services.


Expo : The Good

+ Great for boot-strapping react-native development for cross-platform mobile app development.

+ Possibly a good choice for PoCs to quickly showcase a concept.

+ We get to see the console logs of app in Expo's browser or terminal. This one is a big plus!

+ The documentation is good but could be better.

+ Expo's snack is the code playground in the web browser that will come handy when you want to try out its components from the web-browser and see how it appears in android/ios/browser, before you use it in your project. 

+ Leverage Expo platform for sharing the app in development to Business to get their feedback and adopt accordingly. Agile isn't it?


Expo : The Bad

- Limited choice of reusable React Components that has dependency on native components. Expo is getting better by the day in this, though!

- Their free build service is time consuming (you number in waiting queue could be over 20 with waiting time of over 20 minutes) and paid ones are way too pricey.

- Not all iOS and Android APIs are supported. That said, a great chunk of most used APIs are supported, except for things like Bluetooth, or WebRTC if that matters to you.

- No support for background audio with OS playback controls.

- Doesn't have FastImage incorporated into it and guess is working on its own version of FastImage, calling it expo-image. For the uninitiated, FastImage is to ReactNative, what Glide is to Android and SDWebImage is to iOS; it is a performant image loading and cacheing library.


Expo : The Ugly

- The app size is no less than 60 MB by default. You can reduce about 20 MB by using a property like `enableDangerousExperimentalLeanBuilds: true` in `app.json` for android; but that still keeps the app over 40 MB, which is ridiculous in my opinion. So where your app could do away with just 4 MB in plain Android development, using Expo is an epic failure.

- Expo by default adds way too many unwanted and unwarranted permissions as requirement to the app being published. For instance, it by defaults adds requirement for camera permission. In days of malicious malware being shipped with apps published even in Play-Stores, this will only raise the users' suspicion discouraging them to try the app.

- Connection to Expo dev server gets disconnected after some idle time hampering your hot-reload functionality. When this happens, you will have to reload the app. I experienced this quite often, and it is annoying.


My Verdict

Productivity gained in one thing, is lost in many other things by using Expo. Expo is beginners friendly entry to embracing React Native and may be do a quick PoC. Until things change for better with Expo..

When your Business says, "Tech ain't Rocket Science"


As a Tech-Leader, how do you respond when business smirks and dismisses your challenges in tech saying, "it ain't rocket science"? This post is my attempt of story-telling the complexity in Tech to the ruthless and impatient Business that dismisses it as just being CRUD and is no rocket-science. 

I am a tech-entrepreneur who has made bets on tech, business ideas and its intersection. I have failed for various reasons which is out of scope for this post. Now that introduction is to tell the Business that I understand where their frustration comes from. So I think it is important that they believe in Tech Leadership and its challenges. Not always can this leadership be right. It will go wrong in its bets from time to time. But, hell Business too gets things wrong from time to time, don't you? We should learn to see failure as not the end of a road but only a bend, albeit a hairpin bend at times that if not given due diligence, it can be catastrophic. So what is so crazy about the Tech World that the Rocket Science isn't having? My answer would be EVERYTHING! In Rocket Science the problem space is fairly well defined in that it is mostly science. In the Tech Space, it is oscillates between being an art at one point in time and being science in another circumstances. In Tech Space the choices are umpteen, the shines are mostly mirage and the pitfalls are hardly visible until experienced. Now that is the shortest way in which I could describe the challenges in Tech leadership. 

I can illustrate the tech landscape with my very own little experience in the realm of mobile app development. I had built a couple of Android applications as test of my ideas to understand its market. The Apple iOS ecosystem was a beast on its own and so was Android; each accelerating at a far greater pace in evolution than it is anticipated to be. Additionally the mobile ecosystem in itself had too many variables that you could hardly bet on. 

Take the tangent of, platform for developing mobile mobile applications -- a couple of years back it was native Android/iOS, or cross-platform mobile app development frameworks like Ionic, jQueryMobile, Adobe's PhoneGap, Sencha, Xamarin etc. Today, the very native platforms evolved so much that yesteryears app is just dated to be polite. Add to it Kotlin became popular in the native Android development space, because it is a much better language than Java in terms of maintainability and brevity. The iOS space witnessed Swift replacing Objective C. The community adopted these for good and this was fairly predictable.

But not always is the community adoption a predictable thing. And not always it is wise to go with the crowd, for it might turn out to be a pop-culture thing. This is sort of a high-risk high-rewards sort of thing, in the business parlance. Take the case of community adoption in the cross-platform mobile application development platforms/frameworks. The Facebook's introduction of ReactNative for cross-platform mobile app development became a game changer in this space. Frankly, I didn't bet on it and I was so wrong about it. With the community going ga-ga for it, I had dismissed it as pop-culture; call me a conservative for that and I take it. But wait, this time around, the community made a huge difference by coming up with a ton of open-source tools and components, that I would say had surprised Facebook too. Or Facebook perhaps was anticipating this development from its earlier success with open-sourcing ReactJS. The adoption rate and good produce, prompted Google to come up with Flutter wanting to disrupt this space. While ReactNative (aka RN is based on React.js), Flutter is based on Dart programming language. Taking a stop to reflect back, as things stand today, yesteryear's cross-platform frameworks (like Xamarin, Sencha etc) is just gone from the scene of relevance. Had you invested in those tools years back, you would have had to re-invest in learning the new ways of development in this space. This is tech; the crazy tech, where the craziness of the tech wave comes from the community, which literally can change directions of the wave. You got to ride the wave, float to flaunt, flop but float, fasten and flip, fence from fall, and fall but survive! 

I can share a similar story in the realm of backend development, devops, frontend, etc. but hope this story is more than enough (at least it worked for me in the past) to convince our Business about what it means to ride the Tech wave.

Tech is bloody hard to keep up with. Tell this story of evolution to anyone who is comparing it to Rocket Science. Tell them that Rocket Science don't change as much as tech do. In Rocket Science, you learn that there is so much more to discover in a supposedly closed domain. In Tech, you got to both learn and adopt within the constraints of time, opportunity, challenges and God damned people politics. The bad news is we do fail, and fail often. The good news is we can go past it learning our lessons.

October 10, 2020

Dev Setup of Expo for React Native Development

When you do React Native development using Expo framework there are three ways you can see your development works on your Android device or emulators, depending on how you connect to the Expo development server. 

Note : The one commonality is that you use an Expo-Client on your Android/ios device/emulator to talk to the development server.

Note : The pictures below consider WSL2 on Windows 10 as development environment where Expo server is running. This is purely for representational purpose, and the concepts apply irrespective of your dev env where Expo server is running.

1. Connect using Localhost


  • There is no iOS simulator on Windows. That said, if your dev env is Mac, you could have Expo server running along side ios and Android emulators on the same machine.
  • When you have both the server and the client running on the same host, the best approach to connect them is through localhost.


2. Connect using LAN

  • If you hate emulators/simulators like I do and wish to use the device for development purpose as well, you could well connect the server and the mobile device when they are on the same network. For this make sure you connect your mobile device Wi-Fi to the same network that your laptop is connected to. The is ideal and super fast.
  • When using WSL 2 on Windows, though, I wasn't able to get this set-up working (see my other post on this subject). If you are like me stuck in this, the next option that is available is to make use of Tunneling option.

3. Connect using Tunnel

  • Tunneling is the slowest of the options, because you go through the internet to connect two devices that are literally close to each other.
  • When everything else fails, this is still there for your rescue. Here you leverage the Expo's platform to ship development code to client device for testing using the url that it exposes in the dev-server.
  • This option is also cool when you want to showcase your development work in progress to your clients or other stakeholders as you work through something to get their feedback. Call it Agile, if you wish to ;)


October 9, 2020

Connecting to Expo Dev Server in WSL 2 over LAN

This post drafts things I did to connect my Android device to Expo dev server running in WSL 2 on Windows 10 over LAN connection (in my case using Wi-Fi). The set-up looks like below:


Note: Expo-Client is installed on my android device.

Note: Expo-CLI npm version used is 3.27.14

Assumption: IPv4 address is used over IPv4.

When you run `ip address` in your WSL 2 terminal, you will your ip-address of your VM as something like  172.x.x.x.

When you check the ip address of your Windows 10 host, by running `Get-NetIPConfiguration` in your PowerShell terminal you will find your host ip to be something like 192.168.x.x. When you connect your Android device to the same LAN over Wi-Fi, your ip address would be similar (something like 192.168.x.x).

The fact that WSL 2 isn't sharing the same ip address as its host is an issue to be resolved. This needs to be fixed as first thing, because otherwise how do we even reach the server running in WSL over LAN? The easy fix to this is to prefix your server start command with your windows host ip like `REACT_NATIVE_PACKAGER_HOSTNAME=your_windows_host_ip`. In my case I run the expo server like `REACT_NATIVE_PACKAGER_HOSTNAME=192.168.10.12 expo start`.

Your expo server runs in port ranges of 19000-19006. Make sure your WSL firewall isn't blocking these ports. I have Ubuntu 20.x as my WSL 2 VM. I check to see if my firewall is active and if active are the mentioned ports listed and open by running the command `sudo ufw status verbose`. In my case the firewall status is inactive as expected. Note that using a firewall in WSL is redundant and should you choose to have it activated, you can add those mentioned ports using the command `sudo ufw allow $PORT`, where $PORT is the port number that you want to add to firewall rules to open it up.

You also need to do port forwarding of the mentioned ports on windows host operating system. You can use netsh on your Powershell in admin mode. The cookbook for it will be below commands:
  • List all your portproxy rules: `netsh interface portproxy show v4tov4`.
  • Remove all your portproxy rules: `netsh int portproxy reset all`.
  • Forward Ports into WSL2 :  use the net shell "netsh" to add a portproxy rule. Again, change connectaddress to YOUR WSL2 ipaddress, which is an internal address to your machine.
    netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=19000 connectaddress=127.0.0.1 connectport=19000
  • Open The Firewall: Next, from the same Administrator Windows prompt, open an incoming Firewall Port. You can do it from the Advanced Firewall Settings, but even easier you can use netsh again!
    netsh advfirewall firewall add rule name="Open Port 19000 for WSL2" dir=in action=allow protocol=TCP localport=19000
In an ideal world this should get you going. In my case though, doing all these still didn't help me and I had to resort to tunneling and making use of expo's platform for this.


October 5, 2020

Why Entrepreneurship Is Less In Asia?

Note: While this post says it is about India/Asia, it might still be of importance to you. And if it does, I'd appreciate learning how it helped you or what is your take on this!

There is a gaping difference in percentages of Entrepreneurs when comparing India/Asia with America. There is one unsaid or unspoken reason to this -- family and society. No matter what you age is, you got to respect your elders, the society you live in, your superiors at workplace. While there is so much goodness to this specific trait in culture, with the passage of time this culture has become so shallow that its true essence is lost and is now more superficial and fragile, so much so that this is often confused with the notion that "dissent is disrespect"

Let me help you to see if you are part of this culture. Answer the following questions to the best of your honesty :)

  • When was the last time you said NO with all due respect, to your parents out of disagreement? 
  • When was the last time you said NO to your office meeting because of higher priority personal thing that you had to pay attention to.
  • When was the last time you said NO to your supervisor at work because you disagreed with him and engaged in meaningful conversation.
  • And oh yeah, did you ever disagree with your teacher in school, or college?
If you could get past this challenge of articulating NO in a convincing manner, you have crossed only half of this culture issue. Mid-way through the sail, the sea gets rougher and tougher, with changing climatic conditions. Unfortunately, a lot of this is never discussed to forewarn others and help them better prepare. May be that is how life is -- surprises and shocks are to be experienced, no matter how prepared you are. 

But what is this nightmare that I'm talking about? You know it, don't you?

I am talking about the repercussions of your saying NO. Even if you had said NO with all the right intentions, it could well be received badly. Remember, I mentioned that dissent is reckoned as disrespect, in our culture; with the loss of values what remains is this fragility. Think about all those circumstances that you have said NO. How was it received? Think of times when it had repercussions. Think of times it had ripple effects. How much it did it hurt you? How did you deal with it all?

This is what I call Hard Experience or Life Experience. Playing adventure sports is so much easier when compared to this one for sure, because as Bruce Lee had once said, "Boards don't hit back!".

There is science/logic, and there is a ton of art involved to making people listen to you before you can think of convincing them. And as with any art you are born with it if you are gifted, otherwise you have to acquire it with tons of practice.

Lastly, in spite of this all Asian cultural thing, I do see a ton of entrepreneurial ventures wherever I go in India, albeit not the one that formally fits in the organized sector or book definition of Forbes, so to say. More about this in another blog, some other time.

A Tad Bit About Me In This Context

I have done it all (saying NO to the above mentioned roles/parties in questions), not once but many times over. And tell you what, I continue to do it, and certainly not for the sake of disagreeing but with the best intention of learning by asking and having a conversation. Have I been lucky to not being misunderstood or not being beaten black-n-blue for this all the while? I confess, to have been through the bad times and worse with bad people. The bad news is that it did affect the prospects of easier life and made me weaker questioning my values. The good news is, I got over it sticking to the values becoming much more stronger, learning the art of story-telling and negotiating along the way. The brighter news is that the fear of failure is gone and the thirst for learning grew many folds.

October 3, 2020

Bad Boss Vs Good Karma : Page 1

There are things that early successes give you (the most important of it would be immense confidence in what you think is your secret to your success) and there are priceless lessons that early failures instills in you (the most important of it would be surprising benefits of virtues that you may or may not have embraced).

This is a true story.. an account of my story in one of the fantastic organizations that I had the opportunity to be a part of in my early carrier days. 

Very early on, I shouldered multiple small brown-field projects and was responsible for the quality of the software delivery and customer happiness. Back then, we used to develop software and generate artifacts for deployment to be handed over to the Ops-team managed by another vendor company in the US, for the target deployment environments were all there. This style of multi-vendor accountability can still be seen practiced by many companies even today. 

The early success that I'm talking about is the opportunity to lead multiple small projects/teams from the front. I was so relieved by it because it gave more visibility of my presence to the top management then. But but I also had a big challenge to overcome, it was my boss who stood between me and everything I did and wanted to do. He became more and more desperate to "align me to his whims and fancies", as I was cheered by my customers. Things can't be more unfortunate, a thing you would understand only if you were to have been in that kind of a situation. My boss desperately wanted to overthrow the vendor company and "snatch away those jobs" as he used to put it out. I hated every bit of it, because the intention was so damn wrong. If you win gigs by merit and good relationship, then that win is long-standing; otherwise it is just dirty. Had he dreamed of doing things better than the competitors/partners and had conversations in that direction things could have been very different. Our values were fundamentally different and in my opinion he was toxic to otherwise great environment that I have been working in.

As the ritual goes, I had once submitted an artifact to be deployed in QA environment along with the ticket I raised. The ops-engineer, by sheer accident had deleted it with the SLA for deployment nearing its expiry. This is a big thing in corporate world and it affects his "performance review". An occasion like this is what my boss was craving to paint bad about this vendor. Thankfully, I had hold good relationship with those I'm working with. This guy pinged me while I was about to leave office (I used to be that late worker who mostly lived in the office working and learning). When this guy pinged me, first thing I told him was to comfort him that this is no big deal and that I would happily extend my services to save him. He seemed to have been going through some bad time in his personal life and been making a few mistakes like this. When I re-generated an artifact and delivered it to him, he was so relieved and thankful. We became partners that respected each other.

In months down the line my relationship with my boss turned sour and he was looking for that single mistake I make so that he could escalate it big and paint me really bad. Just as he had desired, I had botched up, by submitting a wrong artifact to be deployed to production in the ticket that I had raised. Technically, I had to cancel the ticket and raise a new one, which would slip the delivery date. This time round I reached out to this guy who I helped earlier in the vendor team. As Good Karma would have it, even though this ticket was not assigned to him, he ensured to fix it all from his end for me. I escaped a potential escalation from my boss back then and lived in peace that I built a great relationship that I can rely on.

Helping others isn't a big deal of thing for me (and so it should be for you). I take no pride in it, rather it gives me a sense of relief that makes me so much lighter (Try it and you too will experience this). When I failed and my good karma paid for it, it was absolute bliss to experience. Luckily, throughout my life there has been many a times that Good Karma did pay back. 

Do not underestimate the value of goodness you can deliver. Just do it!

Also, in hind sight, even having a bad boss was good thing, because I wanted to get away from him and explore better world. And I indeed did it. From that world of manually doing things in a toxic environment to embracing the world of agility with automation via CI/CD, I came a long way in looking out for better ways to do things!

Remember this quote below to pep-up and work with your stakeholder or a partner in your execution, when he/she botches up:

“Forgetting your mistakes is a terrible error if you are trying to improve your cognition… Why not celebrate stupidities!” — Charlie Munger

We all will have bad bosses, experience bad times in personal and/or professional lives. You got to face it even if you have to leave it. But come what may, see if you can help others, if it doesn't cost you much.

September 24, 2020

Book Review -- React and React Native

 

My Ratings

⭐⭐⭐


My Review

If you are that really impatient learner that loves hacking to build stuff more than loving to see how things are stitched together and why they are the way they are, then this book is for you. When you are wanting to get your hands dirty with React and React Native quickly, and are looking for a recipe of sorts to get started with in choosing a library for a problem, this book serves the purpose. When you want to quickly rush through a specific topic perhaps for job interview, this book will serve that goal possibly.

This is typical of a book from Packt publishers, if you know what I mean, just that it is not Cookbook or Recipe this time :P

Even in all this, this book is already dated in some sections, for instance the book uses example of react-navigation version 4, when version 5 is out and its API is different from v4.x. Blame it on the pace with which tech is evolving ;)

P.S: Review is originally published in GoodReads.

September 16, 2020

Setting Default User For Imported WSL Distro

I have a dual hard-drive laptop with the primary being an SSD for quick-boot and the secondary being an HDD. The primary one, unfortunate for today's demand is a little too less in space of just 250 GB but the secondary one is good with 1 TB in space. 

 As a discipline, as much as possible I host most of my files and software installations in my largish secondary drive. As with WSL, when you install it from Microsoft Store (earlier known as Windows Store), it defaults to windows operating system location, which becomes my space constrained primary drive. 

To preserve the space in my primary drive, I wanted to change the storage location of my WSL distro to my secondary drive. This is possible with WSL import/export commands. See WSL Cheatsheet for reference. 

After you import a WSL distribution, you may need to tell WSL 2 to start the distribution using the Linux user account you created when you first created the distribution. Unfortunately, this is not taken care of by default from the export/import procedure; see WSL/Issue in Github, if you are curious. 

The Microsoft Docs however proposes a way to change the default user for a distro, which didn't work for me for some reason. This is what you should try first, which is about executing something like `ubuntu config --default-user my_default_username` depending upon the name of your distro executable. 

Microsoft Docs also proposes a distro specific configuration that you can make with `wsl.conf`. This is a per distro launch configuration setting. Using this you can automatically configure certain functionality in WSL that will be applied every time you launch the subsystem using `wsl.conf`. This file is located in `/etc/wsl.conf` of your target distro, where the contents looks like below:

-- --

Now if even this fails, know the DefaultUid of this user who you wanted to make a default one and use that in setting it up manually in the windows registry like below screenshot:


In the screen-shot above, I had exported my Ubuntu-20.04 distro where I had created a default username kartz at the time of its installation from Microsoft Store. Ubuntu-20 is the new distro that was created by importing from the exported image tar file and I wanted to have kartz as the default username in this distro, because I have my working environment all set to this user in this distro created from imported image. Apparently in my case the value turned out to be 1000.

For easy copy-edit-pasting, I share the snippet below as gist:

---- 

Hope that get you going easy with WSL 2!!..

September 6, 2020

WSL For Development In Windows 10 Is The New Kool-Aid

I had been a happy-go Java developer on Windows platform. And then I had to ride the Ruby-on-Rails wave over Linux platform, only to realize how much I didn't know about productivity with automation. Later I moved onto MacOS to experience bliss before starting to hate it for one thing after the other; right from their buggy operating system upgrades to Apple not providing power cable compatible to Indian market resulting in earthing issues. Out of frustration I jumped back to Ubuntu and now back on Windows after long years. 

Getting onto Windows was more out of necessity than interest and I started to explore how much things have changed in the Windows world. It wasn't a smooth return for me but the teething period is over and I'm loving Windows again. If you are onto Windows 10 Pro edition, and wanting to get the best of both worlds (Windows and Linux), this post is for you. I am jotting down ProTips to experience delight and productivity at development work.
  1. Use WSL 2 instead of WSL 1, for the former is far less resource intensive by integrating natively with Windows 10 Hyper-V virtualization stack, and thus phenomenally faster too. If you are on Windows 10 Home edition, you need to upgrade it to Windows 10 Pro edition and it is worth it, for you can get it at half the price upon upgrade.
  2. Do not mount windows native formatted drive (NTFS) onto WSL for code that can be developed both in WSL environment and Windows. While this works, it is snail paced and you will frustrated too soon. I tried this out of curiosity and frustrated beyond my anticipation. If you are still wanting this, you will have to first format the storage drive in DOS format (as FAT32), so that it works well with your WSL and host Windows operating systems. This is possible the best middle-ground that you can hit upon.
  3. Use Windows Terminal instead of  CmderConEmuMinttyCygwin or any other console emulators. Why? You can customize it with default settings for each of WSLs, Windows Command Prompt, Powershell or other terminals integrated with it. Also Windows Terminal is lightweight and faster.
  4. When you start your development server in WSL 2, try testing it in your browser with localhost, it won't work. WSL is one proper sandboxed environment or VM. You need to port forward localhost settings for this to work. This can be done by adding the line like below in your .wslconfig file in your windows $HOME directory.
    -- --
  5. WSL 2 can consume all of your host memory. You can set limits to it by appending the line memory=16GB in your .wslconfig file.
  6. Do install Oh-My-ZSH to use zsh shell instead of the default bash. You get bunch of goodies like pre-configured aliases for Git and more by way of its plugins that you can configure to your preference.
  7. If you are into using tmux, you can use that too in your WSL 2, and power it up with tmux-powerline.
  8. You can change the location of your WSL 2 distribution's virtual hard drive. I keep all of my VMs (and now WSL 2 virtual hard drives) in D:\VMs\<platform>\<distribution name>. Run the following commands in PowerShell - replacing distribution name and preferred location:
    ----
    Also at the time of writing, when you import a distribution, you may need to tell WSL 2 to start the distribution using the Linux user account you created when you first created the distribution. Thanks to 58bits.com that you can run the below PowerShell script that imports the distribution, and resets the default user as you would like it to be.
    -- --
    Note that if your import fails with 'Unspecified error' (or other) - you may need to limit the amount of memory allocated to vmmem. You can do this with WSL2 config to limit memory as mentioned in ProTip 5 above.
  9. If you are into using VS-Code as your IDE for development, you can launch the one you installed on your host Windows 10 OS from WSL 2 bash in your project's root folder and executing `code .`. With this you can work on your windows operating system launching your development servers in WSL environment, thus getting the best of both the worlds. Additionally, you can install your vs-code extensions on remote wsl as well as on host OS, all from within your IDE.
  10. And Docker Desktop for Windows works well with your WSL2 too. You just can extract the best from everything. 
Upcoming Feature: Having dual boot for Windows and Linux? You can mount your linux partitions onto WSL2 in Windows 10. Checkout Microsoft Dev Blogs

Windows 10 is super cool again with WSL 2. Whether you are a Windows buff wanting to leverage Linux goodies, or a Linux buff wanting to draw upon Windows 10 strengths, you can have it all. Happy coding!!..

References

September 5, 2020

Fix Timeout Error Connecting To MongoDB Atlas

 I am at the moment dabbling with Strapi, which is a headless CMS written using Javascript. I love MongoDB and a fanboy of managed services. Getting to know that MongoDB has launched MongoDB Atlas as a managed service for cloud, I wanted to give it a try.

I had configured Strapi to use MongoDB Atlas as its backend and it worked as expected. The configuration looked like below (note that it uses mongoose library as connector to work with MongoDB Atlas):

As I was working on Strapi in development mode (it restarts its server after code changes), the server restart failed with an error message like below:


My favorite Stackoverflow or MongoDB forum didn't come to my rescue this time. As it turns out, setting the srv to false and replacing the MongoDB Atlas service name with comma separated values of individual node's URI:PORT, worked. I really don't like to configure things this way, as the former is more elegant approach. But until things are set right at MongoDB Atlas (as I see it), this should serve as a workaround. The new MongoDB connection configuration looks like below:

Happy coding!!..

August 30, 2020

Multi-tenant Architectures

 


Multi-tenancy Application Deployment Architecture could be modeled in 4 broad ways:

  1. Separate Apps & Separate Databases
  2. Shared Apps & Shared Databases
  3. Separate Apps & Shared Databases
  4. Shared Apps & Separate Databases
There is no right or wrong here. It's about choice and consequence that you should consider taking into your business context and constraints. In this post I intend to jot down a some key points to keep in mind for each of these multi-tenant architecture. These are more of quick notes for my quick reference, a cheat-sheet of sorts when I have to make choices. And I guess this can come handy to you too in your wise decision making.

Separate Apps & Separate Databases

  • Easiest to implement from development and deployment stand-point.
  • Just automate the deployment infrastructure for every tenant for quick set-up.
  • Most expensive of all the models from infrastructure cost stand-point.
  • Relatively longer deployment time for newer application versions, at scale. 
  • More wastage from infrastructure resource utilization point of view.
  • The application's statelessness criteria for scalability would mean:
    • not holding user-request data
  • Suitability:
    • This is the best way to begin your SAAS platform until product-market fitment.
    • When you provide SAAS as white-labelled product.
    • When you deploy your SAAS product at client infrastructure, maybe for compliance reasons.
  • Challenges:
    • How do you optimize resources for cost?
    • Not succumbing to the temptation of having different code-bases for different tenants. Yielding to this temptation is like getting those easy financial loans at very high interest rates and with the notorious rider of terms and conditions, that is often overlooked blinded by dreams... just as in gambling houses. Often though, the gamblers here are the Product Management team and the losers that get publicly shamed are the development teams.

Shared Apps & Shared Databases

  • The most complex beast of all the multi-tenancy architectures. Depending on the magnitude of tech-debts and gap in the discipline of engineering management, the complexity often grows many-folds increasing the risks of product stability and scale.
  • Maximizing infra utilization every bit for maximum profitability. 
  • Challenges:  
    • How do you manage as volume of transactions  and data increases? The relational database by its virtue is vertically scalable and not horizontally scalable. Now this means it could become a bottleneck sooner than you think as you onboard more and more tenants, depending on the volume of transactions and data.
    • In case of SaaS apps that provides lot of customizations on the UI, how do you get this tenant specific configuration optimally for latency? Wix eCommerce, Shopify, etc.

Separate Apps & Shared Databases

  • A model where tenant specific configuration are tied to deployed instances, but all share a common database. The data isolation per client is achieved by prefixing database schema with tenant info. 
  • You got many web-frameworks and web-plugins supporting this model of prefixing-queries with tenant specific data, to hit the right datasource. For example, apartment (rails/ruby), multi-tenant (laravel/php), springboot (java), etc.
  • Relational database instances are expensive. It way pricier than your application instances and is not as disposable as your compute instances can are. You got to do a bit of forward looking into future for its capacity planning.
  • When you are managing your database instance as a SaaS provider and want to optimize on the overall cost, often the easiest thing to do is use shared database.
  • The application's statelessness criteria for scalability would mean:
    • not holding user-request data
    • not holding database-responses
  • Challenges: 
    • How do you manage as volume of transactions  and data increases? The relational database by its virtue is vertically scalable and not horizontally scalable. Now this means it could become a bottleneck sooner than you think as you onboard more and more tenants, depending on the volume of transactions and data.

Shared Apps & Separate Databases

  • A request can hit any of the available application instance.
  • Tenant specific configuration is got dynamically with every request.
  • The application's statelessness criteria for scalability would mean:
    • not holding user-request data
    • not holding tenant's configuration
    • not holding database-responses
  • Challenges: 
    • How do you hit the right database dynamically on a per request basis? How do you do it optimally for latency? Think  of Atlassian suite of products like Confluence, Jira, Bitbucket etc.
    • In case of SaaS apps that provides lot of customization on the UI, how do you get this tenant specific configuration optimally for latency? Wix eCommerce, Shopify, etc.

Hope that helps you in your design choice for your SAAS architecture...If your experience is otherwise from mine, or that you disagree with any of my points, do pour your thoughts and help me learn from your experience.

August 27, 2020

Norton isn't what it claims to be -- an Anti-virus

I recently purchased an Acer Predator series laptop that came bundled with Norton anti-virus trial pack for Windows 10. I got this laptop for my development work and so I'm a little too crazy about engineering discipline. What does that mean? The first thing that I did was make a recovery drive from that fresh image of the laptop. This came to my rescue later as you'd find through further in this post.

So after a month of trial period of Norton, I wanted to uninstall it and install my choice of anti-virus (that is K7 anti-virus, for the curious). When I uninstalled Norton, it went thought without an error. But when I tried to install K7 anti-virus, it complained that Norton Security Ultra is installed in the system and that it needs to be removed before installing K7. But Norton is nowhere to be seen in my system's Control Panel > add/remove programs. As the world would have it, this seem to be some defacto unethical practice in play embraced by greedy anti-virus companies making them depend on it by force. They provide another software installable that needs to be downloaded to remove the tool the remnants of anti-virus from the operating-systems. For the curious, K7 lists such companies and their tools, from where the users can be download the software, to get rid of their old rogue anti-virus software that stays to spy on you possibly. So from being an anti-virus software they become the virus/malware themselves. This is shame!

Side-note: K7 won my heart in better user-experience in adopting their software. I never had issues deleting their software and using another one in their place thus far.

I tried to download the suggested anti-virus removal software (NRnR.exe) from Norton's website that claimed to have removed the remnants from my operating system when in reality it didn't. K7 anti-virus was still seeing the Norton Security Ultra in my operating system. When I googled for this problem, I realized that I was not alone but a lot of them have been through this same issue of finding it difficult to get rid of norton anti-virus software from their operating system. That left me wondering, how come no one sued this company for willfully causing a lot of pain and frustration. And how come so many other anti-virus companies embraced this unethical practice as a norm is beyond my understanding.

As a customer you have a choice to keep them at bay and not try them for free even. Like they say, "there is no free food". Beware!

I reached out to customer-care of both Acer, and Norton in vain. Acer's tech-support is just horrible. Norton's tech-support was plain dumb once and wicked the other time around. Norton seemed to have system automation for tech-support, that perhaps forced their team to reach out to me the second time only to make me feel more bitter with their wickedness with them plainly blaming it to be Acer's fault.

This seemed like a dead-end. I was about to download a fresh installable of Windows 10 and lo behold, Windows 10 provided an option to reset the PC without any of the bundled software. I'm starting to love you windows! It would have been much better if I have had the option to choose which of the bundled software I don't want in the process of re-setting my PC.

So here are the steps that you should follow to get out of this situation:

  1. System Settings
  2. Reset this PC
  3. Click "Get started" button
  4. "Keep my files" option
    1. Change settings
    2. Turn-off pre-installed apps
    3. Confirm
  5. Reset
This is the fastest was to get going with your system as factory reset without any bundled software. Windows is super smart that it spits out an "Removed Apps.html" file on your new desktop for your reference on the drivers and apps that came bundled with the operating system, that you may want to take a look and consider installing it on your system. This helped me to download the required drivers and apps as needed.

Hope this helps you too, should you have any of the rogue anti-virus software that remains in your PC on a stealth mode, possibly prying on you.

P.S: In case of Norton anti-virus, open REGEDIT in windows and search for the following terms to confirm if Norton is completely out of your system : "norton", "symantec" (because Symantec acquired Norton), "SymIRON", "SymEvent", "SymEFASI", etc. Do not try to edit/remove it manually or with any tools like CCleaner. You may end up with broken-registry as I had suffered. This may result in windows acting weird to crashing, forcing you for complete fresh install from external source.

P.S: Some of the ways I tried to uninstall Norton from Windows 10 are below (approach I took to preserve my existing setup and hope of minimizing my overheads):
  • Factory Reset. Uninstall from "Add/Remove Programs" in control panel.
  • Factory Reset. Uninstall from "Add/Remove Programs" in control panel and use NRnR.exe.
  • Factory Reset. Uninstall using NRnR.exe.
  • Factory Reset. Uninstall using CCleaner.
  • Factory Reset. Uninstall using Revo uninstaller.
  • Factory Reset. [Various other combinations of above]
P.S: I have no affiliation with K7 other than being their customer for a good couple of years now. You are free to choose your anti-virus software..just ensure that they too are not the ones that play rogue..Cheers!

Lastly, I'm hating Acer for bundling uninstallable Norton softwares with it. So should you decide to buy an Acer laptop, you now know what is the first thing you should do -- get rid of Norton without any second thoughts!

References

August 17, 2020

Connect to MongoDB on Windows host from WSL2

 It took me a day to lose my hopes on this issue to come to a conclusion that this is not possible. But then, wanted to give that last few tries, again... And lo behold, it worked!

So what should you be doing to get this working on your windows-wsl2 environment? This is what I did as workable set-up:

  1. Uninstalled MongoDB, one that was installed by windows installer. This one has its own quirks and issues with permission, leading to unexpected error of it being unable to find data directory. In my case, for some reason the installed version didn't honor the config file and was throwing up all of a sudden.
  2. Downloaded a zipped version and unzipped to to my target directory in windows. This one wouldn't come with a mongod.cnf file. So make sure, you create the default config file mongod.cnf, alongside mongod.exe and let its contents look like the one below (where you replace storage.dbPath and systemLog.path property values):
    ----
  3. Get your host windows IP address from powershell by running the command ipconfig to see an output like below:

  4. So now your mongodb connection string in your WSL2 would look like: 'mongodb://192.168.1.6:27017/myprojectdb'.
You should now be good to go!

August 16, 2020

GraphQL FAQs


  1. Is GraphQL a DB? No! For graphDB checkout options like ArangoDB, OrientDB, Neoj, DGraph etc.

  2. Is GraphQL an interface to Graph DB? No! Think of it as a parallel to REST or SOAP way of exposing your APIs.

  3. Is GraphQL a replacement for REST? It may or may not depending on your business context.

  4. Can GraphQL co-exist with REST? Yes!, it sure can.

  5. Does GraphQL have good tooling support? There is good tooling support to get you onboarded and get going. There needs to be more though, say for example, support in defining your GraphQL schema.

  6. Has GraphQL got supported libraries in my language platform? Checkout https://graphql.org/code/ for list of libraries by language, for client-side support and server-side runtime support. And there are also much more goodies in there to explore and experiment with.

  7. Is there a big picture view of GraphQL landscape that I can see? Do checkout https://landscape.graphql.org/.

  8. Is GraphQL better than REST? That depends on the metrics you are looking out for.

  9. Okay, how does GraphQL shine better over REST? Some of the things include,

    1. Simpler API grammar if that pleases you, GET for read operations and POST for write operations.

    2. Adopts better with need for "Evolutionary APIs", mitigating the need for upfront thought on "Versioning APIs" as contracts. This is a super cool thing that this Agile world of development desperately needs to fight its competitors.

    3. API to ask what you want explicitly and get just that and no more. This could mean better performance on both client-side and server-side.

  10. What are the areas where REST shines over GraphQL? Some of the areas include,

    1. Unlike GraphQL, REST needs no additional infrastructure. REST is fluent API that best leverages HTTP protocol to gain maximum mileage. Bow to Roy Fielding for this!

    2. Caching comes for free and easy with REST. This is relatively harder and needs additional infrastructure.

    3. Good part of the world has gone past heavy-weight SOAP to adopting light-weight REST which is the defacto-standard for the entire toolbelt and ecosystem. GraphQL made its presence known resulting in increased "reference-implementation" libraries across language platforms. How this will unfold beyond this hype is yet to be witnessed..

  11. Constructing and maintaining the GraphQL Schema on the server-side with Express.js isn't looking easy for me. As the graphql schema size grows, fitting the schema within the back-ticks is maintenance pain for me. There is not expand/collapse of parts of stringified schema after all. Also, absence of intellisense for this stringified piece is a pain in refactoring schema definitions. Am I missing something? You are not alone here, is the only consolation I have for you at this juncture. I have the same pain and I alleviate it a bit by modularizing the schema to separate files and use string interpolation in the schema definition file. This alleviates some of the said pain points. But absence of intellisense during development is a pain in the back making me question if I'm witnessing "graphql pop-culture" or genuine strengths of it. I'm still experimenting and so this opinion may change and will be updated as I learn.
  12. Not all fields are relevant to all consumers of my API either for the reasons of security or business context. Take for instance, the password field in the User isn't required beyond the signup or password change functionality even for the very user and is breach of security for others to get even the hash of it in their context in fetching Users. Is there a way I can customize this behavior in GraphQL? That's a great question and I'm yet to figure it out. But do hope there is a way out for this, as this is a very basic criteria, after all. My reference API would be Github API, for this.
  13. Given that the API's exposes the fields, would it end-up being too rigid for Public APIs where you don't own the client/consumer app? Sorry, I don't have an answer for this one. Github can't be taken as a reference case for this, so I'd have to look out for a business case likely in the B2B space where different clients demand different needs from an API.
  14. I see a myriad of ways to building GraphQL APIs for consumption and unsure how one is different from the other and if I am missing something. Am I? As I see it, you will still be an early adopter of GraphQL, given the state of evolution that it is in today. Thus, your choice of platform could determine if you are taking SDL-first or code-first approach to development. And then your choice of runtime, could determine how you design and build your schema, how you implement your resolvers (if you know what it is in the graphql context), etc. Doing a PoC with some of the popular options will help you determine what best fits your team context.
More would be added as I experiment with GraphQL and have more conversations in this space. Stay tuned..