Month: January 2014

Project bus-routes -2

Posted on

After my first post on the same I worked on the adding the database and the api. So, for the now there are some entries in the database(156) and an api can interact this. I now need to work on the web interface to interact with the api. I will also have to add a form that will store the edit options.

 

The source code for the api is available on Github

Advertisements

I aint got a taste

Posted on Updated on

food
food

As the title suggests its sometimes related to me and taste buds. From the age of 16 I have been living away from from family and over the years I have realized that I hardly get any taste of foods that I eat.

What does that mean?

Oh, well it means that I invariably get the taste of foods I consume. I eat to satisfy my hunger and pay least attention to the quality. But that doesn’t mean I would consume shitest of food. ๐Ÿ˜‰

It has its own advantages and minimum disadvantages.

Advantages โ€“ I have survivied and thrivied at different places and have never cribbed about ‘how disgraceful the foods tastes’. I sometimes cherishes the food that others dislike.

Disadvantages โ€“ I would say lot of friends tease me for I don’t get the taste of tasty dishes and often complain I don’t cherish the latter either. Another one- I can’t give you a opinion on how the food taste, like when my mom asks me to judge โ€œsee, how it has been cooked?โ€. My answer to this question is โ€œYeah, its fineโ€ always.

P.S: No, I have never tasted the food in the picture. ๐Ÿ˜›

Project bus-routes -1

Posted on Updated on

For the last 4 days I have been writing codes for this project. Let me first explain whats it about. Basically it will be a mobile app which will show the bus number of different routes of kolkata. There are many websites and mobile apps which give this service but the real problem is that these sites are not totally correct and information is sometimes incomplete. For this I have decided to add an edit feature to the app.

So, if the user feels that the information needs some correction or is totally wrongย  he/she can edit the record, this will help in creating a better database. At the start I got this idea that I simply cannot get information that is 100% correct, so this edit feature. Just like wikipedia does. ๐Ÿ˜‰

I wrote some code (basically extracted information into my local database). The site I am using to get all the information is here.

there were few other sites as well but the html so badly written that I couldn’t parse the desired data. In this case a single line python regrex expression did the job for me. Another python code got me all data present across 9 pages on the site.

Once I had all the desired data I stored them into my mongodb database and then some sorting. Adding few fields such as from, to, via, bus number. This was piece of cake, the real work was presenting this data when a query was made on the site. I started with the web app and would hence copy the same logic across mobile app.

Wrote a simple web app in Flask the site was up in few minutes. I used my API code (written in Bangalore) to search for the required data from the database. And boom, I realized my first problem, the site I chose to extract the information had multiple instances of same name. For ex: there was Howrah. and Howrah so if the former is to be matched against the latter in the database no result will be given. There are 405 records which had approx 10 names in it. So, the total number of names becomes approx 4k, wow!!!.

Now how to remove this shortcoming? (which I would not have got, if the admin of the site choose to be little bit sensible while writing the code.) i am thinking of adding models (just like in Django ) in the code and store all the record in a separate model. This would give me a standard entry to search for. But this would also mean I would have to feed all the data across every field. (there are many records) I can write a script that would populate all the models for me, hmm I will have to think about it.

The models will also help me in adding the edit feature that I was talking about. Something I had done in my previous internship. I will keep posting with all the progress. Meanwhile the present codes reside at Github, lot of changes need to be done in the coming days.

Until next

18th jan, IIT kharagpur

Image Posted on

Living here for the last couple of days now, had to shift immediately after coming from Bangalore. Although this is not permanent and I will be moving back to Kolkata on 21st.

This is the 2nd time I have come to IIT Kgp but for the first time I got the chance to witness the student life closely. Rakesh one of my friend (who also interned with me at Bangalore) allowed me a tiny space in his room to stay.

Time and again I get this feeling I let go the chances to make it to this place. I know i could have made here but just didnt gave it enough importance. I was far too engrossed with S, gave my everything and at the end of the day both of them slipped out of my reach.

Still today I can easily trade S with any other possessions of mine. Unfortunately I can’t, helpless.

Sometimes I wonder how the situations had turned hostile for me. I can’t understand one thing how to let this go when deep inside a part of mine wants to hang on it firmly. Disheartening part is that no one cares.

Ok, enough talk of the past no use of that.

 

Addiction? Anyone?

Image Posted on

At one point or another we all must have been addicted to something. It’s true and not bad. Unless that addiction is proving risky to your health or your career for that matter.

I was addicted to many such things or persons. Some were bad and some were good. But the point is sometimes you will never be able to categorize which addiction is proving bad for you or good. In some cases you might be able to figure out. The latter will be a plus point for you.

If you didn’t, don’t mind just go with the flow. Sooner or latter you will develop a taste of what is good for you and what is bad. And that’s life for you.

From blogging to coding โ€“ 1

Image Posted on Updated on

This will be a series of post where I will look back into my life after my 12th grade and how I have fared in this period. This series will give me something to ratter about (since its hard to find decent topics for writing ). Also I tend to become very lazy in terms of writing. The reason for the laziness can be because I have written so much in the last 4 years or so, I sometimes fall short of words. Anyway I feel I am beginning to get over that feeling.

I will start with the year 2010, the year my 12th exams got over. I started reading blogs after my first breakup (after 12th grade). It was horrible and I was in measurable state for months. It was in between those events that I thought of diverting my mind to something else (other than Facebook) I would definitely turn mad. I bought few novels but as it turned out I didn’t had enough money to continue buying more. There I thought of reading blogs (which to my thoughts were also kind of novels.) Initially I used to just read works by others but in between all these reading I got an urge to write as well. I started a blog on blogspot and with fears wrote a small piece. My English was terrible (it still is but I have improved a lot) and I thought I would not get any reader.

Into my 5-6th post I realized I didn’t had any reader, from that very day I stopped writing for others and more for myself.(think less and write more) By this time I was into my college which was horrible. (I realized this on the very first day ๐Ÿ˜‰ ) I was planning to change my college to some better place where I could get a decent exposure. I wanted to explore and find options for myself. Kolkata was a natural choice.

In between all these I used to blog from Suri (the place where my college was located) . The town had limited internet connectivity so, I used to blog from cyber cafe. I used to read blogs from my mobile, write posts in paper and then copy the same on the computer. By this i got the time to correct my spellings and grammar. Oh, did I mention I was also getting decent reaction from my readers (yeah, I got some readers. My poems and writings were being appreciated world wide ). The year was 2010 and i wrote a total of 61 post in that year.

I was even thinking of a career in journalism and how I will write my debut novel.

In middle of all these one particular friend used to help me a lot. She used to encourage and cheer up. She was the primarily reason I got out from the depression mode (after the breakup).

This was also the phase when I started drinking and smoking, all the things that grown ups do. Heck I even taught some of my friends to smoke (for which they curse me till date ๐Ÿ˜€ )

More in the next post.

Untill next.

Looking back and forth

Posted on

Bangalore, 25th Dec.

Merry Christmas. I am almost at the end of the year 2013, by no doubt this year has been the most memorable and productive year. But the word โ€œmemorableโ€ might be considered relative. I will come back to this.

So in the earlier post, I had mentioned about my dropping out, I would not stress much on that point but things post that decision has been challenging and interesting.

I am in Bangalore now for a internship and if things work out fine I might join them full time after this. I am little stressed and I am gonna lie (social network dialog ๐Ÿ˜€ ) also a little scared also. But the fact that I am listening to my heart gives me immense satisfaction.

Today is a holiday, although I would have wished to work at the office. Anyway I will be writing some codes in the afternoon.

 

Bangalore, 1st Jan 2014.

Yay, its 2014. Happy new Year.

I just came from a over night Hackathon (Hacknight). Although I was not able to hack anything, had plans to bult a web app which shows you people whom you can follow on Github (based according to your coding languages mentioned) And the only problem was that Github API will not let me view the repos of each followers.

But still start of the year was something memorable. Cheers to that. ๐Ÿ™‚

 

Bangalore 10th Jan

So, I will be leaving Bangalore in few days, 13th to be exact. I was working with two startups, on backend and frontend. I will continue my work with them in future also and hope I will be paid for the same. ๐Ÿ™‚

I will be meeting a friend today in the evening.

I have also started working on a project, I have named it โ€œcode name โ€“ bus routes โ€œ I will be using this in future reference of this project.

It is basically a mobile app which will show you bus numbers for the routes fed in it. I have created a basic API for it, will need to start work on the frontend part. I will be posting as and when things move forward.

For the last one month that I have spent in Bnagalore I have primarily been coding and nothing else. Even on 25th dec and 1st jan.Why ?? because I have no life and I enjoy this.