Droid/Tux/Web

A close friend of mine bought an android phone.However much of her excitement went down the drain when she was unable to connect to the internet using her ad hoc sharing of Ethernet.

if you are in a similar situation and use linux/fedora and wanted to connect to the internet, here is a small way of doing so. If you use windows 7+ however, you can use an application called connectify. :

Step 1.

$sudo yum install hostapd

Step 2.
Configure hostapd with few lines, there are many options feel free to explore

interface=wlan0
hw_mode=g
channel=6
ssid=Yourssidhere

macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=yourssidpasshere
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

Step 3.
Stop the hostapd service if it is running:

$sudo service hostapd stop

or

$sudo systemctl stop hostapd.service

Step 4.
Go to your network manager, wireless and turn on the hotspot.
Step 5.
Restart the hosapd service

$sudo service hostapd start

or

$sudo systemctl start hostapd.service

Done

There is a better way of doing this with bridge-utils, dnsmasq, and hostapd, I will blog about that later.

Wildlife and Us

It has been little over a year since I am associated with wildlife photography closely. However over the year I have learned about various species, their behaviors, habitats and how to photograph them. Even though I am still in learning phase of being a photographer, one thing I learned pretty closely is the risk we, humans pose to the wild.

Here are few stereotypes I have found during this course.

Wildlife Photographers:

First set of people are amazing photographers and they have these B-I-G big lenses, so that means they are able to shoot best of the photographs from quite a distance. However not always, in some cases photographers for the sake for getting the most exclusive photographs takes their gypsies or go very near to the animal or bird they are photographing . So close that even the tiger you are photographing gives an exclamation like “Dude!!!”

Loved the road runner and coyote show..eh! well there has been cases when a bird had to run like road runner while coyote with better acme products is chasing it. Even a sloth bear was that unfortunate.

Again for some other weird reason in order to take breathtaking photograph, photographers become infiltrators, I am sure if birds were to have a political party it would have called for some strikes and hunger strikes by now. Few examples includes, cutting a bird nest to half so as to have a better view inside the nest. I wonder how you will feel if some photographer cuts down your house to take better picture of your morning life cycle. Another one is to clear off the area around the nest for better photographs thereafter leaving it exposed to predators and other harms. Some even go to the extend of destroying the nest so that no other photographer can take the similar picture, hmm! now that sounds familiar..right!.

Here is one guy who went to the extend of writing a book with this tactics:
Life Cycle of birds( A pictorial representation) By Bhagat Singh.
These has been a huge uproar in popular social networking site regarding this.

Wannabe Steve Irwins(not to insult the great personality in any way, he is a legend):

Few months back a guy who can’t help comparing himself to some legendary conservationist. He went to the extend of catching a very rare and endangered mammal(a Namdapha Flying Squirrel) inside a national Park and then pose photograph with it, injuring it in the process, taking it out of the wild and leaving it in ‘Care’ of Humans. However when confronted by members of INW(India Nature Watch, If you are a member of INW you know what I am talking about), the reply he gave was more shocking and can be considered to be a serious threat, not to mention he violated several protocols of Wildlife Protection Act(1972).

This is not singular case, there has been different instances where people who are attached with wildlife groups and agencies cannot keep their excitement level to low.

The Weekender :

After a hectic week in closed glass box called offices, many will opt for some refreshment over the weekend. What can be more relaxing than a fantastic resort down the bed of river with Himalayas all around you. Weather is cool and soothing, this is a perfect recipe of a weekend getaway.
But here comes the problem. You decide to play music from your car stereo with 11 inch sub in the middle of the jungle. The resort manager tries to convince you the sound will attract elephants which will pose the threat to both the resort and you. But you will be like “Dude, I have paid for this, so this is my right”.
Please pray to your god that you came out alive that night.

The Gypsy Tourists:

You took your friends and family to a jungle and you wants to see tigers. Since you cannot see a tiger in first two safari’s, you are pissed off and you curse your gypsy driver and guide for the same. your money is getting wasted. you curse for their incompetence and then it happens.

A tiger comes out and all you can see is the tip of the tail. you want to see more. You started behaving like you own it. Shouts at your gypsy driver and eventually when the tiger is about to go away, your gypsy driver chases it so that you get a better glimpse of the majestic animal. If you are lucky enough you will get close enough to the tiger to pee in your pants. Ignorant of the fact that, this irresponsible behavior poses a threat to both you and the tiger.
Thankfully, the supreme court has banned all tourists from entering the core zone of the tiger reserves across the country. So “no tip of the tail” anymore.

The other set of gypsy tourists talks. How does this pose a threat!
You talk, then you get excited,and you talk so loudly that there comes a huge ‘sssshhhhhh’ from all other fellow tourists around you. Any tiger reserve and you will be welcomed with this situation. I have seen tourist talking loudly and sleeping tiger walking up with face “Go away, you morons!!”. Even though that looked cute then, I am sure situation would be different if tiger decides to take things in its own hand…err…paws.

The awww so cute ones:

How many times have you seen a cute little baby of a monkey and made the expression like awww! so cute. Well, apparently not all can stop just with that expression. They cannot control their emotions and put out a pack of biscuits and chips out from the window to feed these animals. The point you forgot is, those are for you and not for the bird or animals whom you feel is starving and hungry.
Birds and animals adapted themselves to those situation and now knows that you will come to feed them and there have been instances when they attacked because they didn’t get food from you. Familiar with the situation??

So does this means, you should not visit forests. answer is yes and no at the same time.

If you respects wildlife and the jungle mesmerize you every time you visit. You do good study on animals and their behavior. The color of the bird amazes you and you more than happy to spot a very rare bird even if you were not able to photograph it. You maintain all rules and regulation inside the forest and help keep it clean and is genuinely concerned about it. Please visit, the forests need people like you.

If you are “oh! I don’t care”, “It my money”,”Do you know who I am?” in other word a self obsessed person who just wants a weekend visit/Holidaying/relaxing and not willing to abide by the rules and regulations, please do not visit the forest and spoil it. Take your car and 11 inch sub and go for a long drive maybe.

While I agree that government should take more measures and forest department should do their work, but it always like we should be more responsible towards others.This way both you and nature live in harmony(A word long forgotten since childhood). The supreme court does not get a chance to put ban on visit to core areas of the tiger reserve. Is this too much to ask???

P.S : This topic might feel controversial. Feel free to ignore in case you don’t like it.
P.P.S: The post is just my expression as you may take it, so I have refrained from posting links to actual incidents. If you are a wildlife enthusiast based in India, you should have probable already faced the situation or read about it.

Ouch! My Bad

JavaScript is powerful and Backbone.js is a nice small utility that makes it even more powerful. I was playing with Backbone and Open layers thrown over a Django system.
However there is something weird that I faced and took a good amount of my time to figure out the problem.
This blog post is kind of self note so that I notice this the first place when I face such problem again.

What was I trying to do : Write a small backbone code to display Open layers(OSM) Map.
How was I trying to do :

(function($) {
var Map = Backbone.Model.extend({});

var MapView = Backbone.View.extend({

initialize: function() {
_.bindAll(this, 'initMap');
this.initMap();
},

initMap: function() {
// Initialize Basic Openlayers;
var center = new OpenLayers.LonLat(8110203.9998955, 2170000.4068373);
map = new OpenLayers.Map(this.el, {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
var layers = [];
layers[0] = new OpenLayers.Layer.OSM(); //some more layer will go here
map.addLayers(layers);
map.setCenter(center, 12);

}
});
var map_view = new MapView({ el: $("#mapCol") });
})(jQuery);

The problem faced here was I am trying to access the DOM element even before it is ready.
Result : A webpage which shows the HTML elements, shows some access to Openlayers but no map.

Solution : I modified my code to this

(function($) {
var Map = Backbone.Model.extend({});

var MapView = Backbone.View.extend({
el: '#mapCol',

initialize: function() {
_.bindAll(this, 'initMap');
this.initMap();

},

initMap: function() {
// Initialize Basic Openlayers;
var center = new OpenLayers.LonLat(8110203.9998955, 2170000.4068373);
//alert("you are here");
map = new OpenLayers.Map(this.el, {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});

var layers = [];
layers[0] = new OpenLayers.Layer.OSM(); //some more layer will go here
//$(this.el).html(map);
map.addLayers(layers);
map.setCenter(center, 12);

}
});
$(function() {
var map_view = new MapView();

});
})(jQuery);

Here mapCol is the div element where I want my Openlayers map to be displayed. For more details on Backbone and el, there is a beautiful blog post here.

P.S : There may be certain errors in the codes above. please feel free to correct me anytime.

Dilemma

After over 3 years of using a Powershot, I thought of graduating to a SLR. I planned for a decent SLR but had no plan on lenses.. well I never had taken that into consideration.

Then Ranthambore trip happened. I went crazy over what to buy..from a TC for my Powershot to all possible cameras that I can buy at that point of time, finally ended up buying a Canon EOS 1000D and with some good advice, a Sigma 70 300 APO DG MACRO F4 – 5.6.

Ranthambore trip was a great learning experience, my first wildlife shot was of T39 tigress. I got so confused on either to take pic or watch the tiger go just feets away from me. So did not pay attention to details. Rest of the days in Ranthambore were good, learned a lot from wildlife photographers(Sagar Gosavi and Yogesh Rane).

Next trip was after a week from Ranthambore was Jim Corbett National Park and this time I tested my setup as a camera person . Well I found myself starting from scratch here in Corbett.

My few observation in regards the last two trips were :
1) Canon EOS 1000D is an awesome camera but not at all suitable for Wildlife photography.(1.5 fps in RAW is way too slow).
2) OS/IS/VR is somehow a requirement for early morning and late evening shots(Most movements happens in this time though).
3) ISO the more the better. Noise the less the better ( 1000D scores a good point her though).

In the last two trips I narrowed down on my short comings trying to fix them but still I need a basic setup to do wildlife photography(I might be carried away with the crowd though). Here is what I shortlisted and currently in a dilemma.

1. Canon vs Nikon : Being a faithful canon user for last three years I wanted to stick to canon but found in some cases Nikon provides exactly what i want.
2. Lenses (Sigma,Canon,Nikon ) : Sigma cheap and does great job, while Canon/Nikon are better and costs a lot

Finally these are my shortlisted cameras and lens :

Canon EOS 550D : Great camera with great feature but misses on fps.
Used Canon EOS 40D : Again Great Cam but 10MP(low resolution on high crops, ISO to 1600 only).
Nikon D5100 : Pretty much does everything but I have one or two inexpensive canon mount lenses which goes wasted if I chooses this.

I pretty much narrowed down on Sigma 150 500 F5 – 6.3 APO lens which means I need high ISO a lot of times.

Taking all into consideration I am confused like never before :-(

So please help!!!!

[GSoC] GPSBabel Plugin for JOSM post 1u1

I mainly maintain my contact with my mentor Raphael Mack via email . so after some discussions and some ideas from my mentor . I finally managed to make a GUI on which I will be continuing my work .

My plugin is divided in three part .

1.  GUI itself(design with Netbeans used Metal theme as JOSM uses simmilar one

2 . Bridging with GPSBabel

3.  Integrating with JOSM (Java Open Street Map Editor )

the screenshot of GUI is here  :-

My current work is to interlink the gui parts . In the mean time as per my mentors suggestion I am working on a java class that is actually goint to call gpsbabel .

so I have

GUI —> bridge java class — > gpsbabel  call .

I will be posting codes regarding this soon coz ” no commitment no work ” is the final motto .. bleh

P.S : I am also looking for a GPS device and shortlisted Garmin Ventura HCx and Vista HCx from the same (Pradeepto has got one ) . Need Sugesstions here if anybody as any experieences with these devices .

P.P.S : exams extended due to CPI(m) and trinamul congress bandh regarding fuel price hike . ( I feel like  demolishing  these two parties ) .[:(]

Defacto reality

Here’s a small demonstration of what actually goes on :-

This is the from the ESP of DPL (Durgapur Projects Limited) , an electricity provider of state government.

As obvious the ESP is switched off leading to this nice little polution that effects living .

West Bengal Pollution Control Board has in fact organizing seminars and workshops in 5 star hotels .

WEST BENGAL POLLUTION CONTROL BOARD are you watching or dumb as usual .

and we are talking about curbing pollution ,making life better , blah blah blah ………

At last

At last after discussion with straw developers in #straw at irc.freenode.net , i am able to fix the problem .

I added a line so that constants.py which take care of installation dir. does not points to buildroot as it was doing before.

Found ‘/ c27950′ in installed files; aborting
error: Bad exit status from /var/tmp/rpm-tmp.19618 (%install)

This is because constants.py was pointing to
libdir = os.path.normpath('/var/tmp/straw-0.27-4-c27950/usr/lib/python2.5/site-packages/straw')
The line i added is

sed -i -e s@${RPM_BUILD_ROOT}@@ ${RPM_BUILD_ROOT}%{python_sitelib}/%{name}/constants.py

Now the constants.py points to
libdir = os.path.normpath('/usr/lib/python2.5/site-packages/straw')

Instead of previous var/tmp/straw-0.27-4-........................... as mentioned above.

Spec file along with SRPM and RPM are available here