Dealing with phone numbers in contact book

If you are building an app that uses the user’s contact book then their certain gotchas to avoid.

Telephone country codes are prefix-free

If a country has a country code “+91”, then no other country will get a country code like “+912” or “+913”. This scheme ensures that numbers are inherently unambiguous.

Telephone numbers can have multiple representations

Since most people don’t dial internationally, telecom systems implicitly assume a domestic call. So, someone dialing 612-555-1234 in the US is dialing “+1-612-555-1234”, while the same person in India is dialing “+91-612-555-1234”. Since international dialing would be more infrequent, telecoms require unique prefix numbers like “00” to distinguish whether someone is 612-555-1234 in their country or 0061-255-51234 in Austria. In some states, even the domestic area code is not explicitly required. So, a user might have stored “555-1234” as the phone number to which telecoms will implicitly prefix the user’s area code. And if the user wants to dial beyond their area, the telecom operator would require an additional “0” prefix to mark that it is an STD call. This localization has a massive implication regarding processing cleaning and normalizing phone numbers retrieved from the user’s contact book. Both country code and area code don’t contain “0”, and usually, that’s superfluous. So, while telecoms might be OK with calling or sending SMS to “0-612-555-1234”, they will treat a number like “91-0-612-555-1234” as incorrect.

Multiple countries can share telephone codes

USA, Canada, and many countries in the Caribbean share the “+1” telephony code. The carriers would treat calls or SMS as international, though. Italy and Vatican city share “+39”.

Continuous area codes or country codes are not always adjacent

As the population grows in certain areas more than others, the codes reserved for other regions can get allotted to them. An example of that is the San Francisco Bay area, where the first 408 and then 669 was allocated on top of the existing 650 area codes to deal with the growing population.

Confirming phone number ownership

You can never trust an incoming call or incoming SMS’s phone number. Therefore, the only way to verify that the user owns a phone number is by sending them a text message or making them a phone call.

Incremental testing: save time and money on CI for monorepo

To use monorepo or not is an eternal debate. Each has its pros and cons. Let’s say you decide to go with monorepo, one major issue you will face over time is slow testing. Imagine a monorepo, consisting of an Android app, an iOS app, some backend code, some web frontend code. In only very few occasions will someone modify more than one of those simultaneously.

Further, add to the fact that most of these projects confined to their directories would be using different build systems as well, for example, gradle for Android, yarn/npm for Javascript, go/rust/java/npm for the backend. The total build time, as well as test time, will only grow over time. It annoys developers making small modifications to their part of the codebase. And it slows down the development velocity drastically.

Read More

How to deploy side projects as web services for free

In 2020, the web is still the most accessible permission-less platform. For the past few months, I have been playing and building side-projects to simplify my life. I started with a Calendar Bot for scheduling events, DeckSaver for downloading decks from Docsend, AutoSnoozer for email management, and StayInTouch for maintaining follow-ups.

When I started on this journey, I had the following in my mind.

  1. Cost of domain ~ 12$ a year or 1$ a month
  2. Cost of a VM ~ 10$ a month

Read More

Docker 101: A basic web-server displaying hello world

A basic webserver

Docker containers are small OS images in themselves which one can deploy and run without worrying about dependencies or interoperability. All the dependencies are packed in the same container file. And the docker runtime takes care of the interoperability. You are not tied to using a single language or framework. You can write code in Python, Go, Java, Node.js, or any of your favorite languages and pack it in a container.

Consider a simple example of a Go-based webserver

Read More

Android: Using “Die with me” app without killing the phone’s battery

Die with me¬†is a chat app which can be used only when the phone’s battery is below 5%.

Here is a fun way to use the app without draining your phone’s battery. Connect the phone via ADB or start Android emulator and fake the battery level to 4%.

And now, you can use the app. After playing with the app, reset the battery level with,

 

Keep your dotfiles bug-free with Continuous Integration

Update: As of April 2020, I have switched over to GitHub Actions. Travis CI has become buggy and flaky over time and I got tired of trying to keep the builds green. My GitHub action scripts can be seen here.

Just like many software engineers, I maintain my config files for GNU/Linux and Mac OS in a git repository. Given that, I wrote a fair bit of them in interpreted code, notably, Bash, it is a bit hard to ensure that it is bug-free. The other problem I face is that packages on homebrew, the Mac OS package manager becomes obsolete and gets deleted from time to time.

I added CI testing on Travis CI to prevent these breakages and to ensure that my dotfiles are always in good shape for installation. The great thing about Travis CI is that it is entirely free for open-source repositories even for testing on Mac OS containers.

Read More

Circle CI vs Travis CI

I maintain a somewhat popular Android developer tool (adb-enhanced). The tool is written in Python, supporting both Python 2 and 3. Testing the tool requires both Python runtime as well a running Android emulator. I, initially, used Travis CI for setting up continuous testing of this tool. Later, I felt that Travis CI was too slow and when I came across Circle CI, I decided to give it a try. As of now, both Travis and Circle CI are used for testing. Here is what I learned from my experience.

Read More

Angel investing for Software Engineers

Software Engineers peak early in their career and especially in places in the San Francisco Bay area, New York, and Seattle attain accredited investor status early on in their career. Hearing stories of Jason Calacanis and Chris Sacca, many consider trying their hands-on angel investing in startups.

If you are considering it, here are my few suggestions for that.

Should you do it?

Angel investing, just like many other exotic ventures such as buying arts and vintage coins, is optional. It is much more safe to make money by investing in publicly listed companies. So, don’t do it for money. Find a better reason to do it. For me, the opportunity to connect with other entrepreneurs makes it worthwhile.

How much to invest?

Don’t invest more than 5-10% of your net worth. Most angel investments fail; it is best to diversify. In the early stages, don’t invest substantial check sizes (50K-100K) in a single startup.

How to start?

Get your feet wet via Angellist Syndicates. You can invest a small amount and gain confidence. These investment opportunities come without the information rights, so, you learn a little less than what you get when investing directly.

Once you are confident, watch more pitches either at local pitching events or online pitching events like Stanford’s StartX and Alchemist Accelerator Demo day.

Whether you are looking at companies on AngelList or the pitching events, the quality will vary a lot. More often than not, you will say no, but occasionally, you will come across a gem to invest in.

Dealflow

Good deal flow is crucial. Either you will have to scout a lot of good deals, or you need to be friends with people who are going to make it big. Also, try to have some VC friends, so that, you know what not in trend. Here’s the hard reality, almost every angel investment of yours will need VC money at some point. If most VCs are going to reject the opportunity outright, for example, because it is located in unacceptable geography or is in a crowded space, then that startup is almost bound to die.

In the case of a hot oversubscribed deal, you will have to convince a founder to take money from you. And that’s where you have to answer what value-add do you bring beyond the capital. Put some thought to prepare that. Here’s mine – “I can help you with thinking around engineering as well as product. My background ranging from backend engineering at big companies to mobile development for emerging markets to blockchain gives me a unique engineering + product perspective. You can see my writings at https://ashishb.net/category/tech-thoughts/ and my prior investments at https://angel.co/ashishb“.

Learn to say no

You will be saying no most of the times. Say that fast and move on. Don’t waste your time or the founder’s time.

Don’t give up on pro-rata

Angel investing is way riskier than late-stage investing. And if you end up investing in a gem, you don’t want to miss out maintaining your pro-rata, fight for this right.

Understand the different type of investments

SAFE is the most popular now. Convertible debt creates phantom tax implications. Equity investing is less prevalent in early stage than the late stage.

Criteria

Develop some criteria to decide what would you invest in and what would you not invest in. For example, I don’t understand health tech and pharmaceutical, and I would not invest in it. Similarly, for the lack of understanding, I avoid startups targeting Latin America or Africa. Remember that laws are different everywhere; for example, in India, a minority shareholder can block an acquisition, in the USA, they cannot.

Process

Decide how you are going to invest. Are you going to decide over a phone call or multiple in-person meetings? Have a written questionnaire which you ask to ensure you are not missing on something.

A short guide for MBAs looking for a job in the tech world

Why Tech

In the past decade, interest among MBA grads towards tech companies has drastically gone up. If you are one of those, take a pause and ask yourself “why”. Of course, there are upsides; the tech sector is growing faster, pays well, has a much better work-life balance than finance, private equity, or consulting. But at the same time, do remember that you spend almost 50% of your waking hours at your workplace, so you must as well enjoy it. If you enjoy flashy presentations, regular travel, or an opportunity to think about big M&A deals, then these things come much earlier in your career on the east coast than that on the west.

Why Product Manager

Product Manager is the dominant choice for an MBA grad. That does not mean this is the only possible role. Anecdotally speaking, getting into a PM role at Google is harder than a Software Engineering role. And if you are an international student looking for visa sponsorships, then some tech companies are not willing to do that for the PM role. Lastly, if you are not from the Computer Science/Electrical Engineering background, it is harder to get shortlisted and clear interviews. My goal is not to discourage you from applying but make your expectations realistic.

Beyond Product Manager

Facebook, Google, Apple/Amazon, Netflix (FANG), and Microsoft are big businesses. They deal with a wide range of functions such as real estate to supply chain to short-term/long-term cash management. There are all sorts of finance-world equivalent roles beyond the PM role. I won’t be surprised if Google pays more in real-estate rents than say, WeWork. All big companies engage in regular M&A as well and have a full-time team staffed for that. Cisco, Apple, and Google, in particular, are known for M&A. Also, many companies have roles like Product Strategy and Product Marketing Manager. These roles are similar to Product Manager but attract much less attention since these titles do not look as coveted as the Product Manager. You can use these roles to get in and then can transition to a Product Manager role later.

Beyond tech companies, many venture firms, both domestic and foreign (like Rauketen and Softbank), invest in US tech startups. And for that, they hire analysts, principal, and associates. The job responsibilities range from scouting to deciding on the deals.

Does company size matter?

I like quantifying companies in three stages – stage 1 (pre-product market fit), stage 2 (post-product market fit, growth stage), and stage 3 (mature companies like FANGs). Do note that in a big company like one of the FANGs, you will find products that are in stage 1, stage 2, or stage 3.

If you need visa sponsorships and have loans to pay, then stay away from stage 1 companies. The risk-reward ratio is more skewed towards risk here. If this succeeds, even a small acquisition can net you a million-dollar or two easily.

In a stage 2 company, the likelihood of broad responsibility is higher. You could be doing inside sales one day and scouting for a new office lease the other. If you are willing to take the risk, then the long-term financial rewards are much higher here. If you need visa sponsorship, then you should join a stage 2 company with a non-US office as well. So, in case you don’t get H1-B before your OPT expires, the company can move you to one of the international offices. Confirm this after getting the offer letter and before signing it. Some companies like GitLab have a strong remote culture; this can be extra beneficial to someone concerned about the visa sponsorship issues.

In a stage 3 company, your role is going to be much more structured, narrow, and focused. The company won’t die overnight and would likely have international offices to move you to in case the visa situation does not work out. One caveat for those looking to apply for permanent residence (green card), join a company that did not do layoffs recently and is not planning to do in the next year. If a layoff happens, then the permanent residence applications from that employer are usually rejected by the USCIS.

B2B, B2C, and marketplaces

B2C, Business-to-consumer startups, in their pure form, was thriving in the valley till about 2015. The users have swayed away from installing new apps, and more prominent companies have become good at making the whole startup a feature in their product. So, in 2019, software-only B2C exists, primarily, inside FANG and Snap. Two exciting classes have emerged beyond software-only B2C. One is prosumer (professional consumer) companies like recently-IPOed like Slack and startups like Savvy. The other exciting direction is the D2C, direct-to-consumer, startups like allbirds, and brandless.com. D2C, in my opinion, requires a lot of operations and marketing experience. I notice more B2C startups focused on India, Latin America, and China than the USA these days.

B2B, business-to-business, are all in rage today. From Google cloud/Azure to small companies like Narmi, a lot of companies are capitalizing and building products for other businesses. While B2C is about understanding consumer psychology, B2B is about understanding the needs of another business.

Two-sided marketplaces are hard to grow. Most of them, in the US, are trying to build pieces of Craigslist, and some are doing well.

How to apply

Don’t apply directly for an off-campus opportunity. Go via a referral. The referral route ensures that you will get a response, even if it is a rejection. Most of the time, direct applicants never get a response. And you don’t need to find someone you know. You need to find someone willing to spend 5 minutes submitting your resume internally. Culturally, it is not frowned upon to provide referrals for acquaintances. And if you get hired, the person referring you will make a referral fee, which is usually a few 1000$.

Where to find stage 1 and stage 2 jobs

  1. Angel List
  2. Breakout list
  3. Y Combinator startups
  4. Hacker News’s who is hiring threads and a bit more readable version

Subscribe For Latest Updates

Signup for our newsletter and get member-only articles