The term optimization refers to the process in which system works more efficiently with the same amount of resources.

Spark SQL is the most important component in Apache spark which deals with both SQL queries and DataFrame APIs. In depth of spark SQL lies a catalyst optimizer.

Catalyst optimizer supports both rule based and cost based optimization. Rule based optimization is defined as the set of rules to determine how to execute the query, while cost based optimization is most suitable way to carry out SQL statement. …

Throwing errors in functional programming is a side effect, if exceptions can’t be used what to use instead? The best idea is to return exceptions and errors as ordinary values. In this example we will be recreating Scala’s standard library Option and Either for handling errors in way more functional.

The bad aspects of exceptions

Why do throwing exceptions are not referentially transparent, where do they break functional transparency, let us see this with an example.

Functional programming paradigm is a way in which we write our code without any mutable state. So this raises a question how do we define data structures and how to use them, here we will be addressing what is a functional data structure and how we will be defining and using them, and also will be looking into associated concepts of pattern matching and Higher Order Functions.

Defining functional Data Structures

A functional data structure is something that operates on pure functions that means like 1 + 2 will give 3 leaving 1 and 2 unmodified two lists a and…

Implicit definitions are those in which compiler is allowed to insert into a program if there are any type errors. In other terms it is a final way to avoid some kind of errors in the code and continue with program execution. Consider the example a+b what happens if a and b are not compatible, of course the compiler will throw an error. …

Asynchronous execution

Consider the code given below in scala,which sleeps for 10 seconds and returns the result. Which is 21+21.

What if the code takes 10 minutes sleep instead of 10 seconds. Can you even imagine an API which returns a result after 10 minutes!!. Of course not, we expect the response of an API within seconds, this is the scenario where asynchronous execution comes into play. Java provides multi-threading support for executing threads in the background ,but this mechanism is managed by monitors which provides locks and enables only one thread to enter at time…

What is docker

To understand docker let us use a powerful metaphor rather than a technical explanation. Dockers are laborers who moved containers into and out of ships docked into different ports. This might sound familiar to anyone working in software as a huge amount of time and energy is spend in transporting different applications to different metaphorical ships(dev servers, production servers). So they can be used to solve different businesses problems.

Figure shown below explains how docker can be used to save time and money, without docker a lot of time and energy is required to configure and run…

TCP/IP is the backbone of communication over internet. Now there are two versions of Internet protocol available IP version 4 and version 6 for communication over the network layer. The key difference between these two are an IPv4 address is 32 bits and expressed in dotted-decimal notation whereas an IPv6 address is 128 bits in length and expressed in hexadecimal format.

IPv4 versus IPv6 representation

  • IP version 4

What is OAuth 2.0

If you are software developer on web, chances are you have heard of OAuth 2.0. It is a security protocol used to protect a large number of web APIs. OAuth 2.0 allows a software to access web APIs. In many ways OAuth 2.0 can be considered as a “valet key” for API resources, not all cars will have a valet key but valet key provides an additional security for your car. You can restrict access with valet key as ignition only and prevent access to glove box and boot. Similarly with OAuth 2.0 …

What is a monoid

Let’s consider algebra of string concatenation. We can add “foo” + “bar” to get “foobar”. Algebra refers to the laws associated with the operation. Laws associated with the operation are

  • Existence of an identity element
  • Law of associativity

The exact same laws govern integer addition. It is associative (x+y)+z = x+(y+z). Also there exists an identity element (0). Ditto for multiplication operation (identity element is 1). …

Some histories of Linux begin with this message posted by Linus Torvalds to the comp.os.minix newsgroup on August 25,1991.

Hello everybody out there using minix -

I'm doing a (free) operating system (just a hobby, won't be big and
professional like gnu) for 386(486) AT clones. This has been brewing
since April, and is starting to get ready. I'd like any feedback on
things people like/dislike in minix, as my OS resembles it somewhat
(same physical layout of the file-system (due to practical reasons)
among other things).

I've currently ported bash(1.08) and gcc(1.40), and things seem to work.
This implies…

krishnaprasad k

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