Wednesday, June 30, 2010

'The law of fishes'

This is what is happening everywhere!

Impact of a tweet

I was just thinking about whether we can come up with a formula to measure the impact of a tweet just like we measure acceleration (v = u + at), force (f = ma), etc. in high-school Physics :-)

The following looks to hold:

impact ∝ ((rate of tweeting) * (quality of the tweets) * (number of followers) * (average frequency of checking tweets by followers)) / ((avg. number of people your followers follow) * (avg. rate of tweets your followers see))

It is not so simple as I initially thought; Number of retweets, the @ tags or # tags also can have a very positive effect. And, rate of tweeting could have a negatively effect as well - for example, if you are a fast tweeter people may simply ignore your tweets as junks. Quality is also a very subjective term. Also the relationships could well be nonlinear.

Another thing I was thinking about was how the rate at which information reaches us has evolved over time. 10 years ago, we used to rely mainly on the morning news paper, but now within minutes we have access to tweets and blogs to get our hands on the latest. So, how much is the acceleration of information? Roughly speaking, the acceleration ∝ (a day - a few minutes) / 10 years. The velocity at which information reaches us keeps on rising - I feel like the current velocity is already higher than our brain can 'run' - we are overloaded! We will need to add some 'friction' to slow it down :-)

Sunday, June 20, 2010

[Hiking] Muir Woods National Monument

I along with a friend drove from Palo Alto to Muir Woods which is located 11 miles from the Golden Gate bridge. The designated parking lot is quite small and we were not able to park there. (We reached there around 10 am) But there is plenty of road side parking if you drive a few minutes pass the parking lot.

Muir Woods has over 6 miles of hiking trails (pay just $1 and get the hiking map - it's very useful if you are not a frequent hiker in Muir Woods). It was one of the best hiking I have ever done - you get to walk along giant red wood trees with voices of nature, the less hiked trails give this clam and peaceful feeling to you. I would definitely go back again there when I get a chance. It is not an exaggeration to say that you sometimes get the Pandora feeling in the Avatar movie.

Muir Woods state pare

The temperature was around 60-70 F. I took my jacket with me in case it is cold inside the wood, but I did not have to use it. Make sure you take a bottle of water with you if you plan to do a longer trail - we hiked for about 3 hours - but you need a full day or more to cover all the trails.

Muir Woods state pare


Talking about the trails, there is one main trail which is flat and even wheel-chair accessible; most people walk along this - so it is somewhat crowded. Other trails are either longer or with some rough paths and slopes (medium to difficult). They are not hiked by many people and you get to experience a calm and peaceful environment. We hiked along Fern creek trail, Camp East Wood trail and Hill Side trail - all I would say are of easy to medium difficulty. Most of the time we were hiking along a path with a small water stream flowing next to the trail. There are several other longer trails which we did not have time to cover - Lost trail, Ocean view trail, Redwood trail and Coastal view trail are some of them.

Muir Woods state pare



If you are visiting the bay area and a nature lover, I would definitely recommend this place.

Saturday, June 19, 2010

[Photography] Testing the chromatic aberration in Sigma 10-20mm F4.0-5.6

In reviews, it is said that Sigma 10-20 F4.0-5.6 (UWA - Ultra Wide Angle lens) has a low chromatic aberration (CA) (which is a good thing for people like me as I mainly do landscape photography), but I noticed that the aberration varies by quite a margin with different F (DoF - Depth of Field) values.

First some background info:
Chromatic aberration is a kind of distortion where the lens fails to focus all component waves of the white light to a single focal point. The white light consists of component waves of color red, green, yellow, blue and violate (in their increasing order of frequencies). The refractive index of lens glass varies with the wavelength; shorter waves bends more than the longer ones. See the following diagram:

When this happens, the sensor averages them and the edges in the image becomes distorted. See the Wikipedia page for an example. I was told that this happens mainly from the light entering closer to the edge. So, in theory, if you have a smaller aperture (i.e. later DoF value), aberration should be small. A simple technique to correct this distortion is to have a concave lens right next to the convex lens so that the effect of irregular bending of wavelength is corrected by dispersing them. But with mm focal lengths, it seems that such a simple technique does not work - it's much more difficult to correct this effect with UWA lens as they support very small focal length.

Test setting:
I used a Canon EOS T1i body and took multiple pictures at the same focal length (10 mm) but varying the depth of field (F values at 4/4.5/5, 5.6, 8, 11, 22, 29) at the same light condition. Here are some sample photos.

Unprocessed JPEG image for focal length = 10 mm, F = 4.0:



Unprocessed JPEG image for focal length = 10 mm, F = 11.0:



Unprocessed JPEG image for focal length = 10 mm, F = 22.0:

Note that due to the crop factor (1.6 in EOS T1i), the actual focal length is close to 16 mm.

I was expecting the CA to monotonically decrease with increasing DoF value (think in the line that with larger F values, we have smaller aperture and light will pass through mostly middle of the lens). However it was not the case. Maybe the complex inter-leaved lenses have other effects. The CA visible to the naked eye decreased 4 (highest CA), 5.6 8, 11 (lowest CA) and 11 and 16 had similar quality. At 22, CA was quite high and image quality was less than that for at 4. I am not in a position to explain this bell-curve shape like behavior. Would be very much interested to know the technical details behind the scene.

I repeated the above experiment for focal lengths 12, 14 and 16 mm. I found a similar pattern. The visible CA decreased as the F value is increased closer to the current or little above the current focal length but beyond that visible CA increased with increased F values.

So, with Sigma 10-20mm F4.0-5.6 on a Canon EOS T1i camera, if you want to take landscape photos with minimal CA, set the F value closer to the current focal length.

Friday, June 18, 2010

What's your identity (and religion)? [not a security post]

Yes, what is your identity? We immediately think of the country we were born (the nationality), the religion (or a sub division of it) we follow, the ethnicity, the cast to which we belong, our parents, our siblings, the native languages we speak, our skin color, our height, etc. don't we? But wait...if you come to think about it, we pretty much don't have control over any of the above attributes; we don't have control over who our parents are, where we are born and so on; YET we not only label ourselves using those attributes, but sometimes, go so far as to start an arms struggle based on the differences in these attributes. Look at the current news -- most of the conflicts are due to these attributes -- the attributes we did not earn ourselves, but GIVEN to us (different religions interpret how this inheritance works differently -- but the underlying core is the same -- there should be some source of energy which does everything in such an orderly manner -- some of which are beyond human imagination) It is also sad to see that we discriminate people based on these labels that they don't have control over; high cast or low cast, black or white, short or tall, and so on. Your nationality is not your identity, and so are the skin color, the religion (literally), mother tongue, etc.

So, what exactly is your identity? Identity is something that you build yourself with a good intention and over which you have control. And that serves the greater good. Most religions I know of teach us to build this identity. However, looking at the current affairs, the religious identity is gravely misunderstood. This religious label is not your identity. Your religion becomes your identity only when you are truly honest to yourself (for example, treat everyone with the same spoon irrespective of the uncontrollable attributes) and truly care to make the world a better place to everyone (for example, by sharing your knowledge, wealth, etc., by raising your voice in a peaceful manner for the oppressed, the weak, etc.). In short, don't be evil. I hope this post gave you some food for thought.

Wednesday, June 16, 2010

Twitter

After a long wait, debuted in Twitter :) My twitter id is nabeel_yoosuf. Hoping to share interesting/useful links and events there.

Tuesday, June 15, 2010

Tracking patients remotely

When we talk about GPS, we immediately think about going from point A to B. Technologies similar to GPS have been used to track patient remotely. The basic idea is that these devices, which are, most of the time, attached to the patient, report the location information to a central location and if the movement patterns deviate from the normal patterns, they detect an anomaly. That anomaly could be something good (for example, a patient who is recovering making some movement could be a positive sign, no movement at all could be a negative sign).

There have been commercial as well as research projects in this regard. For example,

Remotely monitory elderly location: here here
A research project to track the recovery from a surgery: here
A device to track dangerous psychiatric patients: here
And many more

Even though these devices/techniques are designed/deployed with good intension, one concern here is people who are being monitored have no control over their own data, i.e. their movement information. And they don't have control over who can view their data. Hence, it could lead to serious privacy breaches. I'd like to see a system where it gives more control to the target (to someone on behalf of the target) over their information.

Monday, June 14, 2010

Security :-)

Hi & Lois (via Schneier on security)

Security by deterrence

When no one can watch (or trace one to what they do), the possibility of doing something bad (steal, break in, erase/modify/add data, etc.) is quite high. I was thinking about security cameras in supermarkets and shops. Is it more effective to have those cameras well visible to everyone or have them hidden? In my opinion they should be installed in visible locations; if they are not visible, there will be more bad people attempting to do bad things; it's true that you can track them down going through the surveillance videos and prosecute them - but think about the cost you have to incur; it is far more economical to indicate some sort of a warning signal. This will reduce the number such incidents and, yes, you can take necessary actions against those few bad incidents where bad guys dare to ignore the warning. Thinking in this line, you actually don't need real cameras installed all the places - you can safely have a few fake ones installed along with the real ones - they will act as a deterrence factor. (If you cannot afford to have a video surveillance system, it is at least good to have some fake cameras installed.)


What about firewalls, ID (Intrusion Detection) systems? I think we can make a similar argument about them.

Another side note, have you ever come across a situation where you cannot keep the lunch packets or any other food items from your co-workers in an office or classmates in a school? One crude way to do that is to take a bite and keep it :-) it'll surely act as a deterrence. A good way to have it packaged as if it's not a lunch packet - most hungry people won't bother to open that. This sandwich bag seems to be a good idea as well (though won't work after others figure out your trick)

Thursday, June 3, 2010

[Math] Transitivity of relationships

Most of the relationships in the real world that we know are transitive. For example, if Bob is taller than Tom and Tom is taller than Alice, it naturally implies that Bob is taller than Alice. At the same time, there are many other relationships where the transitivity is not clear. Take for example, a triangular series among Sri Lanka, India and England. Let's say that India beat England and England beat Sri Lanka. Does that mean India will beat Sri Lanka (comprehensively)? Not necessarily - in fact, it has proven numerous times in the past that the transitive relationship does not hold (a tournament would be boring if it were the case). In other words, the relationship is probabilistic in nature.

Some more not necessarily transitive examples in the technology/science field:
(Social networks) Bob is a friend of Sam. Sam is a friend of Tom. It does not necessarily imply that "Bob is a friend of Tom".
(Trust relationships in security) Alice trusts Bob to keep a secret. Bob trusts Mary to keep a secret. It does not necessarily imply that "Alice trusts Mary to keep a secret" since Alice needs to trust on something else to make the transitivity working. That something is Bob's ability to judge Mary's trustworthiness to keep a secret.

I also find that some relationships can never be transitive. For example:
(Family relationships) Mary is mother of Alice; Alice is mother of Eve. It is incorrect to say "Mary is mother of Eve".

In computer science, we mostly deal with deterministic transitivity. Take for example, Lamport's clock; if an event A occurs before an event B and an event C occurs before the event A, we safely conclude that the event C occurs before the event B. And the transitivity always holds. But, what about probabilistic transitivity?