Wednesday, February 17, 2010

word cloud on my cv

just tryed wordle on my cv. it looks good.


Wordle: my cv

Tuesday, December 15, 2009

Rating system for ZendFramework with Jquery

This ain't going to be mind blowing article, because its one of the very first blog post of mine which will explain how i got some task done. as this is the very beginning i wanted to select a small task to cover up in a blog post.

well i had to write a nice rating module for a small CMS which was written in Zend Framework.

so first i had to find a nice JavaScript rating code and then to write the PHP back-end to make it functioning.

so the only thing which got my eye was a jquery plugin which looked nice and it had lot of customization options as well.

and then it was the time for me to change this into a Zend Framework view helper. so here are the steps i took.

1. The view helper class

The view helper class will be needed so you will be able to call the rate module to render the rating control from any place of your site. this file should reside in folder Library/View/Helper.

2. The template(phtml) file

This file will be one which will hold all the HTML/CSS/SCRIPT needed to render the rating controller. having it one centralized template file makes it very easy for us to make any changes in the way it renders without having to edit multiple place. this file should reside in the folder application/views/scripts.

3. The Model (to interact with the database table)

this file will have all the functions to ADD/REMOVE/GET ratings entered by users. this file can be used to introduce new rules, or different storage mediums later on. the initial view helper file we discussed about will always be talking directly to this model to grab necessary information which it needs to render the rating tool.

4. The controller file (main access point for data submissions)

This file will be used to capture the event of user ratings. so once the user clicks on the rating control the AJAX request will be directed to this controller's add action. and from there it will communicate it with the model to get it saved in the database. this file shud be placed on /application/controllers/ folder.

i will have to find some other way to post code samples into the blog post straight away, but for the time being i cant figure out a way to add the PHP/XHTML code into this blog post. i will re edit this post once i figure out a solution for that.

happy coding!!!

[update Jul2014]
all the source code for this article can be downloaded from here.
Looks like the website that hosted the sample source code is not in use anymore. I will try to find the original source code and post it here.

Friday, October 30, 2009

all tamils arent tigers

i happned to come across this article from the christian sience moniter about human rights in sri lanka. it made me realize how powerful media is to make one race go so angry against another race of people who shares the same mother land.

i'm not defending anyone here, coz we all have to agree that nothing is perfect in this world. but all my fellow journalists and writers please do not use the word tamil rebels to represent LTTE. terrorists are terrorists regardless of their race and culture. insult LTTE for the innocent lives they have taken, but not the tamil race as a whole.

Monday, October 20, 2008

Obamanotes.com widget

one cool idea of exposing your brand on more than one web page while building brand loyalty. +1 for the idea and waiting to see some more cool widgets like this.


Tuesday, July 22, 2008

finally

just managed to pass the ZEND certification for PHP5 exam last friday. :)

it was full of tricky questions, and most of the questions were practical ones.

most of my friends were happy for me because i am the second zend certified engineer in sri lanka but im sure that lot of sri lankans must have done that while being away from their motherland.

so the end of another exam. :)

the country listing for "Sri Lanka"

and my ZCE profile

Monday, January 21, 2008

search engines and information over world wide web

a search engine is an information retrieval system designed to help find information stored over WWW. complex search engines help to minimize the time taken to find information and increases the quality and accuracy of particular information we retrieve.

following is a list of popular web sites currently available:
google.com
yahoo.com
live.com
ask.com

earlier days all search engines were based on HTML meta tags for keywords. so the search results were mathed based on the keywords found in that article matched with the search query. but as the no of web pages which get published in the internet doubled day by day the search results had millions of pages and the relevancy of the particular search result and the initial search query was much lower.

to address the previously mentioned problem a new technology called "Semantic Searching" was introduced. the main idea behind this was to give user of the search engine more relative information based on the search query. nowadays semantic web is being promoted by the usage of RDF or DC for every web page. but as no one can force all the web pages in the world wide web to associate with RDF the assurance of true semantic web is far away from today itself.

the next big topic about search engines is to know how to make the web pages being created to be search engine friendly. this process is named as "Search Engine Optimization". while following SEO process you can make a given web page's visibility towards search engines to increase, thus giving it a higher rank among other results. there are two ways in which you can achieve this. either you can follow "white hat SEO" or either you can use "black hat SEO". with white hat SEO it might take more time/cost to achieve the task of a higher ranking but the output tends to be consistent over time. but in contrast if you follow black hat SEO your web site can get black-listed or banned forever from search engines which results in bad reputation for the brand you promote.

Sunday, December 09, 2007

Organizations Behaviour 09th dec 2007 class

it was a pleasure to start my BCS classes again after facing lot of personal problems for 2+ weeks. as usual i was late for my first class because the registration process took a little bit more time than i expected. todays classes were held by Dr.Dayan. even though i didnt knew him before it was a pleasure to have such a lecturer to cover the topic of Proffessional Issues in Information Systems Practice.

i have missed the first part of the syllabus which is named professional institutions. so i have to work hard and study for that part as these are all therotical it will be harder to understand these points if i dont study them now.

today the class started with the topic of ORGANIZATIONS. this was quite interesting to me as i've covered many of the topics in CIMA business law subject.

organizations can be defined as group of people working together to achieve a common goal. there are two main types of organizations,
  1. Commercial - (these type of organizations do business with a profit motivation, most of the time selling products and services)
  2. Non Commercial ( these are probably having a motivation of social and economical value. there are several types of examples available for this type of organizations)

in order to start new commercial organization in UK you have to follow the legislation of Companies Act 1985. and as in sri lanka you have to follow the New Companies Act 2007. but for non-commercial organizations in UK the approval process is still handled by queen as a tradition. but that Royal Charter State will not be given to non-commercial organizations if they dont prove their comitment beyond reasonable doubt to approving council (privy council).

under companies act of UK there are 3 types of companies that you can start.

  1. Sole Proprieter
  2. Partnerships
  3. Registered Companies

Sole Proprieter
there are not many formal documents and formal procedure in starting an sole proprieter business. but there is no seperate legal existance for this type of business, so the owner of the company is personally liable for all its liabilities.

Partnerships
Partnerships are those where couple of people start working in a group to achieve a common goal. the arrangement for this can be in written or verbal. the problem in partnerships is that all contracts should be signed by a all of the mebers in a partnership and every member is unlimitedly liable for that partnership. all most all of the commercial partnerships among people fail because sharing revenues always become a critical factor. but proffesional partnerships such as with lawyers and GPs are likely to be successful as there is no sharing of invesment or revenue in that. it is all about sharing their client base with members of that partnerships. the no of members for a partnership must be of 2-20 and when the ownership changes the law will treat it as a new partnership so all those important documents should be revised again. and every member in a partnership is having the management powers and the power to act as a agent of that partnership.

Registered Companies (limited liability)
with this type of organizations we can give a seperate legal existance for the comapany which we are starting. so in that case there will be no liability on companies owners and the management to the company it self. the maximum liability of a given shareholder for that paticular company is the money he/she have invested in that company. there are two types of companies which can be formed under registered companies.

  1. Private Limited Companies (PVT)
  2. Public Limited Companies (PLC)

Private Limited Companies
in this formation there have to be a minimum of 2 and maximum of 50 shareholders. and the ownership is decided by the no of equal shares they own. but there are some restrictions placed in private companies by its constitution.

  1. private companies cannot offer shares or debentures to public.
  2. when the ownership of shares change first it should get approved from the board of directors.
  3. maximum no of share holders cannot exceed 50.

Public Limited Companies
public limited companies dont have those three restrictions which were in private limited companies, but in a public limited company there should be a minimum of 7 shareholdes.

limit of a liablity of a shareholder towards company debts are controlled in three ways.

  1. limited by shares (shareholders liability is limited to the amount they have invested)
  2. limited by guarantee (members agree to pay a small equal amount in any case the company wound up)
  3. unlimited ( every share holder is personally liable for all company debts)