Software and Code 18 Oct 2005 07:22 pm

Consider this situation: You are living in an apartment with two/three other people and you share the expenses (grocery, electric bill, rent etc) with them. Sometimes you do the grocery, and X pays the rent, and Y pays the cable bill etc etc. Sometimes it becomes a little tedious at the end of the month to calculate who owes whom money and how much.
Sometime in the July of 2004, the three of us, me, Sagnik and Subhradyuti, all being geeky computer science students, decided to do something which is more easy to maintain than 3 separate excel spreadsheets and then manually sitting together at the end of the month to calculate all the dues. I used to run a http server in my lab computer back then - and I used to host my homepage on that. So, on one fine day we decided to hack up some php and sql code to set up an webpage which would enable us to record all the apartment related expenses and then at the end of the month it would show us who owes whom money and how much. And it would also make sure that everybody has to write at most one check (as Sagnik was running short on checks at that time). All of us out together some effort - the initial page to submit an expense record was written in javascript+php by Sagnik, the C++ program that did all the calculations were written by Subhradyuti, and the database set up and storing / retrieving /viewing the data was done by me. Surprisingly, the few hours each of us spent on this seemingly simple thing worked wonderfully, and we used it without any problem for a more than one year.

Here is a picture showing the result of a month (this was the month with the least numbers of entries … I chose this because this is the only one which would fit in one page).

Expense Report Screenshot

Last month, I moved my homepage, including the photo album from my lab server to this registered host. In the process I moved the whole apartment expense thing to the new website (essentially a complete rewrite). The earlier version was hard-coded to work only with out apartment with exactly 5 people, where even the usernames were hard-coded in the php files. This time I made it a more general where everybody can use it for their apartments as well.

Below is a small step by step instruction for that. If you need any more help, please feel free to contact me.

  1. The first thing that you need to do is to register yourself as a user. For this, go here and complete the one step registration process. Each member of the apartment needs to register this way.
  2. After the registration, you will be send the password via e-mail, and then you can log in. You should have cookies enabled, and that way you don’t have to login each time.
  3. The first page that you visit after logging in is the admin panel. Go to the Apartment Expense link at that page.
  4. Now, if one of your apartment mates has already created an apartment group for you people, then all you need to do is to select that apartment from the drop down box, and click the ”Request to Register” button. The person who has created the apartment will be able to authorize your join request, and then you will be able to use it.
  5. If nobody has created any apartment group for you, then you should create one. Make sure you put the address properly as it will help your apartment mates to select your apartment easily when they want to join in. Once you create the apartment group, you will automatically become a member of that and you will also be the designated owner of that apartment. You will be required to authorize any join request from your apartment mates to include them in your apartment group.
  6. Once everybody has joined in, you can start using the apartment page to track all apartment expenses and relieve yourselves of the pain of maintaining accounts manually. That page should be self explanatory – but in confusion, don’t hesitate to contact me.
  7. Note: Privacy: Your apartments expense report should only be seen by your apartment mates. Usually, (hoping there is not any bugs in the program) your data will not be visible to anybody who is not a member of your apartment group. But do not put any confidential data there. Also, your email address will be kept private.
  8. Note: Reliability: Don’t expect mission critical reliability. I do take daily backup of the databse, but things can go wrong – and don’t blame me later. This service is provided as is and without any guarantee.
  9. Enjoy
» »
Software and Code 06 Oct 2005 03:47 pm

I use firefox - so this problem was not apparent to me. But someone told me that she had some problems seeing the map integration. I checked, and indeed! The page did not work in IE. (Why do people use IE anyway?).

Fiddled a littl bit - and finally got it working with IE. But the appearance of the markers are rather slow in IE - I don’t know why. Anyway, now it does not throw an error and actually lets you see the map.

» »
Software and Code and Computers and Technology 06 Oct 2005 03:02 am

I had this thought for a long time now - since the time I had seen the google map api. Today I had some free time during the day, and I decided to give it a go. I was fumbling around the gallery code - trying to find out how to extract the list of albums. I did a few search in google, and I was surprised to see that the idea has already been implemeneted. Not exactly the way I wanted it to be, but quite close. The howto and the relevant things I got from this forum post. As of today, I ended up using the module found in that forum.

One useful link to find the latitude and longitude of different places: (I didn’t use it though, I came to know of it much later, after I recorded all the Latitude/Longitude from google maps using a script that I wrote using google map api ): http://www.robogeo.com/latlonfinder/map.asp

This is a nifty little fun thing. I spend almost 3 hours today to find out the Latitude/Longitude of all of my photo albums. But this is a work well done and time well spent.

Feel free to have a look at it: click here or at the travel link at the top of this page.

» » » »
Code and Computers 12 Sep 2004 01:02 am

Hmm.. I think I sohuld mention this. I have this really big collection of old hindi MP3s, mostly from IITK. And they are completely unsorted, without any tag of any kind. For the last one year I had been planning to sort and tag them properly, but never had the enthu/time. There were just too many MP3s. Few days back, I came across this site EarthMusic, and an idea-bulb lit inside my head.

And the result:

#include “disclaimer.h”

1. mp3update.pl

2. (and as a helper, I took this file TableThing off the net).

Works beautifully (At least for me). To use

1. Have perl and wget installed.

2. For perl, we need MP3::Tag module also.

3. Put the TableThing.pm file in the same dir with mp3update.pl (or in the perl modules dir)

Then Run:

./mp3update.pl filename



Note:
It searches for the song info using the words from the filename. So, the filename should be close to the song title.

» »