echo '' ;

Programming Language

All Topic

Programming Language
C Languge
Lua Languge
Python
HTML

Get Start

Before leaning to programming language, you should know the answer to the following some basic questions,

  • What is language?
  • Why language is very important?
  • what is the use of language?
  • Without language how communicate with each other?
  • Understanding of programming language & Software
    • இலக்கணம் – Grammar (Programming Language Rules)
    • இலக்கியம் – Poem (Programs)

What is Language?

Language is a set of rules and regulations. It helps to communicate the emotions, feelings, thoughts of humans to other humans.

What is a programming language?

Programming language is a set of rules and regulations design by humans. Its helps to communicate any kind of data in the format of binary  from one machine to other machines. lot of programming languages are there in the real world like BASIC, FOTRAN, COBOL, C, C++, HTML, Java, JavaScript so on.

Interpreted language: Lua, python, PHP, and ruby.

What interpreted language?

  • Interpreted language does not need to compile, before its run.

Top programming language & its salaries

  • 2018 (These lists are the top-most programming language in 2018 and average salary)
    • Python Average Salary – $116,028
    • JavaScript Average Salary – $110,542
    • Swift Average Salary – $80,417
    • Ruby on rails Average Salary- $74,799
    • Java Average Salary- $74,217

Some Common keywords in a programming language

while

  • Repeat execute your program based on the while condition expression if true.
  • Mostly while keyword and function combined with if loops
  • while condition false it’s not executed he statement, only execute if the expression is true.
  • Every time check the while condition while true, it will exit from when false.
  • While will execute inside the statements may be a single line or block of code.

Flow Diagram

Infinite Loop

  • The infinite loop will very useful for continuously run something.

Functions in a Programming language

  • A function is a block of organized, reusable code that is used to perform a single related action or  A function is a piece of code, capable of performing a similar task repeatedly. (it is defined using the def keyword in python.

Software Development Life Cycle

  • Methods:- Water Fall method, V Method,  and Agile Development Method

Tools

Software

Software is calling different names like firmware, program, code, os and etc.

  • Piece of Code
    • Software
    • firmware
    • Program
    • code
    • os
  • Languages
    • java
    • C
    • Lua
    • Python
    • . net
    • C#
    • C++
    • JavaScript
  • Operating System
    • Mongoose OS
    • Lua RTOS
  • Store Data
    • database
    • server
    • Webserver
    • local server

where to start an Old software code?

First, we need to find out the main() function program file. Most of the software code file name itself “main.c”, but sometimes they may put the main() function in the application file name eg: if the application is voltage monitor then main() may be in “voltage. c” file

Software Testing

  • What is Unit Testing?
  • What is Functional Testing?
  • What is a Test Sequence?
  • What is a Test Case File (TCF)?
  • What is Code Coverage?
  • What is a Regression Report?

Code Coverage

If you have questions like what is function coverage? what is conditional coverage? What is decision coverage? here your answer.

Functional Coverage

  • Functional coverage is a measure of what functionalities/features of the design have been exercised by the tests.

Conditional Coverage

  • Condition coverage is also known as Predicate Coverage in which each one of the Boolean expression have been evaluated to both TRUE and FALSE.

Decision Coverage

  • Decision coverage or Branch coverage is a testing method, which aims to ensure that each one of the possible branch from each decision point is executed at least once and thereby ensuring that all reachable code is executed.

UNIT Test cases Examples

How many UT test cases need for below if loop with three condition?
char ArunEworld_IsNewPostAvailable()
{
    bool AEW_IsNewPostAvailable = false;

    if (AEW_IsPublished 
         && AEW_IsReviewed
         && AEW_IsThisMonth)
    {
         AEW_IsNewPostAvailable= true;
    }

    return AEW_IsNewPostAvailable;
}

In the above code

  • ArunEworld_IsNewPostAvailable() is the function name. this function return the true or false based on any new post available in website.
  • AEW_IsNewPostAvailable is local boolean variable and AEW means ArunEworld
  • AEW_AEW_IsPublished is global boolean variable
  • AEW_AEW_IsReviewed is global boolean variable
  • AEW_AEW_IsThisMonth is global boolean variable

The below are the all combination of AEW_IsPublished, AEW_IsReviewed, AEW_IsThisMonth variable values.

  • T T T
  • T T F
  • T F T
  • T F F
  • F F F
  • F F T
  • F T F
  • T F F
void UTest_ArunEworld_IsNewPostAvailable()
{
	//Setup-1
	AEW_IsPublished = true;
	AEW_IsReviewed = true;
	AEW_IsThisMonth = true;
	AEW_IsNewPostAvailable = false;
	
	//Execution of setup-1
	ArunEworld_IsNewPostAvailable();
	
	//Verification-1
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , 1, "UTest_ArunEworld_IsNewPostAvailable() T T T ");
	
	//Setup-2
	AEW_IsPublished = true;
	AEW_IsReviewed = true;
	AEW_IsThisMonth = false;
	AEW_IsNewPostAvailable = true;

	//Execution of setup-2
	ArunEworld_IsNewPostAvailable();
	
	//Verification-2
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() T T F ");
	
	//Setup-3
	AEW_IsPublished = true;
	AEW_IsReviewed = false;
	AEW_IsThisMonth = true;
	AEW_IsNewPostAvailable = true;
	
	//Execution of setup-3
	ArunEworld_IsNewPostAvailable();
	
	//Verification-3
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() T F T ");
	
	//Setup-4
	AEW_IsPublished = true;
	AEW_IsReviewed = false;
	AEW_IsThisMonth = false;
	AEW_IsNewPostAvailable = true;
	
	//Execution of setup-4
	ArunEworld_IsNewPostAvailable();
	
	//Verification-4
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() T F F ");
	
	//Setup-5
	AEW_IsPublished = false;
	AEW_IsReviewed = false;
	AEW_IsThisMonth = false;
	AEW_IsNewPostAvailable = true;
	
	//Execution of setup-5
	ArunEworld_IsNewPostAvailable();
	
	//Verification-5
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() F F F ");
	
	//Setup-6
	AEW_IsPublished = false;
	AEW_IsReviewed = false;
	AEW_IsThisMonth = true;
	AEW_IsNewPostAvailable = true;
	
	//Execution of setup-6
	ArunEworld_IsNewPostAvailable();
	
	//Verification-6
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() F F T ");
	
	//Setup-7
	AEW_IsPublished = false;
	AEW_IsReviewed = true;
	AEW_IsThisMonth = false;
	AEW_IsNewPostAvailable = true;
	
	//Execution of setup-7
	ArunEworld_IsNewPostAvailable();
	
	//Verification-7
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() F T F ");
	
	//Setup-8
	AEW_IsPublished = true;
	AEW_IsReviewed = false;
	AEW_IsThisMonth = false;
	AEW_IsNewPostAvailable = true;
	
	//Execution of setup-8
	ArunEworld_IsNewPostAvailable();
	
	//Verification-8
	TEST_ASSERT_EQUAL_MESSAGE(AEW_IsNewPostAvailable , false, "UTest_ArunEworld_IsNewPostAvailable() T F F ");
}

Linux Commands

  • open the file *vim test.c*
  • *ipcs* – Interprocess communication system
  • *cd.. * back to directory

JSON Format

  • JSON- JavaScript Object-Oriented Notation.
  • Specified by Douglas Crockford
  • Easy to read and write
  • interchanged format
  • Language independent

How to install Git?

For windows

  • Download git software
  • Run the git software .exe file
  • Click Next
  • Choose Destination Location and click Next
  • Select Components and click Next
  • Click Start Menu Folder and click Next
  • Adjusting your PATH environment and click Next
  • Choosing HTTPS Transport backend and click Next
  • Configuring the line ending conversions and click Next
  • Configuring the terminal emulator to use with Git Bash and Click Next
  • Configure extra options and click Install
  • Done

Repository management

Github

Image Source

GitHub is a web-based hosting service for version control using git. It is mostly used for computer code. It offers all of the distributed version control and source code management functionality of Git as well as adding its own features. Wikipedia
  • Founder: Tom Preston-Werne
  • Founded: 2008
  • Headquarters: San Francisco, California, United States

Bitbucket

Image Source

Bitbucket is a web-based version control repository hosting service owned by Atlassian, for source code and development projects that use either Mercurial or Git revision control systems. Bitbucket offers both commercial plans and free accounts. Wikipedia
 
  • Registration: Required with optional OpenID
  • Slogan(s): The Git solution for professional teams
  • Written in: Python
  • Created by: Jesper Noehr
  • Available in: English language, Russian Language, MORE
  • Owner: Atlassian

How do I subtract 5 minutes from a Unix timestamp?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.