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 YourStory.in

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 Samfra.com 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 Samfra.com 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

Monday, April 6, 2009

Singularity

Singularity is a state which witnesses "never seen before" technological progress somewhere after the invent of full-scale Artificial Intelligence.

Some people, like Prof. Robin Hanson, suggest that many singularities have occurred in the history during various technological achievements like agriculture, industrial revolution etc. But I think that all those events originated with some single technology achievement whereas singularity that we are talking about may comprise of dozens of such technology achievements like: robotics, AI itself, staggering power generation, outer space exploration, healthcare etc.

Singularity may or may not happen depending upon the source who invents the AI. If its some government then most likely its going to remain a secret and mainly used for military purposes. If its done by some company then it can commercialize the newly invented technologies thus bringing singularity closer.

Another interesting thing to notice here is that how the AI will be used. Will it be allowed to put its resources on developing powerful technologies or will it be used to provide services, solve mathematical problems, analyze scientific data and so on. Also there will be many powerful entities trying to control the AI and its outcomes.

So, singularity is the state which may or may not happen as the world is just too complex.

Friday, March 27, 2009

Connecting XP (host) and Vista over wifi with ZoneAlarm

I had lots of trouble in connecting xp and vista through ICS but finally made it working. Thought may be useful for others.

Making Vista the host will cause more problems so better to stay with xp as the host. I use firewalls so there was a bit of configuration as well.

Just follow these points and things would get working.

* Host should be XP

* On Host: Go to Broadband connection properties > Advanced. Check Allow Internet Connection Sharing. Enable services like http, https, smtp etc. in Settings button.

* On Host: Go to Wi-Fi properties > Specify IP Address: 192.168.0.1 and subnet mask

* On Guest: Enable Wi-Fi connection with the setting of Obtain IP Automatically. Create a Wireless connection with no authentication (you can choose authentication but I didn't test it).

* On Host: Configure ZoneAlarm (if have):

o Wireless should be in the trusted zone

o In Programs list, make Generic Host Process to ask for permission

o Make Internet zone security to Medium

o Make Trusted zone security to Off

o Allow Generic Host Process’s request and Application Layer Gateway's request

* Keep Wi-Fi enabled in Guest, keep it connected to its wireless network.

Tuesday, March 17, 2009

Hello World

Going to start publishing on Blogger from now onwards. Posts will include technical stuff, search engines, and other topics.