WolframAlpha – Dawn of a new search era

Today will be the launch of WolframAlpha, the new knowledge engine everyone is waiting for. WolframAlpha will truly revolutionize information search in that the information returned will be computed for your particular purpose from a gargantuan knowledge base. It rightly shows the power of intelligent computing. Even though I’m a developer myself and regularly keep myself abreast in the software field, I couldn’t have imagined the amount of advances made in natural language processing, heuristics and knowledge representation.
Read More

Free Geolocation API tool

NOTE: http://www.ip2location.com have done away with the free api access from their site. So the following sample code will no longer work. They now provide a free sample database on their site and also a complete paid version.

iplocationtools.com offers a free geolocation API that lets you query with an ip address and get the location details such as city, country, zip, latitude, longitude etc. The site also offers a free MySQL database for the same if you would like to install it on your server. I’ve used CURL to wrap the API access. The complete function with a sample query and the response is shown below.
Read More

Detecting duplicate code in PHP files

Duplicated code in projects is a frequent thing and also the one ripe for factoring out in a new class or function. Cut/Paste coding is a common development practice among programmers, a lot of which can lead to code size increase and maintenance nightmares. PHPCPD (php copy paste detector) is a PEAR tool that makes it easier to detect duplicate code in php projects. Below is a short tutorial on the PHPCPD package.
Read More

Checking coding standards with PHP_Codesniffer

One of the important factors in developing a successful software product is the application of coding standards. And by successful I mean a product that is easy to develop, modify and maintain. Every developer likes to code in a particular style: in the way he declares variables or function blocks, the number of indentation spaces, commenting style etc. Giving every developer in a team complete freedom to use whatever style he likes will very likely result in a code that is hard to understand, modify and maintain. Even though every coding standard has its good points and bad; the important thing is to try to adhere to a particular one.
Read More