Sourabhsoni.com started with the intent to share my knowledge (whatever little I gain over time) with the world, to document my learnings, so that people don’t end up re-inventing the wheel and waste their precious time on following all the paths that lead to a dead end. It also was a way for me to write about my experiences in life, whether it is with music, sports, technology, languages or even the philosophy of philanthropy (more on that some other time).
As the number of visitors increased, the maintenance cost for this blog also increased and I thought of putting a few ads which could fetch me enough money to pay for the domain and hosting space. The ads, did start to pay for the domain, but I always felt weird about putting ads on a personal blog. I think that a personal blog in itself is an advertisement of oneself and then putting extra ads on top of that is just not fair.
So, I have decided to write all the technical, code related articles in a separate blog, by the name of “codesmith.in“. It’ll serve two purposes.
First, it’ll be a revenue generating blog. A place where I can share my knowledge and don’t feel guilty about putting a few ads for some profit, so that it pays up for both sourabhsoni.com and itself. Secondly, it’ll provide a space to few of my friends who wanted to write about something but did not want to create their own blog for that purpose.
Codesmith.in will only have articles that are related creating software, everything else that I ever want to write will be here on this blog and going forward, I will remove all ads from this space.
There have been a lot of articles on the internet answering the most popular question these days
“Develop first for iOS or Android?”
Approximately all of these articles compare both the platforms based on factors affecting app development (writing code, UI/UX) or revenue generation, but they totally forget about two of the most important parts of software development – testing and maintenance.
For an individual or a company with limited resources, the most important part of publishing an app is how easily they can iterate on it based on user feedback. Sadly, no one actually cares about this while choosing the platform to develop on and no successful app developers have put enough emphasis on the importance of a developer console in the initial success of an app.
Note: if more than 75% of your users are on a specific platform then develop for that platform, nothing else matters.
Developer console is a place where you can submit your apps to be published in app store, so that it is available publicly for people to download. Apple’s developer console is known as iTunesconnect and Google’s is known as Google Play Developer Console. These look something like this-
Although I am an android app developer, I have released one of my app (http://internetusage.in) on all three major smartphone platforms. Here’s what I learned after publishing on both iOS and Android.
With TestFlight in iOS8, Apple is trying to solve one of the biggest problem with iOS development; beta testing, but it is still far away from being as helpful and easy to use as the Alpha/beta testing features in Google Play developer console.
The process of beta testing in both the developer consoles is somewhat similar
create a group of people (testers)
Upload your test build
Testers install the app and provide feedback via email
TestFlight by Apple is less helpful because of the number of restrictions it has. Here are a few restrictions with TestFlight:-
An app is available only for 30 days from the day it is put for beta testing iTunesConnect (not 30 days from when the testers install the app).
TestFlight works only on devices with iOS8 and at the time of this writing, iOS8 has been struggling with a lot of issues, causing a halt in upgrades by users
The tester must be added in iTunesConnect using their Apple ID and they must have a role of either admin or technical which means they have access to “My Apps” and “Catalog Reports”. Not sure if you’d want your beta testers to have permissions to edit/delete all your app data.
Although, Alpha/beta testing using Google Play developer console does not have these issues, they have one restriction that many developers don’t like, which is that the tester should be a part of a Google Plus community or Google group made for testers of this app and needs to be specified in Google Play developer console. You cannot specify a tester’s email address to send her a link to beta build.
User reviews and interaction
As is with all products, a happy user may or may not give a good public feedback (unless you amaze her with what you’ve built), but an unhappy user will always find ways loudly tell everyone how useless your product is.
Both the App store and Google Play store provide more than one way for a user to give feedback to the developer, either via email or by writing public reviews on the App/play store, but only Google Play developer console provides you a way to reply to public reviews (you’d be very lucky if more than 1% of all unhappy users write you an email about their problem rather than taking it out on you with public reviews). Rarely will you find such nice sympathetic users-
This single feature of being able to reply to public reviews makes Google Play way more powerful and useful than iTunesConnect, especially for an early stage app/startup. There were instances where both my apps had a few bugs for specific users causing them to give 1star ratings, but I could only help my android users by replying to them and getting more data out of them. Believe me, there are a few thing which can make you as happy as converting a 1star rating to 5 star by just proper communication with the user.
Although there are a lot of libraries for both android and iOS to log crash data and send it to the developer but both the developer consoles also provide a facility for you to view crash logs for the crashes reported by the user. With the increasing number of devices and different OS versions (even in iOS), these crash reports come in very handy as it is just impossible to test on each and every device/OS combination (specially for android).
iTunesConnect has a very simple page for crash reports, it has tabbed pages for different OS versions and a list of crashes for that version on each page.
While in itunesconnect, you need to download the crash report for each crash and each OS version, Google Play developer console shows all this (and more) information conveniently in the browser itself.
Play developer console makes it very easy to read and analyze crash reports. Like itunesconnect, it gives the complete stack trace for each crash but it also gives a lot of other data like pie charts for number of crashes per app version/OS version/device.
Android also provides users with an option to send a message with each crash report which might be helpful for the developer, but my experience with these user messages hasn’t been very good as they usually are unclear/generic “it’s not working!” and you can’t reply to them!
Apart from being a place to upload your app for publishing, purpose of the developer console is also to show the app statistics like how many people have downloaded your app, from which country, on which devices, etc. This also helps you do some app store search optimization. Try to change a few keywords in app name, description, etc. and then see if it affects number of installs then make changes based on learning.
I had high hopes with Apple while publishing my first app on Apple App store. I thought their developer console must be much better than Google Play developer console as Apple is the pioneer of app stores and they already had a lot of developers making iOS apps, but I was highly disappointed to see that App store shows only app downloads and nothing else. Below screenshot shows the sales and trends page for internetusage (Just reached 10K download :D, ice cream anyone?)
Although, number of downloads can tell you if your app is going viral or not, it is the most incorrect statistics to determine an app’s success. Number of downloads doesn’t tell you how many users are actually using the app. It is very important to know how many active users you have, how many people are actually upgrading to the latest version of your app, how many are uninstalling your app daily (are they from a specific country/on a specific device/on a particular operator?). These app stats are the best part of Google play developer console.
Both the companies have totally different approaches towards the app store. While Google tries to encourage and help developers, users are the most important part for Apple. Although with TestFlight and a few recent changes in iTunesConnect, Apple is slowly trying to solve developer issues, but it is still a long way from competing with Google in this field.
So, if you are an individual developer or a company with limited means wondering which platform to choose, I’d suggest to go Android first because of the smaller iteration cycle with user feedback/good crash reporting, easier beta testing and variety of app statistics. Specially because of the time it takes for Apple to approve an app (someone actually built a webpage to show average app review times http://appreviewtimes.com/). Apple took around 18 days to review and approve internetusage on iOS (meanwhile it was downloaded ~7000 times on android).
These app stores have their own set of vast features, but I have tried to concentrate only on the ones I think are important for a new app trying to improve rapidly with user feedback and help from the platform. Let me know if I missed something.
Every year, Ciena India celebrates Diwali in a grand way. We have various events organized for a complete week which ends with an amazing Friday night party. Apart from the events/competitions for the enthusiasts like Plays, Pictionary, Antakshari,etc. , we have a few for lazy bunch like me who don’t mind participating if we can do it from our desks like e-quiz , e-tambola, etc.
E-Tambola, is version of Tambola where each participant (all >600 employees in our case) take their tickets to respective seats and the caller sends two sets of random numbers each day in email. The person who completes any of the Rows or the full house needs to immediately send an email to the caller. Prize is given on first come first serve basis.
Although it is a simple process and doesn’t take much time to mark off numbers on tickets, I wrote a small PHP script to check whether I have completed any of the winning combinations and send email to caller if I won.
Before I start to explain how I did it, the why seems necessary as many of my colleagues couldn’t understand the reason behind it. Here are a few reasons:-
Every time the email came, it was a pain to find that damn ticket quickly in my desk drawers full with other *very important* documents.
It was not just the ticket that I had to find, I also needed a pen/marker which somehow magically goes missing exactly when I need it
Even after getting the winning combination, you’d be a winner only when you were the first one to send confirmation email to the caller and I thought I could automate the complete process to make sure I was the first to send confirmation email.
I could come up with other random reasons but the main reason I had to do this is precisely depicted in this comic strip by commitstrip.com “For the love of code!”
This was fairly easy as there were no complex winning combinations. I had to hard-code the ticket numbers and find the intersection of each row with numbers from the email. If the input numbers matched any of the winning combination (First five, any of the rows or full house) then show the hyperlink to send appropriate email. Here’s the PHP code:-
Note:- This was a quick n dirty solution and it is possible to do it in a better way using PHP or other languages. I am not a web developer, I have used PHP previously for very simple purposes like writing crawler for weworkremotely app, to send emails via internetusage landing page, creating my Infosys last day “mail” webpage (more on this some other time), etc..
There is a separate php file for input array, so that if I need to track more than one ticket (for my colleagues) then I need to edit only one file for input. It looked like this:-
I thought providing input will be an easy task, the caller will send us a comma separated list of numbers in email and I would just copy paste it in the input file, but these over enthusiastic people have to beautify everything! They sent the numbers in an image, something like this-
Sadly, now I have to type each number in input array and it takes the same time it’d take people to do it manually, but as I said, it’s all for the love of code! 😀
Weworkremotely.com is a jobs listing site which caters to only remote jobs (where you approximately always work from home). I got to know about this website after reading (highly recommended) “Rework” from Jason Fried (founder Basecamp). If I like a website, I immediately check how they have implemented the android app in the pursuit of learning new things, but to my surprise I found they didn’t have a mobile app! So I decided to make one to find a remote job and learn a few things in the process.
Hashtags have become very popular in social networking websites and apps. But these can also be used in many other ways in your own apps, for example making searchable categories in your e-commerce app or inserting tag clouds, etc.
This example will show you how to implement hashtags in your application using Linkify. We’ll add messages with hashtags to a global list and then when the user clicks on any hashtag, we’ll show all the messages which has the selected hashtag in it.
Note: – Although this tutorial shows how to implement hashtags, it is also very useful to understand how to make any text act as a hyperlink.
I am very proud of Muhuratam, my first android app to hit Google play store. I have developed a habit of asking android phone owners (who would know what choghadiya/choghariya is) to install my app and give reviews. The purpose of this blog post is to answer one of the FAQ I have been confronted with , by people who have been impressed with the app.
“How did you think of making such an app?”
The question always makes me ponder over the exact time when this idea incepted ( or the ‘muhurat’ so to speak 😛 )
In one of my applications, it was required to update a TextView every minute. The first approach that I could think of was to have an AsyncTask running a while loop till a minute (check for initial time+60,000 milliseconds in every iteration), but then I found out about ACTION_TIME_TICK broadcast action.
Broadcast Action: The current time has changed. Sent every minute. You cannot receive this through components declared in manifests, only by explicitly registering for it with Context.registerReceiver().
This is a protected intent that can only be sent by the system.
Note:It is assumed that reader has knowledge of how to create and run a simple android application.
I was trying to use the multi-threading capability of boost C++ library, but found that there is no comprehensive(and appropriately brief) guide which shows how to use this library with Eclipse on Ubuntu, so I decided to write one myself.
Boost is a set of widely used cross platform C++ libraries which provide a lot of functionalities which are required by most of medium-large sized applications like multi-threading and regular expressions, but unfortunately are not available natively in C++(although some of these will be available in C++11).
This guide believes that you already have downloaded, installed and setup Eclipse for C++ in your computer(if not, download from here).
1.) Download the latest version(1.48.0 at the time of this writing) of boost library from here. Download boost_version.tar.bz2 file.
2.)Execute the following command in the directory where you want to put boost installation:-
tar –bzip2 -xf /[path_to_tar]/boost_1_48_0.tar.bz2
For example, if you stored “boost_1_48_0.tar.bz2” in “/media/Data/downloads” and want to put the installation in “/media/Installation” then go to “/media/installation” and execute:-
tar –bzip2 -xf /media/Data/downloads/boost_1_48_0.tar.bz2
A lot of people (mostly software professionals) move to Karnataka(mainly Bangalore) everyday for job or business related purpose. Although most of the people here understand and speak English, still there are times when you are out in the market or with some Kannadiga (hailing from the state of Karnataka) friends or trying to explain your watchman/electrician/maid etc about something and you wish if you knew a bit of Kannada. I have been in Karnataka for almost 2 years now and have found that life will be much easier if one knows a few Kannada words. Below is the list of Kannada words that one must know, with their English meanings.
Hibernate is an ORM (Object-Relation Mapping) tool for Java. It is used to persist and fetch data in the database via mapping the software objects to the relational model where properties of a class are mapped to a column in a table, class or an entity is mapped to table and instance of a class is a new record in a table.
This document explains the process of creating a simple Java application which uses Hibernate version 4, to store and retrieve data from MySQL database. It also explains how to create a simple MySQL DB using XAMPP.
It is believed that the reader has a general idea of Eclipse IDE and Java.
Installing XAMPP and starting MySQL
There are various ways in which MySQL can be installed locally, namely: