Courtesy: Beautiful Free Images & Pictures | Unsplash

Indexing is a data structure technique that helps to speed up data retrieval. As we can quickly locate and access the data in the database, it is a must-know data structure that will be needed for database optimizing. Indexing minimizes the number of disk accesses required when a query is processed. Indexes are created as a combination of the two columns.

  • First column is the Search key. It contains a copy of the primary key or candidate key of the table. The values of this column may be sorted or not. …

Courtesy: Beautiful Free Images & Pictures | Unsplash

We can use Promises and observables with Asynchronous in JavaScript. Both the approaches look the same but have differences.


In promises, the function returns a promise. A task is assigned to the promise to perform after the Async completes. Async and Await are keywords more often come with Promise. The Await keyword delays the execution of the Async function until the promise performs the task which is assigned with. Promise passes three states during its execution cycle.

  • Pending

The word, Pending conveys the meaning of “Not yet stared”. This is the initial state of the Promise.

  • Fulfilled

The word, Fulfilled…

Courtesy: Beautiful Free Images & Pictures | Unsplash

Hooks came up with React version 16.8. In React Hooks you can simply use state and other React features and existing components without writing a class. Another fascinating fact about Hooks is the code reusability. Reading others’ codes is one of the best ways a newbie can learn coding. But it is not always easy as we expect. Classes make code readability more complex and even the intermediates struggle with this. Using Hooks is a smart solution for this struggle. It doubles the code readability. …


It is a good practice to use a version control system as a software developer. GitHub is a platform for version control where developers can keep a copy of a project and collaborate with co-workers or other developers. Of course, GitHub makes the lives of software developers stress-free.

In this tutorial, I discuss GitHub basics including Create a repo, Branching, Commit changes, Push, PR, Pull, Merging.

Prerequisite: Get installed Git on your computer

Let’s start your Git journey.

Create a GitHub repository

A local project can be stored in a repository which is called a repo. Repo is literally a location where all the…

Being a good programmer is a real struggle if you are not a smart programmer. Clean coding practices are something a smart programmer should possess with. The program you have written should be clean and presentable. Now you might be wondering why presentable is important for your code. You might be thinking if your code is working pretty well that is enough. But that is not the real scenario. Now let’s see why your code should be presentable.

  • When you are working with a team, your code should be understandable and readable for other programmers.
  • For your future reference. If…

In my previous article, I have discussed What is sorting and simple sorting techniques. In this article, I hope to discuss Advanced sorting techniques.

Sorting simply means rearranging the elements in an array either ascending order or descending order. When advanced sorting techniques are compared with simple sorting techniques, advanced sorting techniques are more efficient. Though the algorithms are a bit complex rather than simple sorting, the steps are less and the intended output can figure out in a short period. Some of the advanced sorting techniques are Merge sorting, Quick sorting, Bucket sorting, Heap sorting, Shell sorting, Redux sorting

Network topology is the different ways the nodes and links can be arranged or how the computers are connected to each other. In computer network, there are five types of topology. This classification is done based on geographical representation.

  • Ring Topology
  • Bus Topology
  • Mesh Topology
  • Star Topology
  • Hybrid Topology

Ring Topology

Each device connects to two other devices and creates a circular path like in a ring. The data transfer occurs in one direction and until the data reach the intended destination, the data transfer from one device to another.


  • As all data transfer in one direction, the collisions hardly can…

In this article, I hope to outline the below topics,

  • What is sorting?
  • Sorting techniques
  • Simple sorting techniques

Under simple sorting, I’ll be discussing Bubble sort, Selection sort, and Insertion sort.

What is Sorting?

Sorting simply means arranging data of a list in a descending or ascending order. We can sort numbers, names, telephone numbers, addresses, etc considering the numerical and alphabetical order. In sorting, we compare the other data items in the array list and replace the relevant data item in the relevant place.

Two main types of sorting techniques are available in Data Structure.

  • Simple sorting algorithms
  • Advanced sorting algorithms


Stateful Widget

As the name itself says the Stateful widget has a mutable or changeable state. The state of the Stateful widget can be changed during the lifetime of the widget. The state can be read synchronously. The Stateful widget is the concrete for other widgets and other widgets are built upon the Stateful widget. The widget tress actually builds in the State class of the Stateful widget. It is advised to use the Stateful widget when the UI is needed to change dynamically. When the state of the Stateful widget is changed, setState() should be called in order to recreate the…

M1 is the very first Apple chip designed specifically for Mac. Apple has used multiple chips to offer the best of the best performance to their Mac fans. But now with a single M1 chip, Apple can bring the expected high performance to Mac fans. It is a wonder that a single chip can bring so much level of performance. This single-chip contains a huge bunch of atomic scaled transistors. In number, it is 16 billion transistors. This is the first time Apple used this many transistors in their entire record. As Apple says itself “An entire system on a…

Sandali Tharuki

Undergraduate-Faculty of Information Technology | University of Moratuwa | Sri Lanka

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