Quotes .....

There never was, there never will be, a man who is always praised, or a man who is always blamed....

Tuesday, March 19, 2019

celebrating 10+ years of blogging...!

It's been a long run many a struggal to be alive
But in a way much fun when we do the revive
It's always happier to walk down this memory for
Been a blogger of a decade and more!!!
:-)

Saturday, April 8, 2017

The Love of Learning …. Be a Philomath.

Can a man be a master of many subjects? You've probably heard the saying "Jack of all trades, master of none." Which implies that when you learn many things, you lose the ability to become master of any of them. Also if you have heard the noble handbook for a moral lifestyle, "Subhashithaya"; written by Alagiyawanna Mukaweti, which is an unique book of advisory poems, there is also one poem dedicated to show impossibility of mastering many fields.
If above poem is loosely translated to English what it says is that a man in this world will be clever for one work and another person will clever for another work. This will not change. Similar to the fact that no matter whether it is a rainy or sunny neither a ship will go in the road nor the cart will go on the water. However mastery of multiple disciplines is not a novel concept. From the time immemorial various men and women walked on this Earth who have mastered in various fields simultaneously. They who decided to learn many subjects as and when possible contributed immensely for the innovation and the novelty of this world. One of the unique person who have cultivated the love of lifelong learning in many subjects and mastered in them all is none other than Leonardo da Vinci who’s working involved invention, painting, sculpting, architecture, science, music, mathematics, engineering, literature, anatomy, geology, astronomy, botany, writing, history, and cartography. Thomas Hobbes (whose fields were political philosophy, history, jurisprudence, geometry, the physics of gases, theology, ethics, and general philosophy) and Benjamin Franklin (a leading author, printer, political theorist, politician, freemason, postmaster, scientist, inventor, civic activist, statesman, and diplomat) are both renowned polymaths. They are just three of the famous personalities out of vast number of individuals who are lifelong learners. We all are born with free will. Everyone when they were children knew what they want, how they want something to be and more importantly how to spend the time in satisfaction. Without jealousy, greediness and the social pressure this was easy. But when they grow older these elements start to play a major role in decision making. Today's world encourages speciality. The norm or the concept that a person nurtured to complete a specific set of tasks was further popularized by the Henry Ford, Ray Kroc and many others in their successful businesses. They made great fortunes creating systems that could be run by people specialized to do one part of the task. This is an excellent concept to get an accurate and a quick result by working as a team. Teamwork is good thing but do you like to be a cog? For an example if you are good at cutting fabric for clothing do you want to spend your entire life to improve the cutting techniques? Or do you want to learn how to sew a garment and complete the product. May be you also like to study about fabric and pattern making. Imaging you as the world’s top fabric cutter for clothing. Still are you loosing anything by studying other areas? The answer is obvious. There is nothing to loose instead you’ll be able to streamline the total production and who knows you’ll be able to invent new concepts or you’ll become a famous personality of the world. Innovations and enhancements are limitless, all this because you decided to learn more without locking your brain to engage only on the cutting fabric for clothing. On the other hand why do you want to be the best in a single field when you can become better in several fields? It is obvious a man can’t be the best or learn all the treads in the world. But I don’t see the importance of restricting to a single field. If you want to specialize in one field, go for it nobody is stopping you. But don’t stop there. Learning is a lifetime journey and the human brain is capable for it. Try your level best to learn and apply the very speed you did when you were a kid. What you can learn, explore and produce are limitless and only you should be the decider of your limits.

Saturday, October 3, 2015

The History of Administration of Criminal Justice of Sri Lanka

Can be examine under five distinct periods.
  1. Period before the European Powers Occupied the Island. [6th B.C. - 15th A.D.]
  2. Period during the Portuguese Occupation. [1505 A.D. - 1656 A.D.]
  3. Period during the Dutch Occupation. [1656 A.D. - 1796 A.D.]
  4. Period during the British Occupation. [1796 A.D. - 1948 A.D.]
  5. Period after Independence and up to the present time. [1948 A.D. - ]
To be continued....

Thursday, April 10, 2014

Why Do You Write?

Why Do You Write?
This question is posed not only for professional and popular writers but also for amateurs.

Various writers give various answers to this question. For some its merely a hobby. For some people it’s the mission of their lives. But I often wander do we need to have a reason to do writing. How justifiable this question, “Why do you write?”.

Saturday, November 9, 2013

MVC Ajax Search Form - Code First Migrations


1. Create an ASP.NET MVC 4 Web Application.








2. Select Basic Project Template, Razor View engine and leave ‘create a unit test project’ tick box blank.














3. Add a Model Class name it as Address.cs.











Shortcut: Ctrl+. To find references required
4. Add reference to jquery.














5. Create a connection string in the Web.config file.
<add name="AddressDBContext" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=PostCode;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\PostCode.mdf" providerName="System.Data.SqlClient" />
6. Build the solution (Ctrl+Shift+B).
7. Add a Controller named AddressController.































8. Add a View by right click in the AjaxSearch method in the AddressController.



















9. Create a partial view ‘_PostCodesList’ in the View/Address folder. Click the Create as a partial view tick box.

















10. Enable code first migrations.


At the PM> prompt enter the following command:
enable-migrations -contexttypename AddressDBContext









The Configuration class includes a Seed method that is called when the database is created and every time it is updated after a data model change.
namespace MvcSearchSite.Migrations
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Migrations;
    using System.Linq;
    using MvcSearchSite.Models;
    using System.Collections.Generic;

    internal sealed class Configuration : DbMigrationsConfigurationAddressDBContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
        }

        protected override void Seed(MvcSearchSite.Models.AddressDBContext context)
        {
            var postcode = new List<Address>
            {
                new Address { ID=1, PostCode = "AB101AB",   Street1 = "Alexander",
                    Street2 = "",Address1="Address1",Address2="",Town="Derby",County="Derbyshire" }
               
            };
            postcode.ForEach(s => context.Addresses.AddOrUpdate(p => p.ID, s));
            context.SaveChanges();
        }
    }
}
Build the project.
In the Package Manager Console window, enter the following commands: 
add-migration InitialCreate
update-database
A SQL Server database has now been created for your data model

In Database Explorer db is visible, sql commands can be executed.







If you need to add more data to the table, change the Seed method and run the ‘update-database’ command.











11. Set the default starting page in ‘App_Start/RouteConfig.cs’.










12. Run the application (F5)

Friday, April 12, 2013

COMMONWEALTH SHORT STORY COMPETITION 2013
Fight or Flee
By Surangi Tissera.

Chintha and Manori were seated in the spacious hall of the Road Moto Vehicle office or known as RMV; with hundreds of other people from all walks of life. They all are anticipating this one cause of getting their Moto-vehicle driving license. It is a very noisy hall. Small talks of each ones have made the sound of thundering. Sometimes sounds are getting high pitched when they scold for the authorities for taking long to release their permits.
The hall had two fully erected walls; one side is opened to the outside garden and the opposite side had two glass covered doors which are opened to the adjacent office building. Through the glass doors, one can see peons clad with blue uniforms walking here and there with stacks of papers on their hands. The air, in the hall is getting warmer due to the asbestoses sheet shelter without a sealing. The two fans, hanging from the bare roof are rotating in full speed. But it couldn’t help to cool the environment inside the hall; as it is near the noon of this tropical summer day.
Except some, all of them were in the ripe of their youth. Also few school boys with their school uniforms were seen among the crowd too. Most of the men have applied for heavy vehicle category and they are planning to go Middle East countries in search of jobs as drivers. Their faces show the weary of searching jobs and their cloths reveal the poorness and village looks. On the other hand all most all ladies were in posh looks and wearing latest fashioned cloths. They were talking in English and showing off with their luxury mobile phones and accessories. They must be the lucky people who are going to drive their own vehicles.
Chintha and Manori were sharing some milk cookies cursing for the delay. It is almost their lunch time at office. They both work in an UK based BPO company as software engineers. Over the past six months they were chatting and most of the time dreaming about what they will do with the driving license.
The unmarried girl, Chintha asked her friend Manori who is newly married and the husband is working in abroad.
“You know what? Yesterday I drove our family car a bit.”
“How was it? I bet it is not easy as driving the mini-car we drove today for this test”, Manori interrupted while taking another milk cookie out of the pack.
“Who said it’s easy. It is Terrible!” they both laughed in unison to the Chintha’s remark and she continued. ”We can’t drive those old modeled huge vehicles in these narrow roads full of daredevil three wheelers”, Manori nodded in agreement.
“We better try to buy those mini model auto geared cars. But they cost a hell of lot of money, you know”, Manori continued her munching.
Chintha looks around and see the middle aged woman two rows back to them.
“Do you see that lady in the corner with heavy make-ups? She is an international school teacher“, she whispered to Manori’s ear pointing to the back rows.
“How do you know?” Manori asked surprisingly.
“Oh, she was in the same vehicle where I was. In fact she went just before me in taking the practical test. I heard the driving learners’ school representatives were talking about her. They were so much upset as they couldn’t get bribery from her like they took from us”, Chintha went on.
“She is either smart or too foolish, I guess”, Manori interrupted her friend.
“No, you silly, she has said the examiner who is going to conduct the test is one of the parent of her class student and she personally knows the examiner and passing the test is not an issue”, Chintha went on.
“There you go… she is smart, we could have also told some kind of story to Learners’ school representatives. Who knows whether she is personally know the examiner or not”, Manori heaved a sigh.
“Do you think it’s that easy to get away from them? They are thug like people. Even all those examiners take bribes and keep close connections with them”, Chintha warned.
“Here everything is corrupted and without a bribery or close connection nothing is possible”, Manori nodded in agreement to the Chintha’s statement.
For a minute or two they both said nothing and went on eating the milk cookies.
Manori broke the silence.
“Did you hear the news about Yasanghi?”
“O yes about her resignation after the marriage. That’s a bit old one. Isn’t it?” Chintha went on while searching for the water bottle inside her handbag.
“I bet you haven’t heard about the migration. Her husband has got the PR in Australia”, Manori said moving her chin bit upper and rolling the left corner of her mouth proudly for knowing the latest news which her friend doesn’t.
“How come I haven’t heard it first? Even she came to me to write her resignation letter”, Chintha said in displeasure pouting here lower lip on the upper.
“It’s true she is not clever in documentation”, Manori when on agreeing to her friend. ”She came to our room yesterday afternoon when you had left from office, to get help in writing another letter. She was looking for you. Since you were gone and she was in rush, she asked help from me. You know I am not as good as you in writing. But I managed to write her a letter requesting a service letter”, with that Manori put her hand in to biscuit pack only to find it’s empty.
“But service letters are normally given when you give your request for it in the resignation letter along. I think she has already got one”, Chintha went on still in doubt.
“Yea… she got one yesterday afternoon. But the letter given is not in details. She had to request for a detailed service letter. She needs it because she must find a job in Australia even before she migrates to that country. You know on those countries everyone need to earn their bread and butter themselves. Specially people migrating from third world countries have to do several jobs at once to meet their both ends. One of my cousins who went there for higher studies said he works whenever he gets free times from his studies. And he told me most of the Sri Lankans living there work around the clock. You know unlike here, day time and night time works are not treated differently”, Manori said wisely.
“But people migrate to developed countries to have a better living, right? What is the use if they have to keep on working around the clock? Here we can manage with one job”, Chintha went on.
“There is a different, Chintha, They earn and pay government taxes, which in return give them better living standard. It is at the beginning one has to work hard to establish the life in an alien country, afterward it is much easy. Now compare that to here. Of course we do one job and manage our lives. But till we die what we all do other than managing our things with barely sufficient salary. We pay tax and in return what we get? We have to pay higher prices for everything. We earn in Rupees but required to spend in Dollars”, Manori said with quick paced anguish tone.
“There is a point in your talk. If we also given the chance to work more than one job and earn our living we also can reach to that living standard. But the structure needs to be created first to change the attitude. Even education structure needs to be change to suite the current job opportunities available. Remember how difficult it was to find qualified people to work in night shift in that latest USA project at office?”, Chintha reminded.
“Correct. That is why people go to other developed countries even in illegal ways. I think in this year along more than thousand people were caught trying to migrate to Australia in fishing boats”, Manori looked at her wrist-watch and knew it an hour passed her normal lunch time.
“Look Chintha, I think the officers are also taken their lunch breaks. Shall we also go to the canteen and take our lunch”, Manori suggested as the hunger is unbearable to her.
“I too feel feeble. Those cookies can’t help since I took the breakfast very early today morning to arrive on time to the test. But you see they instructed us to wait here. If they call our names while we were away then that will be a mess again”, Chintha reminded.
“I saw some of the candidates go out and come. We should have the right to eat our lunch. They can’t deprive that. This is intolerable. Come on. It won’t take more than ten minutes”, Manori pressed her friend in agreeing to her. Chintha agreed.
“O.k. then let’s go quickly”, Chintha stood from her seat.
The canteen is not noisy like the waiting hall and it is more spacious and air conditioned. A well known restaurant chain is there to serve food and it is maintained in excellence conditions. As quality is high so does the price of the food. The prices are nearly three to four times higher than the normal price.
At first the two friends thought of eating rice and curry. But the thought didn’t last more than ten seconds when they saw the prices. They had quick chat and decided to quench their hunger by fish-buns and milk packets for the moment and to take late lunch in a Tamil Vegetarian restaurants known as ‘Syvar Kade’ in roadside. Manori paid for buns while Chintha bought milk packets.
When Chintha came to her seat in the table Manori had already started eating. Chintha knows well about her friend’s inability to wait when food served. Therefore no issues of table etiquette took place. She put one of the milk packs she brought to Manori’s side of the table and started to eat her bun. By then Manori has eaten half of her bun and telling the food is so tasty comparative to other places.
“It should be high taste than the outside shops like the price of it. No wonder these examiners had to take unsolicited fees from us to eat their daily meals from this star hotel”, Chintha said looking seriously and chuckled at the end.
Manori winked while eating the last portion of the bun.
“If we go to one of the roadside ‘Syvar Kade’ we could have eaten a full meal with desert to this cost”, Manori said while sipping her milk packet.
They both finished their quick snack and rush to the waiting hall. Still candidates are waiting in that scorching place for authorities to release their driving licenses.
The both wanted to go to the wash room too. So as the time permits they decided to take leave again. There were two rows outside the washrooms, one for males and the other one for females.
They both stood in the female row and were able to reach to the front in a few minutes time. It was then that they understood they have to pay first in order to go to these toilets. Pay money before going to the toilet isn’t a new concept in some areas of the world. But these two girls haven’t experienced it anywhere before and they both were laughing about it afterward on their return to the seats in the waiting hall.
After another impatient ten minutes all of the examiners who conducted the practical tests that morning came with the bundles of temporary permit letters. The hall went silence at once. In a split second again the noise started at full length. But there was a difference. Now the examiners all at once started to call the candidates name to handover the letters. They had to repeat the same candidate name several time as the audience couldn’t grasp what they are telling. But then without any further instructions candidates knew how to cope with the situation. Individual candidates started to move toward each examiner seated location by identifying their correct examiner. Since Manori and Chintha were belong to two different Examiners they too also parted from each other.
Now the next hurdle, they have to be in all ears and stay standing with the crowd.
“Mudiyanselage Jagath Bandara”, Examiner let a loud cry by holding the letter. From the back of the crowd where Chintha stand, emerged a skinny, brownish man with red eyes. When he walked up to the examiner’s table, he is given a paper to sign by the examiner. Then only he found out he doesn’t own a pen. Examiner frowns and looked at him in a split second before starting to scold in high pitch.
“So you came without a pen ha!”, Looking at the crowd he continued in sarcastic tone, “Everyone needs to know when coming here you must bring a pen with the relevant documents and a vehicle to drive at the exam.”
Then again he looked at the candidate standing at his desk and demand. ”Go and get a pen yourself without standing here like this.”
By then a fellow in the crowd passed a pen to him and it settled the matter. Everyone searched for pens and people who don’t have one, searched for a pen owner who can lend it to them.
Now it’s time for the next candidate. He is a boy at his twenties and wearing a t-shirt with a denim trouser and deck shoes of the latest fashion. He is having a pen in his hand and showing it to the frowning examiner. But this time examiner is looking at his deck shoes. He pointed his left hand toward the shoes and asked him to remove it. Everyone is looking at his legs now. From his eyes it is obvious his shyness but obeyed the instruction by removing the shoes. Then he is advised to remove the socks. He looked at the crowd who are watching all eyes and some with mouth agape. Chintha noticed that one of the socks is having a big hole in the sole. The candidate started to remove the pair of socks while both the crowd and the examiner are watching.
“Is he hiding something?” Chintha thought to herself. If Manori was nearby she could have something to say about this. She thought and turned her head to the direction where Manori is standing. But Manori is looking in the other direction.
When Chintha returned her gaze back to the scene the boy’s fate has been decided. He is slowly rolling his denim trouser legs to the knee height without looking at the crowd anymore. Examiner is quite unhappy about his slowness and opened his mouth again.
“Have I asked you to rip your trouser down? You are embracing like you are doing a sin. Do it hurry and show me your two legs together”.
Some were laughing but when examiner turned his head toward the crowd everybody stand still in silence.
“Oh! My gosh! What is he doing?” Chintha thought to herself. The person next to her saw her facial expression. It was that international school teacher.
“Don’t worry…” she said with a consoling touch to her shoulder.
“It is checked to see if both legs exist. You can take medical certificates for money like everything, you know”, she smiled.
“But he is not checking it in everyone”, Chintha said still in disbelief.
“If you applied under heavy vehicle category and wore shoes and cover both legs, then he’ll do the double checking”, she reassured.
Later Chintha found out what she had said was true.
It was almost late in the afternoon when the two girls left the RMV office situated in off the city of Colombo. Are they happy with the driving permits? By looking at the faces one could figure out that they are feeling tiresome. But if it is possible to penetrate their thoughts, one could clearly observe that happiness was nowhere to find.
Without telling to each other they forget the late lunch they were planning at the lunch time. The cheerfulness they had in the morning when coming to the RMV premises has been ripped off from them. They get into a bus routed to Colombo city. While on the bus they called the office and extend the half a day leave they both applied into a full day leave. Then each one called home to assure and soothe worried mothers at home that everything is alright. Of course they were pleased to catch a less crowded and fast travelling bus, not like the one they travelled in the morning.
In a thirty minutes travel of the bus took them to the heart of Colombo city. From there they departed from each other and got into different routed buses as they both lived in suburb of the city in the opposite direction. While at the bus Chintha thought about the unpreparedness of her in the situation compared to the International school teacher she met at the RMV office. With an education up to a university degree and twenty-five years of living experience in town, knowing how harsh and corrupted the society is; she had to let herself be the victim ultimately.
It was in that night, Chintha wrote a new blog post called “Riyaduru Perahara (The procession of drivers)” criticizing the work conducted at RMV office, giving instruction of what should be known by anyone who is going to that place. Furthermore, asking general public to stand against these wrongs. Her personal blog which she has originally dedicated for IT related articles and sharing new trends in the IT field, henceforth started to talk about the corruptions of the society and how innocents are suffered. What the world didn’t know at that night was, it is the sacred night that gave birth to a fighter who will over the years start eradication of corruption in the society and save innocents.
It was this same night Manori could make her husband agreed reaching him through a voice call over the Internet to apply for a Permanent Resident in Australia immediately.