Author: nitinnain

  • Native Vs Hybrid Mobile Apps

    I was recently checking how the Hybrid App frameworks compare to Native iOS or Android Apps.  Here are my observations on few Phonegap Apps that I tried on my phone:

    • The size of Phonegap Apps is big: an app that should have been less than 10MB has a 40-50MB installer.
    • The Apps take longer to boot up.
    • There’s noticeable drop in scrolling performance (less fluid).
    • They lack significantly in giving the native feel.

    And then there are these major shortcomings when it comes to Design and Development Time itself!

    Hybrid Apps’ Design doesn’t match up

    There are different design guidelines for Android, iPhone and Windows Apps. You will observe that many iPhone Apps have a menu at the bottom, but that doesn’t work well with Android Apps. Android has fixed ‘menu’, ‘home’ and ‘back’ buttons at the bottom and it’s inconvenient to have more options there. Then there are subtle differences in icons, fonts etc. that you should take care of.

    You won’t save much (any) development time

    If you’re starting fresh, I don’t think it takes any longer to make a Native app than a PhoneGap, Cordova or Xamarin App. If you already have a Web App, starting with PhoneGap might give you the impression of progressing fast initially; but fixing everything later is definitely going to be very painful.

    I personally love highly optimized code. If something can make my software a bit faster, or use lesser space, within practical limits, I would do that. If you’re particular about have a beautifully designed app, that’s fast and can use your phone’s hardware in the best possible way, in my opinion you should go for the native apps.

    Reference:
    – Explanation of PhoneGap, ionic and Cordova – http://ionicframework.com/blog/what-is-cordova-phonegap/
    – A startup moves away from PhoneGap to Native platform – http://www.fastcolabs.com/3030873/our-html5-web-app-flopped-so-we-went-native-and-havent-looked-back

  • github is not git

    Git is a free and open source distributed version control system that can handle small to very large projects. It’s mostly used to keep the history of your source code.

    Github is a company that provides an online git hosting service, used by some projects to keep their source code.

    There are several companies like gitlab, bitbucket that offer github like service. They all use git to manage a user’s project source code internally.

  • Product Analytics for growing Startups

    For any product company, understanding how their product performs is crucial in achieving growth. And data-driven decision-making can uncover hidden patterns and help align the products with its long-term vision. The Amazons and Googles of the world are successful because they have successfully used analytics at key stages of their product lifecycles.

    Now of course not every startup should act like Amazon Google, or Facebook and there’s definitely something to be said about the gut feel, product aesthetics, and not blindly following data too. But still, when used consciously, data-driven decision-making can be of great help to any product manager.

    It can be overwhelming to analyze fragmented data from multiple sources: so here are key concepts and methodologies which you can use as a guide for incorporating analytics into your strategy:

    1. Vanity Metrics: Avoid the Temptation

    Metrics such as page views or historical total downloads don’t always convey actionable measurements. They might make you feel positive about growth but think hard about whether you want to base your strategy on these. Every product is different! They are often (unfortunately) used to inflate growth figures but do not indicate real engagement or success.

    Example: If a product shows high page views but low conversion rates, you need to investigate user engagement rather than just traffic.

    2. Metrics vs KPIs

    While metrics are measures of specific aspects of your product (e.g., number of users), KPIs (Key Performance Indicators) directly reflect progress toward your business objectives.

    Example 1: your advertising spend is a metric, not a KPI. Advertising might help you get new users but the money spent is just a measure. A KPI could associate the sales increase with the advertising spend, i.e. cost of customer acquisition could be a KPI.

    Example 2: While tracking user sessions is a metric, the KPI might be ‘User Retention Rate,’ which tells you how well your product is keeping customers engaged. Always ask yourself whether a metric drives actionable outcomes or just provides general insights.

    To sum up, all metrics are not KPIs.

    3. One Metric That Matters (OMTM)

    Just like in your daily life, your startup needs focus! The OMTM is the most important metric that your team should rally around. In practice there might be 2-3 metrics that you might have to track, say sales, UX, and tech debt. But definitely keep this very low and below three.

    Of course, your goals will change with time, so your OMTM evolves as your product and company mature.

    Example: Early on, your OMTM might be “user acquisition,” while later it might shift to “revenue per user.”

    4. Segmentation: Granular Insights Lead to Better Decisions

    Segmentation allows you to break down your data by user attributes like geography, device, age, or behaviour. This helps in observing patterns more minutely instead of being lost due to averaging. As your product grows, you will gain an increasing ability to ask complex questions from your data and then you can optimize marketing efforts or product features for specific user groups.

    Example: A product targeting millennials may realize that users from urban areas have higher engagement rates than rural users, leading to more targeted marketing efforts.

    5. Funnels & User Journeys: Mapping Key Milestones

    A funnel breaks down the steps users take as they move toward conversion. It helps you understand where users drop off and identify pain points in the user journey.

    Example: If your signup funnel shows a large drop-off after the email verification step, it may indicate a cumbersome process or unclear instructions, providing an opportunity for improvement.

    6. Retention

    User retention is one of the most telling metrics of your product’s long-term health. Simply acquiring users isn’t enough if they don’t stay. By cohorting users (grouping them based on when they signed up), you can measure how product changes impact different groups over time.

    Example: If users who signed up after a recent feature launch show lower retention rates, it may be an indicator that the feature has usability issues.

    7. Data Points: Focus on What Matters

    A Data point is a measurement that can be represented numerically or graphically. Here’s a more detailed Wikipedia definition. While it’s easy to get lost in data, not all data points are relevant to every decision.

    Example: Focus on the key data points that align with your KPIs and business goals. Instead of simply tracking ‘all actions,’ narrow it down to those that affect revenue, user satisfaction, or growth.


    Implementing Analytics for Your Product: A 3-Step Approach

    There are three broad steps you need to perform to setup analytics for your product:

    Step 1: Plan

    • Define Product Vision: Ensure you and everyone in the team understand the problem your product is solving.
    • Identify KPIs: What metrics will indicate progress toward your vision?
    • List Critical Metrics: Prioritize those that will guide your strategy.
    • Plan the Funnels: Decide what actions matter most along the user journey.
    • Data Points: Further drill down on where and how you’ll collect the metrics.

    Step 2: Measure

    • Use Established Tools: Focus on your core product instead. This is not the time to get political, whether AWS and Google Analytics are being monopolistic or not. Leverage tools like Google Analytics, Mixpanel, Hotjar for tracking. You can always reflect on these once you have substantial size.
    • Collect & Store Data: You might want to set up separate databases to run regular queries for fetching metrics over time. Set up automated dashboards where possible.

    Step 3: Report

    Mark Actionable Insights: Focus your reports on KPIs, comparing trends with competitors, or tracking user behavior changes. Summarize the findings to share with stakeholders and guide future decisions.

  • Navigating large codebases and contributing to Open Source

    (I wrote the following as an email to a someone who asked me for advice. So it’s verbose and written with a personal tone.)

    I. Setup your system and build the project code

    Pick any good Integrated Development Environment (IDE). I like VS Code. You can work on any langauge in VSCode be it C++, JS or Python, and you won’t have to learn the interface of a new editor everytime you switch language. VIM is a good choice too. Then of course there’s emacs and more. I recommend you pick a more generic — widely used editor, instead of something like say Dev C++ that’s restricted to a language.

    Under the hood, VS Code has something called “Intellisense” which creates a sort of index of the whole project when you load the project (So, when you right click on a variable/function you can click on “Go to definition” to jump to where a variable is defined/declared etc.). This indexed code is super useful for navigating a large codebase: a good analogy I read long back is to think of this ‘index’ as a torch to navigate through a dark maze. That’s is basically the difference between an IDE or just using a more basic Editor.

    Also figure out how to use the terminal effectively — modify your terminal’s configuration file to your liking. In older days, people would use things like ctags, cscope, gdb to achive the same via the Terminal; IDEs were buggy and slow. Command line tools like tags and cscope help you jump to definitions/functions etc. just like IDEs. It’s interesting to learn these too, in particular if you’re working on C/C++.

    Then, get a local copy of the code you want to checkout and compile it. Usually there’s a “how to build/run the project” section in the README file.

    You can’t do anything if the project doesn’t build on your system! Look at the build script (makefile, requirements.txt, webpack etc., whatever is used on the project) to see if you can find some hints on how the code is actually “booted”. See the list of other libraries the project depends on.

    Always, read the output of the build process: you’ll find some helpful hints on what command were executed and how the build went.

    II. Understand the business logic for the code base

    Get a high level understanding of the project. Coding usually doesn’t just involve punching keys. You have to understand what the project is trying to achieve, otherwise you would remain confused.

    You’ll have to read the project’s documentation or some literature on the industry. For example, if you’re working on an HTTP networking library, you’ll need to know the HTTP specification fairly well. If you’re working on a library management system, you’ll have to understand how books are categorised in libraries, ISBN format etc.

    If it’s an open source projects, you might even find some talks by the project developers online or some project slides. So search on the web. See if you can find some architecture diagram viz. flowcharts, sequence diagrams, UML class diagrams, Component (Block) diagrams. If you can talk to other developers on the project, that would be useful too.

    III. Set an initial aim

    Decide what you want to do on the code base i.e. do you just want to just learn the code flow, fix some issue or enhance some feature etc. Try to aim high. Setting up audacious goals generally has positive outcomes.

    This essentially is a Bottom-Up approach. You isolate a module/component in the codebase, and work on it.

    Make small changes and see how it affects the code flow. You can always revert back to the original version.

    The Top-Down approach, would be something like grasping the whole source code before editing anythint. While that theoretically sounds like a good idea, it could take too much time and you’ll tire youself out before modifying even a line of code. Learning the whole codebase is overwhelming for everyone.

    New developers at Facebook are encouraged to commit their first code on the first day of joining! This bottom-up approach is a much better start, then trying to understand the whole FB architecture.)

    IV. Make notes as you study the code

    Understand the different classes or abstractions, and try to estimate what each module/class/abstraction is doing. Look at the Folders/Files and try to make sense of what they are doing by their names.

    I usually like to make a lot of rough notes on paper – noting down the classes how they interact, the inheritance structure.

    Draw rough class diagrams on the fly. Also draw a call graph, as in which functions calls the next function etc. Diagrams could be specially useful if you’re a visual person. At times, I have even taken printouts of some code at times and annotated it.

    Big codebases, usually have a lot of asynchronous calls with multiple processes and threads. You might have to understand how the process/threads pass data between themselves.

    V. Look for an entry point into the code

    Usually, projects keep the core code in “src”. While the built binaries usually go into “bin”. There are also other folders like lib, docs, test etc.

    Your IDE will allow you to setup Breakpoints on various files to debug the code. So setup a few breakpoints on functions that you might think will be ‘hit’ when the code is run. When a breakpoint is hit, the code execution stops and you can see a call hierarchy, i.e. a trace of all the functions that were called till the breakpoint.

    VI. Look for the data models

    There are two broad types of coding projects — Data driven and Functionality driven.

    If your code base is to deal with large amounts of structured data then reading the DB Tables/Data structure would be super useful. Here’s a quote that puts it so well:

    “Show me your [code] and conceal your [data structures], and I shall continue to be mystified. Show me your [data structures], and I won’t usually need your [code]; it’ll be obvious.” – Fred Brooks

    VII. Logs, Debug msgs, Test folder

    When you run/build the code, it shows a lot of info on the output terminal or in Log files.

    It might seem daunting initially, but read the output carefully and try to follow what the messages are trying to tell you. You’ll understand a lot about the code flow from here! Eventually, you’ll develop a knack for how to read logfiles and debug messages and this is a super helpful skill.

    If you just can figure out, look into the tests folder, there might be some earsier/helpful code you find their on how to interact with the main source code.

    VIII. Language basics are important

    Big projects could be using very advanced language features, complex design patterns, clever hacks etc. So a good understand of the language syntax itself, Design patterns, OS fundamentals is super useful.

    For example, if you’re working on some mobile app, then understanding the MVP design pattern is almost necessary before even getting started. If the code uses frameworks, you’ll need to understand the framework itself. For example, to build a web application on Django, you’ll need to have gone through the basics of the django framework at the very least.

    You might need to understand how the language interacts with the OS (Android, iOS, Linux, MacOS, embedded systems et al). For e.g. how does File I/O happen or how are threads spawned.

    IX. Be patient

    It takes time, so be patient. Navigating code base isn’t easy for even experienced developers, especially when many people have contributed to the code.

    Additional

    You’ll also need to understand:

    • How code versioning systems work. Most probably git is being used.
    • How bugs are reported and handled on the project.
    • Coding Standards — how variables/functions are to be named or how many spaces are used for indent etc. Be sure to follow the guidelines setup by the project’s maintainer.

    More Tools

    • Tools like grep, find are super helpful.
    • tree
    • tree | less(you can do brew install tree to get tree on Macs)
    • For C/C++ callgrind + kcachegrind are interesting to see call graphs.
  • What’s inside Google Glass?

    What’s inside Google Glass?

    It’s impressive to see how much punch “Google Glass” packs in an elegant and light-weight construction.

    Google Glass breakdown

    (Image: iFixit)

    I’ve long believed that the ability to create new materials is a good indicator of a country’s production and economic ability. Just look at what Britain, US and Germany did with materials during the industrial revolution and Japan and China in the last century. Right now, US scientists are trying to use the power of Big Data to sequence ‘the materials genome’. 1000 years back it was probably the Middle East, China and India who were acing the material sciences and were indeed economically prosperous.

  • Python for beginners

    Getting functional in Python programming took me about a month and I’ve several years of C++ programming experience. I feel this is ok time for experienced programmers to get started, given you have something else going on in life as well. For beginners though, learning a new programming language in a useful manner is not as casual an affair as some YouTubers and Tech bloggers would tend to suggest on the internet (looking at you people, who write the ‘learn X in 1 hour’ guides 🙄).

    Computer systems need a fixed syntax and grammar which needs practice to get comfortable with. Python is easier than many other languages, but still, if you’re a beginner, you need to set aside a good amount of time learning it. People will forget to mention this when recommending books, but there are broadly two categories of programming books out there:

    • 1) for experienced programmers/Web Developers, and
    • 2) for beginners, with the language basics.

    If you’re a beginner to programming, don’t pick the former.

    If you just want to write some standalone scripts, then avoid books targeting Web Developers (Web developers would have to learn other topics, like a web framework, HTML rendering, REST APIs, etc., stuff that you can skip). I learnt it from Dive into Python, which is a bit advanced and not for you if this is the first computer language you are learning. It’s a great book though!

    If you’re a beginner, just focus on the language syntax, keywords and the style of writing code. The book Byte of Python might be it for you. Or try Think Python.

    Don’t try to learn by collecting tips from forums on random Python-related FAQs. It’s best if you start with a complete book. The forums will come in handy later when you have started coding and are stuck at some specific point. I haven’t studied programming through interactive online websites yet; I prefer working with native tools and find practising on the browser a bit cumbersome. It’s always better to practice coding in the environment you would be working on. Online interactive tutorials will give you a sense of accomplishment, with a quick start, but without actually building a good foundation. Having said that, there are a few good resources out there.

    There are also some very good online video courses available now. “sentdex” on youtube has some awesome content.


    P.S.: Python like most scripting languages uses Regular Expressions for a lot of text operations: it would help you greatly if you learn a bit of RegEx as well (You have definitely encountered some RegEx already if you’re an active computer user).

    If you’re preparing for Web Development: then learning about web frameworks (ex. Django), file I/O, REST API, Databases etc. will be the next steps. Pick the advanced topics after you’ve learnt the language basics though.

  • Visualizing data using graphs and charts

    There’s been a surge in reporting data using charts on the web. This has brought in the trend of infographics and several tools (JS libraries) that simplify the task of drawing charts.

    Many people get too occupied in visual design and overlook whether the chart actually fits their use case though. Software charting libraries/plugins ought to be used judiciously and not plastered all over a report. The rotating dials and gradients on several corporate website homepages are usually just pointless and irritating. The graphics on Google Trends on the other hand are so useful cause they are crisp at presenting data. 10 years back the world wide web used to be full of hotch-potch gifs, flash and blinking orange/green lights on jet-black backgrounds! You have to be cautious not to do that with your graphics. What’s really bad is is sometimes the infographics end up representing the information incorrectly and can cause some serious damage.

    I think that a simple 2D Bar or Line chart is what most people need when they instead pic some 3D chart graphic.

    Here are my tips on how to go about creating a graph or a chart:

    1. Start with the problem — not by picking up a cool graphics library.
    2. Ask yourself if you have enough data. Use good statistical methods to analyse that data. If you aren’t ready to crunch the numbers, find help but don’t do it wrongly.
    3. Simple 2D representation with optimum contrast and colours that are easy on the eyes might be what you need. The decision on which chart to use comes at the end, pick 3D only if you need it, not because you liked a similar animated visual on some other website.
    4. Think about Accessibility: Use colours that are readable by colour blind people.
    5. Don’t leave it upon the user to figure out what is being said. That’s cognitive overhead which needs to be avoided.

    Here’s an interesting infographic showing the basic chart types

    (Source: http://online-behavior.com/analytics/chart-types)

  • 10 fields to consider for startup ideas and inspiration

    June 1, 2013

    People generally have a limited vocabulary when talking about internet businesses. I think learning to categorise online businesses properly is important to find inspiration for new ideas; especially for those who are just starting to explore options of their own.

    If you’re bitten by the startup bug, consider the following different fields of online business that have been successful in the last few years:

    1. Big Data / Analytics

    Big Data is basically the huge amount of data generated on the internet, by sensors, by electronic devices etc. which is difficult to process, store or analyse by traditional computing methods. There’s no dearth of topics that you might chose to analyse: Sports, Politics, Consumer behaviour, Demographics, Economics, Financial Markets. In my opinion, a certain disposition for analytics and understanding of tools used for data analysis is important to start in this field. 

    2. Hardware Startups (Internet of Things)

    Talks of smart homes and connected devices have been around for several years: but only now have some really interesting new gadgets begun to take shape: check out — Fitbit, Nest, Leap Motion, BodyMedia, SmartThings.

    If you are interested in starting something on these lines, you may find ideas around use of advanced sensors, remotely controlled devices, smart homes and wearable gadgets. The returns vs. invested capital (as in the case of the clumsier but cool humanoids) is always a sticking point. Getting the pricing right and the right PR is crucial. Moreover, the adoption in countries with low PPP tends to be low, so most probably you might have to build something for the global markets, which would be a huge project. A solid plan and good funding would be necessary to execute this. Consider Arduino and Raspberry Pi as interesting kits to carry out initial experiments on. (Also, consider how Micromax, Karbbon et al. manage the supply chain.) This article has some interesting points.

    (Nest, priced at $249, has a 1GHz ARM processor capable of supporting Linux and Android OSes)
    (Nest, priced at $249, has a 1GHz ARM processor capable of supporting Linux/Android)

    3. E-commerce

    Buying or Selling anything over electronic media. Shopping sites are all over the place now: Amazon, Flipkart, PepperFry, Fab, Etsy and many more. You might want to look at the WordPress WooCommerce plugin or the Magento platform to quickly integrate shopping cart like features into the website. Also, understand how the purchasing decision works. It’s nice that the logistics infrastructure has already got a priming. Btw, I find selling fashion online to be tricky; it’s difficult to prove the product to the user without them knowing how it fits and feels in hand. The sector is abuzz still, and there’s so much that could be done here!

    4. Software Services

    A model that has worked well in India: you can start by taking up contract job for creating or managing website or mobile apps. Building momentum for a company is tricky though. You need to have staff to get good clients and vice versa. Chicken and egg story! And to sustain in business, you would need people who can deliver — a recruiting and HR challenge!

    5. Social Media

    The talk for the next big Facebook is always on and new social networking sites such as Airbnb, Pinterest, 500px keep springing up every year. It’s not easy to bump into a fresh idea here, but who knows, you might soon be gunning for a $1Bn deal.

    6. Web / Mobile Apps

    Basically a frictionless service that you can create over the connected web. Communication apps, taxi service, Mobile payment systems, etc.

    Btw, consider issues from Local/National scope. There’s a reason why the American muscle cars won’t work in the streets of Rome, just as the small European car doesn’t jive with American roads. For India, my favourites are the likes of Redbus.in, PayTm.com and Practo.com who addressed the local markets and have seen strong growth.

    7. Finance related

    If you understand the Financial Institutions, Banking systems, Stock exchanges, Payment systems well then there’s a lot of potential here. The systems are archaic and can be challenged. They are also very regulated, huge and laden with security/trust concerns though, which makes entering into this field quite tricky.

    8. Ad-Tech / Digital Marketing

    Algorithms/Databases to help companies with targeted advertising, or just assist them with their online marketing needs. If you’re entering this domain, think hard how you want to position your company, there’s lot of competition in this field already.

    9. Design Consultancy

    Ok I’m fatigued of reading the “We’re a creative design firm” line, but there’s scope of course. Maybe differentiate yourself in a particular aspect, say logos or sites or mobile UX or whatever. You would want to design everything, but I think it’s not an easy position to sell to your clients.

    10. Games

    Computer games have sustained for years as a form of entertainment and it sustains against odds. There are big companies (like king.com) that exclusively make Mobile games and are performing very well.

    So those are the top 10 that come to my mind. Did I miss something important?

  • The Signal and the Noise by Nate Silver

    Just finished reading this book and would whole-heartedly recommend it. A very engaging read for anyone interested in Statistics, Data Analytics and Predictions.

    Nate Silver is a statistician, writer, and founder of The New York Times political blog FiveThirtyEight.com. He was named one of the world’s 100 Most Influential People by Time magazine.” He predicted the results of last two US presidential Elections with amazing accuracy. It’s like he can know the future before it happens!

    As the name of the book suggest, with plenty of examples from Weather Forecasting, Sports, Finance, Economics and Politics, Nate explains how he uses statistics and Bayesian Theory to pick up the signals that help him make those amazing predictions.