You have a startup idea, what should you do now?

Alright, you have an idea, you love it and you are ready to do whatever it takes to bring it to life, but you should not jump to idea of starting up so soon. ‘99% of startups fail‘, it is not because they lack skills or their idea wasn’t superb enough, the major reasons are they were not prepared for the challenges ahead. Before you actually decide to start a business –

Evaluate the idea – every idea has a potential of making money, but how much, in what ways (what all possible revenue models), how it will scale. Get an unbiased view of an expert on the idea – he/she will tell you about the major pitfalls. Once you are sure of the sustainability of operations and development (not from VCs or angels money), go ahead.

Build a great Team – the greatest of the ideas can fail miserably if not executed properly. You need to nurture a team which shares the same ideals and concerns as You. They should possess skills necessary to execute the idea. When looking for a co-founder do not go for a guy who fills the skill set required (you are hiring an employee then). Find a person who shares the same concern, the skill set and ability to scale the business. For eg, when looking for a Tech Cofounder, don’t just go for a great Engineer, find someone who has the skills but can also hire, nurture a team and ship great product in timely manner.

Make products with utility not beauty – your product should not solve the same issue that other tens of products are doing, just that you are doing in a ‘better’ or ‘user friendly’ way. No, it won’t work for most of you. Find utility the customers will get out of it, and it should not be marginal. Marginal improvements over existing solutions is not going to work. You need to take a leap, shift curves of imagination and utility.

Give it in hands of superusers – you love your brainchild, everyone does. Learning about its shortcoming is a not an easy task. Give it to some superusers – people who live in the real world, face the issue you are trying to address and are really good critics. Learn from their feedbacks, improve upon the shortcomings and release a beta version.

Market it great – ‘Good products don’t need marketing‘ – its true if you have all your life to wait for it to go viral. Greatest of all products need loads of marketing in the right manner to catch the attention of potential customers and make them hold on to it. The attention span of internet users is very low, if you don’t catch the eyeballs right away, your product stands very less chances of going viral.

Iterate and Improve – One thing most of startups fail to do is, they don’t iterate. Learn from user analytics, insights, feedbacks, keep on iterating, try new things that improves the experience of your user or customer. Here is a quote I personally admire a lot

Speed of iteration outbeats the quality of iteration.

Keep on improving your product before trying to diversifying it. Follow the Lean startup principle – Keep It Simple. Don’t try to do many things, find a very basic problem try to solve it, in a way which provides the most utility to customers. Try to increase the marginal utility of using your product everyday.

Web scrapping and Automation using PhantomJS

I was recently trying to automate form filling in some sites, searching for options I came across PhantomJS. It is a great library and since I’m just too used to javascript, it turned out to be a very good choice. If you simply want to do simple form filling stuff or parse content from some specific div etc you can try CasperJS. It is a nice little layer on the top of PhantomJS, with simpler function to scrap web content or fill up forms.

So what is the exceptional thing I found about this library. All the tools so far I had used for web scraping – php-curl / python-beautifulsoup / mechanize, all them required figuring out how the form is posted, debugging / figuring out the action of your code was really tough — getting to know from console where you got stuck was really painful. And all of them required lots of code especially php-curl. Some sites would figure out that you are a bot and you get HTTP 403 error.

Now PhantomJS is very exceptional in this regard because what it does is it executes the javascript function you define like it was being executed in the JS console. ( Over the time I have become too comfortable with JS, so whenever I get a choice to use JS over other language I would choose it. So is the reason for my love for Node.js) This gives you an edge because now you just have to know how the DOM is made. Earlier there didnt used to be so much JS validation, AJAX content etc. Now forms are complex and next form fields are pulled via ahah/ajax. Unless what you do totally mimics the behavior of user it would be a tough job to scrape the web. PhantomJS comes to the resuce –

1. You dont have to worry about your user agent – it sent as the same of the computer on which your script runs and still you can modify it if required.

2. PhantomJS uses QtWebkit, so your scripts behavior is same as that of a user trying to access contents from a browser.

3. You can simple trigger events — all of them (click, change, keyup etc). This ensures that if content is fetched via AJAX – you are able to see it.

4. Debugging code is really easy. You can capture the screenshot of the browser (QtWebkit) and see upto what steps your script has accomplished its work. Still you can output stuff to console in fancy colors using CasperJS’s colorize API.

5. There are event listeners almost all of which you could imagine, i you want a custom event you have the liberty to define one. Your script has got options to wait till that click you triggered fetched that content block and not simply keep on running step by step with arbitrary timed sleep/wait.

Btw, CasperJS is widely used to write test cases for web application these days.  You should definitely give it a try. And if you are looking for an extremely powerful web scrapping and automation tool, you should head to Selenium. It is by far the most powerful tool I have come across but remember it has a huge memory heap, it will totally consume your server.

Mobile Web 101

Hey there, So it is time, you have decided to start designing/developing web app for mobile devices. Here are few basic start guides which will have you going with your mobile web application.

This will be a multi-part series, Here’s part one on differences in designing for Desktop and Mobile devices

Before you get going out there to code, I would like to tell you the difference between designing for desktop/laptops and designing for mobile devices.

There is no technical difference –  but a lot of psychological changes do occur and usage patterns do change. Mobile comes with lots of hardware possibilities. The newer HTML5 APIs are providing more and more hardware access through mobile web and helping create more and more native like experience. So what is the difference in developing for mobile platforms and PCs ? –

1. Hardware capabilities – Desktops and laptops came with the adequate amount of memory and processing capabilities, the chances of your application crashing the browser of the user was zero, so could be totally sure of that css animation not being laggy, for eg if it works on great on your computer. Mobile devices with few exceptions dont have a great hardware configurations, so your code must not be fragile,  check for memory heaps, leaks etc is a necessity, especially for Javascript intensive applications. Processing can be slow, if you are planning front-end rendering beware,  you will be facing trouble. Its not that mobile devices in general cannot process at great speeds but the problems is the multitude of devices out there, some with great quad-core processors and some with 256 Mb of RAM. You need to consider performance on an low average configuration. (Especially in a country like India where more people browse internet through phones and phones made in China. ) Also there are lots of hardware access available via HTML5 APIs which can be greatly harnessed to make user experience more pleasant. (For e.g using the location API we at housing showed directions from current location of user to the listings location, which enabled him/her to visualize on which road the listing is and decide for to visit on the move).

2. Platform + version + browser(s) variations – In the world of desktops we have Chrome, Firefox, Safari and I.E ( >7) and platforms – Windows, Mac, Linux. Through my experience whatever you design for one browser and platform it almost seamlessly works same for rest all (except for IE – which most of dont care for). When it comes to mobile devices there are platforms – Android, iOS, Windows, Bada, Symbian etc, then there are browsers chrome, android browser, firefox, opera mini, dolphin, are to name some, there are lots and lots of them and people use them to browse and in a fairly good number (#GA stats). So whats the problem? Mobile platform is very young – the implementations are buggy. So if you make something is works in one platform and browsers there are lots of chances it not working on other platform & browser. And to your surprise it may work on one version of the platform (e.g Android 4+) and not on other versions (less than Android 2.3). Coming on to browsers each on has its own implementation of interpretation of  Javascript (& support for CSS3 properties), some support some properties and some don’t, you have to have to take care of fallbacks especially in case of Javascript applications. (i got this one with History API see )

3. Network Bandwidth/Speed and Usage Charges – This are serious concerns, you hear all the times that now mobile browsing is lightning fast etc but still in countries like India people browse over 2G/EDGE and expect lightning fast experience. Speed is something that matters the most about any web app (see Marissa Mayer on speed – Cost of ping >> Cost of content, always remember this. Instead of making each page small and dividing stylesheets and javascript files, make a multipage – single page app. Combining all files into one. Had this been the case of Desktops you could safely assume a broadband/3G dongle. Network speed is not such a greater concern as it is expected to be fast. Also you have ample screen size to show usable content on landing itself.

4. Screen Sizes – There are billions of mobile devices out there, with atleast thousands of different screen sizes, resolutions. Whatever you make must look the same on all these devices. Its not a huge challenge till you stay away from any kind of hack to put that div right there. To my surprise CSS position : fixed was such a buggy implementation on Android 2.3 (see that we had to change greater part of our UX. Sticking to standards and well established CSS specs is very important and noHacks!!. Being responsive is the best way to go for a mobile applications. Now if you were to develop for a desktop, a simple % dimensions would have sufficed :P.

5. Psychology and Usage Patterns – People now-a-days use mobile devices all the times. There are generally two purposes for using a mobile web app. Either it is for passing time (social networking, gaming etc ) or for some serious need (google search, find some restaurant etc). All these second category apps need to focus a lot upon the user experience. Understanding the psychology of the user is very important. Your user came to your web app with some purpose, the quicker you can ful-fill his/her purpose beautifully and elegantly, the more happier he/she will be and more will be the chances of him/her returning. People on mobile devices hate to wait, wait for the right content to appear, navigation is already complex and people are not so keen to figure out the navigation and controls. If you are not able to serve the right taste dish in right time, the potential customer is long gone. For the first category apps, your app should be fabulous at killing time, take angry birds or temple run for eg, they serve the purpose completely. User engagement is the key, the more the user feels engaged the longer he/she stays. Keeping it simple to use and engaging is the way to go.

To conclude, there are a lots of platforms you need one app to perform and look great. This requires some serious efforts, much greater compared to what you gave on desktops. People use mobile devices on the run or for killing time. Decide the category and design UX accordingly. Some properties behave differently on different platforms and platform versions, know them and find fallbacks. I will be posting a list of such properties I feel can cause trouble to a beginner in my next blog posts. Designing a great mobile web experience is a tuff job but if you are successful in doing so, You will be the most happy Front-end Engineer out there. 🙂

Hello World!!

Ok, the same insane stereotypical title – but c’mon as a developer for every beginning there is a “Hello World”. How can I not do justice with the most simple title ever. I have been thinking about to start to blog since long but always came up with lot of excuses, lack of time, where to start on the top of list.

So what causes the change of mind all of sudden and I start this very task to pen down remarkable life learnings (mostly hacks to make your website work 😉 ). Well most of the time my problems have been solved by landing on some great (wo)men(s) blog. The internet is vast and so are the problems while making it better for the people to use. Now is the time of mobile web, people are addicted to their smartphones, some are even married to and few sleep with them. There are infinite number of devices, lot of screen sizes and resolutions, JS/CSS interpreters etc. Many developers have made lot of contribution to make desktop web easy to build and they continue their efforts for mobile web too, we all share gratitude for them. But still, the number of resources for mobile web are scarce, so its very important that we share our learnings out there and make mobile web experience better!!

So in a way via this blog I would keep posting about the new hacks I discover – keep posted.