Buy @ Amazon

Search This Blog

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= 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= listenport=19000 connectaddress= 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.