Image for post
Image for post

Background

In the previous article, we analyzed the data representing the statistics of javascript during the year 2019. The data visualization showed us how various types of javascript developers are distributed across the countries. In this article, we will look at linear and logistic regression mechanisms that can be applied to the data to predict the type of javascript developers and the various technologies that will gain more usage in the future. We will particularly look at using several descriptive features given by the users to predict whether they work in AngularJS or not.

Data Preprocessing

The combineddf used for visualizing various charts to see the data distribution will be again used for regression. Since most of the descriptive features are categorical we will be using LabelEncoder to transform this to Numerical data. …


Image for post
Image for post

I have been using javascript for pretty much my whole career, and have started embarking on a new journey of becoming a data scientist. Along with the exciting new things I have been learning, I felt the need to revisit some of the old classics and try to make sense of the survey data.

This survey was conducted this year and it reached nearly 21,717 people. The survey has collected a wide range of data starting from the general demographics of the population using javascript such as the country they live in, the job specifications of the people working with javascript, and what is their proficiency level in frontend or backend development. …


Image for post
Image for post
pipes

Why do we need pipe or compose?

In one of the previous articles, we discussed the need for chaining several functions, and how to do them using the this operator. While this works fine, there are several drawbacks to using this method:

  1. One has to keep track of this. And the value must be stored in the this operator so that the functions chained later on gets to access this value.
  2. The syntax is not quite intuitive. If there are many functions, it would look something like this -> functionA().functionB().functionC().functionD().......functionZ().

To reduce the effects of these two caveats, the implementation of pipe() and compose() functions can be used. …


Image for post
Image for post

Handling forms in React

Dynamic web applications require data to be sent to and fro from the server. Consider any web application that is used in day to day life. The user information is sent to the server via HTML form elements such as inputs (user name, user email), radio buttons (selecting a choice), checkboxes (agreeing to terms and conditions), etc. React library also has its way of handling forms to collect user data. …


Image for post
Image for post

Hooks

React hooks, which got introduced in 16.8 versions, are a new way of using state, and others react lifecycle methods in functional components. React hooks were introduced to solve 3 major problems in the earlier versions of react:

  1. Resuing logic: When multiple components need to share logic, using Higher-order components or Render props is the first approach that comes to mind. However, as the app grows, adding more and more higher-order components is not only difficult, but it also leads to wrapper hell.
  2. Gaint components: A class component contains a lot of code to be executed in its life cycle methods, and sometimes a similar set of logic circles around componentDidMount, componentDidUpdate and componentWillUnmount. …

Image for post
Image for post

What is the need to chain a function?

Functions are the first-class citizens in javascript. Every method or pattern implementation is done through functions. Many times in programming, we face a situation where we need to call a series of functions one after the other, passing the value from one step to the next step. Normally, handling such a sequence of function calls looks something like this:

const finalResult = function1(
function2(
function3()
)
);

OR

const result3 = function3();
const result2 = function2(result3);
const finalResult = function1(result2);

In both cases, we are trying to pass the output of the innermost function to its immediate outer function. While this works well for three functions, imagine a scenario where there are multiple function calls to be repeated this way. …


Image for post
Image for post

What is a generator function?

Generator functions are a new class of functions that were introduced by the EcmaScript 2015 standard. A generator is a function that can be paused mid-way at any point during the execution and resumed whenever required. The best part about the generator functions is that they preserve the execution context until they reach the end of the function. The variable values within the generators remain intact until the function execution is concluded.

How does a generator function work?

A normal function in javascript cannot be paused halfway through the execution. …


Image for post
Image for post

What is a lambda function?

By definition, lambda functions are anonymous functions that are not bound to any identifiers. These functions are usually passed as arguments to other higher-order functions. However, when it comes to Netlify or any cloud provider, lambda functions take a different meaning. Lambda functions are a great way to define a small chunk of serverless code to run on your applications’ behalf. Let’s say you have an application running purely on the client-side, and you need a small chunk of code to be executed on the server-side, bringing up a whole new server, and deploying just to perform one small task seems a bit of overhead. …


Image for post
Image for post

A blockchain is a distributed database that is used to maintain a continuously growing list of records called blocks. But what does this mean? Consider a decentralized database that is managed by multiple participants, this can also be called as Distributed Ledger. Blockchain is a type of Distributed Ledger, containing blocks of transactions. These transactions are recorded with an immutable cryptographic signature called a hash. Not all distributed ledgers apply this concept of sequence of blocks being connected via cryptographic signatures. Blockchain is a type of distributed ledger designed to record transactions digitally without the need for third-party interference.

What is the need for blockchain technology?

Blockchain technology is useful because it eliminates the need for a trusted third party to take care of the bookkeeping. Consider a scenario in which a set of transactions need to take place. If both parties keep their books containing the details of the transactions, anyone can tamper it and claim that their version of the transaction is true. This calls for a trusted authority trying to safeguard the source of truth. Blockchain eliminates the need for such a middleman while handling transactions. Blockchain provides a distributed, immutable, tamper-proof way of recording transactions digitally. …


Image for post
Image for post
Trustless authentication system

What does trustless mean?

The daily interactions we have either with real people or with our devices and applications require some level of trust between the interacting parties. When we create an account in Google, we are trusting our details such as username, mobile number, password with google to store it securely, preserve it, and use it whenever as per our instructions. However, there is a factor of trust involved here. Now imagine a system that doesn’t need your true identification, a system where individuals can be completely anonymous and exchange value or information without requiring the factor of trust with one another or with a third party. …

About

Aparna Joshi

CODER | TECHNICAL WRITER | ARTIST. Find my code: https://github.com/AparnaJoshi007

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