Thursday, August 27, 2009

Robots and rights

This argument has been going on for quite some time now. Some people argue that if a robot can think, act and behave like humans then it should have equal or less rights and some people say that its just a machine and not a human or real life so machines can’t be given any rights.

In my opinion, when such a robot is developed which thinks, acts and behaves similar to a human then there is no difference left between both. Just imagine, how would you think of such a robot as a machine if it’s talking to you and behaving with you just like your human friend. Mind connects with mind. Both robot and human become equal because both have consciousness which is the main thing in a living life, which defines life (in spirtual terms) only the hardware is different. In case of a human, we have nano technology based hardware whereas in a robot, we’ll have electro-mechanical based hardware (nano-tech may be used in mind but that’s a different issue).

I believe that robots do deserve “some” rights but giving them rights may cause severe problems because robots might start getting thinking about their own individuality and their own importance. They might start thinking that they are not a “machine” and deserve equality with humans. That’s possible.

Another thing is that a robot should never be given emotions because if their consciousness is based on pure rationale then they will happily accept the relation with human as "master-slave”.

I expect we will have such level of robots by 2025 because its only depending on invention of AI.

Wednesday, August 19, 2009

Some Java Tips

I have been working in Java for more than 5 yrs. Here are few general tips which I found very useful for my coding.

This is not a comprehensive list so I’ll keep updating this post in future as well.

  1. Use ArrayList instead of LinkedList. These are significantly faster.
  2. Instead of creating new Integer/Boolean/Float etc. objects, use Integer.valueOf and so on. These methods are 3.5x faster than creating new objects every time. They use JVM caching and other caching tactics to do this. Normally values from 1 to 100 are guaranteed to be in cache.
  3. Use HashMap instead of Hashtable when synchronization is not an issue.
  4. “double” is faster to calculate than “float”.
  5. Use thread pooling instead of creating new threads for every server request (if you expect high volume of requests). Threads are light-weight but they still consume significant resources for creation each time.
  6. Java programs can be compiled into native .exe formats. use MinGW’s gcj tool to do this. As of now, this tool can compile only console applications and not GUI applications like Swing. But it has great support for SWT based applications and its free!
  7. Use StringBuffer rather than the string concatenation operator (+)
  8. Reuse objects where possible
  9. Iterator.hasNext() and Enumerator.hasMoreElements() do not need to be repeatedly called when the size of the collection is known. Use collection.size() and a loop counter instead
  10. Creating an exception is a costly procedure, because of filling in stack trace
  11. Generic integer parsing may be overkill for converting simple integer formats
  12. Don't optimize as you go. Write your program concentrating on clean, correct, and understandable code
  13. Use profiling to find out where that 80% of execution time is going, so you know where to concentrate your effort
  14. Compile with optimization flag, javac –O
  15. Synchronizing on methods rather than on code blocks is slightly faster
  16. ints are the fastest data type
  17. Null out references when they are no longer used so that garbage collection can reclaim their space
  18. Use maximum caching when possible to enhance performance

Will be posting more.

Monday, July 27, 2009

A recent article on

Jeet Singh was the winner of 2 prizes in technical categories during a national competition held in his engineering college. Never did anyone think that one day the same ingenuity that won him awards would translate into entrepreneurship.
He had however already set his sights on his dreams. Jeet Singh recalled his motives saying, “The challenging journey of entrepreneurship inspired me to quit my Infosys job. I took this decision during my college time itself and had tried to quit my BTech degree back then and start a company around a banking product that I developed.” 
His entrepreneurial vision came to fruition in 2007 with Matcoms Technologies Pvt Ltd. Jeet told us about his entrepreneurial undertaking saying, “Matcoms focuses on local search market. The company has launched a local search engine providing city search, movie timings, news and events information in around 20 cities for free. The company was established in 2007 with a vision of making finding information about a city easier.”

“The company believes in enhancing the content by partnering with content providers. This ensures the quality of information and reliability of the service. The company has partnered with some companies including a leading yellow pages company for enhancing the city search database.”
Jeet is in no doubt that his enterprise will find its place under the son. He proceeded to plead his case saying “Local search industry has great potential in India. Research shows that more than 60% searches performed on leading Indian web search engines are local in nature. This amount will increase as more people come online and cities expand. So there is a clear opportunity here and we are committed to make a strong position in this segment.”
“Business model revolves mainly around bringing local advertisers online. Apart from this, advertisement in is another opportunity that we are working on. The differentiator of a local search engine lies in the richness of the data. We are focusing on increasing the amount of rich data providing more details, maps, photos and more. Some of these efforts went into making trailers and wallpapers available in movies section for our users.”
Jeet has plans for developing his enterprise further, he told us about it saying “We plan to scale-up by reaching out to more users, expanding to more cities and partnering with more content providers. Addressing the needs of local advertisers in a city is a key challenging issue and needs to be handled before expanding the offline presence of the company.”
Jeet has faced the entrepreneurs’ nightmare too. Being the only one in charge meant that he had to shoulder all the burdens that came their way. However some burdens are heavier than others as he related saying “The biggest challenge so far has been in learning to cut the expenses, keeping the progress up in difficult times and lack of resources. For every startup, the biggest challenge lies in the management of the funds and utilizing its limited resources to maximize the output. We also had to reduce the cost factor by thinking of different ways of doing some costly things, reducing server costs and more.”
The venture got its initial transfusion of lifeblood from the founders who invested the required money. Family and a few friends invested in the venture and got Jeet on the track to success.

Read more on YourStory

Tuesday, June 30, 2009

Speed comparison between iPhone 3G and iPhone 3GS

Tuesday, May 19, 2009

Classic presentation by Steve Jobs

Steve Jobs introducing iPhone - part1.

Making of Zoozoo Ads

Everyone's favorite ZooZoo ad, its making and people behind it.
Source: Ahmedabad Mirror

Nielson Online Releases January 2009 Search Engine Share Rankings

Google experience 40% year-over-year growth in the number of searches in January 2009, according to Nielsen Online. Live Search experienced 18% year-over-year growth, but gained 2 percentage points over last month. Yahoo! grew a modest 8.7% year-over year, while the overall growth for all search engines was 27.5%.

Source: SearchEngineWatch