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

Invention & Innovation

Invention is the conversion of cash into ideas. Innovation is the conversion of ideas into cash. This is best described by comparing Thomas Edison with Nikola Tesla. Thomas Edison was as innovator because he made money from his ideas. Nikola Tesla was an inventor. Tesla spent money to create his inventions but was unable to monetize them.

Reference:
1. Wikipedia

Fields in Information Retrieval

Wikipedia defines Information Retrieval (IR) as a science of searching for documents, information within documents and metadata for documents [1]. Web searching is an application of IR.

There are several fields in IR. Some of them are listed as follows:
  • IR Theory and Formal Models
  • Performance, Scalability, Architectures, Efficiency, Platforms
  • Indexing, Query representation, Query reformulation, Structure-based representation, XML
  • Metadata, Social tagging
  • Evaluation methods and metrics, Experimental design, Test collection
  • Interactive IR, User studies, User models, Task-based IR
  • User interfaces and visualization
  • Web IR (e.g. link analysis, query log analysis, ad targeting)
  • Digital libraries
  • Enterprise Search, Intranet, Desktop, Adversarial IR
  • Distributed IR, peer to peer IR, Mobile IR, Fusion/Combination
  • Cross-language retrieval, Multilingual retrieval, Machine translation for IR
  • Multimedia IR
  • Topic detection and tracking, Routing, Content-based filtering, Collaborative filtering, Agents, Spam filtering
  • Question answering, Natural language processing for IR, Summarization, Lexical acquisition
  • Text Data Mining
  • Text Categorization, Clustering
  • Other domain-specific IR (e.g., Genomic IR, legal IR, IR for chemical structures)
  • Blog and online-community search
References:

FUN: Sense of Humor

The head of the firing squad asked the condemned man, "Before we shoot you, would you like a last cigarette?" And the prisoner replied, "No thanks, I'm trying to quit smoking!"

References
  1. Sense of Humor
  2. How important is a sense of humor

Keep your eyes on the destination, not on the road

This is a very crucial adage. It says that we should be very attentive towards our goal. To reach at the destination, there might be many ways some of which may be shorter than others. However, it is not important to look at these roads because the ultimate thing is whether one reached at destination or not. No matter which way he takes, he is not successful unless he gets what he wants.

Fun: I like doctors but I don't like who doctors

Doctor as a noun represents the people who are experts in medicine and treats people when they are ill. However, doctor as a verb means several things. One who doctors changes documents to deceive people. Similarly, doctoring equally mean adding poisonous materials into foods and drinks. So, what do you think , do you always like doctor ?

Info: How dangerious an atomic bomb would be?

Source: Wikipedia

Two major types of atomic bomb were developed by the United States during World War II: a uranium-based device (codenamed "Little Boy") whose fissile material was highly enriched uranium, and a plutonium-based device ("Fat Man") whose plutonium was derived from uranium-238.

The uranium-based Little Boy device became the first nuclear weapon used in war when it was detonated over the Japanese city of Hiroshima on 6 August 1945. Exploding with a yield equivalent to 12,500 tonnes of TNT, the blast and thermal wave of the bomb destroyed nearly 50,000 buildings and killed approximately 75,000 people.

Initially it was believed that uranium was relatively rare, and that nuclear proliferation could be avoided by simply buying up all known uranium stocks, but within a decade large deposits of it were discovered in many places around the world.

View: Free Banana VS Paid Mango

Tell me, what do you do when you have to study or know about something. Most probably you ask your friends unless you don't have Internet facility. Otherwise, the de facto means of getting any information is the web. For example, imagine a person wants to know about Nepal. No doubt, he uses his favourite search engine, such as Google, Yahoo or Bing, and queries the term Nepal. If he doesn't like the articles in the result set provided by the search engine, he tries with other sources. This is what happenes to me. Last year, when I wanted to study 'French Revolution', I asked Google which offered me Wikipedia as the first source. Actually, I didn't like the article in Wikipedia and tried in MSN Encarta. The article in Encarta about French Revolution was awesome.

Recently, I wanted to refreshed the French Revolution. This time I tried 'French Revolution Encarta' in Google because I already knew that the article there was very good. Unfortunately, I was offered an error page with this information: "The MSN Encarta page you are trying to visit has been discontinued...". I was unhappy to know that the good article is no more available other than in Google's cache.

This raised me a few questions : why the article is not accessible ? May be I need to pay now because MSN Encarta is not free unlike Wikipedia. I again went to Wikipedia to know more about MSN Encarta and found that it is DEAD JUST A WEEK AGO. Wikipedia says, "In March 2009, Microsoft announced it was discontinuing the Encarta disc and online versions. The MSN Encarta site in all countries except Japan was closed on October 31, 2009. Japan's Encarta site will close on December 31, 2009".

The point I want to express is not about my way of accessing information. Rather, it is about the way people consume information. On one hand, Wikipedia, which is a outcome of freelancers' contribution, is gaining momentum. On the other hand, MSN Encarta, which is a commercial product of Microsoft, is vanishing. What does this indicate ? This is the crux of this article.

My answer is simple: the former one is the 'Free Banana' and the later one is the 'Paid Mango'. In my view, given Free Bananas and Paid Mangoes, even a person, who is a fan of Mango, takes Banana simply because of the tag: FREE. That is to say, very few people are willing to pay for a service leaving a similar free service behind.

In conclusion, the way people consume information has changed. People choose free services not the paid services which is tantamount to choosing between Free Bananas and Paid Mangoes. No matter how sweet mangoes are, no one wants to buy them when bananas are readily available for free.

Freedom: Fall of Berlin Wall

Guns can do nothing; barriers can do nothing - they just intimidate people for days or may be for few years; they may claim few lives. No weapons are needed to counter-attack junta and dictators. Just need to make people aware of their RIGHTS and FREEDOMS. Look at the "Fall of Berlin Wall" in 9th Nov 1989. Anybody who has visited Berlin must have a bag of words at this moment: November 9, 1989; Berlin Wall; East and West Germany; Brandenburg Gate; Checkpoint Charlie; People's Freedom.

Golden Rule: "Those who have the gold make the rules"

I didn't know the Golden rule until I read an article. This rule is applicable to many circumstances. For example, a landlord can impose rules to the people who live in his house.

Do you have any gold ? If yes, start making rules. Otherwise, follow the rules :).

Idioms: carrot and stick

Carrot and stick (also "carrot or stick") is an idiom that refers to a policy of offering a combination of rewards and punishment to induce behavior

Strategy often used in negotiations where one side offers the other something it wants while threatening negative sanctions if the other side does not comply with its requests. Thus a union could offer wage concessions in exchange for better workrule provisions while threatening to strike if no accommodation can be reached.

Identity Crisis

I read in some newspapers that China will have the largest economy in the world by two decades now. Remember that two decades is not a long period to wait for that achievement. It is the time when a recently born child will be 20 years old ! I'm very happy for China's astonishing achievements.

I'm a citizen of its neighboring country, Nepal. Having richer and successful neighbors not only make us happy but also provide some ways of identification. For example, we can say that Nepal is near to CHINA. Even these days, I NEED to say my friends that Nepal is a small country that is situated in between China and India. Then, they understand the location.

However, I don't want to introduce my country referring to my neighbors. I want our own identity. However, current situation in my country doesn't show a single hope for that. If the ambient continues, I will not have any other options to introduce my country other than referring to the neighbors. I fear that we may get another identity, "the failed state" :(.

Why don't our politicians learn from the past? Why don't they study JUST the neighbors? Why don't they understand that current China is not the Maoist country?...I have thousands of such WHYs in mind. Sometimes, I think I should be a leader because I know something. But I also know that having knowledge and skills don't work to become a successful leader in my country. Take an example, a father recommends (appoints) his daughter a vice-president not because of her skills but to keep his family's influence on the politics. What a stupid leader! What a shameful situation! These are the few facts that actually hinder to get our own identity and, therefore, creating the identity crisis.

Diarrhoea kills more kids than AIDS

I'm amazed knowing an astonishing news, at least to me, that I read in web. It says that although there are efficient and inexpensive ways of treatment to diarrhoea, it kills more children than AIDS, malaria and measles combined.
Only 39 percent of the children get recommended treatment of diarrhoea in developing countries. This is what makes the number so high. It is a very sad news...

Discussion: Where is my Nobel Prize ?

Recently, I read a very good article in Times of India whose title is Where is my Nobel Prize?. The author tries to explain why Indians lack to get such prizes though their population is so high. He has analyzed many possible reasons. However, I liked following paragraph the most:

"Talent is rare, and randomly distributed across the human population, irrespective of pedigree, connections or wealth. Some may call talent an unfair gift. However, it is talent that allows ordinary people to come up in life. Otherwise. rich people would stay rich and poor people poor. Thus, this unfair talent actually makes the world fairer"

Many friends gave their views. Here are the views :

Vijay: I think, it is bit complex.To become successful in life people need talent, hard-work, opportunities, etc.While talent is an asset distributed across the human population, opportunities are more open towards the rich.

Deepak:I think talent isn't unfair gift, because everyone got an unique talent, its just matter of recognizing and mastering it to make some productive outcome, so there are two kind of people winners and losers...hope i made some sense :)

Me:
@Vijayalyan: I totally agree with you. I think, that is the reason why 'talent' people of developing countries, even though they are 'industrious', either don't get 'Novel Prize' (coz of few opportunities) or receive once they moved to developed countries.

@Deepak: I don't think only 'trying to master' makes a person talent. For example, one may fail to become a popular singer though he really wants to become so and practices a lot, a lot & a lot, possibly taking courses from experts. Why, then, he can't get success eventhough he works with several 'famous musicians' etc..???

What I think here is that he doesn't have gifts (vocals) i.e. talents and therefore cannot master and produce productive outcomes :).

Bishnu: TALENT: To Achieve in Life with Enough Number of Tries....

Krishna: absolutely true...

Mandip: nobal le sarai thik kura garyo...............

Me: @Bishnu: khai ta mero singer wala example le timro TALENT ko defn lai support gardaina ni...

Surendra: I also believe in the stochastic distribution of talent, but I think that every people has talent. So, if somebody has not a good voice he may not be a successful singer but he may have good painting skill or ...So, Identification of owns skill is important.

Bishnu: Everything is not universal ni ta....tai pani timro singer ko example ma...talent and success are two different things in life...tara if some one practice then it is nothing that he/she cannot get...kun level ma pauney it depends and also kati time ma pauney also depends....tara it does not mean ki u saga talent nai chaina....How we see the world ...

Me: @Surendra: u think that "everybody has" talent but you also think that it has "stochastic distribution"--seems contradiction hehe. I think u mean to say one cannot predict who can identify his skills and who can't. Thus, the talent is random. If so, I agree :)

Surendra:Different people has different talents. its distribution is random irrespective of cast creed, economical status and geographical location. Every one is equally likely to be a successful man. However, commitment, dedication & passion is essential to identify hidden talents

Me: @Bishnu: My assumption is that a talent guy gets at least a success ... You made me talent in singing coz I can sing better compared to sb hehe... thnx :)

Pass by Value VS Pass by Reference

Anybody who is confused between pass by value and pass by reference in JAVA can go through this article. This is a very good article.

Life - an optimization problem

"Life is a complex optimization problem. We need to think the matching values of its variables, which may not be the best values for themselves, in order for maximizing the life's objective function" - Me.

Java Reflection

Java's Reflection API's makes it possible to inspect classes, interfaces, fields and methods at runtime, without knowing the names of the classes, methods etc. at compile time. It is also possible to instantiate new objects, invoke methods and get/set field values using reflection.

References:
  1. Tutorials at jenkov.com

FRIEND

I don't know who expanded the abbreviated term FRIEND. It was circulated among friends in Facebook on the friendship day. I really liked it. Its interesting:

FRIEND :
F=Few
R=Relations
I=In
E=Earth
N=Never
D=Die

F=R=I=E=N=D

________________##_________##
_______________###*_______*###
___________.*#####_________#####*.
__________*######__________######*
________*#######____________#######*
_______*########.__________.########*
______*#########.__________.#########*
______*######@###*_______*###@######*
_____*#########*###____###*#########*
____*##########*__*####*__*##########*
__*###########_____*_*______###########*
_############_______________############
*##*#########___FRIENDS ____#########*##*
*_____########______________########_____*
_______#######______________#######
________*######____________######*
_________*#####*__________*#####*
___________*####*________*####*
_____________*####______####*
_______________*##*____*##*
_________________*##__# #*

Properties in Java

Properties are configuration values managed as key/value pairs. In each pair, the key and value are both String values. The key identifies, and is used to retrieve, the value, much as a variable name is used to retrieve the variable's value. For example, an application capable of downloading files might use a property named "download.lastDirectory" to keep track of the directory used for the last download.
To manage properties, create instances of java.util.Properties. This class provides methods for the following:
  • loading key/value pairs into a Properties object from a stream,
  • retrieving a value from its key,
  • listing the keys and their values,
  • enumerating over the keys, and
  • saving the properties to a stream.

References:
  1. Properties in JAVA

n-gram

Introduction:
Wikipedia defines  An n-gram as:  a subsequence of n items from a given sequence. The items in question can be phonemes, syllables, letters, words or base pairs according to the application.
An n-gram of size 1 is referred to as a "unigram"; size 2 is a "bigram" (or, less commonly, a "digram"); size 3 is a "trigram"; and size 4 or more is simply called an "n-gram".
Usages
n-grams are used in various areas of statistical natural language processing and genetic sequence analysis.
Examples:
Examples of word level 3-grams and 4-grams (and counts of the number of times they appeared) from the Google n-gram corpus.
  • ceramics collectables collectibles (55)
  • ceramics collectables fine (130)
  • ceramics collected by (52)
  • ceramics collectible pottery (50)
  • ceramics collectibles cooking (45)
4-grams
  • serve as the incoming (92)
  • serve as the incubator (99)
  • serve as the independent (794)
  • serve as the index (223)
  • serve as the indication (72)
  • serve as the indicator (120)
References:
1. Wikipedia: N-Gram

America's Got Talent: Impossible

There are very good links shared among Facebook friends. The links generally refer to short videos, advertisements and articles. This time I really liked one link shared by Kancho. Basically, this video is a dance, know as "America's Got Talent: Impossible". Its amazing. Enjoy !!

Page Rank Algorithm

Google uses Page Rank Algorithm (PRA) to rank web pages so that finding needle in web's haystack can be accomplished. Here is a good tutorial that explains how it finds our pages in the web.



Fun with mathematics II

We can do multiplication by means of visual ways. I have found both video and article that shows how one can compute the multiplication of ANY DIGIT NUMBERS using visual method.

A. Video
I am hundred percent sure that you will enjoy this video. Watch it first and then we discuss the principle behind this approach.


B. Article

Note: I have copied the following paragraphs and a picture from [1]. If you don't understand here, please go to that site.

Example: Multiply 22 by 13.


Note: This figure is taken from [1]

Draw 2 lines slanted upward to the right, and then move downward to the right a short distance and draw another 2 lines upward to the right (see the magenta lines in Figure 1). Then draw 1 line slanted downward to the right, and then move upward to the right a short distance and draw another 3 lines slanted downward to the right (the cyan lines in Figure 1).

Now count up the number of intersection points in each corner of the figure. The number of intersection points at left (green-shaded region) will be the first digit of the answer. Sum the number of intersection points at the top and bottom of the square (in the blue-shaded region); this will be the middle digit of the answer. The number of intersection points at right (in the yellow-shaded region) will be the last digit of the answer.

This will work to multiply any two two-digit numbers, but if any of the green, blue, gold sums have 10 or more points in them, be sure to carry the tens digit to the left, just as you would if you were adding.

C. Understanding the LOGIC
Below, I've described the way we did the multiplication in our school and if you have noticed, the same thing is happening in the visual method as well. Here it goes:

Ex1
   2 2
x 1 3
-------
   6  6
2 2  x
-------------
2 8 6

Ex2:
1 5 6
3 5 8
---------------------------------------
           8    40   48
     5  25    30   x x
 3 15 18    xx    x x
-------------------------
 5   5  8      4     8 [ while adding , carry should be propagated towards left ]

We know that two non parallel lines always meet exactly at a point. Note that when a number of lines (representing one digit number, e.g. five lines for 5 ) crosses  a number of other lines ( which represents another one digit number), then the number of  points formed by the crossings is equal to their product.

I understood the logic by referring back to my ways of doing the calculation. It may not be clear to you by my explanation. Better visit the website and read the article in such a case.

References:

  1. Su, Francis E., et al. "Squaring Quickly." Mudd Math Fun Facts

Fun with mathematics I

I found many interesting methods to solve mathematical problems. In this blog, I'll post some of them.

How to find square of a number quickly ? 
Multiplying two numbers will be easy if one of them is a multiple of 10. There is also a high probability that a person knows the squares of small numbers by heart. If we incorporate these two ideas, we can get a quicker solution to get the square of a number.
Sample problems and Solutions [1] :
It's based on the algebra identity for the difference of squares, but with a twist!
54^2 = 50 * 58 + 4^2 = 2916.
42^2 = 40 * 44 + 2^2 = 1764.
37^2 = 34 * 40 + 3^2 = 1369.
Logic
a2 = (a-b)(a+b) + b2.

How to find square of a TWO DIGIT number that ENDS in 5? 
Here again, I've taken examples from [1]. Its very easy to calculate the square of a given two digit number if it ends in 5.
Remember three things
* Two digit number
* Ends in 5
* Find square
Sample problems and Solutions
45^2 = 2025
85^2 = 7225, etc.
Logic:
If the first digit is N and the second digit is 5, then the last 2 digits of the answer will be 25, and the preceding digits will be N*(N+1).

References:
  1. Su, Francis E., et al. "Squaring Quickly." Mudd Math Fun Facts

Using Multiple Search Engines

I just found a useful website. It is really useful because it saves user's time by presenting the results of a query from two different search engines. In other words, with same input effort, one can get results from two search engines. As an example, if I want to search NEPAL in Google, I would be happy if I can get the results for NEPAL from other search engine e.g. Yahoo, on side-by-side. This would be much interesting if your screen is big enough.





Happy browsing !!

Using TreeTagger

I recently used TreeTagger to get the part-of-speech (POS) of English and French texts. As mentioned in its original website [1], TreeTagger is a language independent tool used for annotating text with part-of-speech and lemma information.

Installation is pretty easy. One just needs to follow the instructions given in the website. After the installation it will tell you something like :

You should add /home/nobal/TreeTagger/cmd and /home/nobal/TreeTagger/bin to the command search path.

And here is how you can add path (in ubuntu) :

sudo gedit /etc/bash.bashrc
at the end of file

PATH=$PATH:~/TreeTagger/bin:~/TreeTagger/cmd
export PATH


Don't forget to restart the terminal to get the effects. To verify, use this command:

echo $PATH

External Links:
[1]. TreeTagger

Lexical Similarity Measure

My last post described the Levenshtein's algorithm for finding the differences between two sequences which does so by means of "edit distance" metric.  Recently, I read an algorithm that utilizes the same metric to calculate the lexical similarity measure between two strings Li and Lj:

SM(Li, Lj ) := max(0 , (min( |Li|, |Lj| ) - ed(Li,Lj) ) / min(|Li|, |Lj|))

where

|Li| and |Lj| are the lengths of  Li and Lj ,
ed(Li, Lj) is the edit distance between Li and Lj

This method can be applied for comparing two set of strings as well. Details can be found in the paper: A. Maedche and S. Staab, "Measuring Similarity between Ontologies", Karlsruhe, Germany.

Levenshtein distance

Levenshtein distance, also known as edit distance, is a metric that measures the amount of differences between two given sequences. Wikipedia says the Levenshtein distance between two strings is given by the minimum number of operations needed to transform one string into the other, where an operation is an insertion, deletion, or substitution of a single character.

Usage: It is often used in applications that need to determine how similar, or different, two strings are, such as spell checkers.

Examples:
The Levenshtein distance between "kitten" and "sitting" is 3, since the following three edits change one into the other, and there is no way to do it with fewer than three edits:
  1. kitten → sitten (substitution of 's' for 'k')
  2. sitten → sittin (substitution of 'i' for 'e')
  3. sittin → sitting (insert 'g' at the end).

Ontology Search Engines

I was looking for an ontology. I found that there exist many ontology search engines. Beauty of these search engines is that they only search ontologies unlike Google, and Yahoo which are general web search engines.
 
Why do we need ontology search engines?
They help to find the suitable ontologies for given user requirements so that reuse of knowledge bases can be made.

Examples
  • SWOOGLE: An ontology search engine.
  • SCARLET: Discovering relations between two concepts.
  • WATSON: Search Ontology and Semantically Related Documents

Bloggers are the sensors

I prefer to say: "BLOGGERS ARE THE SENSORS". Sensors are triggered as soon as they sense the changes in the environment; bloggers are triggered as soon as they sense popular news or stories in the society. Similarly, sensors help humankind by providing their services. A number of BLOGGERS can easily direct the society by providing their views. Think from another angle, what if sensors of a machine don't work ? Answer is simple: the machine may not work properly. Similarly, if bloggers don't blog and don't raise social issues and views, society may not be directed the way it should be.

Definition: Feed distillation task

The task of identifying the most relevant feed for a given topic or query term is  known as the “feed distillation task”.

My Technical Blog gets momentum

I decided to accelerate my technical blog too. I'd started it since my MS thesis's proposal defense. However, I couldn't manage my time to update this blog for  a certain period. Now again its time to express technical stuffs to the blogosphere's visitors. Therefore, I've commenced posting technical stuffs...

How is blogosphere growing ?

According to some estimates, “the size of the Blogosphere continues to double every six months” and there are over seventy million blogs (with many that are actively posting). However, some studies indicate that of all these blogs and feeds, the ones that really matter are relatively few.

A nice saying of Mahatma Gandhi

Last week I read an article which had quoted a saying of Mahatma Gandhi, a famous Indian politician. The apothegm was: "You may never know what results come of your action, but if you do nothing, there will be no result".

The adage is so simple but carries much meaning. It is true that we may or may not know the outcomes of our actions. As an example, we won't know what benefits we get if we invest to a firm unless we really achieve them. If we don't invest to it, what do we expect? Of course no benefit! The results provide feedbacks of our actions and thus progress can be made. In our example, based on the results of the investement i.e. revenues, we can think of investing to similar firms. This saying, therefore, encourages people not to fear with taking risks. The more you fear the lesser you accelerate !

Retrospect: Flash back to 11 August, 2006

I’m not going to talk about 9/11 because it was not 9/11. Rather it was 8/11 i.e. August 11, 2006. May be you guys have forgotten this date. If so, let us retrospect to the date. Now you already loaded the date in your memory, didn’t you? You are right - it was the day when we’d taken a flight to Thailand in order to join our master’s program at AIT. I can guess the flight was the first international flight to most of us.

It was exactly three years ago when we’d taken the flight of RNAC (now NAC), government owned national flag-carrier of Nepal, from Tribhuvan International Airport (TIA), Kathmandu to Don Muang International Airport (DMK), Bangkok. DMK was shortly closed (Sept 28, 2006) for international flights as Suvarnabhumi Airport was kicked off. Consequently, our batch became the last AIT batch from Nepal who took the flight to DMK from TIA.

We six people had taken the group ticket. To the rest, we didn’t know. We commenced introducing each other from TIA. Later we found there so many friends who were going to AIT. Here is a list:
  • Bharat Shrestha, Sailesh Bharati, Bishnu Acharya, Pratik Shrestha, Binod Chaudhari, & I
  • Sangita Sharma, Abha Baidhya, Mukta Sapkota, Lalita Thakali (?)
  • Prabal Khanal, Agni Nepal, Prakash Gupta
If we look at the statistics, the flight was carrying more than 30 % of the total students from Nepal who registered for AIT’s master program in August 2006. That was what made the flight very exciting.

Few interesting events were emerged during the flight. For example, as it was his first flight (national or international), “Kale” was quite nervous when there was turbulence in the flight :). He was babbling: ... oh God ... ... :D. I won't go further to this event as anybody can easily guess ... :). To me, the international flight was quite relaxing because there was less turbulence compared to the domestic flights.

People used to say that any first or last event is unforgettable. Our first international flight also aligns to the saying. Since then the time has made us juniors, then seniors and now alumni. In each of these stages we have got a lot of friends (national and international), experiences (both good and bad), and more importantly the thinking power (to any topic). In addition, some people knew how to cook ;) during their AIT life. Finally, no matter wherever and in what situation we are living now, the day definitely provided us a window from where we started watching the world. Hope casting an eye over this note made you remind the especial day once again. Missing all your companies and love !

***

In this occasion, I would like to dedicate a song, the song that we played in the AIT's welcome show, to all the 2006 August batch friends who took the same flight. Please check it:




Nothing we know is truly independent of context

Recently, I read a sentance written by Laren, Ellen J. Langer, psychology professor at Harvard University in an article available at [1]. The sentence is: "Nothing we know is truly independent of context". The more I went through it, the more interesting it became. As a result, I decided to share it through my blog. I hope you will enjoy reading this blog post.

What we learned in our school mathematics is that 1 plus 1 make 2. I stored this statement in my mind as an axiom. But once I read the article, I don't keep this statement as an axiom without a context. In orther words, I don't believe that one plus one make two in all of the cases. As an example, 1 plus 1 make two in base-10 systems. However, if the base is other than 10, then the statement is not true. For example, 1 plus 1 in base-16 make 32 in base-10 system.

There is another example that helps to understand the sentence more easily. One cup plus one cup doesn't always equal two cups. For example, mixing one cup of vinegar with a cup of baking soda solution creates a mixture of less than two cups as some of the molecules combine and form gas and release to air.

From these examples, we can clearly say that a fact is always associated with contexts. Without it, the fact wouldn't be correct. We have seen that one plus one equal two is true for some contexts and false for some other contexts. Thus, there is no such a wrong answer irrespective of context. Hence Laren's sentence "Nothing we know is truely independent of context" is perfectly reasonable.

References:
[1] When 1 and 1 Are Not 2, Harvard University. Last accessed on July 26,2009 in
http://www.news.harvard.edu/gazette/1997/01.16/When1and1AreNot.html.

Mr. Jackson in Berlin

As it was my last day in Berlin (June 26, 2009), the capital of modern Germany, and many places were still remained to discover, I'd decided to wake up early in the morning. Accordingly, I woke up at 6:45 am and when it was around 7:35 am I went to ground floor for my breakfast. The place was at a hostel named St. Christhopher's Inns, ROSA - LUXEMBERG PLAZA, BERLIN which is at the heart of the city, near to the Berlin TV Tower.

I was alone in the German trip. Moreover, it was early in the morning. So, there were very few people who were taking breakfast together with me. I was spending the melancholy minutes. Fortunately, a guy, carrying his breakfast, took a seat next to my seat and started talking with me. I was quite happy because he had started chatting in English (In most of the European countries, you will be lucky enough if you meet a person who starts speaking in English). He was from UK. Since I used to follow international news, I was feeling very comfortable while talking with him. Being a student of history, he was also quite confident in the international news, views and subjects.

Our topics for discussion were mostly political : UK, Gordon Brown (his ministers had resigned due to shameful financial scandals), Gurkhas and their protest for the equal rights, Afghan war and so on. In the meantime, he asked me, "Have you heard a breaking news?". "No", I replied. He opened his iPhone, browsed the web and showed me the news. It was written "Michael Jackson is dead... The reason is still unknown". This is how I knew Mr. Michael Jackson's death.

Moreover, he told that he is not a fan of Mr. Jackson. But he started counting Mr. Jackson's famous albums. Like the British guy, I am not his fan. Unlike the guy, I don't know his albums :(. However, I do know that Mr. Jackson is a great singer because I had heard from friends and watched news videos from his latest UK trip (few months ago) in which he was promising to his fans that he would be back soon for his forthcoming concert.

In order to make my first Berlin trip memorable, I started my laptop, wrote a short blog and posted in my blog site mentioning that my first Berlin trip was on a day when Jackson was dead. I also took few pictures of a TV which was broadcasting the breaking news.

Truly speaking, I had remembered Mr. Jackson just a day ago. During the previous day's museum visit, I had met an American women accompanied with her husband. The couple were very friendly. The women is a teacher of Santa Barbara City College and her husband is a software engineer. May be because of his hair style, I felt her husband somehow as Mr. Jackson. At this moment, if I compare the guy with Mr. Jackson, I can find very few similarities ... nationality at least :D. Anyway, it was an event that was triggered in my mind on that day. If I go to Santa Barbara and the address in their visiting card remains valid, I'll definitely visit them and more importantly I'll point out the 'living Mr. Jackson' ;).

What is true is that world has lost a great artist at such a young age (age of 50). My heartfelt condolences to his family and fans !!

Pic: With the American couple at a museum in Berlin. I'd remembered Mr. Jackson when I met the guy (left to me). Remember that Mr. Jackson was dead on 25th June, 2009, the same day I met the couple, perhaps the same time ...!!


Pic: A TV in Berlin broadcasting the breaking news. My heartfelt condolences to his family and fans !!

Pic: Dans la tele a Berlin. Une artiste exceptionnel nous a quitté! Trop tôt, beaucoup trop tôt. Mes plus sincères condoléances pour sa famille et ses fans !!

FRENCH: Un vrai test de français

C’est ma deuxieme article en francaise. En cette article, je vais presenter ma experience de vrai test de français.

Deux semaines avant, j’ai visité allemend pour une presentation conference. La presentation été en Leipzig, une petit ville au sud de la capitale, Berlin. Et pour aller de Paris à Leipzig, il y a deux possibilités. La premire possibilité est prendre le train directment de paris à Leipzig. D’outre possibilité est prendre l’avion jusqu'à Berlin et après le train à Leipzig. J’ai choisi la deuxiemé option parce que cette option été moin cher.

Un aéroport en paris s’appelle Orly. Pour prendre l'avion, je dois arriver à Orly avant 6h30. Le aéroport n’est pas loin, presque 40-45 minutes. J’ai parti pour le aéroport à 5h10. J’ai prendre le RER (train) et arrivé Juvisy où je peux prendre bus pour l’aéroport. Il était 5h50 quand j'été à Juvisy.

Quand j’ai arrivé á bus station de Juvisy, il y a n’ai pas de bus. La station était blocké!! oh la la! … oh la la!! … oh la la!!! … J’ai derniere demi-heure pour arrivé l’aéroport ... :(.

Le problème c’est que, il était en matin et il y a très peu de personne. Mêmê si il y a un person, il ne parler pas l’anglais …. Donc, il était une vraie examem de francais où je dois recontre quelque personne et poser question pourquoi il y a n’est pas de bus !!

Aprés cinq-sept minutes, j’ai recontré une personne et posé la question. Elle dit moi que la station a changé la semaine derniere. Pour prendre le bus je dois marche 500 meters plus. Finallement, j’ai prendre le bus et je suis arrivé aéroport à 6h35 !!

Je dois donne “merci beaucoup” pour la femme qui aide moi en situation trôp dificile. Merci pour moi aussi parce que j’ai passé un vrai test de francais :) :).

À bientôt !!

FRENCH: Je suis en la vraie France

C'est ma premire article en français. Je sais il a beaucoup de erreurs mais pas de problem, je essayer pour ecrire en français de toute façon :). Après quelques articles je peux réduire les erreurs.

La semaine dernier j'ai changé ma appartment. Avant, mon appartment était plus loin de mon bureau. La nouvelle apartment est pas loin. Je peux a piéd meme si il ya une grave, manifastation etc. en train ou bus. La autre difference: j'ai habité en mémé batiment avec mon ami l'étranger. Cependant, maintenant je connaise moin personne que habite a coté de mon appartment. La troisième difference : je dois parler française parce que peuple ne parler pas l'anglais ici.

Donc, Je sens que je suis en la vraie France maintenant. Aussi, je connaître pourquoi je ne parler pas bien français. La réponse est simple, avant je n'ai pas habité en vraie france :).

Merci beaucoup pour lire ma premire article en francaise. à bientôt!

When will this recession ends?

Everybody in the world is affected by recession. All of them are eagerly waiting for its end date. Although it is hard to say when it is going to be end, history can assist to think about it. In this article, I will paraphrase the major recessions and their life period.

According to the Bishambher Pyakurel, there are many recessions since last 70 years [1]. The major recessions and corresponding durations are listed here:

  1. Recession during 1930 - 1932 : Duration= 43 months
  2. Recession during 1980-1981 : Duration= 16 months
  3. Recession during 1990-1991: Duration = mild
  4. Recession during 2001 : Duration = mild
  5. Recession during 2007: Started in December , End = Unknown

Furthermore, [1] states that there are 10 recessions since World War II and the average duration is 10.4 months. The current recession is already 17 months old, greater than the average duration, but the end date is not certain yet. It is predicted that the recession will end by the end of 2010. Lets hope it will end very soon.

References:

[1] My Republica

OPINION: "Life is a computer Program"

Despite some differences, a Life and a Computer Program have many similarities. In this article, I will analyze the similarities between them. First I define some of the terms as:

Computer Program: "A computer program is a collection of instructions"

Life :"A human life is a collection of instructions"

Programmer: One who writes programs

Environment: The way a program is written . A computer program is written in another computer program such as IDE.

States: A possible situation of a program such as on lab, running, paused, killed, died etc.



Terms
Computer Program
Human Life
Programmer
Computer Programmer(s)
The God (s)
Environment
Programming languages. Computer Program is written in editors, the computer programs. Not all editors can be used to write programs.
Human life is written using parents, the human lives . Not all parents are used to write human lives.



Execution
executes inside computers
executes in planets



Communication
communicate each other using protocols. Mismatch in protocols means no communication.
communicate each others using languages. Mismatch in languages means no communication.



Dimension
the dimension (height, width etc) depends on the the purpose and devices (computer, mobile phones, pda etc)
depends on the state to states.



States
in lab, written, running, killed, stopped
in belly, born, running, killed (by accidents, wars etc), died



Repairing
debugmedicate



Exception
handled by Exception handlers. Not all programs have such facilities like programs in C vs programs Java.
handled by Insurances. Not all people have such facilities.



War
A program can kill other programs with or without any reasons.
A human can kill other humans with or without any reasons.



Dependent
A program may depend on other programs like packages, APIs
A human may depends on other humans e.g. espouse, parents etc



Hierarchy
have hierarchies. Operating Systems are the big bosses.
have hierarchies. State heads, company executives are the big bosses..



Migration
Can be written in a lab and be sent to other places for execution.
May born in a place and live in another place


NOTE: If you have other similarities in your mind, let us share...

Can problems be solved by laws and legal systems ?

Many people think that laws and legal systems are the only thing that a nation should have in order to keep things in control. In South Asia, we frequently talk about laws. For example, we talk about the laws for women empowerment, child labor, terrorism, dowry etc. However, I personally don't believe only on the legal systems. What I think is that the laws and orders make sense when it applies to the region where basic needs are already fulfilled.

There is a saying - 'Hungry man is the angry man'. I absolutely agree with this statement. How can a law work if people are not certain for their daily foods, sufficient clean drinking water and shelters? We have made laws to prevent selling women for money. Is that working? Of course not! Hundreds of Nepalese ladies are being sold today to Bombay.

Moreover, we have made laws to prevent child labor. All we know that it is illegal to keep a child as a labor. But we forget when we return to our home. We are using them to clean dishes, wash clothes etc. No matter how educated the person we are, we usually forget such rules rules in our daily life.

The same pattern applies in case of terrorism. If a person is not getting items to eat, he could be easily influenced by terrorist groups as they offer a handsome amount of money to him or his family. As a result, he is motivated to carry out dangerous attacks. This is a ground reality we are seeing each day in our region, South Asia.

I believe no counties support dowry and all of them have made some forms of laws to prevent it. But we have witnessed its effect very frequently. In other words, people are not able to get married just because they haven't sufficient money to pay for the boy. After marriage also, many women are forced to do suicide just because their parents can't pay the money committed before their marriage.

These are just few examples. We have a bundle of such laws we are not working at all. The main reason is the lack of basic needs. If a person is not hungry, then only he/she starts thinking what a law is. The important question is not about whether laws are needed or not. The question is - How can we fulfill the basic needs of people so that the laws could be enforced ? People will be educated only when their basic needs are fulfilled and then think about their rights, the laws and legislative systems.

Definitions of few words in linguistics

Today I am presenting the definitions for few words which are commonly used in linguistic. They are Synonymy, Antonymy, Hypernymy, Hyponymy & Meronymy, and Corpus. Note that I have used Wikipedia for the definitions.
  1. Synonymy: Synonyms are the different words but refers to the same or similar meaning. State of being synonyms is called Synonymy and words which are synonyms are called synonymous. Example: Buy and Purchage (verbs), pretty and attractive (adjectives) etc.
  2. Antonymy: Antonyms are the words which have opposite meanings or refers to the opposite pair. e.g. Male and Female, Long and Short.
  3. Hyponymy & Hypernymy : According to the wikipedia [1], hyponym is a word or a phrase whose semantic range is included within that of another word. In other words, hyponyms are a set of related words whose meaning are specific instances of a more general word. Hyponym is also known as IS-A relations between concepts. On the other hand, hypernyms are the words which represents a broad meaning. To make the definitions clear, consider words car, automobiles, bus, plane and vehicle. Here vehicle refers all forms of transportation i.e. car, automobile, bus and plane. Thus, vehicle is hypernym of each of these words. Conversely each of those words are the hyponyms of the word vehicle.
  4. Meronymy and Holonomy: Meronymy (Part-Of relationship between concepts ) is opposite of Holonomy. Holonomy defines the relationship between a term denoting the whole and a term denoting a part of , or a member of, the whole. Putting differently, X' is a holonym of 'Y' if Ys are parts of Xs, or
    'X' is a holonym of 'Y' if Ys are members of Xs. Examples: 'tree' is a holonym of 'bark', of 'trunk' and of 'limb' | 'finger' is a meronym of 'hand' because a finger is part of a hand | 'wheel' is a meronym of 'automobile'.
  5. Corpus: A corpus is a large and structured set of texts which are used to do statistical analysis, hypothesis testing etc.
  6. Polysemy: A polyseme is a word or phrase with multiple, related meanings. For instance, the word wood can refer either 1. a piece of a tree or 2. a geographical area with many trees.
References:
[1] Wikipedia

Amsterday - 5th Busiest tourist destination in Europe

Source: http://oainfo.olympicairlines.com/destinations_ams_en.html

As I recently visited Amsterdam, I wanted to post an article about it (source mentioned above) so that I can quickly review the history of Amsterdam in future.

--------------------------------------------------------------------------------

History

The first known record of Amsterdam is 27 October 1275, when the inhabitants of a late 12th century fishing village who had built a bridge with a dam across the Amstel were granted freedom by count Floris V from paying a bridge toll . The certificate's wording (homines manentes apud Amestelledamme - people living near Amestelledamme) gives the first known use of the name Amsterdam, which by 1327 had developed into Aemsterdam. A local tradition has the city being founded by two Frisian fishermen, who landed on the shores of the Amstel in a small boat with their dog. In any case, Amsterdam's origin is relatively recent in comparison with other Dutch cities such as Nijmegen, Rotterdam and Utrecht.

In 1538 Amsterdam was given city rights in 1300 or 1301. From the 14th century on, Amsterdam flourished, largely on the basis of trade with the cities of the Hanseatic League. In 1345 a Eucharistic miracle occurred near the Kalverstraat and Amsterdam would remain an important pilgrimage city until the Alteration to the protestant faith; today the Stille Omgang - a silent procession in civil dress - remains of the rich pilgrimage history.

In the 16th century, the Dutch rebelled against Philip II of Spain and his successors. Both for his imposition of new taxes, the tenth penny, and his religious persecution of Protestantism with the Spanish Inquisition. The revolt escalated into the Eighty Years' War which ultimately led to Dutch independence. Strongly pushed by Dutch Revolt leader William the Silent, the Dutch Republic became known for its relative religious tolerance. Jews from Spain and Portugal, prosperous merchants and printers from Antwerp, Ghent and Bruges (economic and religious refugees from the part of the Low Countries still controlled by Spain), and Huguenots from France (persecuted for their religion) sought safety in Amsterdam. The influx of Flemish printers and the city's intellectual tolerance made Amsterdam a hotbed of the European free press.

The 17th century is considered Amsterdam's "Golden Age". In the early 17th century, Amsterdam became one of the wealthiest cities in the world. Ships sailed from Amsterdam to the Baltic Sea, North America, Africa and present-day Indonesia, India, Sri Lanka and Brazil, and formed the basis of a worldwide trading network. Amsterdam's merchants had the biggest share in the VOC and WIC. These companies acquired the overseas possessions which formed the seeds of the later Dutch colonies. Amsterdam was the most important point for the trans-shipment of goods in Europe, and it was the leading financial centre of the world. Amsterdam's stock exchange was the first to trade continuously.

The 18th and early 19th centuries saw a decline in Amsterdam's prosperity. The wars of the Dutch Republic with England and France took their toll on Amsterdam. During the Napoleonic Wars, Amsterdam's fortunes reached their lowest point. However, with the establishment of the Kingdom of the Netherlands in 1815, things slowly began to improve. In Amsterdam new developments were started by people like city planner Samuel Sarphati, who found their inspiration in Paris.

The end of the 19th century is sometimes called Amsterdam's second Golden Age. New museums, a train station, and the Concertgebouw were built. At this time the Industrial Revolution reached Amsterdam. The Amsterdam-Rhine Canal was dug to give Amsterdam a direct connection to the Rhine, and the North Sea Canal to give the port a shorter connection to the North Sea. Both projects improved communication with the rest of Europe and the world dramatically. Joseph Conrad gives a brief description of Amsterdam, seen from the sea at this period, in The Mirror of the Sea (1906).


Geography

Amsterdam fans out south from Amsterdam Centraal railway station. The main street is Damrak which leads into Rokin. The area to the east of Damrak is the oldest area and is known as de Wallen ("the walls") after the medieval walls of the city - this area contains the city's red light area. To the south of de Wallen is the old Jewish quarter of Waterlooplein. The 17th century girdle of concentric canals, known as the "grachtengordel", embraces the heart of the city. Beyond the grachtengordel are the formerly working class areas of Jordaan and de Pijp, Museumplein, containing the city's major museums, and Vondelpark, the 19th century park named after the Dutch writer Joost van den Vondel.

Several parts of the city and of the urban area are polders, recognisable by their postfix -meer meaning 'lake', such as Aalsmeer, Bijlmermeer, Haarlemmermeer, and Watergraafsmeer.


The canals

A woodcut (1885) of the Nieuwezijds Voorburgwal, a canal that is now a filled up
A typical view of Amsterdam canal, Feb 2008Much of the Amsterdam canal system is the successful outcome of city planning. In the early part of the 17th century, with immigration at a height, a comprehensive plan was put together, calling for four main, concentric half-circles of canals with their ends resting on de IJ bay. Known as the "grachtengordel", three of the canals are mostly for residential development (Herengracht or ‘’Gentleman's Canal’’; Keizersgracht or ‘’Emperor's Canal’’; and Prinsengracht or ‘’Prince's Canal’’), and a fourth, outer canal, the present Nassau/Stadhouderskade, for purposes of defense and water management. The plan also envisaged interconnecting canals along radii; a set of parallel canals in the Jordaan quarter (primarily for the transportation of goods, for example, beer); the conversion of an existing, inner perimeter canal (Singel) from a defensive purpose to residential and commercial development; and more than one hundred bridges. The defensive purpose of the Nassau/Stadhouderskade was served by moat and earthen dikes, with gates at transit points but otherwise no masonry superstructures.

Construction proceeded from west to east, across the breadth of the lay-out, like a gigantic windshield wiper as the historian Geert Mak calls it – not from the center outwards as a popular myth has it. Construction of the north-western sector was started in 1613. After 1656, with the canals in the southern sector also already finished for some time, building in that sector too was started, although slowly. The eastern part of the concentric canal plan, covering the area between the Amstel river and the IJ bay, was never implemented. In the following centuries, the land went mostly for parks, old age homes, theaters and other public facilities – and for waterways without much plan.

Over the years, several canals have been filled up and are now streets or squares, such as Nieuwezijds Voorburgwal and Spui.


Climate

Amsterdam enjoys a moderate temperate climate, with the weather patterns being strongly influenced by Amsterdam's proximity to the North Sea to the west and its prevailing north-western winds and gales. Winter temperatures are mild: on average above freezing, although frosts are not uncommon during spells of easterly or northeasterly winds blowing in from the inner European continent, i. e. from Scandinavia, Russia and even Siberia. Summers are warm but rarely hot. Days with measurable precipitation are common, but still Amsterdam averages less than 760 mm of precipitation annually. Most of it falls as protracted drizzle or light rain. But the occasional Western storm may bring a lot of water at once, and all of it has to be pumped out to higher ground and to the seas around the city. These bodies of water make cloudy and damp days common, particularly in cooler months, October through March.


Economy

New development on the south bank of the IJAmsterdam is the financial and business capital of the Netherlands and one of the most important cities in Europe in which to do business. Many large Dutch corporations and banks have their headquarters in Amsterdam, including ABN Amro, Akzo Nobel, Heineken International, ING Group, Ahold, TomTom, Delta Lloyd Group and Philips. KPMG International's global headquarters is located in nearby Amstelveen, as is the European headquarters of Cisco Systems.

Though many subsidiaries are located along the old canals, companies are increasingly relocating outside the city centre. The South Axis (Dutch: Zuidas) is increasingly a financial and legal center, and is intended to become the new business-face of the Netherlands.The five largest legal companies of the Netherlands have settled down in the South Axis, and also the Dutch subsidiaries of large consulting firms like Boston Consulting Group, McKinsey & Co and Accenture. In this financial quarter the recently expanded World trade centre also has its location.

The Amsterdam Stock Exchange (AEX), nowadays part of Euronext, is the world's oldest stock exchange and still one of the most important in Europe.


Tourism

Amsterdam is the 5th busiest tourist destination in Europe with more than 4.2 million international visitors. The room occupation rate is the 2nd highest in Europe in 2007. Tourists can choose from 350 Hotels, 17 of which are fivestar hotels. 18,000 rooms and almost 45,000 beds are provided.


Retail

Amsterdam shops range from large department stores such as Metz & Co, founded in 1740, Maison de Bonneterie a Parisian style store founded in 1889, and De Bijenkorf founded in 1870, to small specialty shops. The most luxurious shopping street is P.C. Hooftstraat, the busiest high street is Kalverstraat.


Demography

In the 16th and 17th century non-Dutch immigrants to Amsterdam were mostly Huguenots, Flemings, Sephardi Jews and Westphalians. Hugenots came after 1685's Edict of Fontainebleau, while the Flemish Protestants came during the Eighty Years' War. The Westphalians came to Amsterdam mostly for economic reasons – their influx continued through the 18th and 19th centuries.

The first mass immigrants in the 20th century were people from Indonesia, who came to Amsterdam after the independence of the Dutch East Indies in the 1940s and 1950s. In the 1960s guest workers from Turkey, Morocco, Italy and Spain migrated to Amsterdam. After the independence of Suriname in 1975 a large wave of Surinamese settled in Amsterdam, mostly in the Bijlmer area. Other immigrants, among which asylants and illegals, come from Europe, America, Asia and Africa. In the seventies and eighties many 'old' Amsterdammers moved to 'new' cities like Almere and Purmerend, prompted by the third planological bill of the Dutch government. This bill promoted suburbanization and arranged for new developments in so called "groeikernen", lit. "cores of growth". Young professionals and artists moved into neighbourhoods the Pijp and the Jordaan abandoned by these Amsterdammers. The non-Western immigrants settled mostly in the social housing projects in Amsterdam-West and the Bijlmer.


Culture

Rijksmuseum AmsterdamDuring the later part of the 16th century Amsterdams Rederijkerskamer (Chamber of Rhetoric) organized contests between different Chambers in the reading of poetry and drama. In 1638 Amsterdam got its first theatre. Ballet performances were given in this theatre as early as 1642. In the 18th century French theatre became popular. Opera could be seen in Amsterdam from 1677, first only Italian and French operas, but in the 18th century German operas. In the 19th century popular culture was centered around the Nes area in Amsterdam (mainly vaudeville and music-hall). The metronome, one of the most important advances in European classical music was invented here in 1812 by Dietrich Nikolaus Winkel. At the end of this century the Rijksmuseum and Gemeentelijk Museum were built. In 1888 the Concertgebouworkest was established. With the 20th century came cinema, radio and television. Though the studios are in Hilversum and Aalsmeer, Amsterdam's influence on programming is very strong.


Art

The artist most associated with Amsterdam is Rembrandt, whose work, and the work of his pupils, is displayed in the Rijksmuseum. Van Gogh lived in Amsterdam for a short while, so there is a museum dedicated to his early work.

Amsterdam has a world-class symphony orchestra, the Royal Concertgebouw Orchestra, the home base of which is the Concertgebouw.


Fashion

Amsterdam has developed itself into a European fashion capital. Big fashion brands like G-star,Gsus,BlueBlood,10 feet and Warmenhoven & Venderbos and fashion designers like Mart Visser Viktor & Rolf, Marlies Dekkers and Frans Molenaar are headquartered in Amsterdam. Also model agencies like Elite Models, Touche models and Tony Jones have opened departments in Amsterdam. Supermodels like Yfke Sturm, Doutzen Kroes and Kim Noorda started their career in Amsterdam. Amsterdam is also known for its World Fashion Centre.


Tourist attractions

Nearly a million people a year visit the Anne Frank House on the Prinsengracht.Visitors are attracted to Amsterdam for its reputation as a liberal city; its relaxed charm emphasised by elegant, narrow fronted merchant's houses and enchanting canals; and the reputation of its museums.

The major museums are the Rijksmuseum, the Stedelijk Museum, the Rembrandt House Museum, and the Van Gogh Museum, which houses the largest collection of Van Gogh's paintings and drawings in the world. The Anne Frank House, a museum dedicated to the story of Anne Frank, is also a popular tourist attraction.

The liberal nature of Amsterdam is not only physically embodied in the layout of the city, such as the de Wallen area which contains the red-light district and many cannabis-selling coffeeshops, but it is also embodied in the well-rounded, prevailing attitudes of its residents, government and businesses. Amsterdam's red-light district is located in the centre of the city and is clearly marked on maps. Window prostitution in the Netherlands is legal at specific places. Cannabis selling, however, is not - but it is tolerated when small quantities of cannabis (up to 5 grams) are involved.Previously in Amsterdam a handful of smart shops sold psilocybin mushrooms and drug paraphernalia. However psilocybin mushrooms have recently been made illegal. Though illegal to consume in public, these mushrooms are still sold by several smart shops.


Sports

Amsterdam is the hometown of Eredivisie football club Ajax. Its home base is the modern stadium Amsterdam ArenA, located in the south-east of the city.

In 1928, Amsterdam hosted the Games of the IXth Olympiad. The Olympic Stadium built for the occasion has been completely restored and is now used for cultural and sporting events, such as the Amsterdam Marathon.

Amsterdam also is home to a famous ice rink, the Jaap Eden baan. The Amstel Tijgers play in this arena in the Dutch ice hockey premier league. In speed skating many international championships have been fought in the 400-metre (1,310 ft) lane of this ice rink.

The city also has a baseball team, the Amsterdam Pirates, who play in the Dutch Major League. There are three field hockey teams, Amsterdam, Pinoke and Hurley, who play their matches around the Wagener Stadium. These teams are often referred to as playing in Amsterdam; however, all of them (even Amsterdam) play their matches in the neighbouring city of Amstelveen. There is also a basketball team, the Amsterdam Astronauts, who compete in the Dutch premier division and play their games in the Sporthallen Zuid, near the Olympic Stadium.

Since 1999 the city of Amsterdam has honoured its best sportsmen and -women at the Amsterdam Sports Awards. Boxer Raymond Joval and field hockey midfielder Carole Thate were the first to receive the awards in 1999.


Transportation

An Amsterdam bikeAmsterdam is one of the most bicycle-friendly cities in the world and is a centre of bicycle culture with good provision for cyclists such as bike paths and bike racks, which are ubiquitous throughout the city. There are an estimated one million bicycles in the city. However, bike theft is common, so cyclists use large secure locks.

In the city centre, driving a car is discouraged. Parking fees are steep and a great number of streets are closed to cars or are one-way.The local government sponsors carsharing and carpooling initiatives such as Autodelen and Meerijden.nu.

Public transport in Amsterdam mainly consists of bus and tram lines, operated by Gemeentelijk Vervoerbedrijf, Connexxion and Arriva; however, there are four metro lines; with a fifth line, the North/South line, under construction. Three free ferries carry pedestrians and cyclists across the IJ to Amsterdam-Noord, and two fare charging ferries go east and west along the harbour. There are also water taxis and a water bus, in addition to the canal cruises, that transport people along Amsterdam's waterways.

The A10 Ringroad surrounding the city connects Amsterdam with the Dutch national network of freeways. Interchanges on the A10 allow cars to enter the city by transferring to one of the eighteen city roads, numbered s101 through s118. These city roads are regional roads without grade separation, and sometimes without a central reservation. Most are accessible by cyclists. The s100 is called the centrumring, a smaller ringroad circumnavigating the city centre.

A tram on JavapleinAmsterdam is served by eight stations of the Nederlandse Spoorwegen (Dutch Railways). Five are intercity stops: Sloterdijk, Zuid, Amstel, Bijlmer ArenA and Amsterdam Centraal. Many other stations exist in the Amsterdam urban area.

Eurolines has coaches from Amsterdam to destinations all over Europe.

Amsterdam Centraal is an international train station. From the station there are regular services with destinations in Belgium, France, Germany, and Switzerland. Among these trains are international trains of the Nederlandse Spoorwegen and the Thalys, CityNightLine, and InterCityExpress.

Amsterdam Schiphol Airport is less than 20 minutes by train from Amsterdam Central Station. It is the biggest airport in the Netherlands, the fourth largest in Europe and the tenth largest in the world. It handles about 44 million passengers a year and is home base to KLM. Schiphol is the third busiest airport in the world measured by international passengers.