Friday, February 5, 2016

Few tips to organize your life...

    Take control on time


In order to organize you, there should be a control between your time and work. Time is something that we cannot control. We have to schedule our work accordingly.

Understand the purpose

Primarily it is important to understand the role of self, before thinking about organizing. The purpose for the existence should be recognized. Eg: - In an organizational context, your purpose can be the organizational purpose itself. You better ask the question “What am I here for?”  in order to understand your purpose.

Select and categorize tasks


Once you identify the purpose, you can list down the tasks you need to perform. Then they have to be categorized. There are two main categories of tasks which we can identify.

·         Active Tasks – Which are directly linked to your purpose. (Important Tasks)
·         Reactive Tasks – Everyday tasks (Less Important)

Establish Priorities and schedule time


Establishing priorities is something that we have to be concerned of. Tasks can be prioritized considering its importance and urgency.
·         Active tasks should be given the priority when scheduling time.
·         Allow other time for reactive tasks.
·         If the task is urgent and important, include it in your schedule although it is a reactive task.
·         If there is an urgent task which is not that important, deal with it immediately. If not you may forget.

Delegate Work


Delegation of work is something that has to be done carefully. For that, you need to give up something that you love to do. You need to get over your fear of losing your control. But always remember that, although the task is completed by someone else, you are accountable for what you do.
When delegating the tasks, there are three main facts to be considered.
  •  Which task to be delegated
  •  Is the new owner capable of completing the task
  • How long will it take to complete
Further, it is important to note that, delegation cannot and should not be done without a proper training. Hence, taking time on training and learning on the process will be more effective. You should be confident when a task is delegated to other person. Once a task is delegated, you need to inform relevant parties also.

Delegation is mostly misunderstood as assigning a task to another and keeping yourself out of it. But when delegation is done, monitoring should be happen because you are accountable for that task, although it is executed by a different person.

Tuesday, November 10, 2015

TSR Model

TSR Model



                                                                 

TSR model depicts the key attributes that must be handled effectively for successful completion and closure of any project. 


Project scope defines the completeness of the product. Scope creep is one of the main risks of quality. It is where additional requirements are introduced after product execution has begun. It affects both time and cost and ultimately product quality. Hence, scope should be well managed in order to achieve a quality product.

Cost/ Resources are another factor we need to focus on. Reducing Cost will affect the product scope and ultimately affect product quality. Cost is mainly associated with resources. When more resources are assigned to a project to shorten the schedule or meet increased scope, the more the cost will increase.


Time is non-recoverable. Changing the project schedule will affect either scope or cost. If the project needs to be completed sooner, more resources need to be allocated. It will increase the cost. Another solution is to reduce the scope where some desired features are left out or de-prioritized. 

Monday, September 15, 2014

Seven Testing Principles

There are several testing principles identified by several parties during past years. Seven are identified as most common among those.

1. Testing shows the presence of defects.
Testing can show the available defects in the software but cannot prove that there are no defects. Although the tests are concluded with no errors, cannot guarantee that the software is error free. Testing reduces the risks that can occur due to undiscovered errors.

2. Testing everything is not feasible
Testing all combinations of pre-conditions and inputs is not feasible. Simply exhaustive testing cannot be approached. Have to prioritize the scenarios and risk analysis should be focused.

3. To find defects early, start testing early
If the defects should be found as early as possible, testing should be started early.

4. Defect Clustering
Testing should be focused on early found defect density and should be compared with expected results.

5.  If the same tests are repeated, there will be no new defects found
Test cases should be regularly revised and updated. Because, software changes. If the same sets of test cases are run over and over it will find no defects. Have to be updated with new scenarios. (pesticide paradox)

6. Testing is done differently in different contexts
Testing is context dependent.

7. Absence of errors fallacy
Finding and fixing defects will not be helpful if the system is not usable by the users and if it doesn’t fit to user expectations.



Thursday, September 11, 2014

Software Testing and Quality

In today’s world, software has become an integral part of life. Hence quality has become something crucial in software since inferior software can cause really big problems even death.
Humans are prone to errors. Time pressure, complexity, technology… all these factors (and many more) expose us to mistakes which eventually distract us and produce bugs and eventually fail the product. Bugs (Fault, defect) itself will not cause failures but if executed will do. J Human beings are not the only cause for the failures of the products. Environmental conditions such as pollution, radiation etc. will be a cause by changing the H/W conditions.

Since both the causes and the outcome (Quality) is something that is unavoidable in a software, Testing also becomes something unavoidable. Testing is something that has to be maintained throughout the software development life cycle, from the requirement gathering to maintenance. Testing will give the stakeholders an idea about the proceedings of the product and a level of confidence. Learning is a kind of main objective of testing. Improving quality through preventing reoccurring defects is a main aspect of quality assurance.

Friday, November 15, 2013

Yesterday... Today... Tomorrow...

YESTERDAY...
was to learn.
TOMORROW...
will be the results of what I do today...
it will be the consequences of what I can do today.
TODAY...
is the last opportunity.
I have to live...
noone can assure that 
I can see tomorrow's sunshine... 
time is most valuable...
I will make me everyday a success...
I will spend each minute to make today
a different and unique day of my life...
leaving footprints and my presence in the hearts of the others...
I will take the time to be happy...
and 
TOMORROW...
I will feet on the ground.
defenetly I will be happy...
It will be a new season with loads of love,joy and dignity...


Wednesday, September 26, 2012

Building web applications using Codeigniter (Installing Codeigniter)

Codeigniter is a powerful PHP framework which can be simply used to create full featured web applications.   This framework is based on the MVC Architecture. Here I am using Netbeans IDE as the editor. 

MVC Architecture
MVC or Model View Controller Architecture is a well known software designing pattern in creating web applications.One of the main advantage or a purpose of using MVC is to seperate business logic and the application data from the presentation layer. Model is the one who carries business logic and the application data. It handles data processing. Controller works as the mediator and converts input as commands for the model or the view. View is the interface shown to the user simply view is the presentation. Codeigniter is using this MVC architecture in it.

Get start with Codeigniter
Requirements
1.WAMP server
2. Netbeans IDE (as the editor)

Install codeigniter

1. Download Codeigniter. Latest version can be downloaded from Codigniter official website.
2. Unzip the package.
3. Upload the CodeIgniter folders and files to your server. (eg:- www folder of WAMP server. Create a folder with your project name and copy Codigniter files and folders into it).
4. Then, create a Netbeans project. Create a new PHP project with existing sources and select the folder you created.


 

5. Run the project. You will see the welcome message of Codeigniter in your browser.

6. Here are some important notices.
  •  If you are using a database, edit application/config/database.php according to your database settings. 
  •  Edit application/config/config.php to set your base URL. Location of your project folder. (eg:- if hosted in localhost,   http://localhost/ProjectName/)

taadaaa.... You have successfully installed codeigniter. Now you can create your own app...




Wednesday, August 1, 2012

MPI program to send two messages from multiple processors to one processor


MPI is a language independent communication protocol used in parallel programming. It a message passing library specification where data is directly sent to processes via messages. MPI is not an implementation. MPI is designed for high performance on both massively parallel machines and on workstation clusters. MPI provides a powerful, efficient, and portable way to express parallel programs. Message passing in MPI can be point to point operations or global operations.  MPI was explicitly designed to enable libraries. MPI specification has been defined for both Fortran and C++ languages.
The main objective of MPI programming is to enable computers to communicate and perform one task collaborating with each other. Communication will be managed by clusters. There are three main functionalities of MPI. Process Management Functionalities, Point to point communication and collective calls. (Broadcaste calls).

Blocking send and receive:-

In a MPI program, one address space is used in communication. Within the communication world there is one specific problem to be addressed. All the elements within a particular group should communicate within that context. In data transmission, two processes are involved. (MPI_SEND and MPI_RECV). Buffers are used by both of these processes within the transmission process. In one buffer communication world, when the buffer is refreshed, data will be lost. Sender has to keep the data in the buffer (blocking send) until you make sure that the receiver has received all data. Receiver also should wait (blocking receive) until the data received. Data loss will be reduced by this mechanism. 

Code:-

#include "mpi.h"#include <stdio.h>#include "stdlib.h"

int main(int argc,char *argv[]) {    int tasks, rank, dest, source, error, source_id;    char incomemsg[20]="Acknowledgment",   outgoingmsg[10]="Generated";    
    MPI_Status Status;   
    char errorString[BUFSIZ];     
    int errorsize;
    error = MPI_Init(&argc,&argv); 
//initializing MPI environment      
    MPI_Comm_size(MPI_COMM_WORLD, &tasks);  
//get the number of processes    
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);  
//get the  ID's of processes     
if (error != MPI_SUCCESS) {
    printf("MPI initialization failed!\n");
    exit(1);
  }

if (tasks < 2) {
    printf("You need to have at least 2 processors to run this program!\n");
    MPI_Finalize();   // Quit if there is only one processor     exit(0);
  }
if (rank != 0) {
  dest = 0;  /*process 0 is the receiver. other processes are sending messages to process 0 */
        error = MPI_Send(&outgoingmsg, 1, MPI_CHAR, dest, 1, MPI_COMM_WORLD);
//receives acknowledgment from process 0
        error = MPI_Recv(&incomemsg, 1, MPI_CHAR, dest, 1, MPI_COMM_WORLD, &Status);
        printf("Process %d received %s message from Process %d \n", rank,&incomemsg, Status.MPI_SOURCE, Status.MPI_TAG);
       //error handling if (error != MPI_SUCCESS) {
MPI_Error_string(error, errorString, &errorsize);
fprintf(stderr, "%d: %s\n", rank, errorString);
MPI_Abort(MPI_COMM_WORLD, error);
}
}
         else {
for(int j=1; j<tasks ; j++){
  //process 0 receives multiple messages from other processes source =j;
  error = MPI_Recv(&outgoingmsg, 1, MPI_CHAR, source, 1, MPI_COMM_WORLD, &Status);
printf("Process %d received %s message from Process %d \n", rank,&outgoingmsg, source, Status.MPI_TAG);
source_id = Status.MPI_SOURCE;
//process 0 sends acknowledgement
error = MPI_Send(&incomemsg, 1, MPI_CHAR, source_id, 1, MPI_COMM_WORLD);

if (error != MPI_SUCCESS) {
MPI_Error_string(error, errorString, &errorsize); (stderr, "%d: %s\n", rank, errorString); MPI_Abort(MPI_COMM_WORLD, error); }            } }     
MPI_Finalize();  //finalizing MPI environment}

Sunday, May 13, 2012

DNSChanger Check up

Internet is one of the main sources for malwares which damage our computers. Since last few months 'DNSChanger' which is kind of a Trojan, has ruled the world of malwares. Thus, FBI, America has repeated the warning that as many as half a million computers still infected with the malware could lose their Internet connections on July 9 because the agency is shutting down an expensive workaround to the problem.
This DNSChanger virus affects the Windows and MAC systems and it was around the Internet since 2007. What it basically does is changing the DNS settings used by the system. DNS (Domain Name System) is an Internet service that converts user-friendly domain names (www.google.lk) into the numerical Internet protocol (IP) addresses (192.232.134.52) that computers use to talk to each other. First, DNSChanger changes the computer’s DNS server settings to replace the ISP’s good DNS servers with rogue DNS servers operated by the criminal. Second, it attempts to access devices on the victim’s small office/home office (SOHO) network that run a dynamic host configuration protocol (DHCP) server (eg. a router or home gateway). Further, this virus can spread itself into other machines if you are using a LAN by changing the settings of the router. Making it worse, this will block you from accessing anti virus softwares too.
The Bottnet network which was used to spread this DNSChanger was disabled in last November by FBI, USA through their special mission called 'Ghost Click'. Moreover, most of the anivirus software companies have updated their products against this malware. Even though several actions took placed, it was found that about half a million affected computers are still have access to internet as its users are not aware about this malicious software. Thus, FBI has announced that these computers will lose their Internet connection from July 9 onwards.

Fortunately, there are no infected computers reported from Sri Lanka yet. But still you can have a check up for your computer for this DNSChanger at http://dns-ok.us/. If you get DNS Resolution = GREEN in green, you are safe. Else, if you get  DNS Resolution = RED in red, it is better to have a complete system scan and remove DNSChanger via an updated antivirus software.

Source : http://www.fbi.gov/news/stories/2011/november/malware_110911 

Thursday, May 10, 2012

Populating a Drop-Down list using PHP and MySQL

In web based applications you may need to develop a drop-down list using elements taken from a database table. This code will help you to easily populate a drop-down list from a field of a database table.

 function get_dropdown($user){
         connect_to_db();
                if (!mysql_select_db('cars'))
                {
                    echo "could not select ('db')";
                }
                            $add_query = "SELECT names
                           FROM cars 
                             WHERE owner = '$user'
                            ";
                    $res = mysql_query($add_query);
               <select name="car" class="dropdownmenus" value="Select me">
     <option selected> Select Car </option>
     <?
           while ($row = mysql_fetch_array($res)) {
         extract($row);
           echo "<option value='$row'>$row[names]</option>";
           }
     ?>
     </select>
     }

Friday, May 4, 2012

Creating a horde module

After successfully configuring horde a new application can be easily created.

1. Working horde packs can be downloaded via, ftp://ftp.horde.org/pub/horde-webmail/.

2. Next download the horde skeleton module using GIT repository.

     $ git clone --depth 1 git://github.com/horde/horde.git
   $ cd horde
   $ cp -R skeleton/ /your/install/path/to/horde/


3. Move the new module to /var/www/html/horde directory.( Full installation guide including moving the folder and renaming the module is available at http://wiki.horde.org/CreatingYourFirstModule?referrer=HowTo )

4. Then Open /var/www/html/horde/config/registry.php. Add the following entry to the file.
(module name = skeleton)

 $this->applications['skeleton'] = array(
             'fileroot' => dirname(__FILE__) . '/../skeleton',
             'webroot' => $this->applications['horde']['webroot'] . '/skeleton',
             'name' => _("Skeleton"),
             'icon' => $this->applications['horde']['webroot'] . '/skeleton/themes/graphics/me.png',
             'status' => 'active',
             'menu_parent' => 'horde'     );

Tuesday, May 1, 2012

Installing Horde in Fedora 10

As an open source project Horde will work better on Linux platform. This will guide you to install horde together will http server, MySql, PostFix SMTP server and Dovecot IMAP server.

Horde version - 3.3.8
PHP version - 5.2.9
Dovecot version - dovecot v1.1.20

1. Installing Apache  server
        $ yum install apache server

2. Installing MySql server
        $ yum install mysql-server

3. Install PostFix and Dovecot servers
        $ yum install postfix
        $ yum install dovecot

4. Configure PosFix SMTP server and Dovecot IMAP server
         http://workaround.org/ispmail/etch

5. Move /hordre folder to /var/www/html/ folder

6. Start servers.
        $ service httpd start
        $ service mysqld start
        $ service postfix start
        $ service dovecot start

6. Run the setup.php file
         $ php horde/scripts/setup.php

7. Check whether horde is working
         http://localhost/horde

8. Can use the users in the virtual_users table to login into horde. But have  to use the full domain names as,

    john---> john@example.com

Thursday, March 29, 2012

Installing Horde in WAMP

Here is a simple way to install Horde in WAMP (Windows, Apache, MySQL, PHP) server.

1. Extract downloaded  tarball “horde-latest.tar” in WAMP “www” folder. (It can be downloaded from  http://www.horde.org/download/horde )

2. In order to create database tables go to /scripts/sql and open ‘create.mysql.sql’ by import mode in wamp server.



3. Test horde using this URL. http://your-server/horde/test.php