The Fermat test is based on a result from number theory known as Fermat’s little theorem.

According to Fermat’s little theorem, if n is a prime number and d is any positive integer less than n, then d raised to the nth power is congruent to d modulo n.

If…


Have you desired control over the execution context of your multi-threaded environment? Have you encountered challenges emanating from multiple spawned threads not being managed adequately?

One can effectively manage asynchronous computations in a cooperative pattern by adopting coroutines. A coroutine is a method that executes for a certain period, suspends…


We frequently encounter code that looks like this:

open class ExampleClass {

private var dependencyOne = DependencyOne()
private lateinit var utilDependency: UtilDependency
protected lateinit var dataProvider: DataProvider

protected open fun loadData() {
dataProvider = DataProvider()
utilDependency = UtilDependency(dataProvider)
}
}

In any code, we know one type depends on multiple…


Majority of the folks in the programming community start with the plain old “Hello World” when experimenting with a new language.

Let’s print “Hello World” in PHP.

<?php 
echo "Hello World";
?>

Too lazy, use short tags (not recommended):

<?="Hello World"?>

In JavaScript :

console.log("Hello World");

Let’s enter the Java World.

public class DemoClass{  public static void main(String[] args){
System.out.println("Hello World");
}
}

Everything…

Devesh Shetty

Developer @Shopify

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