Posts
Declarative vs Imperative programming
Imperative programming focuses on ‘how’ and Declarative programming focuses on ‘what’.
Examples
C#
//Collection of integer objects List<int> collection = new List<int> { 1, 2, 3, 4, 5 }; //imperatively checking and creating a list of odd numbers List<int> results = new List<int>(); foreach(var num in collection) { if (num % 2 != 0) results.Add(num); } //doing the same 'declaratively' by using LINQ var results = collection.Where( num => num % 2 !
read morePosts
GitHub & Microsoft Saga
Github is the most popular hosting site for millions of git repositories around the world, most of them being open source.
Microsoft was filed for Antitrust case in 1998 and has been historically been infamous for being more business-oriented. The then CEO Steve Ballmer even said Linux is a cancer that attaches itself in an intellectual property sense to everything it touches. However times have changed and Microsoft has come a long way.
read morePosts
Working with Spring Data and Json
1. Overview
Json is, in many places, the preferred way of storing data due to it’s brevity (mostly compared to xml) and human readability. While working in any web framework which involve operation with data models and templates, usage of json data format is almost inevitable. Languages like Python, Ruby even have this format conceptually built into the core language library itself. Hash in ruby and dictionaries in python which allow json-(dictionary/hash) conversion with an ease.
read morePosts
GDPR
GDPR (General Data Protection Regulation) is a regulation to ensure that the companies working in the European Union region in e-commerce domain comply with a set of rules in order to safeguards customer’s data and their privacy. It also requires them to completely wipe off user’s data when requested by the user. So, basically this is an attempt at empowering general user and giving them ownership of their own data. In the light of recent incidents such as Cambridge Analytica Scandal involving Facebook, enforcement of GDPR (enforceable from 25 May 2018) has been received with very much enthusiasm and anticipation.
read morePosts
Generative Adversarial network
Adversarial training is the coolest thing since sliced bread.
–Yan LeCun (Quora Session)
Little preface:
A little background first. Traditional neural networks have an interconnected layer of computing nodes where in the first layer various input signals of the training data are fed and in the final layer are select number of nodes(each representing a class/category) each representing the probability of given data being into that certain category. Between the first and the last layer are n numbers of additional layers where input signals flow from one layer to another based on some cost function and other computations that follow along the connections (represented by weight of the connection).
read morePosts
Message Queuing (Kafka and Zookeeper) for Microservices and ML Solutions Pipelines
Microservice architecture is a philosophy of decoupling an otherwise large monolithic application into different independent modules (applications) interconnected with one another as well as external data sources using APIs. Message queuing comes into play in order to handle these inter-microservice and microservices-external-source communications, be it API calls or intensive data processing, blocking threads for which using synchronous model would render the entire application unresponsive.
Apache Kafka is one such platform. Officially, it’s known as a distributed stream processing platform with high resilience and fault tolerance.
read morePosts
Autowiring Generics In Spring
@Autowired is heavily used in Spring for injecting dependencies. By entrusting the framework itself to inject dependencies (eg: repositories interface) programmer can rest assurred and focus on core business logic of the application.
We can also use @Autowired in order to initialize java collections which use Generics. Let’s say we have an interface which could be implemented by a given number of classes. We can Register each of those classes in Spring Context with @Context annotation.
read morePosts
Equals and HashCode in Java
The parent of all ‘Object’ classes in Java has, among many, two notable methods: equals and hashCode. For the most of the part, we can go about without tinkering/overriding these methods, but they play a significant role when we are dealing with any kind of data structure whose implementation depends on hashing. Maps, Sets, and their various derivatives and implementations of the Java Collection framework depend on the hashing of objects.
read morePosts
Leveraging Lombok Annotations to spice up Java
Java is heavily criticized and hated for its verbosity. Even for things such as reading/writing files we have to ceremoniously write a lot of generic stuff. The increasingly popular Java library Lombok has been hugely successful in addressing this issue. It’s an annotation based Java library that plugs itself into editors, IDE, and build tools at compile time, facilitating the generation of boilerplate code and making the code clean and more readable.
read morePosts
SSH tunnelling using ngrok!
So, what if you want to expose your locally running server to the bigger world wide web (WWW)? The answer: “port forwarding on your router and time setting up dynamic DNS solutions”. I am glad that there is a tool now which allows developers to expose their local server to the internet using a single command with a plethora of options: over secure channel, with authentication enabled and also live inspection of the requests coming to the server to name a few.
read more