Freebase - an open database of world's information

Recently, I watched a one hour long video about Freebasean open database of the world’s information, built by a global community and free for anyone to query, contribute to, and build applications on. Drawing from large open data sets like Wikipedia, MusicBrainz, GNIS, EDGAR etc., Freebase is curated by a passionate community of users and contains structured information on millions of topics such as people, places, music, film, food, science, historical events, and more.


Freebase is designed to store the amorphous kind of data that you find in everyday life. To store data about the prolific Bob Dylan --who composed songs, sang and performed, wrote books, acted in movies-- which relational table should we use? The "song composer" table, or the "singer" table, or the "book author" table, or the "film actor" table? The answer is that we need to store data about that same person in all those different tables. This complexity is not limited to prolific people; a building could start out as a church, be turned into a hospital during a war, and later become a tourist destination. The apple is a fruit, but also an ingredient in numerous recipes, the logo of a company, and a literary device in the story of Snow White.

What's more? Those million topics are very intricately connected. A certain politician might have run a campaign funded by a pharmaceutical company, whose board consists of some people who used to study at some particular Ivy League schools. Topics in different domains (politics, business, education, etc.) are linked together, spanning across virtually any combination of tables. Real life is intricately interconnected, and so is Freebase data.

Freebase is not only a web site that people can use directly with their browsers, but it's also a collection of web services that your own web applications can use to achieve things that wouldn't be possible without additional data or a hosting platform where you can develop and run securely your web applications directly in Freebase's own server infrastructure.

Quick Links:

  1. APIs
  2. Query Editor

Delicious - A Social Bookmarking System

World is amazing because of web which is amazing because of amazing ideas that have been producing amazing applications for free ! One of the amazing applications is Delicious which is a Social Bookmarking service, which means we can save all our bookmarks online, share them with other people, and see what other people are bookmarking. It also means that it can show us the most popular bookmarks being saved right now across many areas of interest. In addition, their search and tagging tools help us keep track of our entire bookmark collection and find tasty new bookmarks from people like us !

It has APIs available to add, edit, delete and to do many more with the bookmarks. Tutorials of using APIs are available here.

Design Patterns

Design patterns are the repeating patterns of solving problems in software. A nice book called "The Design Patterns, Java Companion" [ available here ] by J. W. Cooper explains design patterns in very simple words. He says that when we tell a colleague how we accomplished a tricky bit of programming so he doesn’t have to recreate it from scratch. We simply recognize effective ways for objects to communicate while maintaining their own separate existences.

He has collected some useful definitions of design patterns:
  • “Design patterns are recurring solutions to design problems you see over
  • “Design patterns constitute a set of rules describing how to accomplish certain tasks in the realm of software development.”
  • “Design patterns focus more on reuse of recurring architectural design themes, while frameworks focus on detailed design… and implementation.”.
  • “A pattern addresses a recurring design problem that arises in specific design situations and presents a solution to it”
  • “Patterns identify and specify abstractions that are above the level of single classes and instances, or of components.”
But while it is helpful to draw analogies to architecture, cabinet making and logic, design patterns are not just about the design of objects, but about the communication between objects. In fact, we sometimes think of them as communication patterns. It is the design of simple, but elegant, methods of communication that makes many design patterns so important.

WEKA - Data Mining Software in Java

Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes.

HtmlCleaner - A HTML parser in JAVA

I wanted to parse webpages of a website. At first I looked at the pages' design and guessed that the HTML pages were well-formed. However, DOM parser couldn't parse the pages and informed the pages were not well-formed. More closer look revealed that some of the tags were not closed.

My next step was to search tools that  facilitate parsing of HTML pages using JAVA. I found that  a number of HTML Parsers are available to do so. Among them I chose HtmlCleaner, a tool that can CLEAN HTML web pages and can give us the DOM document. Since the pages contains Nepali characters, I must use UTF-8 encoding. Fortunately, HtmlCleaner has that capacity.

The website of HtmlCleaner doesn't show a complete sample example. However, a user has posted a sample program ( given in this URL ) that really helped me to start HTML parsing.

KompoZer - Dreamweaver like tool

I was looking for an open source tool that works similar to dreamweaver. I found KompoZer. Its official website says :
KompoZer is a complete web authoring system that combines web file management and easy-to-use WYSIWYG web page editing. KompoZer is designed to be extremely easy to use, making it ideal for non-technical computer users who want to create an attractive, professional-looking web site without needing to know HTML or web coding.

Though I haven't used it much, my first encounter with this tool was impressive.

Few facts in J2EE world

  • A Web Server is supposed to support HTTP and/or FTP, SSL HTTPS, etc protocols..Doesnt have to do anything with Java.
  • An Application Server is an extension of WebServer, which basically should support all the technologies in J2EE spec (JavaServlets, JSP, JMS ...)
  • WebLogic, Websphere are commercial (proprietary) JEE Application Servers whereas JBoss and GlassFish are open source JEE Application Server.
  • Catalina is a term used for Tomcat. Unless you're talking about the nitty-gritty details, just call it Tomcat.
  • Tomcat is a Web Server cum Servlet Container which can work as a container for Servlets and JSPs. Being a Servlet Container Tomcat does not provide certain JEE enterprise features like EJB, Messaging etc.

View: Why institutions are corrupt?

Today I read an opinion entitled "Why Nepali institutions are corrupt? ". The article is written by Dr. Ananda Jha where he presents reasons behind the corruption that is going on in our institutions. He has presented very interesting thesis and supporting examples.

Dr. Jha writes, "A person accepting bribes compares the benefits of taking bribes with its costs. If the benefits exceed the costs, he accepts it; if it does not, he rejects it. Regardless of his race, place of residence, education, and his level of income, it is this cost and benefit analysis that determines whether he accepts bribes." In other words, a person tries to analyse the possible negative consequences of taking bribes as well as the benefits. For example, he considers whether there is a chance of doing investigation on it and so on. And benefits of course in terms of the amount of money he is going to receive. Based on this analysis, he determines whether to take bribe or not. To illustrate more, Dr. Jha presents an example: "Try giving 5,000 rupees to the police chief of Kathmandu to hush a murder, and he will throw you out of the room. Try giving him 5 million, and maybe he will think twice before being impolite to you. Try giving 50 rupees to motorcycle license granting operator to bend the rules for you, he will get offended. Try giving him 5,000 rupees, and he might actually bend the rules for you." Moreover, he says that the same rule i.e. cost and benefit analysis applies to the one who is offering bribes. If he has to pay more cost, he doesn't offer else he does.

Dr. Jha tries to focus on the rules in Nepali institutions. I admit that if the laws are strong and they are enforced properly, costs of taking and offering bribes are high. Developed country also have corruption cases though the cost is higher compared to the developing and poor countries because the benefits offered are comparable with the corresponding costs and they are higher compared to that of the developing and poor countries.

In conclusion, I agree with the cost and benefit model of corruption mentioned by Dr. Jha. The rules are equally applicable to any institutions in the world.

Study is important

I was grazing in web and got a page where I found following view:

"Once upon a time, there was a boy who had everything what he desired, lots of good friends and a good paying job. Life was a party for him and he used to enjoy every bit of it. But some people have tendency to screw up things when everything goes fine. So did he, and on one fine day he decided to leave everything and go for further studies."

I feel that these are my sentences though somebody else typed first :) . Of course, money is necessary to make life enjoyable but it is not sufficient to keep the happiness in "the whole" life. I reckon that study is what carries the highest weight for making a person happy for whole of his life because it provides more knowledge. The more knowledge one has, the more powerful he can become! This is a reason that motivates me to go for further studies :).

Yahoo Pipes

Yahoo Pipes is a composition tool to aggregate, manipulate, and mashup content from around the web is in a visual programming environment. I had heard about it and was thinking that it is same as igoogle. Today I tried it to create my own application and found that it is different from iGoogle. I love the concept of Yahoo Pipes :).

Wikipedia API

APIs are available to access Wikipedia's articles' information. Here is a live demo that uses wikipedia to check spelling of word we type.

Quick resources for processing XML with JAVA

  • Here is a chapter of a book from Sun.com that talks about using SAX parser for XML processing in JAVA. 
  • A quick overview of using DOM, SAX, XML in JAVA is also available here