Wednesday, 31 January 2018

Software Verification and Validation Topics - 2017

1a.The notion of Verification and Validation. Overview of typical verification and validation activities during software development. (L01a)

This includes verification of requirement specification
Modelling and verifying designs
Source code verification and unit testing

1b. Efficient verification of complex systems by symbolic model checking (L08a)
Included model checking with set operations
Representation of states with boolean function. Construction of characteristic function

2a. Basic formalism for modelling behavior: Kripke Structure. Labeled Transition System, Kripke Transition System, Finite Automata, Timed Automata

Kripke Structure: properties of state: labeling by AP
LTL: properties of transitions: labeling by actions
KTS: properties of both
FSA: states and transitions
TA: for modeling time-dependent behavior, labeling with clock-variables

2b. Formal relations for refinement checking: May Preorder and Must Preorder and their relationship with testing.

May Preorder: successful T1, may also be successful T2. preserved behavior
Must Preorder: successful T1, always successful T2. Non-determinism

3a. Verification of Software Requirement Specification: criteria and techniques

Complete, Consistent, Verifiable and Feasible
Techniques: Static Analysis(Manual Review and Tool Support)

3b. Verification of invariant properties by bounded model checking (BMC)
The state space is not handled all at once. Partial verification done by restricting the path of the state space.
Map the problem to a suitable SAT problem

4a. Verification of Software Architecture Design: criteria and techniques
Criteria includes: dependability, performance, maintainability, usability, testability
Techniques: ATAM(how does architecture satisfy quality objective and use of utility trees, Static Analysis and Quantitative Analysis

4b: Formalizing and checking requirements using LTL and HML

LTL: use of rule and symbolisms: linear and branching, AP, boolean operators and temporal operators
HML: LTS = (L, Act, ). Captures finite sequence of actions

5a. Verification of detailed design: criteria and techniques
Criteria include Local Characteristics of Completeness, Consistency, verifiability and feasiblility. Behavioral properties of safety and liveness
Techniques include Static and Dynamic Checking

5b. Model based test case generation by model checking and bounded model checking.
Bounded model checking restricts the path of the state space and maps the problem to a suitable SAT problem

6a. Role of development standards in the verification and validation of critical systems
Standards specifies safety functions and integrity levels.

6b. Software model checking with Counter-Example Guided Abstraction Refinement.
Creating a refined state space from the given concrete state space by hiding details.

7a. Verification of program source codes. Criteria and techniques
Checking for coding guidelines, software metrics, faulty patterns and run-time failures
Techniques include static analysis and code interpretation

7b.  Model-checking of timed dependent behavior - basic formalisms of timed-automata and timed temporal logic

Tuesday, 30 January 2018

The Static Keyword in C# - A Simple Explanation

In this lesson, we would examine the following sub-topics:

  1. What is the Static Keyword
  2. When is it Necessary to use the Static Keyword
  3. Example of Static Method
  4. What of Static Classes
  5. Static Constructor
  6. Summary

What is the Static Keyword
The Static keyword is used to indicate that a member variable belongs to the class itself. When applied to a method, then the method belongs to the class and not to instances of the class. The same applies to  properties of a class. Variables or method declared as static are referred to as class variable.
Assuming a class is created with static methods, then we don't have to create an instance of the class to use the static method.

When is it Necessary to use Static keyword?
 Static keyword is used when it is not necessary to create multiple instances of the variable. This means that a single variable exists and can be accessed across multiple instances of the class.

Examples of Static Method
Consider the program below:

    class MyGame
        private int numberOfPlayers;
        public static  String Status;

        public static void GetStatus()
            Status = "Game Started";

            return Status;

If we have the code above then in the main program, we can just use the GetStatus() method without having to create an instance of the MyGame class.
So in the  main program, we could have something like this:

        static void Main(string[] args)
            String status = MyGame.GetStatus();

Here we have called the GetStatus() method directly. This is possible because the GetStatus() method is has been declared as static.

What of Static Classes
A class can also be declared as static. If a class is declared as static, then that class must have only static variables.
If in the above program, we mark the class as static and try to compile, it would generate a compile time error.

    static class MyGame
        private int numberOfPlayers; //there would be error here in this line
        public static  String Status;

        public static void GetStatus()
            Status = "Game Started";

            return Status;
The error  is because all the member of a static class should also be declared as static.
Static Constructors
A static constructor is use to initialized the static data members of a class. So note that the code below is valid
   class MyGame
        private static int numberOfPlayers;
        public static  String Status;

        static MyGame()
            numberOfPlayers = 4;
            Status = "Idle";

        public static String  GetStatus()
            Status = "Game Started";
            return Status;
In this case, the static constructor only initialized the static member variables. Also note that this constructor cannot have access modifier of public or private. This is because a static constructor is already public by default.
  •  Static keyword indicates that a method or a variable belongs to a class
  • A class can also be marked as static.
  • A static method does not need an instance of the class to be called
  • If a class is marked as static, then, all the variables and methods should also be marked as static.
  • You can have a static constructor in a class which would be used to initialize the static members of the class

Monday, 29 January 2018

What are Interfaces in C# and Java? A Simple Explanation

In this lesson we would cover the following:
  1. What are Interfaces?
  2. When can an Interface be used?
  3. Interface implementation example in C#
  4. Summary on Interfaces
  5. Interview Questions

    What are Interfaces?
    An interface is a class that is marked with the Interface keyword. According to the C# programming guide, an interface contains definitions for a group of related functionalities.. Maybe I could correct this by saying that, 'an interface contains only definitions...'. This means that interfaces would not contain any implementation.

    When do we Need an Interface?
    Interface is use when you want a class to inherit from more than one base classes. this capability, where a sub class inherits from more than on parent is called Multiple Inheritance. This is  a feature in C++ but not in C#. Interface is a way to achieve multiple inheritance in C#.
    Interface is defined using the interface keywork

    Example of Interface in C#
    In the example below, there are two interfaces called IMovable and IParkable. The class Car is defined to  inherit from the two Interfaces.
    Notice the the Car Class implements the methods in the two interfaces
        public interface IMovable
             bool Equals();
        public interface IParkable
            String Park();
        public class Car : IMovable, IParkable
            // Implementation of Imovable
            public bool Equals()
                    return false;
            public String Park()
                return "I need a garage";
    Summary on Interfaces
    1. Any class that implements an interface must also implement all the members of that interface.
    2. Interfaces can contain both methods and properties
    2. Interfaces cannot be instantiated directly.
    A class can implement more than one interface.

    What are Abstract Classes? A Simple Explanation

    In this lesson we would cover the following:
    1. What are Abstract Classes?
    2. What are Abstract Methods?
    3. When can an Abstract class be used?
    4. Abstract class implementation example
    5. Interview Questions
      • Can we create an instance of an abstract class?
      • Can an abstract class include a constructor
      • Can an abstract class inherit another class?
      • Can an abstract class inherit an interface?(What is an interface anyway?)

    What is An abstract class
    An abstract class is a class that have been defined using the abstract keyword.
    The abstract keyword is used to indicate that the class or method has an incomplete implementation. This means another class, a subclass of the abstract class has to provide the missing implementation of the abstract class.
    According to the C# reference,  'the abstract modifier can be used with classes, methods, properties, indexers, and events'.
    If abstract is applied to a class, then the class cannot be instantiated. This means that you cannot directly create a new object of an abstract class. To use an abstract class, you need to create a subclass that derives the abstract class.

    What is an Abstract Method?
    An abstract method is a method that have be declared using the abstract keyword. If a method is marked as abstract, then any subclass must implement this method. If a subclass fails to implement an abstract method, then the program would report a compile-time error.
    Also, if a method is marked as abstract, then the class is automatically abstract. If a class contains an abstract method, but is not marked as abstract, then the code would not compile. However, an abstract class can have a non-abstract method inside.

    Let's take an example
    Consider the class vehicle. The class vehicle has a method called Move(). So we can create this class as an abstract class and then create subclasses such as Car, Train and Motorbike.
    public abstract class Vehicle
     public String Name;
    //Abstract Method, must be implemented in sub-classes
    public abstract String Move();
        public class Car: Vehicle
            String name;
            public override string Move()
                return "I move on Land";
        public class Train: Vehicle
            String name;
            public override string Move()
                return "I move on Rail road";
    In the above example, the Vehicle class have been declared as abstract and also contains an abstract method Move().
    The tree subclasses: Car, Boat and Train implements this Move() method. Note the keyword override used before the Move method in the subclasses. Now, this keyword is optional. Without using the keyword, the program recognized that the method is being overriden since it is marked as abstract in the base class and have the same name in the subclass.
    But if a method is not marked as abstract, the you can used the override keyword to force an override in the subclasses.

    When do we Need and Abstract Class
    An abstract class is needed when the object could be implemented in different ways. An example is a class that represents shapes. It could be implemented as a Triangle, Rectangle, Square etc. In this case, a class defining Shape needs to be an abstract class. Another example as illustrated in our code is the Vehicle class.

    Interview Questions
    • Can we create an instance of an abstract class?  No
    • Can an abstract class include a constructor? Yes
    • Can an abstract class inherit another class? Yes
    • Can an abstract class inherit an interface?(What is an interface anyway?) Yes (Interfaces are explained in another lesson)

    Sunday, 28 January 2018


    This is the course schedule for the ASP.NET C# in 24 days Course. You could always check the schedule for any changes.

    You may print it if you like so you can keep it handy. You may also be checking frequently in case of updates or assignments been added to the schedule.

    Day 1: Introduction to Visual Studio, ASP and the .Net Framework
    • What is the .Net Framework
    • What is ASP?
    • Getting a Free Visual Studio IDE
    • Introduction to Visual Studio
    • The Visual Studio IDE
    • What you can do with  Visual Studio
    • The C# Programming Language
    • About this course
    • Home Work

    Day 2: Starting a C# Application/Structure of a C# Program
    • Create a C# Console Application in Visual Studio
    • What is a Console Application/Web Application
    • Create a C# Web Application
    • Introduction to Visual Studio
    • Basic Syntax of C# Program
    • Class vs Method in C#
    • Multiline and Single Line Comments
    • The Main() Procedure or method Keywords in C#
    Home Work:

    Day 3: Setting up Web, Console and Windows Application in the same solution
    • Set up an Empty Solution
    • Add A Console Application
    • Add an Empty Web Application
    • Add a Windows Application
    • Add some information in each of the Projects
    • Setting Startup Projects
    • Trying to Access Classes across projects Setting Startup Form in Windows Project (Program.cs file)
    Home Work 3: Create an Empty solution. Add an Empty Web Application. Also Add an Web forms Web Application. What difference did you notice between the two?

    Bonus Class: Designing a simple Web page

    Day 4: Variables, Data Types and Declaration
    • What are Variables?
    • Variable Name convention rules(symbols, number etc)
    • Defining Variables. (More than 1 variable) Initializing Variables
    • Getting User inputs (Console.ReadLine() and Console.WriteLine())
    • C# Data Types(int, float, char, string, double, single, decimal)
    • Value Types and Reference Types
    • Value type(int, double, Boolean, short, float) 
    • Reference type(String, Array, Objects) 
    • Nullable Type in C#
    • Introduction to Pointers and Pointer Types
    Homework 4: Try to use Console.ReadLine(), Console.Read(), and Console.ReadKey(). What is the difference between them? Do the same with  Console.Write(), and Console.WriteLIne()?

    Day 5: Type Conversion: Implicit and Explicit Conversion ( and Parse()
    • Introduction to Windows Forms
    • Common Windows Form Controls and Properties 
    • Coding the Exit Button
    • Linking between two forms. Open a form with a button click
    • Converting Integer to String
    • Converting String to Integer (Int.parse(), )
    • Converting to Decimal
    • Converting to Other Data Types
    • Rounding Decimal Numbers
    • Difference between Float, Decimal, Double and Single
    Home Work 5 : Write a program that asks the user of his name and age. Then it would display: “Your name is …. and you are ….. years old.

    Day 6: Handling Date and Time Data Types
    • Using DateTime type
    • Creating an new date using the DateTime constructor
    • Declaring date data type
    • Converting to a date using Convert.toDateTime() Converting Date to a Strings (ToString, ShortString, LongString etc)
    • Getting Today’s date and time Extracting Day, Month and Year from Date
    • About TimeSpan Data Type for date and time
    Home Work 6: Design a Form that allows the user to select a date. The form would contain a button. When the user clicks on the button, the system would show the Day, Month and the Year. You form should look like the one shown below.

    Day 7: Operators in C#
    • Arithmetic Operators
    • Relational Operators
    • Logical Operators
    • Bitwise Operators
    • Assignment Operators
    • Other Operators
    Homework 7: Write a simple menu-based console calculator. The calculator will display a menu that allows user to select an operation. Then user is prompted to enter first and second operand. Then the result is calculated and displayed.

    Day 8: If/Else and Switch Statement
    • If Statement in single line
    • If Statement in multiline
    • If/else statement
    • Nested If statements
    • Switch statement
    • The ?: operator in C#
    Homework 8: Write a program that displays a grade to an input entered by the user. The grade is assigned as follows: 70-100: Excellent, 60-70: Good, 50-59:Average, 40-49:Fair, 30-40: Poor, 0-29:Fail.

    Day 9: Loops in C#
    • The While Loop 
    • For Loop 
    • Do…While Loop 
    • Nested Loops 
    • Inserting Loops using Snippets 
    Homework 9: Write a console program to (a) Calculate the Sum and Average of numbers between 1 and 100 and display the result (b) Print the Fibonacci Sequence it 1,2,3,5,8,13,..... (c) Write a program the accepts a number n from the user and calculates the sum of numbers from 1 to n.

    Day 10: Access Specifiers in C#
    • The public keyword 
    • The Private keyword Instantiating a Class (Creating object of class) 
    • Deriving a class 
    • Protected keyword 

    Day 11: Arrays and Lists
    • What are arrays. 
    • Declaring Arrays 
    • Initializing Arrays 
    • Accessing Array Elements

    Day 12: String Manipulation
    • String Data Type String or string? 
    • Formatting a method to produce a string 
    • Properties of a string Comparing Strings 
    • Checking if String contains another String 
    • Retrieving Substring from string 
    • Joining strings together (Concatenation) 
    Homework 12: Create a application that takes a users Firstname and Lastname and then separates it into Firstname and Lastname

    Day 13: Inheritance: Classes and Subclasses
    Creating a New Class
    Properties and Methods
    Instantiating a Class(Creating an object of a class)
    Types of Constructors Destructors
    What is Inheritance
    Deriving a Class

    Day 14: Working With Various Web Controls
    About WebForms
    Setting Properties of Buttons, Labels and Textboxes
    Using a Listbox and dropdownList
    What are CSS Files
    Attaching a CSS File to a Webform
    Working With Radio Buttons
    Working with Checkboxes
    Working with Calendar Control

    Day 15: The Static keyword
    • What is a Static class What is a static method? Static Members of a Class Day 16: Polymorphism in C#
    • What is Polymorphism
    • Function Overloading
    • Operator Overloading
    • Abstract Classes

    Day 17: Overloading
    Operator overloading Examples

    Day 18: Multiple inheritance and Interfaces
    • What is Multiple Inheritance?
    • What are Interfaces and What are they used for
    • Declaring Interfaces

    Day 19: Abstract Classes and Class Library
    • What is an Abstract Class
    • What is a Class Library
    • Abstract Class Demo

    Day 20: Namespaces and Preprocessor directives
    • What are namespaces?
    • The System namespace Defining namespaces in C# 
    • What is a pre-processor directive 
    • The #define directive

    Day 21: Regular Expressions
    • What are regular Expressions Defining regular expressions

     Day 22: Handling Errors and Exceptions
    • Keywords for Exception
    • Handling Exception Handling
    • Syntax Creating User-defined exceptions

    Day 23: Reading and Writing to Files
    • I/O Classes in C#
    • The FileStream class
    • Reading a text file and displaying to the output

    Day 24: Connecting to Databases
    • Connecting to a Microsoft Excel Spreadsheet
    • Connecting to a Microsoft Access Database
    • Connecting to MySQL Database
    • Connecting to MS SQL Database Final Course Project

    Project 1: Create an image browser application. This application would have buttons: First, Last, Next and Previous. And would display images in a directory. Next Step: Advanced ASP.NET C# in 24 days

    Project 2: Creating a Simple Website in ASP.Net

    Sunday, 21 January 2018

    Understanding Clustering (k-Means) in Machine Learning (Unsupervised Learning)

    In this lesson we are going discuss clustering under the following topic:
    1. Introduction to Clustering
    2. Formalized Definition of k-Means Clustering
    3. 1-of-K Coding Scheme
    4. The Expectation and Maximization Algorithm 
    Introduction to Clustering
    Clustering is a class of unsupervised learning concept or machine learning whose goal is to identify groups or clusters within datapoints in a multi-dimensional space.
    Suppose we have data sets {x1, x2, ..., xn} consisting of N observations of a random D-dimensional Euclidean variable x. The goal is to partition the data into K clusters when the value of K is preknown.
    We can define a cluster as a group of data points whose inter-point distances are minimal compared with the distance with points that are outside the cluster.

    Formalization of k-Means Clustering
    Let's assume a set of D-dimensional vectors  μk where k = 1, 2, ..., K and μk represents the centroid of the cluster k. Take centroid to be the mean of data points in the cluster.
    Our goal is to find the assignment  of data points to clusters as well as a set of vectors { μk} such that the sum of squares of distances of each data point to its closest vector  μk  is at a minimum.

    1-of-K Coding Scheme
    The 1-of-k Coding Scheme is a coding scheme applied to a K-dimensional vector x in which one of the elements xk equals 1 and all the remaining elements 0. This means that a data point cannot belong to two clusters at the same time.

    In this case, for each data point x, we introduce a corresponding set of binary indicator variables rnk ∈ {0,1}.
    If xn is assigned to μk then rnk = 1 and rnj = 0 for j ≠ k
    We can then define an objective function J know as distortion measure

    This represents the sum of the squares of the distances of each of the data points from its assigned vector μk
     The goal is to choose values for {rnk} and k} so as to minimize J. This brings us to the next section where we would examine the algorithm.

    The Expectation and Maximization Algorithm(k-Means)
     The algorithm is an iterative algorithm where for each iteration, two steps are taken that optimizes the variables rnk and μk

    The algorithm goes this way.
    First, choose an initial value for μk 
    In the first phase: we minimize J with respect to rnk while keeping μk fixed.
    In the second phase, we minimize J with respect to μk  while keeping rnk  fixed.
    Repeat the two steps until convergence.

    How to Reduce Expected Loss in Classification (Machine Learning)

    This lessons explains in simple terms how to minimize expected loss during classification.
    Remember that when an input variable is classified wrongly, a loss is incurred. However, this loss can be large or can be minimal

    Example of Cancer
    Scenario 1: A patient that does not have cancer is misclassified as having cancer
    Scenario 2: A patient that has cancer is misclassified as not having cancer.

    For these two misclassification scenarios, we can see that the loss incurred by the second scenario can be enormous, which may actually be death of the patient.

    So the objective is to reduce such misclassifications that would result in much loss. That means reducing the expected loss

    We can formalize the discussion by introducing a loss function also known as cost function. The loss function is a single overall measure of the  loss incurred in taking any of the available decisions.

    The goal is to minimize this total loss incurred.

    The Loss Matrix
    The Loss Matrix is a table showing the decision that was taken relative to the true class. This is shown in Figure 1:

    Figure 1: Loss Matrix for the Cancer Example
    The elements of the  loss matrix represents the loss incurred by taking one of the available decision. The rows of the loss matrix represents the true class while the columns of the matrix represents the assignment of class based on our decision

    Assuming that for a new value of x, we assign it to class Cj whereas the real correct class is Ck. It means we have incurred a loss Lkj, which is the k, j element of the loss matrix.
    The average loss function is given by the equation:

    The best solution is one that minimizes the average loss function. For a given input vector x, our uncertainty in the correct class is expressed through the joint probability distribution p(x, Ck).

    As before, we can use the product rule which states that

    p(x, Ck) = p(Ck | x)p(x) 

    to eliminate the common factor p(x). Therefore, the decision rule that minimizes the expected loss is one that assigns x to the class for which the quantity:

    is minimum.
    This can be found once we know the posterior class probabilities p(Ck | x)

    How to Minimize Misclassifcation Rate in Classification (Machine Learning)

    Remember that classification is a supervised learning concept that has to do with determining the the class a new input variable belongs.
    In trying to assign input variables to classes, there is possibility that we may assign to a wrong class. This is called misclassification.

    By definition, misclassifcation occurs when an input variable is assigned to the wrong class.

    One of the goals of classification is to minimize the number of misclassifications. This is done by defining a rule that assigns input x to one of the available classes.
    The approach is to divide the input space into regions Rk called decision regions, one region for each class.
    Rk is assigned to class Ck

    Consider the case of two classes C1 and C2. A mistake occurs when an input vector belonging to R1 is assigned to C2 or vector x belonging to R2 is assigned to C1.
    We can represent this as follows:

    To minimize misclassification, we must choose to assign x to which of the classes has the smaller value of the integrand.

    So if p(x, C1)  is greater than p(x, C2), then x would be assigned to C1.

    Using the product rule, we can  determine the posterior probability:
    p(x, Ck) = p(Ck | x)p(x)

    Note that the term p(Ck | x) is known as the posterior probability and x should be assigned to the class having the largest posterior probability p(Ck | x).

    For the more general case of K classes, it would be a bit easier to maximize the probability of being correct and this is given by:

    This means the to minimize misclassification, we need to maximize this probability over the region Rk.
    Using the product rule which states that:

    p(x, Ck) = p(Ck | x)p(x)

    We can see that each class has to be assigned to the class that have the highest posterior probability  p(Ck | x)

    Saturday, 20 January 2018

    3 Approaches to Classification in Machine Learning

    In this lesson, we would examine 3 approaches to classification. The first 2 would be based on the a priori knowledge of the probabilities. The third one would be based on the formulation of a discriminant function.

    1. Determination of the Class-Conditional Densities p(x | Ck)
    2. Determination of the a Posteriori Class Probabilities p(Ck | x)
    3. Use of a Discriminative Function

    Let's begin with the first one.

    1. Determination of the Class-Conditional Densities p(x | Ck)
     The first step is to solve the inference problem of determining the class-conditional probability densities p(x|Ck) for each class Ck individually. Also separately infer the prior class probabilities p(Ck).
    Then use Bayes theory of the form

    Bayes Theorem

    to find the posterior class probabilities p(Ck | x).
    We not that the expression p(x) in the numerator can be found by the formula:

    Having found the posterior probability p(Ck | x), we can use decision theory to determine the class membership. Such approaches that model the inputs as well as the outputs are called generative models, because they can be used to generate synthetic data points in the input space.

    2. First Determine the Posterior Class Probabilities, p(Ck | x)
    This approach first solves the inference problem of determining the posterior class probabilities p(Ck | x), and then subsequently use decision theory to assign each new x to one of the available classes. Such approaches that model the posterior probabilities directly are called discriminative models.

    3. Using a Discriminant Function
    The third approach is to find a function f(x), called a discriminant function. This function maps each input x directly to a class label.
    For example, in the case of the two-class problem, the function could have a binary output such that f(x) = 0 represents class C1 while f(x) = 1 represents class C2. In the use of discriminant function, probability is not used. The binary output discriminant function is shown:

    Final Notes
    The first approach is the most demanding  of the three. This is because it involves finding the joint distribution over both x and Ck. But this approach have the advantage of allowing for marginal dencity of data to be determined.
    The simplest approach is the last one as it does not require probability functions.

    Tuesday, 16 January 2018

    Difference Between Software Engineer, Computer Programmer, Application Developer etc

    You can watch the video of this explanation hereVideo
    Many person in the field of IT don't get as productive as they should be because they don't consider the differences between related professions.
    This is especially true in the field of IT where some organization use same employee to perform different job roles simply because the roles are related under the ICT field
    In this brief article, I would focus on difference between Software Engineer, Computer Programmer, Application Developer and related roles, beginning with Software Engineer.

    Who is a Software Engineer
    A Software Engineer is someone in the Engineering profession involved in the Computer Software related functions.
    A Software Engineer just like every other engineering profession has quite a tasking requirement. First you need to undertake year of formal education and then you need to meet up certain requirements imposed by the engineering body in your location. In Nigeria, the regulating body is Council for Regulation of Engineering in Nigeria(COREN).
    The irony is that someone may be a Software Engineer without being able to write computer programs or develop computer software, but he still could qualify to be an engineer.

    Who is an Application Developer
    An application developer is an ICT professional involved in one or more of the phases of the Software Development Life Cycle(SDLC).
    Remember that the software development process is made up of a number of phases, some of which may be iterative.The number and specification of these stages, though depends on the particular software development model. For example the Water Fall model has the following phases:
    • Requirements Phase
    • System Design
    • Implementation
    • Integration and Testing
    • Deployment
    • Maintenance
    So to be a software developer, you must be involved in one or more of these phases. (Not as a user though!).

    Who is a Computer Programmer
    A computer programmer is an ICT professional involved in the programming phase of the Software Development Process. Simply put, a computer programmer, develops computer programs. Note that I did not say, 'writes computer programs'. The reason is because, there are procedures involved in developing a program. This included, writing the algorithm, the pseudocode, drawing the flowchart and then writing of generating the program codes. A good number of programming softwares allows the programmers to specify certain parameters and then the application can generate the program codes.

    Which one is Better?
    Granted, how much earnings is involved for each of the professionals depends on the organization and the tasks involved. But I would say, that a professional computer programmer that is vast in a number of programming languages have some edge over other roles. This is because a programmer is normally paid by hour. Added to that, a programmer can take up a number of contracts and work on them from home. But more importantly, one can become a good programmer without having to pay for any education or training. This ones are called 'Self-taught Programmers'.

    Final Notes and Recommendation
    I would recommend that if you are a beginner start by taking tutorials on some programming languages. I suggest starting with Java due to its viability and availability of tools. If you are in a different field altogether, but want to learn programming, you can also start wit these series of simple tutorial you can get from this link:

    Monday, 15 January 2018

    Best Short and Easy Java Tutorials - 2018(Learn Java Today)

    This  is a list of the very best Java Tutorials  I've had to make. The reason I rate this tutorials high compared to other tutorials is because they are very easy to follow tutorials. Also they are practical tutorials such that you have to work on the hands-on part as you move along.

    Object Orient Programming (OOP) Lessons
    Part 5: Object Oriented Programming(OOP) - Polymorphism

    Try it Sample Programs(Tutorials)
    Part 2: How to Build a Simple Calculator in Java Using Netbeans - Step by Step with Screenshots
    Part 1: How to Build a Simple Calculator in Java Using Netbeans - Step by Step with Screenshots

    Beginner Lessons
    Java Progamming For Beginners Lesson 1: Introduction to Java and Installation of Netbeans
    Java Progamming For Beginners Lesson 2: Write Your First Java Program
    Java For Beginners Lesson 3: Structure of a Java Program

    Check from time to time for more free tutorials on Java as this list is updated every week

    Sunday, 14 January 2018

    What is the Difference between Confirmatory and Exploratory Research

    Today we will understand the concept of Confirmatory and Exploratory Research.  In other words, we can say Confirmatory and Exploratory Data Analysis
    We begin with Confirmatory.
    Confirmatory Research Data Analysis
    Confirmatory research are research that test the validity of already made hypothesis, known as a priori hypothesis. This means that possibly some previous studies have been carried out on the subject matter and some results have been presented. This research method is normally based on previous studies, to confirm an existing result or theory
    The benefit is that it makes the results more more meaningful.

    Example: Providing evidence for existing hypothesis.

    Exploratory Research Data Analysis? 
    Exploratory research is one that aims at generating new hypothesis, known as a posteriori hypothesis.
    This research method tends to generate new knowledge by examining a data-set and trying to find trends within the observations.
    In Exploratory Research, the researched does not have any specific prior hypothesis.
    The benefit of this research method is that it tends to adopt less stringent research methods.

    Relationship Between Confirmatory and Exploratory Research
    A number of studies includes both exploratory and confirmatory hypothesis. Sometimes, the exploratory hypothesis may not affect the analysis of the confirmatory hypothesis. In some other cases, both are carried out together. An example would be when a two-way ANOVA may have exploratory hypothesis for one of the factors and confirmatory for the other factor.

    Table 1 presents a summary of the difference between confirmatory and exploratory research.
    Table 1: Difference Between Confirmatory and Exploratory Research

    Linear Models for Regression(Linear Basis Function Models)

    This article discusses the Linear Models of Regression with focus on Linear basis function model.

    • Background of Linear Regression
    • The Regression Problem
    • Linear Function Model
    • Constructing the Basis Function
    • Introducing a non-linear function
    • Final Notes

    Other discussions can be found in this link: Best 23 Easy Tutorials on Machine Learning and Artificial Intelligence(Easy to Understand)

    Remember that Regression is of the technique under Supervised Learning. The other is Classification. The objective of the regression model is to determine the value of one or more of a target variable t, given the value of a D-dimensional vector, x of input variables. In other words, you need to find the function that relates the input and the output. This can be done using Linear Models.
    One of such modes is the polynomial curve fitting which gives a function that is a linear function of a particular parameter.
    A better model is the Linear Basis Function. This is discussed next.

    The Linear Basis Function
    Given a set of input dataset of N samples {xn}, where n = 1, ... , N, as well as the corresponding target values {tn}, the goal is to deduce the value of t for new value of x. The set of input data set together with the corresponding target values t is known as the training data set.
    On way to handle this is by constructing a function y(x) that maps x to t such that:
    y(x) = t
    for a new input value of x.
    Then we can examine this model by finding the probability that the results are correct. This means that we need to examine the probability of t given x 

    Constructing the Linear Basis Function
    The basic linear model for regression is a  model that involves a linear combination of the input variables:

    y(w,x) = wo + w1x1 + w2x2 + ... + wDxD

    where x = (x1, x2, ... ,xD)T

    This is what is generally known as linear regression.
    The key attribute of this function is that it is a linear function of the parameters w0, w1,..., wD. It is also a linear function of the input variable x. Being a linear  function of the input variable x, limits the usefulness of the function. This is because most of the observations that may be encountered does not necessarily follow a linear relationship. To solve this problem consider modifying to model to be a combination of fixed non-linear functions of the input variable.

    If we assume that the non-linear function of the input variable is φ(x), then we can re-write the original function as :

    y(x,w) = w0 + w1φ(x1) + w2φ(x2) + ... + wDφ(xD

    Summing it up, we will have:

    where φ(x) are known as basis functions.

    The total number of parameters in this function will be M, therefore the summation of terms is from j = 1 to M.
    The parameter w0  is known as the bias parameter which allows for a fixed offset in the data. 

    (Quiz: Can you remember any other topic the word bias appears? Leave it in comment on the left of the page!)

    Final Notes
    The topic for linear models of regression covers much more than what is presented here. But what we have discussed is the basics of the Linear Basis Function Model and I have decided to keep it simple and clear so that you can easily understand it and possibly pass an oral exam.
    But if you  are a Math student and want to delve further, I would recommend reading chapter three of the book. 'Pattern Recognition and Machine Learning', by Christopher Bishop.

    Best 23 Easy Tutorials on Machine Learning and Artificial Intelligence(Easy to Understand)

    I have made a list of the best 20 easy lessons of various topic of Machine Learning, Pattern Recognition and Artificial Intelligence.
    Why I rate these tutorials high is the ease to understand as well as the clarity in the explanation of the concepts. With this tutorials, many students have come to easily understand fir the first time the concept of Perceptron, Clustering, Supervised vs Unsupervised Learning, Dimensionality Reduction, Neural Networks etc.
    So check them out below. You can bookmark this page as you will find it helpful.

    Key Concepts in Machine Learning
    1. Introduction to Machine Learning
    2. Difference between Classification and Clustering in Machine Learning
    3. Maximum Likelihood Estimation (MLE) in Machine Learning
    4. Outlier Detection Techniques in Statistics and Machine Learning
    5. Introduction to Recommender Systems
    6. Difference Between Supervised Learning and Unsupervised Learning
    7. Bias/Variance Trade-off in Machine Learning
    8. Introduction to Support Vector Machines (SVM)

    Supervised Learning Concepts
    1. What is the Difference Between Classification and Regression
    2. Linear Models for Regression(Linear Basis Function Models)
    3. What is Overfitting in Linear Regression and Machine Learning
    4. Difference between Classification and Clustering in Machine Learning

    Artificial Neural Networks
    1. Basics of Neural Networks in AI Artificial Intelligence
    2. What is Activation Functions in Neural Networks
    3. Basics of Backpropagation  in Neural Networks
    4. A Simple Explanation of Multilayer Perceptron
    5. What is Gradient-Decent in Neural Networks
    6. What is Perceptron? How Does Perceptron Work?

    Unsupervised Learning Concepts
    1. What is K-Means Clustering in Machine Learning?
    2. Dimensionality Reduction and Principal Components Analysis(PCA)
    3. Basics of Decision Theory in Machine Learning
    4. Difference between Classification and Clustering in Machine Learning

    Other AI Topics 
    1. Sophia the Robot is not Who She Claims to be
    2. Intelligent Data Analytics Questions and Answers Summary (2017)

    Saturday, 13 January 2018

    All You Need to Know About Cryptocurrency(How it Works)

    I have done a little research on cryptocurrency recently and I would like share the outcome with you. The area I looked at included: the technology behind it, projections on the future of cryptocurrency, expert advice on whether to invest int it or not.

    My research findings are summarized below:
    I do think that this these explanations helps you understand clearly the concept of cryptocurrency.

    If you have questions, or you want to know some specific facts,  please leave it in the comment box below or by the left of the page. Currently, I working on the financial trends on individual cryptocurrencies and would make available the results in subsequent posts.

    Friday, 12 January 2018

    What is the Difference Between Classification and Clustering in Machine Learning

    Today we will discuss the difference between two important topic that appear similar in machine learning.
    • Classification and
    • Clustering
    I have decided to create this article because of the confusion the name of the topics may pose. Is clustering not the same as classification, like having to separate the data into different classes or clusters? It seems to make sense, right?
    But, in the world of machine learning, the two are completely different concepts.

    Let's start the discussion with classification.

    What is Classification?
    First classification is a supervised learning technique that has to do with learning and training an algorithm using a set of labeled  training input dataset.
    In classification, the goal is to assign each input vector to one of a finite number of discrete categories.

    Real life application of classification is spam detection. In this case, there are finite number of discrete categories an email can belong to: spam and non-spam. The input data set in this case is incoming emails.

    Theory of Classification
    Assuming that we are given a training set comprising of N observation of random variable X which can have values  of x1, x2, ... ,xn.
    Then we also have corresponding observations of the values of t,  which can take values t1, t2, ... ,tn.
    The first step would be to find the function of x that maps the input x to the corresponding t.
    To do this we can use the polynomial curve fitting which is of the form:
    We would not go further than this since we are only considering difference between classification and clustering.

    Find a detailed discussion of classification on:
    Introduction to Machine Learning
    Difference between Classification and Regression

    What is Clustering?
    Clustering is an unsupervised learning technique whereby the input dataset is unlabeled.
    In clustering, we use a finite set of input data, and to goal is to discover, groups(or clusters) within the data that have similar characteristics.

    Theory of Clustering
    Assuming we have a set of observations {x1, x2,... xn} which consists in a set of N random variable x (x is a D d-dimensional real vector). The goal is to partition the data set  into some number K of clusters, where the value of K is known.
    A cluster is a group of data points whose inter-point distances are minimal when compare with distance to points outside the cluster.
    The first step is to find the mk, for k = 1,..., K, in which mk is the mean associated to the kth cluster.
    We now assign each of the data points to clusters, such that the sum of squares of the distances of each data  point to its closest mean mk is  minimum.This particular case is known as k-means clustering.
    Find detailed explanation on: K-Means Clustering.

    Summary of differences between Classification and Clustering is given below: