Saturday, April 08, 2017

Royal Enfield and the fart of motorcycle maintenance

Royal Enfield bikes are a craze among us Indians. It is a dream for many and there is a cult following for Royal Enfield (RE) bikes. And a true biker is never done until he has taken an Old Royal Enfield bike on a Leh-Ladakh road trip. People take notice of you when you are on the road on a RE bike. The RE classic is such a legend, that Royal Enfield / Eicher motors is now selling more of the classic than ever. RE replaced TVS as the fourth largest bike seller in India in the last month.

But none of this makes sense. Within the last week, 3 friends asserted to me about the shitty low quality bikes RE makes. 2 of those were Thunderbirds and a classic. This is excluding my Himalayan, whose battery has now failed for the third time in seven months.

I had always fantasized about owning a RE during my college days, but I could never get to that as I didn’t have the money and didn’t find it practical then. Back then, A Royal enfield bike was not easy to come by, since you had to wait for months to get a bike delivered. People usually bought used bikes and modified or maintained it. Maintaining an used RE was an art in itself taking effort , patience and finding the right mechanic to keep it running fine. So when people owned a RE we knew they would have put in a lot of effort and time on that bike. But a new RE bike will also require the same maintenance as an old one. It breaks down often or has recurring minor issues. If you knew how to maintain a bike by yourself, this happens to be an interesting hobby. It is an antique right out of the gate.
When you buy an RE, riding bikes ceases to be your hobby and maintaining bikes becomes your hobby.
It makes no sense. If you buy a new RE bike, you have to invest the same amount of money and time as you would on an used bike. Let me explain. First of all, your RE bike is supposed to have problems before the first service. The first service is like an initiation ceremony for your bike. If you run into any problems, you will get prompt advise from many RE fans and owners about how your new bike’s misbehaviour is normal and how it takes at least a couple of services before all the kinks are ironed out. This is somehow acceptable and is normal. How is this acceptable ? How does this get past QC on an assembly line? Mine wouldn’t even idle until 3 services( in a month ) and wouldn’t run after that.
Wait for a couple of services, then you will start loving the bike. Why can’t I love my bike from the get go ?
The bike looks really cool though. Everyone turns around to take a second look at the bike. Whenever I stop at a signal I do get a lot of looks and questions about my RE Himalayan. It is a new and bold design. Understandable. Classics and Thunderbirds from RE also get the same attention even though nothing has changed in their design or performance. Mostly this is because of the sounds their exhausts make. It is loud , it is bad and some riders intentionally get louder exhausts. It is bad because the engines are loud by being raw and not tuned. This is where an RE fanboy would jump in and say “That sound is how you know you are alive. The RE thump is your heart beat”. Bullshit!! The looks you get on a Classic RE / Bullet are just looks of disgust for all the noise produced for low speeds.
yaanai varum pinne mani osai varum munne ( You hear the bells first and then you get to see the slow elephant )
Trips on an RE is what life for a rider is all about. Cruising on the highway at a slow steady pace, covering miles and miles to the thump of your RE beat in unison with your heart. You must have heard the romantic stories about Royal Enfield road trips. Well, they are all true. But it comes with an acceptance of the harsh realities of an RE bike. The reason you have to cruise “slowly” is because any RE engine will start vibrating once it crosses 80 kmph. Yes, 350 cc and 500 cc bikes that cannot overtake any car or lorry can’t accelerate or maintain a high speed. You are forced to just cruise. The story about their flagship bike, the continental GT, is even worse. It has so much vibrations that you hand becomes numb and lose sensation after a while. That is right, A cafe racer that can’t handle highway speeds. The vibration are bad enough to rattle your balls all the way through a trip. The bikes are terribly slow too.
There is a reason why the RE Trip logo has a incomplete symbol for biological male. It is sans balls.
For a bike that been there for so long, There are way too many hardware problems that still seem to haunt most RE owners. I have listened to many scary stories from friends.
  1. The clutch cable can snap anytime. This happened to a friends thrice now he travels with a spare clutch cable all the time. This is a serious problem since it can easily kill an inexperienced driver.
  2. You will hit false neutrals and gear box won’t shift. I have lost count of the number of times I have found myself between a lorry and a hard place unable to overtake because my gearbox shifted to a gear in Narnia.
  3. Electronics on a RE a joke. You will just keep replacing the digital instrument cluster every other or every year. Equally subpar is the plastic part on the bike.
  4. Brakes on RE bikes are a joke as well. They can’t stop even if your life depended on it. Oh Wait! Your life does depend on it. One more reason why you need to drag your ass on a highway instead of just getting to the destination quickly. Also they rust real bad.
  5. Unreliable mileage. The bike gives varying results for the same riding conditions. Strange.
  6. And the worst part is , the service engineers are terrible and they can’t fix the bike and neither you nor the service engineer will know what is being fixed on the bike. If you spend a day or two at the service station ( which you end doing anyways since you own a Lemon ) you will feel sorry for all the people who have bought a RE.
My Himalayan spent 20 days of its first month in a service station. And its battery has died down thrice ( first time , second time , and this article is being written when my bike sits useless in my parking lot with a dead battery for the third time)
Their best engineers reached out to me after I tweeted about the second failure, and tried to fix this problem for a week. They have no fucking clue what they fixed and it is still not fixed. I have no bill for the money or time I spent for the first few services, Reason: my bike serial number is not present in some record keeping system of theirs ( Expected : it is a RE process ). I just gave up.
Royal Enfield and the Fart of motorcycle maintenance
If you want to experience passionate motorcycle maintenance , I still recommend buying an old enfield. They are still gold and they don’t make them like they used to. Alternatively, You can also buy a new Royal Enfield and keep repairing it, because we are not supposed to expect quality and we will keep buying substandard bikes anyways because of lack of choice.
Royal Enfield, Made like a Gun. Diwali Gun perhaps ?? because it is sound only ?
My sincere advise, get a bike with a Japanese engine or any one of the other Indian bikes. All of the Indian bike manufactures have many improvements They at least have some reliability and accountability. Last but not least, what make RE bikes popular is their legendary ageless engines. But,
Royal Enfield engines are British age bike engines marketed as engines with an Indian soul.

This was original published on Medium by me : https://medium.com/@phrishikesh/royal-enfield-and-the-fart-of-motorcycle-maintenance-d467fb346c12

Wednesday, July 27, 2016

My Sad Himalayan Story




I am a big hypocrite. I have advised my friends from getting Royal Enfield bikes for  years now. They usually have many problems requiring servicing, lack power, have vibrations at sub highway speeds and no power to overtake. I hated any one who said You had to experience a royal enfield ride to love bikes. When everyone said it is a looker I have pointed out it is only because it makes so much noise and not because it looks good. It just grows on you and you tend to live with its problems, that is what I have been told by folks I could get through to.

Didn't I say I was a hypocrite ? Yeah. I did. Royal Enfield then launched the Himalayan. Raving reviews. Everyone was talking about it. I took a test ride. I did like the feel of the bike and was super excited. The Engine sounded good and it had a nice feel to it. Totally new stuff from RE. I booked it immediately.   A big mistake.

I write this right now sitting in the waiting room of the service center knowing very well that my bikes problems have not been solved.  It has been two months since I got this bike And here is how it stands right now.

 1. I have ridden a total of 600 kms and my bike has already spent 10 days of the 2 months  at the service center
 2. My Engine wouldn't run at idle speed and will get cut off if I switch gears.
 3. Engine has terrible knocking and can't slow down at any speed or gear without knocking.
 4. My Battery has died already at 580 kms.
 5. It Heats up for no reason ( It heats up enough to affect the ambient environment temperature sensor to show 48 degrees )
 6. And nobody at the service center has any clue as to what is wrong with the bike.

After waiting for more than  3 months for getting the bike, even though I booked it on the very first day, I got the bike.  The sales people at the Legend Motors showroom didn't care about the bike. They just sold it had no clue as to what they were selling. I was advised to kick start the bike every morning before I started using it for the day.  I mockingly  asked them to show me a demo of kick start knowing  very well that bike has no kick start. As soon as I started the bike it switched off. I was assured that it takes a week for the engine to settle down.  Knowing RE idiocrasies, I drove away on the bike which switched off many times before I reached home. A very sad feeling to have a new bike fail on you so many times :( .

After riding for about 250 kms , I gave up . The engine was still problematic . It kept switching off at low speeds. It kept knocking if let go of the accelerator. I took the bike to the service center way ahead of the scheduled time. After the bike spent 5 days at the service center and replacing a bunch of wires. I was assured that the bike problems will sorted out now. I tested it and was not satisfied. The folks at the service center unlike the showroom folks were nice to me, but they had no clue what needed fixing. After arguing with them for while . They assured me they will have some one from the factory take a look at it the next week.  I also mentioned that the knocking problem existed ( there was news about a faulty part that need to be replaced. ). I had been assured of my bike being one of the lots that had fix from factory itself.   I took the bike and rode it with great regret .

How does a bike get off the factory line without being tested for something as basic as idling speed / idling run? How can the engine not run for a whole 5 secs when you turn it on? 

Problem existed still. Every RE owner I talked to told me such problem with the bikes will always exist. It just goes away with time. They described this as a character of the bike .  I could not digest it that such sub standard bikes were so popular. They were describing each bad problem as a character of the bike. So many people acknowledge this cold start problem and that engine will die on you at low speed as a common phenonmenon. But I came to terms with the engine problems like others.

Now I stared experience new heating problems. The engine heat was crazy and I couldn't even ride with jeans on. It would heat up so much that the temperature indicator on the dash would shoot from 36 degrees when I start the bike to 48 degrees when I have ridden it for half hour to an hour. It is supposed to show environment temperature so the engine heat was just affecting the sensor. This did not exist before the first service.  And Engine still had a knocking problem.

What use is a bike if you cant cruise at 50 -60 kms without knocking up  ? 

Then in 2 weeks times It died out on me again. I started the bike from office , rode 25 kms home. The battery low indicator was on when I halted to open my gates. I killed the engine hoping the indicator was wrong.  Well damn me, cause the battery had already died out on me and the bike wouldn't start .

A whole of 600 kms and the battery had already died out on me . How the hell is this bike supposed to scale mountains ? 

The bike stands in the service center right across me as I write this. It still can't idle. I am pretty sure I can't ride it smoothly until the engine heats up.  I am not sure if the knocking is solved. I hate my situation. So I write this blog cause I don’t want to agree with all those die hard fans out there that RE bikes are great. I may have got 1 bad lemon out of 1000 bikes and this is just an anomaly among other himalayan bikes.  But that is a very low standard for a such a highly valued company. If something cant be fixed and I have to live with that bike for the rest of its life, I refuse to accept the Himalayan is a great bike. I reject all good reviews of Himalayan out there.


Update 1 : I have been contacted by Royal enfield to resolve the issues with the bike. It has gone back to a service centre.

Update 2 : My bike has spent about a week and it still can't idle. I have a new problem of bike now shutting down as soon as I touch the throttle. The knocking is still bad if not worse . However, the heating issues have definitely been resolved although the service engineer would not say anything about what was fixed.  I have just accepted my fate and decided to just live with it. Can't give it for service just to get it back with different problem because they don't seem to know what they are doing ( Best Engineers promised by the Tamilnadu Sales head for my problem)











Tuesday, October 07, 2014

What a messaging app to trump WhatsApp needs to be

There has been some news recently that Google seems to be prepping up for  a messaging app, to catch some lost ground with Whatsapp. Isn't that what they planned to do with Hangouts in the first place ? When I tried out Hangouts it seemed like a nice idea to use a single app for SMS and Instant Messaging. I was used to the idea from using a Windows Phone (You could switch between SMS and Facebook Messenger). But after using it for a day or two, reality caught up.


Hangouts didn't perform well and it was confusing to say the least. Sometimes, it didn't make sense to have SMS as a fall-back as Hangouts also allowed contacts from your Google plus circles ( and Gtalk contacts ) to message you. Not just folks on your circles, but just about anyone on Google+ ( unless you turned it off ).


Another major reason I found Hangouts uncomfortable was the fact that I was also using my official account on Hangouts. This made me feel Hangouts was more of an official tool than a casual messaging tool. Also, I was mentally tuned to not share anything fun on Hangouts for the same reason. No fun content will eventually die out soon. Now I use hangouts purely for staying on top of office work.


Coming back to WhatsApp and what (I think) google  needs to challenge WhatsApp - Well , there are a couple of things at which WhatsApp is lagging in. Fixing those would be a great start.


I just made a list of what I feel are the key change areas, but this could also be seen as what Google needs to do to be on top of the messaging game :


1) Privacy  

Currently anyone with my number can message me on WhatsApp. This seems a little too irritating when random people can reach you if they know your number. Total strangers could be stalking you. I would like some more control over this. Not every number on my phone book is a friend and not everyone who has my number is my friend. Hike seems to have done something about this.


2) E2E Encryption  

This is more of a room for improvement rather than a necessity. Some of us are paranoid about who might be snooping in on our data. We could carelessly share details about ourselves over a chat that someone with malicious intent could be listening on. So, an end to end encryption might give us peace of mind that only intended parties can read the messages sent. But having said that, P2P chat might have the same complexities as Bleep for setting up a simple chat, but I am OK with the cumbersome nature if security is guaranteed . However, I don't see this happening as Google is known to make their services easy to use for people.


3) Better delivery status 

The Last seen status on WhatsApp is not an accurate way to say if a person has seen your message. Facebook messenger has done it right with the seen status for each message. This can be too much detail for some, but is appreciated by others. So , such a feature with an option to opt out might be good to have. Hangouts always has trouble sending messages often going into retry mode. This should be handled better.


4) GIF support

If a picture speaks a 1000 words, a GIF speaks a thousand fun filled words that carve out a story. If a messaging app can support GIFs as picture messages, it would be awesome. And I don’t just mean  animated Emojis. We should be able to send any GIF we want. And of course stickers .It is 2014 and Emojis and stickers are just taken for granted for any messaging application.


5) Connect with Email option  

Ability to add people by email is also needed. Sometimes you don’t want to share your phone number, but instead an email might be fine for acquaintances. Many might not agree for a need for such an option, but I think it would be useful during travel, or to contact support.


6) API/Framework for Extension 

An API ( Application Programming Interface) for building extensions to the chat would be great. Hooks for intervening messages or callbacks for messages to do some processing would give rise to a lot of interesting apps that can be built on top of the message. A better way to do this would be to provide a framework for writing apps that can live within Google's server so that the data is securely processed by sandboxed instances dedicated to that particular user or app. This will be an awesome ecosystem. Some uses I can think of for this are as follows -  mood graph, who among your contacts messages most / least, data stats per user/group, filter out images & videos on some groups, save images automatically to drive or dropbox, etc.


7) Firefox OS Support 

One huge factor for WhatsApp's success was Symbian support. It had Symbian support early on and still is supported on some Asha phones. This made adoption of the Whatsapp more easier for people who couldn't afford smartphones. It was also the main reason why many people got smartphones, since they liked what was possible with WhatsApp on their feature phones. This may not be true for today's scenario but it still matters. Android one is a good program , but for true success they will need to support cheaper platforms such as Firefox OS and Nokia's Asha OS.

8) Official Accounts for Organizations

Imagine being able to reach to for support for your issues for an  App over a quick chat. Or check for some info by chatting with a bot. Or check in to your flight with a simple message. Organizations can have official accounts on the messaging ecosystem so that users can reach out to them right through the messaging app. This coupled with a good API creates endless possibilities .

Let me know if you have more ideas or feedback about this in the comments .

Sunday, September 22, 2013

Mr. Miagi's Wisdom

Have you seen The Karate Kid movie. If you haven't , well.. you should watch it. Because if you haven't, you are missing out on one of best characters onscreen "Mr. Miagi".

The character is played by Noriyuki "Pat" Morita in the karate kid series. Very few sentences are spoken by the character but they carry maximum weight, in fact you will find yourselves waiting for Mr. Miagi to say something during the movie. Although these quotes are contextual to the movie situations,  I personally think many of these gems apply to our life.  Some are old sayings from Okinawa, but mostly pure gold from Mr. Miagi.

Here is Mr.Miagi's wisdom from the movie Karate kid in no particular order.

- For person with no forgiveness in heart, living even worse punishment than death.

- Answer live inside you.

- Everything can heal, Daniel-san. Take time, patience.

- Inside you have strong root, No need nothing except what you have inside to grow.

  - Sometime animal have more sense than human.

- Anything try first time impossible, but must try.

- You know you good, that important thing.

- Never trust spiritual leader who cannot dance.

- Sometime when living caged too long, whole world seem like a very big place.

- It is stupid when neighbourhood gangs kill each other. It is stupid when countries fight war. Not stupid to respect all living things.

- Ambition without knowledge is like boat on dry land.

- Just remember. True strength come from inside.

-  Julie-san, fighting not good. But if must fight, win.

- Basic of life, Breathing. No breathe, No life.

- Never put passion before principle. Even if win, You lose.

- Someone always know more

- First learn stand, then learn fly.

- Must practise

- No such thing, Bad student. Only bad teacher.

- No call no one nothing.

- Win , lose. No matter. You make good fight, respect , then nobody bother.

- Daniel-san, nobody perfect.

- Sometime, what heart know, head forget.

- Fighting always last answer to problem

- Never stop war by taking part in one.

- Not matter who stronger. Matter who smarter.

- Best way to avoid punch, No be there.

- Daniel-san, lie become truth only when person wanna believe.

- Fighting not good, somebody always get hurt.

-  if today, Julie-san get angry. Just repeat these words. Sun is warm. Grass is green. Everything workout.

- Never keep lady waiting.

If you follow these. Miagi have hope for you

Before i go , two more dialouges  for you from the movies. There is meaning in them too. Enjoy.

1) Walk on road. Walk right side safe. Walk left side safe, walk middle "squish" . Sooner or later , you get squished like grape.  Karate do yes ok. Karate do no ok. You karate do guess so. "squish".

2) Miagi raise in small village in okinawa. At that time very bad temper bull live in pasture near village. Oh ! Bull very bad. He chase children women going shopping, farmer, everybody. Then one day big festival. Everybody happy.

Person : What the hell is that supposed to mean ?

That day bad bull become good soup.

Monday, July 29, 2013

Smart Watches. All Wrong.

The first electronic gadget that I fell in love with was a watch. I still remember it like yesterday the moment the watch, a gift from my Uncle, was given to me.It was a basic CASIO watch. Waterproof, with an alarm , stopwatch and countdown timer. It was the best thing ever. I couldn't take it off and couldn't help hoping that some one would notice and ask about the hourly beep that went off on the watch.  

Nowadays watches have become just jewelry . With so many multi-function devices around us , All of which guarantees the feature of being able to show the time, we have no need for a watch. Who needs a single function device to tell us the time when so many devices already do that for us. Right ? But I think we need the watch.   
Why ? Well I am not talking about the device that needs 21 crystals ( jewels ) to tell me what is happening right now. But the future of such watches. 

We have seen some smart watches introduced recently. My favorite being the pebble. Well, it is not what I term smart, but it definitely an improvement over the basic watch we are used to. The others such as Sony have  smart watches that can play music, allow you to read messages and email and answer calls. Neat huh !! Well it depends. 

 I call such watches dumb terminals, because that's what they are. They are terminals to access your smart phone. It is no different than your hands free that takes voice commands. This is just another way to interact with your smart phone , through a smaller screen and lesser touch area. In other words the smart watch is just a digital watch without an accompanying smart phone. 

What I look forward to is a true smart watch. Some where along the way we lost it. Lets go back in time. Does any one remember Giant robot ? Johnny Sokko could say commands into his phone and Voila we have a robot shooting missiles out of its fingertips. OK, I know a robot minion is too much to ask for, but still totally awesome.  

The point is a watch was a effective communication device . A handy device ( pun intended ). The concept of a watch or watch like device that is used a communicator has been a well established one in science fiction. Damn it, even power rangers have one. The alien in predators was envisioned to be advanced enough to control space ships, vision sensors ( way more advanced than google glass) , gun turrets and packs a punch with a self destruct bomb. Although the interface seems to be a version of alien Symbian OS, it definitely was envisioned as  a device to do many things. But still all we see is dumb watches called smart watches. Why can't we take cue from science fiction for ideas on this. 

The small screen is practically useless for touch screen usage and to display anything worthwhile. They are useless with out the accompanying smartphone since they don’t have connectivity of their own. How difficult would it be to put a SIM on one of those watches ? Of course the problems such as device heating up, and radiation  would have to addressed since the device would always in touch with the body.  

Why haven't we seen a true smart watch yet ? The voice commands technology and the Artificial Intelligence behind it has improved so much that we could forego touch or use it as a secondary way to provide input. Imagine Google glass like device sans the squint eye possibility, that you can speak to instead of fiddle around. When you are using the Smart watch, it should feel as capable as your smart phone just that your palms are facing the other way. May be a smart glass makes more sense than a watch since Voice over and Voice out is also taken care.  

There are rumors about Google, Apple and Microsoft working on a smart watch. What would you expect out of a smart watch. Can it be a efficient device now that hand held devices can do so much more? If it is just another extension to your smart phones then I would be very disappointed. We will have to wait and "watch".  

Sunday, August 05, 2012

What if Humans had Infrared (heat) Vision ?


Evolution has made humans the most advanced species on earth and as of now on the solar system. We are the most intelligent of all creatures. We can walk on two legs and can handle objects with great dexterity, have a vivid imagination and are creative. All these have been possible because of a whole lot of ifs and buts. We are here because of a whole lot of right conditions in the equation of life. The right temperature, the right combination of gases, water, the right chemicals.

There is one aspect of this evolution that many of us don't think of much. VISION. More accurate description would be color vision. Not all animals have evolved to be capable of perceiving the wide range of colors that we perceive today. We can appreciate red, green and blue today. The females are more evolved to see them as cherry red, bottle green and peacock blue. Did you know that humans make out color with 3 receptors . Some birds have 4 . And some invertebrates have up to 10 receptors . They can see more shades of color than we can imagine.

The reason we are able to do this is because we adapted to perceive the most common range of wavelengths on earth. The earth's atmosphere locks out all the infrared and ultra violet rays from entering the atmosphere. So what enters earth and becomes the most common spectrum of light / electromagnetic wavelength is the visible spectrum, called so because we can see it. Over millions of years the creatures evolved and developed sensors that could perceive this spectrum .And slowly we could perceive a wide array of colors as well. Again , this is because of the factors were right.

WHAT IF HUMANS HAD INFRARED VISION.

Imagine a universe where we were on a planet that had more infrared radiation then any other wavelengths then it is possible that evolution would have taken a different turn.We could have developed infrared sensors or Pits . We would be seeing heat Signatures instead of color. The alien from the movie predator must have been from such a planet. It is a possibility. Aren't we a product of millions of years of evolution and adaptation to various conditions. It could be possible that we adapted to possess heat vision due to suitable conditions.If earth were to have a different composition of atmosphere, creatures could have evolved to have infrared receptors. Among all possibilities we could alter the current world in just one small possibility of humans possessing infrared vision, What would be different in such a world . The following passages are my thoughts on such a possibility.



Freaky chillout


Evolution and Physiology :

The evolution process of having infrared vision would mean that the creatures would have to be in an atmosphere that doesn't block infrared rays. Such a thinned down atmosphere would have high amounts of radiation, leading to a change in physiology. Infrared is attributed to heat. A cockroach like exoskeleton would help creatures endure such radiation. Skin and flesh around bone would make no sense when an exoskeleton can do a better job of preventing radiation. This also would mean that bipeds on such a planet would have soft gooey interiors.

Nocturnal behavior would also be something the bipeds will have in common with roaches. Vision being the main factor for this behavior. When you are seeing heat signatures, it would be so much easier to hunt at night when prey can be spotted by tracking heat emitted from their body. So man over a period of time would have adapted to being active at night. During the day, the sun would make sure every thing is heated up . If the eyes are sensitive , this would mean the eye would have trouble looking at objects during the day. It would be too bright ( or too hot ) for the IR eyes to comprehend. So man would be like an owl sleeping during the day and active during the night. a preference to the underground might be a possibility. Prehistoric men would have embraced caves as well as developed ways to dig underground caves like animals burrowing, before he could have come up with ways to build shelter. Many more creatures would take to burrowing as a way of survival and protection.
Another offset in the evolution would be in the composition of the exoskeleton. The exoskeleton might comprise of a combination of calcium but with a possibility it is re enforced with another metal. Vitamin-D and the sun are major contributors towards the strength of the bones. With a nocturnal behavior this is bound to evolve differently. Also, it would make sense for the exoskeleton to be made of better material than brittle calcium which is easy to break and not flexible.

Appearance :

I have strayed away a bit from the main focus, vision. Lets get back to vision. And when we think vision. We would be able to make out the outlines with the heat differences, but the sharp nature of our eye sight and our ability to see varying shades of light and shadows is lost. All flowers would seem to be blurry shapes of blue and red , different shapes , but blurry. A distinction without a difference .


Snake-o-vision
There would be other distinguishing features that humans would use for identification. We would be able to see the brightness in the brains due to the heat from the activity and differentiate people though the vein patterns and nasal passages and jaw bones. To an extent we should be able differentiate people based on jaw bones Structures and general features . These are dependent on the clarity of the such a infra red vision.

Races :

Distinction and similarity brings to my mind, races. Man has a tendency to find similarities between himself and others . This search for similarity is what brings together people as communities. This is also the nature that drives them to see people as different. In a world with no color ( as we know it ) , there won't be a chance for color discrimination. Would we have racism, or would every one be the since , we would all be blurry masses of heat ? There wont be a distinction of Caucasian , African or Asian. But man basic nature would have driven him to identify some similarities. It is possible that people with warmer tones of color find themselves similar. Since warmer usually means active people with a good metabolism. These might constitute what in such a world might be considered as superior. Ones with colder bodies might find themselves together . This would in terms mean a color discrimination in a world that sees heat levels.

There is flaw however in this line of thought. The flaw is the fact that the hot or cold bodies is not a genetic trait . If it is , then we would have such a divide. Fortunately that is not how it works. Family and origin could make it hard to differentiate oneself from another based on heat patterns if they are from the same family. So this differentiation would just exist as a way to categorize people (like thin vs fat ) and not as a means of differentiation( like black vs white ) that could lead to racism. It might be a world with just one kind of humans, blurry bright bipeds, a better world hopefully.

Beauty and Fashion :

What would constitute beauty on such a world . Features are not bound to be constant since your body's heat signature can change with varying conditions . What features would constitute sexy. Shape of your body still works so I guess that plays a key role. Apart from that , beauty could constitute the way our body tracts are aligned. An odd beauty might be people with a little misplaced heart or one that is more towards the center to contributes to a symmetry.

Dresses would be just be for practical reasons for such creatures. There is no point to fanciful colors when you can't see them. Comfort and use would take a precedence. It won't be awkward for your mom's to tell that you would have to change from briefs to boxers cause it would be in plain sight that your privates are heated up.

Colors and Meaning :

Violet to red would be the possibilities of how hot you want your soup not possible fashion statements. You could see if the food is hot or not just by seeing it. He is so red right now , would be a common phrase depicting a person ill or working out. He is cool as blue would replace cool as a cucumber. Mood rings won’t sell that much , since that would be same as wearing a watch and carrying a cellphone.

Camouflage :

Camouflage for armed forces would not be as simple as wearing a dress with dirty patches of green. They would have to wear something sophistic that can hide their heat. A sniper would be better off firing from a fridge door than a window.



Chameleons and other creatures that use camouflage as a means of defense or offense, would have to evolve differently to have such a power. In order to be able to camouflage, they should have tremendous control over their body temperature.

Science and Medicine :

Medically and scientifically this vision would have proved to be a boon and a bane . We would be closer to understanding energy and its workings because heat being much closer of a definition to energy than light. Heat transfer and conversion of energy would be visible phenomenon. For example , as soon as some one eats food we can see the metabolism increase and understanding the heat generation. Lights on and lights off would be a good enough description for the alive and dead, for you can see life in active people and its absence in the dead. But medical studies would have developed different methods of diagnosis since some visual elements like pale skin, yellow eyes , red patches won't be available . Another aspect is that the clarity of identifying minuscule details .

Limitations :

The more I think about infrared vision, the more absurd it seems.

The basic problem with such a vision would be the range of vision. We will be limited by details that heat provides. Can we sense heat beyond a distance. Even though we can pick up heat signature by perceiving infrared signals, The IR receptors would have limitation to the amount of such signals it can process. If there are multiple layers of information, for e.g one person standing behind another, will we see just the person in front or both as a mixed signal ? Imagine the same across multiple objects ranging multiple distances . IR cameras can locate people movements inside buildings. If the eyes work the same way there might be too much information to process. So evolution might have either restricted the depth of vision or it might have given us enhanced brains to handle so much information.

 Another problem of such a vision is the resolution and detail you can see. You might see blobs of colors but can you make out finer details ? No !! . The reason being heat transfer. Heat moves from objects of higher temperature to lower temperature. so any given time all objects will be trying to get closer to the temperature of the objects they are in touch. Thus heat transfer will define the borders between objects. But the details.might be lost. The resolution or detail you can see would be very minimal. Humans have developed such awesome IR camera these days that makes it possible to see so much detail. We may have evolved to see such detail with infrared but we can't really say with certainty. 


 May be that is why we evolved the way we did. We are just right the way we are . There is nothing that can change. We are perfectly alright the way we are. Blessed , may be. And hope humans don't mess it up. 

God , if he exists, would have been a crazy mathematician. He would point out and say , do you see the probability of your existence and the way you are. Our presence on earth is a miracle of a million possibilities. To say that it just happened and was not according to some grand plan, is something that would be hard to explain. God is one of the answers to such a question.

Saturday, March 10, 2012

Thread Name Based Logging for Log4J

In a multi-threaded environment , it sometimes becomes hard to debug parts of the application because you constantly have logs from multiple threads. Simplest method to debug such cases is to do a grep on the thread name .  I have been asked a few times if it was possible to log messages happening in one thread to a separate file.  I couldn't find such a implementation. Log4J , which is what i have mostly been using , didnt have anything of that kind out there .

The drawback with Log4j configuration is that , you have to assign appenders to packages . So if you wanted to log a particular functionality in a separate file, you have to design your code packages in such a way that all classes related to that functionality  share the same package ( or package hierarchy ) . This is fine and that is how you would usually structure your code. But the problem arises when you use third party libraries . These end up not being captured along with your file , so it becomes useless once you separate a package to use a different log file . 


The only way we could capture the entire flow is  by using the Thread names. ( like we would do with a grep ). So log messages from each thread can be routed to seperate files. Not many would prefer this , i doubt anybody would want to do this . But if you are using a naming convention for threads then it would be easier to do the routing.In my case , we are doing that in my current project. So here is my attempt to do just that with a custom appender for Log4j. 

 ThreadNamePatternAppender is an appender for routing your Logging messages to multiple files by using the thread name patterns as a key . 
E.g You have 2 threads that have the names(Thread.getName())
       Consumer and Producer. 
 You can route the logging from the Consumer Thread to Cosumer.log and logging from Producer Thread to Producer.log with a log4j.properties that  looks as follows


log4j.rootLogger=DEBUG, MY_THREAD_APPENDER

log4j.appender.MY_THREAD_APPENDER=com.rex.logging.appender.ThreadNamePatternAppender
log4j.appender.MY_THREAD_APPENDER.defaultFile=EveryThingElse.log
log4j.appender.MY_THREAD_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.MY_THREAD_APPENDER.layout.ConversionPattern= %-4r [%t] %-5p %c %x - %m%n
log4j.appender.MY_THREAD_APPENDER.threadNameMapping=Consumer>Consumer.log|Producer>Producer.log

  
 This uses a DailyRollingFileAppender internally. So you should be able to use all the parameters   you would use with a DailyRollingFileAppender like DatePattern , Encoding etc. So you can control how frequently the files needs to be rolled over. However you cant control it at each thread level , but you can control it at an appender level.

 If you have multiple threads sharing the Same name or Have similar names , They can be routed to the same file by using * along with the names. 
  
   e.g If there are Threads by the name Consumer-1 , Consumer-2 , Consumer-3 ,     you can route messages from all three threads to the same file as follows .

 log4j.appender.MY_THREAD_APPENDER.threadNameMapping=Consumer*>Consumer.log|Producer>Producer.log


You can add multiple Thread name mappings by separating them with a pipe '|'.


You can download the jar for this from here .  You can view the code here 




Tuesday, January 03, 2012

End of Days


       Happy new year,  2012 is here.


                       An eventful year just got over. Another starts . This year is predicted to be the year of doom . Why? Well the Mayans were too bored to go beyond this year on their calendar.  Dec 21st , 2012  is marked for apocalypse and Armageddon. End of the World ( EOW , better this way cause I don’t like the sound of it). So is it true ? Is the world really going to end ? Should I be preparing a bucket list ? Well , I don’t know if I should care about the Mayan calendar getting over or what Nostradamus scribbled when he was drunk. Never the less , there has been a huge set of people who strongly believe that the EOW is a possibility. Many are damn right sure about it being an assured phenomenon.  


                      There is not much base to this prediction. How will the EOW happen ? Earthquake ? Asteroid ? Wrath of the Titans?  21/12 being a palindrome , I find it too filmy a number to believe in it. But what if it really does happen ? What do we do ?  


                       The best we can do is to be prepared. 21/12 might have been predicted , but there are events that are bound to happen due to the unpredictable nature of nature . And here are few things that can help you during / after such a crisis . Of course this is only if it isn't a total wipe out.  




1)  Get a stock of some essentials and have them ready at home at all times. 

      • First Aid kit , Medicines  
      • A Water filter  and a Stock of fresh water for 2 weeks .  
      • Food for at least 2 weeks, non perishable food , Dry Fruits. 
      • Some basic tools , A Swiss knife . 
      • Batteries . ( not a pair,  a whole lot of them ). 
      • A Torch / Flashlight. 
      • A good ole Radio  ( FM / AM ) and a Walkie-Talkie . 
      • Matches / Lighter. 
      • An Alternative SIM from an adjoining state ( To avoid network Jam during crisis ) .  

2) When a disaster occurs, I don’t think Google will be able to answer your questions. So once in a while practice thinking "What would my grandparents do to get this done?"   


3) Keep a copy of your important documents at some other location, Say a relative staying in another city.


4) Staying Calm and collected during the crisis will save your ass for the most part.  


5) Save yourselves. Then think about others . I know there is nothing heroic about this but the fact is people helping others are the ones that get killed. ( I salute them , but cant do that in person ). Post catastrophe, Check yourself for injuries and then start helping others .  


6) Get Educated on what to do in various situations.


Now to the specifics . 


1) Earthquakes / Tsunami / Cyclones  

  • These are serious and ever present dangers .  Worst part is they are by products of most EOW scenarios .  
  • Please read through the survival info publish on the following sites ( Google / Bing for more )  

2) Asteroid Crash 

  • This is scary and very much possible  
  • NEO ( Near Earth Objects ) can disrupt surface activity or erupt to create havoc .  
  • All previous occurrences have  known to cause terrible damage ( one of which particularly made sure I can never ride on the back of  Sauropod to school )  
  • Only solution I can think of, is an Armageddon style rescue .  

3) Solar Flare  

  • A Strong enough solar flare can have  the same effect as an atomic bomb, Just a little way bit more powerful than that . Extreme heat , Radiation .
  • If it is a smaller flare , that leaves us alive . First thing you will notice is that your fancy smart phone and your TV don’t work . because a solar flare will have a EMP ( Electro Magnetic Pulse ) accompanying it . So , that will put us at "What would my Great Great Grand father do ?" ideology. 
  • Radiation post flare will still last for a long time. So we would end up living in Tin Foil Tents  . 

4) Crazy Planet alignment causes cosmic energies to affect everything on earth. 

  • Consult a gemologist . Get a bunch of rings .  
  • Wear your lucky charm 
  • On a serious note , These can cause Tsunamis and Earthquakes. 

5) Kali yuga 

  • This is the EOW as predicted in the Hindu texts.  
  •  Be good , do Good , Think Good to survive Kalki's wrath. 
  • Bible's Armageddon . Nostradamus predictions . All the same 

6) Zombie Apocalypse .  

  • Get Fit , you are going to be doing a lot of running  
  • Stay away from tunnels and closed paths. After watching so many movies , you will know that is where most people die ( and horrible background scores are created ) .  
  • Don’t be a hero and go around investigating surroundings. There will be a zombie behind door no 2.   
  • Get Guns :D . All those years of playing first person shooters , this will be your true test.   

7) Meddling Scientists 

  • This is my best bet for a cause for the EOW . I am guessing some crazy scientist will be poking at the dynamics of energies / particles he does not understand and unintentionally create Armegeddon. 
  • Current researches are on God particle and Antimatter. These are things that could cause a black hole and gobble the planet as a whole . 
  • Silliest but plausible reason for an EOW. 

8 ) Alien Invasion 

  •  Learn a language , you never know what they will speak .
  • Learn to play the piano . ( Close Encounters ) 
  • Have a vial of Common Cold virus handy , it will come to be of use. ( War of the worlds ) 



              Other possibilities of concern are Nuclear war , Global Warming and Chuck Norris's Sneeze . No matter what , I am sure we will survive. Earth survived a million years , we will survive a million more. Live today like there is no tomorrow


BTW , Don't forget to create your bucket list :P