Posts

Featured post

Why should I learn Go?

Image
What is unique about GO language? Here are some of the advantages of GO programming language: Code runs fastGarbage collectionSimpler objectsEfficient concurrency
Code runs faster:
Before understanding why GO runs faster, let us know the process of software translation. Basically, we have three broad categories of languages:
Machine level language ·Machine level language is a low-level language where instructions are directly executed on the CPU. Machine level instructions are small steps which are straight forward and simple (Ex: ADD, SUBTRACT, MULTIPLY )
Assembly language ·Assembly language is similar to machine level language but a bit more specific for humans to understand. For example, 100000111001 may be the equivalent opcode representation for ADDITION operation in machine language. Whereas in assembly language you use the word ‘ADD’ to represent the addition operation. Assembly language is a one-to-one mapping to machine language. High level language (C, JAVA, PYTHON..) ·High level lan…

Debug a Node.js application in a Docker Container

Image
In this post, we'll take a look at how you can debug a Node.js app in a Docker container.
According to the Foundation's Node.js Developer Survey, half of Node.js users use Docker for development because containerization, in general, is a very powerful tool.

Using the Node inspector If you mostly use printf, aka caveman debugging, it can be very difficult to find the right value at the right time. Things get even worse if you have to rebuild your container image each time you add console.log to it. It could be a lot easier to have the image built once and jump around within it, examining your variables while it's running. To better understand what we're gonna do here, I highly suggest to familiarize yourself with the node inspect commands first.
To run your Node app in debug mode, simply add inspect after node, something like that:



When you run your code in inspect mode, it always stops at the first line, waiting for you to interact with it.
For those who were brought up u…

INTRODUCTION TO DEEP LEARNING - Neural Networks

Image
What is a neural network?
The term deep learning refers to training neural networks. In this post I’d like to provide some basic intuitions on neural networks.
    Let us consider an example where we are trying to predict the price of a house given its size. Let’s say we have a dataset with size of the houses and their corresponding price and we want to fit a function to predict the price of the house as a function of its size. In Linear Regression we try to draw a straight line to the available dataset.


    But we know that the straight line can eventually be negative whereas the price of a house is always greater than zero. So, we try to bend the curve so that it ends at 0. We can think of the function we just fit as a simple neural network where we have a node (neuron) with input as size of the house and output as price. The function is called RECTIFIED LINEAR UNIT (RELU).     A larger neural network can be formed by stacking all the single neurons. Let us extend the housing price …

Tennis-Paddle game

interface and interface collections in java

Image
Interfaces: Interface in Java refers to the abstract data types. They allow Java collections to be manipulated independently from the details of their representation. Also, they form a hierarchy in object-oriented programming languages. As you have already learnt about Abstract methods and abstract classes and how they are implemented. The main difference between an abstract class and an interface is that in an abstract class there exists at least one abstract method. On the other hand, an interface consists of all the methods as abstract. Here, by abstract we mean that the methods are unimplemented.We all know that multiple inheritance is not supported in java. This is because of the conflicts that might arise when both the parent classes are having the same variable declarations. This makes it hard for the child class to infer which class the particular variable or the method belongs.Even though it is said that Java directly doesn’t support multiple inheritance, it might support the…

Logging levels and Resources in Android

Image
Logging and Resources in Android
In these series of posts, we are going to learn about the Android permission system, Network IO and how to move time consuming tasks off the main UI thread. In this post we will learn about the logging levels in android and the use of Resources directory in Android.
Logging:
Whenever you run an application, you might have seen a window pop up showing different messages like “A slow app needing to skip frames” or “An Error occurred” or perhaps “Some request or process finished”. These messages are called Log Messages. Developers use log messages to communicate information about their application. When you use logs in your app, you must declare the log level that your app must use.




There are 5 log levels in Android:
·ERROR: Use error to log any error messages·WARN: Use warn to log messages that wont crash your app but remain a concern.·INFO: Info is mainly used to log informative messages like “CONNECED TO THE INTERNET”.·During development, we can use both d…

What’s the difference between AngularJS, Angular2 and Angular4?

Image
One question that often comes out is “What is the basic difference between AngularJS, Angular 2 and Angular 4 and how to jump from Angular 2 to Angular 4?”


Angular JS was introduced in 2010 as a JavaScript framework for building client side single page web applications. So it gained popularity and the Angular team at google started to add some more features to the core. But the framework was not designed with the needs of today’s applications in mind and moreover it was totally complex. So the Angular team decided to rewrite the entire framework using TYPESCRIPT and as a result Angular 2 was released in mid 2016. The new Angular framework is completely different from the previous version and we can think of it as a completely different framework compared to the earlier one.

The decision was frustrating to most of the developers since a lot of applications have been designed using AngularJS. I personally liked the direction that Angular developers took in rewriting the entire framework a…