Posts

Showing posts from 2017

Error Handling in Java

You cannot afford to have an application that stops working or crashes if the requested file is not present on the disk. Traditionally, programmers used the return values of methods to detect error that occurred at run time. Error handling becomes a necessity when developing applications that need to take care of unexpected situations. The unexpected situations that may occur during program execution are: Running out of memory Resource allocation errors Inability to find files Problems in the network connectivity Exception An exception is an event that occurs during the execution of a program that disrupts the normal flow of instructions during the execution of a program. Exception handling code can perform the following tasks. Find the problem(Hit the exception) Inform the error has occurred(Throw exception) Receive the error information(Catch the exception) Take corrective actions(Exception handling) Inside the standard package Java.lang, java defi...

V-Model

Image
V- model means Verification and Validation model. Just like the  waterfall model , the V-Shaped life cycle is a sequential path of execution of processes. Each phase must be completed before the next phase begins.  V-Model  is one of the  many software development models . Testing of the product is planned in parallel with a corresponding phase of development in  V-model . Diagram of V-model: The various phases of the V-model are as follows: Requirements like BRS and SRS begin the life cycle model just like the waterfall model. But, in this model before development is started, a system test plan is created.  The test plan focuses on meeting the functionality specified in the requirements gathering. The high-level design (HLD) phase focuses on system architecture and design. It provide overview of solution, platform, system, product and service/process. An integration test plan is created in this ph...

Static Code Analysis using FindBugs

Image
It is a method of computer program debugging that is done by examining the code without executing the program. Introduction to Tool FindBugs, a free software program which uses static analysis to look for bugs in Java code. It   requires JRE (or JDK) 1.7.0 or later to run.  However, it can analyze programs compiled for any version of Java, from 1.0 to 1.8. Download and Configuration Details FindBugs can be downloaded in this link ( http://findbugs.sourceforge.net/downloads.html ). The FindBugs plugin should be installed into the Netbeans IDE as follows, Choose Source > Inspect from the main IDE's menu. In the Inspect dialog box, click Install. In the Installer dialog box, click Next to proceed with the installation.   Review the license agreement, select the license agreement option, and click Install. When the installation is complete, click Finish. Finding Potential Problems in Java Code with FindBugs The  FindBugs ...

How to setup your styling environment?

Image
If you are styling your site using CSS, then its time for now to use Sass. Sass is a powerful professional grade CSS extension language in the world. You need to have Ruby installed in order to run Sass.    Ruby Installation Download RubyInstaller from http://rubyinstaller.org/downloads/ . Execute the installer and go through the steps of the installation. When you get to the screen below, make sure to check the “Add Ruby executables to your PATH” box. Click Install. You can check your ruby version by typing “ ruby -v ” in your command prompt Sass Installation Open your command prompt To install Sass, type “ gem install sass ”. This will install Sass and any dependencies for you. If you get an error message then you will need to use the “sudo” command to install the Sass gem. It will look as follows, “sudo gem install sass” You should now have Sass installed. You can check that by typing “sass ...

Let's learn some basic ideas of Test Designing

Image
Test Designing is an act of creating and writing test suites for testing a software. The below diagram shows the subdivisions of test design. These are the following steps which should be followed in Control Flow Coverage. Graph Coverage Used   for internal structural aspects. Let's look at an example to learn the definitions in Graph Coverage. The Below figure displays a Control Flow Graph(CFG). Test Requirement Set (TR set) Set of attributes/ certain aspect that we want to cover in the given specification, during testing. Test Criterion Set of rules which govern the coverage of TR set. Test Set A minimal number of test paths needed to traverse through TR set. eg: Test Criterion - Node Coverage TR Set            - {1,2,3,4,5} Test Set          -  {[1,2,3,4,5]} Coverage Level Percentage of traverse through test requirements for a given test se...

How to setup GitHub using SourceTree?

Image
Fed up with typing commands to push and pull from GitHub??? Thinking of doing it in an easy way??? Here you go.. Source Tree is a free Git client for Windows and Mac. It provides a nice visual interface between you and git, no more command line!!! Connecting to GitHub using SSH Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying username and password at each visit. Download puttygen.exe from here . Run the file Generate your keys Change the number of bits according to the need Save the public and private keys Add a new SSH key to your Github account Click 'Settings' in your GitHub account Select 'SSH and GPG keys'  Click 'New SSH Key' Give a title and add the Private Key Connect with Source Tree Download Source Tree from here . Run the file Select 'Tools' in your Source Tree window Click "Create or Import SSH k...

MY SECOND YEAR PROJECT

Image
My second-year project for the subject, ITP is to create an ERP system to Teemah  Biscuits Manufacturers . It is a biscuit manufacturing company situated in Ampara which made its entry into the Sri Lankan market in 2013. As an impact on being in its early stages, the company used MS Excel to hold company's records from sales purchases to utility bill payments, raw inventory system and finished good management. However, with their growth into a  large scale manufacturer, they find it difficult to manage a large amount of data using the aforementioned methods and require a software solution that could automate the process. The primary need of the client was to store data in an efficient, organised for easy retrieval and reporting capabilities. The solution an ERP system which would solve above-mentioned complications, reduce manual work and make the process easier and more efficient. There were seven modules which are Raw management, Product process management, Sales Mana...