Feeds:
Posts
Comments

Archive for the ‘general’ Category

vimperator

I have been using firefox in vimperator mode for some time. It is an extremely fun way to browse the web for an vi addict.
Once a vi user, get addict to it I’m sure he will never go back to usual firefox mode using mouse.
I can navigate pages and links, add and search bookmarks and  more importanty search the vi way, so much easily without moving my hands off the keyboard.

Of course good old Lynx is still usable in these modern days of the web. It is immensely valuble on certain low bandwidth environments.

Advertisements

Read Full Post »

A book of five rings

These days I am reading two different translations of the same book “Go Rin No Sho” a book originally written by famous Japanese warrier Miyamoto Mushashi(1584-1646).  Why two translations of the same book and why I read both?. To understand let’s go into some detail.

Miyamoto Mushashi lived in a time where Feudal Japan is ruled by various warrier clans. He was a wondering Samurai (Ronin) who travelled alone honing his sword skills. He faced many duals with famous Samurai many of which were between life and death.

He survived all the duals  he fought and later his life he lived an ascetic life and just few months before his death wrote “A book of five rings”. This book was about strategy. The strategies he learned from his life and death duals and his life long learning. Those days his followers used these strategies in real war. As time passed when business became the war between people, companies and nations, some started to use those strategies in business.
The translation by Victor Harris try to interpret the original content intended by Mushashi. The translation by Thomas Cleary try to interpret the ideas targeting the business world.

The idea is that wherever strategy is involved these ancient techniques still give insight into winning. Present WBA heavyweight boxing champion David Haye said that his camp trained according to Art of War by Sun Tzu, another ancient strategy book famous among todays strategists. His opponent was seemingly ahead of every aspect but to astonishment of many(including me), he won the fight.

It is said that Australian cricket team and Philiphines Manny Pacquiao(currently WBO welter weight champ) and many other sport teams also use Art of War.
Some of the well know general guide lines of Mushashi are as follows

1. Do not think dishonestly.
2. The Way is in training.
3. Become acquainted with every art.
4. Know the Ways of all professions
5. Distinguish between gain and loss in worldly matters.
6. Develop an intuitive judgement and understanding for everything.
7. Perceive those things which cannot be seen.
8. Pay attention even to trifles.
9. Do nothing which is of no use.

Read Full Post »

Logic

Of all Mathematics I learned at my undergraduate courses I value most the simple but powerful two logics which I consider are very useful in understanding the world.
They are,

1. x ⇒ y (x implies y or if x then y)
2. x ⇔ y ( x if and only if y)

These two logics apply in most of the things we see/hear in our every day life. To understand them one need not have great learning on Mathematics or Logic. It is very intuitive, yet very subtle in their application. Some times it may seem too simple. But when you think carefully you understand that you need to be very careful in applying them with facts.

First simply mean that if x is true then y must be true. It is that simple. The only fact we know is that if x is true then y must be true. Take x and y to be any two facts that you face in life. For example let x be the fact that you buying product O from company M and y be the fact that you get discount in buying O.

So here our expressed logic is

If you buy O from M then you will get discount.

This could be any marketing propaganda that you are targeted at in your every day life. So what do you think?. What if you don’t buy O?. Then you won’t get discount?. The answer is, If you don’t buy from M, there is no more implication about your discounts with regard to buying from M. Of course you may still get discount by buying from some other company. May be not. We cannot come to any precise conclusion about your discounts from the given logic.

x ⇒ y is not equalent to (not x) ⇒ (not y). But sadly this is something that most people take without giving proper heed to the facts.

But here is an equivalent logic

x ⇒ y  is equivalent to (not y) ⇒  (not x)

So under the context of our example we can say that

If you are not getting discount in buying your O  then you haven’t bought O from M. Yes this is true.

So what if x ⇒ y and (not x) ⇒ (not y) are both given as true logic?

Look carefully. (not x) ⇒ (not y) is equivalent to

(not (not y)) ⇒ (not (not x)). What does that mean?. It is simply y ⇒ x.

So we have both x ⇒ y and y ⇒ x. In other words x if and only if y. This logic is defined with the symbol x ⇔ y.

So when this apply to our example it says

If you buy O from M then you get discount and if you get discount then you have bought it from M. So in this case it is to be understood that only M company gives discount for O and no other company in this world give a discount for O. If some company express such logic it should be taken as very strong claim. You get discount for product O if and only if you get O product from our company.

When reading anything, hearing anything I tend to think precisely along these logics. In that way I believe I get no more than it really mean, and no less than it really mean. This result in very little chance of getting cheated at least.

Read Full Post »

Restful PHP web services

I finished reading Samisa‘s recently published Restful PHP Web services book. Normally when it comes to technical books I don’t read every bit of it. My understanding is it is not necessary to do so.  Because you have the book you can always refer to it whenever necessary. However my initial reading aim at fulfilling one task. That’s to understand how to use the book quickly when need arise. It’s kind of indexing the book in memory for faster reference later. Also interesting bits that attract me most will be covered withing this initial iteration of reading.

But with this book I read it from start to end without missing a single word of it. It is so compact, so easy to read. One reason for this change is my curiosity about the content of the book. That curiosity is aroused by several reasons. For one thing I often hear the technical jargons contained in the book within the office environment I live. My colleges at WSO2 developed WSF/PHP which support RESTful as well as SOAP web services in the same stack.  This WSF/PHP use WSF/C as it’s web services core on which development team I’m a developer at WSO2.  For some time I wanted to know what they do in these PHP web services stuff but could not find time/desire/way to do it fast. This book provided me all that.

Second I share the belief with many that WSF/PHP and the rest of the scripting web services stacks like WSF/Ruby, WSF/Python  from WSO2 have big potential within the web services market in near future. So gaining knowledge in those areas is always a good thing to do.

Chapter 6 nicely explained the use of MVC architecture in Zend framework for supporting restful web services with step by step easy to understand examples.

In addition to explaining the facts related to the subject matter Samisa has nicely used his knowledge on Software development which he gathered through experience as a developer as well as through years of teaching at the University of Moratuwa Sri Lanka. Throughout the book he explains best practices and how to avoid pitfalls(especially in chapter 7)  which are useful hints for any developer.

There are extensive code samples which could be a + point and at the same time – point depending the reader. However even a non-php programmer could easily understand those code excerpts without much effort(I could and I’m not a PHP programmer he he)

I wish if there was a section comparing positive and negative aspects of REST and SOAP web service approaches. May be an design approach which could take best from both worlds(I don’t know).

Read Full Post »

Indigenous Music

Senanayaka Weraliyadda’s creation ‘Mal Paba’ is really interesting piece of music(youtube contain a sunflower version which is totally ridiculus). I love to hear this song so much. To me the music in that song is what I can call is real indigenous music. I can cleary understand the music emanated from real indeginous music instruments like Davul, Bera, thammattam, thalampota etc etc. Althought Thabla is very interesting instrument I believe it is not used in our ancient music and I don’t hear it in this song. To me this man is really talented musician who deserve more recognition.

It is amazing to see how those simple instruments that we hear played in Pirith gedara, Dane gedara, Perahara could produce such great music.

It is very unlucky of me that I can not enjoy the music produces by modern musicians. The last generation of musicians who produced music that I could enjoy are no more seen to be creating new music.

Read Full Post »

Karate Do and Self Defence

Nowadays there I have heard that as Self Defence there is no use of learning Karate. They say it is only a sport or a way of creating a healthy body and mind. But for me it can never be a good sport and it is the best form of self defence. With an opponent weilding a gun infront of you what self defence Karate can provide to you? they ask.

Before answering this question we must know the meaning of the phrase “Self Defence”. Defend the Self from whom?. Your opponent from whom you could defend yourself could be anything. It could be a flowing stream, a strong wind, a falling tree, a fierece dog, a burgler or it could be even a physical ailment and most of the time it is your own fear.

To defend from these opponents your self you must be always prepared mentally and physically. By practising Karate devotedly, diligently prepares you for this. It is moving meditation.

It may be true that you cannot avoid a bullet triggered at you in an alarming speed. But before that bullet is triggered at you, you have a thousand and one things to do to defend yourself if you have mastered Karate.

First you could avoid such confrontations by being not angered easily or by not making other ppl angered by you. You could avoid dangerous ppl and places by improving sense of awareness which is result of moving medition of Karate. Even then if you could not avoid such confrontations you could always hide or run before being confronted. To hide, to run effectively you need greater phsical ability. For example to instantly jump over an 8 feet high wall or nimbly climb up 15 feet tree require great phisical strength and some sense of correct technique which are all results of years of training(You don’t train to climb trees and jumping over walls while practsing Karate. But you are in a better possition than average ppl to successfully doing these when need arise.). Even if you cannot avoid the confrontation by these methods you can attack him in lightening speed before his finger touch the trigger(you are trained for such speed and power). Even if you could not avoid that then you can die bravely and unregrettedly which is the highest attainment the Karate traing could give you.

But realistically being confronted by a opponent with a gun is an incident that an ordinary person face not even once in a life time. But he is sure to be confronted by fear, decease and his own anger many times in life which could effectively devastate one’s self.

It is interesting to see that ppl who do not have time for practising this moving medition(or whatever form of exercise) at their younger age find ample time in thier old age to suffer from ailments which are unavoidable result of unhealthy mind and body.

I would like to produce following excerpts from the Master Text “Karate Do Kyohan” which has been my Bible for “self defence” for more than a decade.

* There is absolutely no need for concern about one-sided development of the body in Karate, and the fact that unform development may be considered to be on of the benefits of Karate.

* In most cases, only a minute or two is required to complete a Kata(my note:Predefined sequence of techniques that is soul of Karate) . Moreover, as one continues to practice, the movements become quicker and the training as a whole more vigours, so that one can get ample exercises from a relatively short period of time.

* No specific area, equipment, or even partner are necessary, for it can be performed in a garden, living room, hallway, at any time or place that one feels the desire to practise.

*Other contemporary karate experts such as masters Yamaguchi, Aragaki, chibana, Nakazato, Yahiku, Tokashiki, Sakihara, and chinen, have all lived to be over eighty. These examples are indicative of the role of Karate as a superier method of maintaining one’s health.

* It is not an exaggeration to assert that a man well trained in this form of defense may consider the whole body to be a weapon of awesomely effective offensive power.

* Although Karate does have throwing techiniques, it relies prinicipally on striking, kicking, and thrusting techiniques. These movements are much quicker and can escape the untrained eye. Block -attack combinations are executed simultaneously, and weaker individual, women or young boys, do have ample strength to control a more powerful opponent with them.

* An insight into this art, a mastery of its techniques a polishing of the virtues of courage, courtesy, integrity, humility, and self-control to make them the inner light to guide one’s daily actions:these require at the least ten or twenty years, if possible a lifetime of devotion to the study of this art.

* One who truely trains in this do and actually understands Karate-do is never easily drawn into a fight. One attack or a single kick determines life or death.

* True Karate, that is , Karate-do strives internally to train the mind to develop a clear conscience enabling one to face the world truthfully., while externally developing strength until one may overcome even ferocios wild animals. Mind and technique are to become one in true Karate.

* It is the small-minded individual who likes to brag upon acquiring some small skill, and those with little knowledge who carry on as if they were experts are childish. It is because of the large number of false martial artists in the world that the public tends either to ignore the martial artist or to consider him wild.

* For the Karate-do student, the most shameful trait is indecisiveness.

I hope these ideas let newcommers to do correctly

Read Full Post »

Be Humble, Be Honest

I read this article about the life style of Iranian President. This is unbelievable cosidering the fact that Iran is much more wealthier country compared to Sri Lanka. Whatever their political view every politician in Sri Lanka should consider the facts in this article seriously provided they claim themselves as volunteers dedicated for the benefit of the country and it’s people. Not only politicans, we all should know what is the economy of our country(family) could afford and do accordingly. 🙂

http://lankaguardian.blogspot.com/2008/02/will-our-politicians-emulate-iranian.html

Read Full Post »

Older Posts »