August 31, 2007

New Trends in Programming

Here are a few technologies that are making a Buzz on the web, and every tech-blog is beginning to talk about them. These are just brief introductions to those non-Microsoft technologies that I'm excited about. Now, I am one in the crowd to experiment and tell the world.

GridGain provides computational grid platform for Java that is fun, simple and productive to use. As you would expect, it is open source and professionally supported. It's ideal for performing parallelizable tasks (i.e. Split the work, calculate, and aggregate the results). GridGain now supports integration with Jboss, Spring, AspectJ, Weblogic, Websphere, and many more... You can find good documentation and a quick demo at its homepage.

Erlang is a concurrent functional programming language designed at the Ericsson Computer Science Laboratory. Erlang processes are very lightweight (lighter than threads) and the system can support several thousands of processes.

Unlike most languages that use shared state concurrency, Erlang uses pure message passing concurrency. Thus, making things scalable and fault-tolerant is relatively easy. If this interests you, read the fine analysis of Erlang by Hendy Irawan. Here is an excerpt...

Erlang is built on the ideas of
  • Share nothing : Process cannot share data in any way. Actually, this is not 100% true; there are some small exceptions.
  • Pure message passing : Copy all data you need in the messages, no dangling pointers.
  • Crash detection and recovery : Things will crash, so the best thing to do is let them crash and recover afterwards.

Google Gears is an open source browser extension that enables web applications to provide offline functionality. It provides Javascript hooks that will interface with a few locally running services such as Cache, Database, and asynchronous Thread pool. If you are a user of Google-Reader, you might have noticed the Offline support... This is made possible only with the help of Gears plugin on our browser.

This effort from Google is what lays the foundation, and gives fullness to the concept of Web O.S. As a developer, you’ll be able to make an application with the assurance that it will work offline and online across browsers. Check out the Google Gears API Developer's guide for tutorials. The version 0.2 release of Google Gears will support Cross Origin API, and will be a huge treat for Web application developers.

Java DB is Sun's supported distribution of the open source Apache Derby 100% Java technology database. Amongst the many changes in Java 6(u2), Sun introduces Java DB as a part of its SDK. This is great news for Java lovers who are looking for a light-weight database. I'm thrilled!

Interestingly, we can use it within browser, Web-2.0 applications for easy distribution, one-click install, secure local data storage, and data persistence if the Internet connection is lost or for use off-line. Further, it is easy to migrate an application using Java DB to other open standard databases.

Groovy provides powerful features of a dynamic language, and proves to be a handy tool to Unit test Java applications. It offers a syntax similar to Java, supports Java libraries, and compiles to Java Byte Code. So, calling of methods between the two languages can be interoperable. Groovy can serve as a good alternative to Perl and Ruby.

Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages. It is also fully interoperable with Java. Check out the beginner's guide for getting started.

August 30, 2007

Be Bold and Strong

Here is my one of my all-time favorite anecdotes by Swami Vivekananda.

Turn around and face it! Once at Varanasi, as Swamiji was coming out of the temple of Mother Durga, he was surrounded by a large number of chattering monkeys. They seemed to be threatening him. Swamiji did not want them to catch hold of him, so he started to run away. But the monkeys chased him. An old sannyasin was there, watching those monkeys. He called out to Swamiji, 'Stop! Face the brutes!' Swamiji stopped. He turned round and faced the monkeys. At once, they ran away. Many years later, Swamiji said: 'If you ever feel afraid of anything, always turn round and face it. Never think of running away.'

August 28, 2007

A fortune making machine for some!

Anything that is shown intact can be hacked... And to spice up things, hackers get rewarded big time! George Hotz, a 17yr. old kid unlocked the IPhone from its better-half AT&T and displays the phone on sale. According to the News, he traded the hacked IPhone for "a sweet Nissan 350Z and 3 8GB iPhones". Considering this as a summer project with nearly 500 hours burnt, the reward is good.

IPhone is a fortune making machine for some... Here is another lucky guy Jay Westerdal who earned a million dollars by selling the domain iphone.com to Apple. Apple shares shot up with the launch of IPhone, and is a treat for Apple share holders and believers. AT&T is profiting to a great extent from the deal too... inspite of what many believe that its a bad marriage between Apple and AT&T. It is one of those couples where a pretty chic embraces the ugly dude.

I hope to see several features built into luxury products to integrate seamlessly with IPhone. Just as how IPod is integrated with Nike shoes, Mercedes/BMW cars, and dock stations, IPhone will soon become ubiquitous!

August 27, 2007

Chak De! India

Yesterday, my friend and I saw the film 'ChakDe! India' at a nearby theatre. Its a superb one-of-a-kind movie that Bollywood has ever produced. The film displays the culture of India along the sidelines of team spirit and sport training. I'll let you read the storyline and actor profiles from Wikipedia and others. There are several scenes in the movie that I appreciate.

The virtual concept of 'Unity in Diversity' that India is always proud off is well presented. We often hear people say that this is India's greatest strength, and one of her greatest weaknesses too. Most Indians relate themselves to their state first, and then the country.

The movie actually makes me think that Hockey is more of a sport than Cricket, as it is lively, entertaining and time-bounded. I hope this gives a kickstart for India to embrace Hockey once again, and show an all-round performance in Sports. Let there be options for the youth to choose their sport, and an increased support from schools & colleges. Not to forget the need for more sponsors!

The committee's attitude is well portrayed in the movie, as it discusses the religious, regional and gender conflicts in India. I hope Bollywood will continue to make such good movies in time... Its a very good effort from all the actors on screen and on the field. Coming out of the theatre after the movie, we atleast get a pseudo-feeling of India winning a World-Cup. It does feel great!

August 23, 2007

Walking by the Pond

A few months ago, I quit gym and decided to take a stroll along side a beautiful pond at Cottonwood park in Richardson (TX) for 45 min everyday. The freshness of open-air, the scent of surrounding trees, and the view of birds is immensely refreshing. Sometimes, I'm accompanied by my Ipod, and other times I prefer to experience the solitude.

The liveliness of the ambience vitalizes my daily exercise routine, and makes it pleasurable. I feel fit with alternate rounds of jogging and speed walking, and is a damn good alternative to a boring visit to the gym. Here is the best part... The park is just 7-minutes drive from my house.

Spread out on 25-acres of land, the park has 2 small lakes, a swimming pool, 2 tennis courts, multi-use court facilities and a playground. Families laugh and argue around the grills in the picnic area or hang out in the pavilion. Looks like fun!

In the pond, we can find several colored-ducks, 2 white-duck couples, and a few birds whose names I don't know. The white ducks are so cute that I wanted to pet one of them (like Joey/Chandler in Friends). Of-course, that's ridiculous!

August 20, 2007

Success of lightweight JAVA

The Spring Framework and Hibernate revolutionized the concept of POJOs with the introduction of lightweight technology. Then came EJB 3.0 spec which was inspired from the Spring guys. Meanwhile, Hibernate won the hearts of millions of people for its excellent ORM support. Latest to the party is JBoss Seam 2.0.

Why?
The lightweight frameworks promote better and cleaner application architectures, and make it easier to reuse business components. The rise of lightweight technologies was largely due to developers' rebellion against the heavyweight of EJB 2.1 (and earlier).

The Central Theme?
The core principle shared by all lightweight enterprise Java frameworks is the use of plain old Java objects (POJOs) for the data access and business logic. There are no more infrastructure classes or interfaces to inherit or implement. You just create a POJO to model your data or to implement a business process using the data. Then the POJOs are "wired" together using metadata.

How it works?
A key technique in the wiring of POJOs is a design pattern called Dependency Injection (DI). DI uses the lightweight framework container (Eg. Spring container or an EJB 3.0 container) to inject services or other objects into a POJO. This way, all object instances are created and managed by the container. A POJO need not manage the life cycle of its service objects or to look up services.

The Distinguishing factor?
The major differences between lightweight frameworks are how they wire container services together and implement Dependency Injection.

Ref: Java Developer's Journal

August 17, 2007

Social Networks for Entrepreneurs

Below is a short compiled list of social networks that are popular among techies and tech-entrepreneurs.


Saywit is a social webapp to share our ingenuity, creative thinking, and out-of-box solutions. It aims to bring out our creative intelligence naturally through participation! It has an ALGORITHMS channel that might interest many software programmers & developers.

Vator.tv is a catalyst for innovation. It is a professional network and marketplace for ideas and businesses. Anyone, across all industries, at any stage, can share ideas, products, services and businesses with the rest of the world, mainly through video.

People use Vator.tv to pitch their ideas, businesses, skillsets or needs, such as capital, partner or staffing requirements. Hence, the tagline, "What's your pitch?" Through these pitches, people on Vator.tv can network, exchange knowledge and collaborate with other people who can help those ideas get to the next level.

TechTribe is India’s career network. It’s a place where professionals connect to advance their careers. Developing a career requires professionals to network with people – for Jobs, Advice, Knowledge, and Relationships. techTribe is a platform that enables professionals in India to do that.

The offerings include frontFoot, a referral recruiting service which enables professionals to refer their friends to great jobs at market leading companies; and Answers, an advice forum which enables professionals to seek advice from their peers, and to offer advice as experts.

Cofoundr is a private community for entrepreneurs -- programmers, designers, investors, and other individuals deeply involved with starting new ventures. Members use the site to find co-founders, build teams, and get advice.

BizToo is an online community that lets you meet new business contacts. It's also an online business marketplace and social business networking site where you can ask
and get business advice form global entrepreneurs.

Ecademy is a Social Network for Business People founded in 1998 now with over 150,000 member profiles worldwide. It is unique as business people connect both online on the web site and offline at events and 1-2-1 meetings. Ecademy includes both a free basic membership and a paid premier membership.

Ryze helps people make connections and grow their networks. You can network to grow your business, build your career and life, find a job and make sales. Or just keep in touch with friends.

Members get a free networking-oriented home page and can send messages to other members. They can also join special Networks related to their industry, interests or location. More than 1,000 organizations host Networks on Ryze to help their members interact with each other and grow their organizations.

LinkedIn is a place to find and leverage professional opportunities, now and throughout your career. There are already 13 million professionals in the LinkedIn Network and that number is growing fast. LinkedIn is an irreplaceable resource for building your professional relationships and achieving your goals. Locating connections is as easy as a simple lookup for employees listed under any businesses you worked for.

Doostang is an invite-only professional social network that started in 2005. It is an online career community that connects people through personal relationships and affiliations. The members of this site can share relevant career opportunities and interact with one another.


Other Notable ones for Business Networks include Xing and Spoke. In India, the social networks like Brijj and ApneCircle are getting popular among the professionals. The new comer EyeMany comes up with a slightly different approach by introducing video resumes, but still has a long way to go.

August 16, 2007

Is MD5 the God of Hash?

It is 'Yes' according to Skrentablog. I found some interesting uses of MD5 in the article 'We Worship MD5, the GOD of HASH'. Here is a gist of it.

MD5 takes any length string of input bytes and outputs 128 bits. The bits are consistently random, based on the input string. But if you make even a tiny change to the input string, you'll get a completely different output hash.

MD5 tips & tricks

  • Unique ID generation

    Say you want to create a set of fixed-sized IDs based on chunks of text -- urls, for example. MD5 (url) is 16 bytes, consistently, and you're unlikely to ever have a collision. So, it's safe to use the md5 as an ID for the URL.

  • Checksums

    Don't trust your disk or your OS to properly detect errors for you. They CRC and protocol checksums they use are weak and bad data can get delivered.

    Instead, bring out an industrial strength checksum and protect your own data. MD5 your data before you stuff it onto the disk, check the MD5 when you read it.

        save_to_disk(data,md5(data))
    ...
    (data,md5) = read_from_disk()
    if (md5(data) != md5)
    read_error

  • Password security

    You could store the password in your database, "in the clear". But this should be avoided. If your site is hacked, someone could get a giant list of usernames and passwords.

    So instead, store md5(password) in the database. When a user tries to login, take the password they entered, md5 it, and then check it against what is in the database. The process can then forget the cleartext password they entered.


  • Hash table addressing

    MD5 isn't a weak hash function and you don't need to worry about that stuff. MD5 your key and have your table size be a power of 2. You will never have to worry about Hashtable bucket collisions and similar issues.


  • Random number generation

    The typical library RNG available isn't generally very good. For the same reason that you want your hashes to be randomly distributed, you want your random numbers to actually be random, and not to have some underlying mathematical structure showing through.

    Having random numbers that can't be guessed or predicted can be surprisingly useful. MD5 based sequence numbers were a solution for the TCP sequence number guessing attacks.