Technical Writer | Tech Enthusiast | Open source contributor
Photo by Kelly Sikkema on Unsplash

Singleton design pattern is the one of easiest design pattern and it is a creational design pattern. Let's go through what is singleton, where should we user it, how to implement it and implementation in goLang.

What is singleton design pattern

It says single. Yes singleton design pattern use only single object throughout the application…

Photo by Kelly Sikkema on Unsplash

Let’s do those with command line interface which is much easier.

First thing first. You should update and upgrade first.

$ sudo apt update
$ sudo apt upgrade

Install git

$ sudo apt install git

Yes it is that simpler.

Install npm

$ sudo apt install npm

Install VS code

$ sudo apt install software-properties-common apt-transport-https wget
$ wget –q https://packages.microsoft.com/key/microsoft.asc -O- | sudo apt-key add -
$ sudo add-apt-repository “deb[arch=amd64] https://packages.microsoft.com/repos/vscode stable main”
$ sudo apt install code

Then simply run the VS code using code . .

Install mysql-server

$ sudo apt install mysql-server

Hope this will be helpful.

If you have found this helpful please hit that 👏 and share it on social media :).

Photo by Nihal Demirci on Unsplash

I love Ballerina functions since it gives more flexibility and super easy to do a task.

This will cover basics of Ballerina language functions and following is the basic structure of a function.

function add(int numOne, int numTwo) returns int {
return numOne + numTwo;
}

Let’s play with Ballerina…

Photo by Jeffrey Wegrzyn on Unsplash

Stream API is data flows from one side to other side.

Stream API is introduced in Java 8 in order to bring functional programming into Java.

What Stream API is

  • It is a data pipeline.
  • It use to process collection of objects or arrays.
  • It will not changed the original source.
  • It is efficient…

Photo by Thomas Franke on Unsplash

Is it use for data hiding? Yes it is Encapsulation is data hiding. But what is the point of hiding data.

  • Encapsulation limits the access for data.

Some cases we need to provide read only access for that we use encapsulation. Let’s take an example — For a student, student…

Yashod Perera

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store