Friday, January 11, 2013

Dev Environment On Linux

So, well after over a decade of writing programs that no one uses, I finally decided to give a Linux environment a shot. Yes, absurd as it may sound, I had never really tried my hand at the Great Open Void, errr, Source OS. And this time too, I wouldn't have bothered, but for the fact that I had access to a laptop with no OS, and the closest computing machine I could get to, to work on CityNaksha, was 1700kms away, in Calcutta! This is a noteToSelf of sorts, to act as reference in the future, when I try and replicate the same process on another computing machine.

The 'right' Distro :
It is very important to go with a flavour of Linux that you are comfortable with. Being a newbie, I didn't want to spend too much time googling various commands. Instead, something with a helpful GUI was what I was aiming for. A friend suggested Knoppix. It was good, but not really what I would want to have on a Developer machine. So, switched to Ubuntu, and it has been quite a joy, since.
What I did was this :
  • Started the computer with Knoppix from a pen drive
  • Went to Ubuntu website, downloaded and burnt an ISO image on a spare DVD
  • Installed Ubuntu from that DVD
  • Opened Update Manager and installed updates for pretty much everything.
Getting the Dev environment :
Till now, my favourite'st thing about Ubuntu is the Software Center. Makes installing new stuff, amazingly simple. For people who are more used to clicking and installing stuff, this is manna from heaven! From VLC player for the music, to MySQL server and client (MySQL Workbench), Filezilla and Dropbox, I used the Software Center to install a lot of the stuff that I needed.

However, two things that did not work this way, were Eclipse and Tomcat.

SC installed an old Pure-Java-only version of Eclipse. I couldn't find a way to change the version to be installed, nor could I find an easy way to update from within Eclipse. So, I separately downloaded the tar file and unzipped it. That pretty much worked.

Tomcat, I didn't want to install via SC, because I wanted it to be installed in a particular location. Couldn't figure out how I could change those settings in SC, so again, downloaded the tar file and unzipped it. Both seem to be working fine for now.

Remote Debugging issues :
All this while I have been using Eclipse, I was using a customized version, which had the Lomboz plugin pre installed. That was quite a help in building the WAR files, that we deploy on our servers. But this time round, I decided to get rid of it. So, I worked directly with ANT. The problem that I faced, was that debugging the webapp from inside Eclipse, couldn't be done as easily as earlier. These links here and here, were quite helpful in configuring Remote Debugging.

Lets keep connecting the city.
RD,
Facilitator, CityNaksha.

Friday, March 9, 2012

MobiApp Details

We launched our Android MobiApp on February 12th, 2012. And since then, we have made numerous releases. This post is a Change Log/Bug Fix update for the same.

Description :
CityNaksha MobiApp is a Locational App, which will help you find places around you. Be it restaurants, ATM's, localities or movies. Find out, how to get there and how.

We believe in making rapid releases, so updates will be frequent. There is still a lot to be done, but be rest assured we are working on it. CityNaksha MobiApp is Locations Made Easy, Just For You!

Do use the feedback feature, to let us know what is your experience with our app.

Cities supported :
  • Calcutta
  • Bangalore
  • Pune
  • Hyderabad
  • Mumbai
Main website :
http://citynaksha.com

Features expected in forthcoming releases :
  • Support for more cities
  • Facebook signin integration
  • Search results on map (done since 6.11.16)
Social Network presence :

Change Log :
v.6.11.22 :
  • Design changes
  • Bug fixes for adding 'My Locations'
v.6.11.20 :
  • Design Changes
  • Bug fixes
v.6.11.19 :
  • Poll booth support for Mumbai and Pune
  • Bug fixes
v.6.11.18 :
  • Improved Facebook signin
  • Bug fixes

v.6.11.17 :
  • Problem with using app in Mumbai resolved
  • Road searching made easier
  • Custom location issues resolved
v.6.11.16 :
  • Search results can be viewed on a map as well
  • Bug fixes
v.6.11.15 :
  • Assembly Constituency and Part Number filters for Polling Booths
v6.11.12 :
  • Poll Booths for Kolkata
  • Bug fixes
v6.11.9 :
  • Notification update for new happenings
  • Notification update for new movies
  • Data update processes moved to background services
  • Bug fixes

v6.11.8 :
  • Bug fixes
v6.11.7 :
  • Optimized number of server calls
  • Bug fixes
v6.11.6 :
  • Open any ctnxa link via the app
  • Check new movies of the week
  • UI change (directions button in search results)
  • Bug fixes
v6.11.5 :
  • Refresh data periodically
  • Bug fixes on changing city
v6.11.4 :
  • Home page is more responsive
  • Bugs fixed on Share
v6.11.2 :
  • Happenings can be shared from the app
  • Bugs fixed on the map display
  • Bugs fixed on custom location
  • Bugs fixed on number of happenings displayed
v6.11.1 :
  • New app version notification
  • Cleaner movie/theater halls list
  • Change your location
  • Happening Notification
  • Minor bug fixes
v6.11.0 :
  • City specific entity categories
  • Movie and theater halls can be shared
v6.10.10 :
  • Refresh Route midway
  • Sharing of locations made easier
  • Textual directions removed, show map directions directly
  • Support for plays
  • Bug on repetitions while scrolling results
  • Bug on plays
v6.10.7 :
  • See Public Happenings in your city
  • Tap on landmarks on the map tp see their names
  • Major bug fixes
v6.10.6 :
  • Sharing location of restaurants or movies over Twitter, EMail
  • Small improvements to the UI
  • Minor bug fixes
v6.10.5 :
  • Sharing location of restaurants or movies over Facebook
  • Minor bug fixes
v6.10.4 :
  • Show Map and Current Position in unsupported city
  • Request to Rate App, after every 5 successful uses
    v6.10.3 :
    • Client side logging on server
    v6.10.2 :
    • Bug fixes
    v6.10.1 :
    • App start has been made SUPER Quick!
    v6.10.0 :
    • Calcutta search was displaying results for Bangalore - FIXED
    v6.9.1 :
    • Area Names on map can be removed by tapping on them
    • Movie details show the language as well
    • 2 bug fixes
     v6.9.0 :
    • Maps show colour coded overbridge and underpass segments of route
    • Single links can be looked up from the app
    v6.8.0 :
    • Language and theater hall filters for movies
    • Bug fixes
    v6.7.0 :
    • Area names displayed on map
    • Bug fixes
    v6.6.0 :
    • Reminder to turn on  GPS
    •  Approximate Distance From Source is displayed in list
    • New look for loading image
    v6.5.0 :
    • Show current location on map
    • Exit Button added
    v6.3.0 :
    • Distance from Current Location while listing
    • Alternate Route for Calcutta is displayed based on current time
    • 'General' now works as 'All'
    v6.2.0 :
    • Map shows landmarks at each crossing/junction
    • Direct call option from restaurant details
    • Bug fixes
    v6.1.0 :
    • Support for Maps in Directions
    • Bug fixes
    v6.0 :
    • Data Compression implemented
    • Partial support for Bangalore added
    • Bug fixes
    v3.0 :
    • Conditional One ways (Park Street, Theater Road) taken care of
    • Warning for unsupported cities
    • Refinement in taxi fare
    • Minor Compression
    v2.0 :
    • Total Distance and Approx Taxi Fare feature implemented
    • Feedback now has a link to Android Market
    • Link to CityNaksha's Facebook and Twitter pages added

    Wednesday, January 4, 2012

    Hiring For A Startup - I

    Well, we are going through one of those phases now, where we are bang in the middle of the Hiring Blues! Oh yes, don't mistake it for a unique problem that we are up against. If you happen to talk to 10 different startups, and find out what problems are on the top of their minds, hiring is bound to be one of the top three!

    And honestly, I don't think most of them have managed to solve this either. If you have an idea, you can't get hold of people to execute it. If you have found the right people, you can't hold on to them. And finally, the ones that have managed to hold on to their people, have worked out the game. But there's gotta be a simpler way to get things to work. I mean, after all, there are a lot of people who are looking for work. And there are a lot of startups out there, who are looking for people who are looking for work. So, what prevents the two from coming together?

    Obviously, if I had the answer to this question, I wouldn't have been typing it out on my blog here. I would have probably written a book on it and made a coupla million dollars! :) But I do have some ideas. Will be writing about them, in subsequent posts.

    But I am thinking in terms of :
    1. A quarterly meet up arranged by a brand that is committed to startups and potential employees,
    2. Sponsored/majorly driven by startups themselves,
    3. Targeted at people who are start-curious, are willing to put in the effort to get some mileage in their resume and believe that the brand organizing this event can give them that extra to make their resume stand out
    Will elaborate on this later. But any thoughts on this will be greatly appreciated!

    Lets keep connecting the city.
    RD,
    Facilitator, CityNaksha.

    Tuesday, July 26, 2011

    Sending Email Using PostMark

    Having your webapp send out emails, is well, according to me, a tricky issue. Its definitely a convenience for your users, as long as, there is no delay in receiving the mail. But beware, that delay can make or break the functionality!

    When we first tried using the SMTP server of CityNaksha, we were happy for the functionality, but absolutely disheartened with the mail delivery! After a while, the delays were piling up to a couple of hours! It was completely unacceptable.

    A couple of days and a question on StackOverflow later, Postmark came to the rescue! And well, till now, we are happy with the result. Here's a quick primer, compiled from the notes that I was jotting down, while implementing Postmark for out webapp.

    We run on Java, with Struts.
    1. Signup on Postmark and create an account there. They have a package of 1,000 free emails to help you set things up
    2. There are a host of plugins you can choose from. For Java, we used Jared Holdcroft's library
    3. I couldn't locate a combined jar file in there, so had to put all the source files in my project, and the associated jar's in the build path of the project and the WEB-INF/lib location
    4. The code snippet from the test file, is quite helpful
    We have been using it for a few days now, and are quite happy with the performance. The integration didn't take much time either.

    Overall rating : 4/5 stars

    Lets keep connecting the city.
    RD,
    Facilitator, CityNaksha.

    Thursday, April 7, 2011

    Post On Facebook Page As Page Not As Admin User

    Sometimes, even the seemingly easy things, can actually end up being very tough. And that is what happened, when I tried to implement auto updation on my Facebook page, from my website. So, after I finally got it done, I decided to write about it here. Partly for future reference, and partly, out of an altruistic urge! :)

    Before we proceed, here's my setup :
    Webserver : Apache Tomcat
    Framework : Java Struts
    FB Utility API : restfb

    And here's my problem :
    I have a facebook page pageabc. I have a facebook user user123, who has administrative privileges for the page. I want to post an update on pageabc, as pageabc (not as user123). And I want this to happen, as a trigger from my webapp.

    If you have not used restfb before, then I highly recommend you go through my friend Saurav's blogpost on a simple application to post updates on your Facebook profile. Its well written, it will help you set yourself up for the task, and above all, I will get paid for directing traffic to his blog! ;)

    Now, if you can post a status update to your account, you are all set to move on from here. Just create a page on Facebook, set yourself up as an admin to the page and start making these changes to your code.

    First up, the permissions need to be changed. For posting to a page, as a page, you need two permissions.
    • manage_pages : This will give you permission to access the data related to a user's pages
    • publish_stream : This is a basic permission, needed to update facebook status message
    This information will go into your Authorize URL, and will look something like this : https://graph.facebook.com/oauth/authorize?client_id=**************&scope=manage_pages,publish_stream&redirect_uri=

    Next, you need to get the pages managed by the user. The access token that Facebook provides you now, will let you access a user's pages, as well as publish to the user's feed. This can be obtained from restfb in this way :

    DefaultFacebookClient fbClient;
    Connection myAccounts;
    fbClient = new DefaultFacebookClient(initialAccessToken);
    myAccounts = fbClient.fetchConnection("me/accounts", Account.class);
    You now need to parse through myAccounts, to get the names of the different pages that the user is associated with. Iterate through it, till you get the desired page. Each page will also have its own Access Token, which is associated with the permissions allowed on that page. Once you have iterated through to the page you want, get its corresponding access token (call it, pageAccessToken). This will now be used to post to the page, as the page itself.

    fbClient = new DefaultFacebookClient(pageAccessToken);
    fbClient.publish("me/feed", FacebookType.class, Parameter.with("message", "Aloha! ;)"));
    And voila! That's it. Aloha! ;) will get posted to the page, not as an update from user123, but as an update from pageabc. The message posted this way, will successfully propagate to all the fans of the page (people who have Liked the particular page)

    In conclusion :
    I spent more than a couple of evenings, figuring this whole thing out. It was quite simple, but I am not very proficient in using public API's. So, it took me a little while, to get the solution. If you really liked this, feel free to send me some money over! ;) And if you really, REALLY like it, just drop in a line in the comments section!

    Lets keep connecting the city.
    RD,
    Facilitator, CityNaksha.

    Some helpful links :
    http://developers.facebook.com/docs/reference/api/
    http://restfb.com/
    http://www.masteringapi.com/tutorials/how-to-post-on-facebook-page-as-page-not-as-admin-user-using-php-sdk/31/
    http://codifyit.blogspot.com/2010/12/integrate-your-web-site-with-facebook.html

    Monday, December 14, 2009

    Chocolate Relationships

    I have never been particularly good at "Networking". Don't really believe that startups should be vociferously loud in order to be heard. You could easily relegate me to the old school chain of thought, of people who believe in letting their actions speak for them. Which, to quote Rommel, means that I am more of an Artist, than a Businessman (I hope Madhudi, Pintuda and scores of art teachers who gave up on me with exasperation, are listening)! Not a People's Person! And so, it was with a fair amount of surprise that I went to the kirana store, to buy 10 bars of chocolate for the guys at Alpine Computer Systems!

    My computer at home (the ONLY developement machine at CN's disposal, as of now) has been acting up with alarming regularity, lately. The beast wouldn't turn on at home, inspite of all the cajoling and coaxing from my end. However, the moment we plug it in at Alpine, it purrs like a Siamese Cat. Yesterday when I took it to the guys at A, it was the third time. But the result was the same. The owner gave me a smile, and suggested I work on the wiring of my house. And as there was nothing wrong with the computer as such, he didn't charge me anything, for the third consecutive time!

    Whether it was a sense of guilt, or prospects of starting a professional relationship, I'll never know. But instead of leaving with a smile of gratitude and profuse apologies, as I had done the previous couple of times, I ran down to the kirana store nearby, and bought 10 DairyMilk bars. Passed them on to the owner of Alpine, with an apologetic smile, telling him how bad I felt about bothering the busy people there, with something so silly and trivial, and came back home.

    I don't know how effective this would be. After all, you can't really replace money with chocolates, in exchange of services rendered. But you can always make subsequent transactions comfortable and trustful, by small gestures of warmth and care, even for professional relationships. And according to me, THAT can never be bad. After all, people always respond positively to well intentioned gestures. And that is bound to reflect in their interactions with you, even on a professional level.

    However, for all I know, we could be horribly wrong in this. After all, conventional wisdom is conventional, because it has worked a lot of times. And destructive innovation, aimed against conventional wisdom, doesn't always guarantee success. But at CN, we believe in trying new things out. Even if success is not guaranteed. We are determined to try this way of dealing with our partners out, before we pass judgment on its effectiveness. The worst case scenario, as far as I can see, could be us coming out of this experience, slightly better human beings than we previously were. And that aint such a bad idea! :)

    Lets keep connecting the city.
    RD,
    Facilitator, CityNaksha.

    Tuesday, June 23, 2009

    How To Prevent A Bozo Explosion

    To keep the minimum work at CN happening, the core CN team needs to have day jobs. People have told us that this shows a real lack of commitment and purpose, and that if we really believe in what we are doing, we should chuck our day jobs, and get into CN 100%. Sometimes I agree with them, sometimes I give them a sympathetic, helpless nod. Sometimes, I even ask them for suggestions. It all depends on my mood. But one thing that remains constant, is my belief that the way things are now, I can't think of doing them any other way. I probably wouldn't do it any other way.

    And well, looking at the brighter side of things, there are always things to learn from my day job. Lots of things. Those who know me, won't be very surprised to hear, that most of these learnings, are negative influencers. More often than not, I learn how NOT TO DO things. (yes, yes, I can almost see you grin and nod) Maybe someday I will wake up and realize that it is my naivete to believe that most things I see happen around me are to be avoided at CN. But till that day comes, I am gonna stick to my guns.

    The most visible Bozo in an organization, is the guy who is sticking around, merely because he thinks that he has to be Somewhere, and well, why not here! He pretty much does just about what is expected of him, sucks up to the guy he has to report to, bosses around a little to people who report to him, cribs about his work place, cribs about the people around him at the loo, and basically doesn't give much, this way or that.

    But these are not the most dangerous qualities of a Bozo. These, you can handle. What you can't really contain that easily, is the negative energy that such people spread around them, thereby contaminating the whole environment. They set a very undesirable tone to the culture that you might have been trying to promote. A nascent culture, that needs a lot of nurturing and protection from negative influences. And this in turn influences the people around, and before you know it, you have a whole population of Bozo's around you, and the wise men called this very phenomenon, The Bozo Explosion!

    Small orgs with an aim of remaining effective, cannot afford a Bozo Explosion. And if you are a small org aiming to be effective AND have a resource crunch, you probably cannot even afford a single Bozo! So, it becomes imperative to be able to screen them out at the very beginning, before they can cause harm to your baby. If not, atleast find them out quickly, and hunt them down mercilessly, before they can do much.

    Some thoughts that I have on preventing such an explosion from happening are,

    • TALK to people before you accept them to come work for you. And don't just talk to them about the roles they are expected to play and the kinda work they are supposed to be doing. Talk about general things. At a small place, a closely knit group is always a preferable idea. And what you can find out about someone by just spending a coupla minutes talking to them, is often underrated. If you are not comfortable with them around over a cup of coffee, are you sure you would like to have them during the most productive hours of your work day?
    • Its better to have one employee less, than have one misfit employee more. Don't be in a hurry to get people on board. If their expectations and yours are not in sync, and an implicit compromise is being made to make this work, then it probably won't last long enough. It might work at larger orgs, but at startups, the secondary incentives are just not enticing enough for this kind of arrangement to work.
    • MBWA is a great way of having your finger on the pulse of the org. Try it out. It really works. At the first signs of Bozocity, beware. The sooner you douse these flames, the better. And if that aint reason enough, think about all the drasted kilo's you'll be losing, walking around, listening to people, chatting them up.
    • Don't be afraid to prune. Often, we have a reluctance to ask people who don't fit in, to leave. I think what deters this, is the hardship that a lot of us have to face initially, to get someone to come work with us in the first place. Not really wanting to go through all that trouble again, we often choose to maintain a status quo. This can prove to be very detrimental in the long run, because not only does this mean an extra bozo is encouraged, it also sends out wrong signals to the others. Bozocity needs to be discouraged sternly and quickly, before it becomes a threat.

    Ofcourse, this is by no means an exhaustive list. And probably some of the more pertinent questions are still left unanswered. And the ones that are answered, probably don't take a very pragmatic approach. My apologies to you. As this post was a result of my rants against the predicament I currently find myself in, I used this as more of a vent than anything truly constructive. Hopefully, in the future, saner wisdom will prevail, and a more level headed and sensible post will follow.

    Lets keep connecting the city.
    RD,
    Facilitator, CityNaksha.