Posts
Leveraging Cron job to monitor network connection
Scenario: There are a handful of ways to run some script periodically on a linux machine. Cron jobs, watch command. Cron jobs are heavily used in server infrastructure for task like regular disk clean up, network monitoring, hard disk storage monitoring, setting up alerts, etc.
I have been running Ubuntu 18.04 and one common issue that I have observed is, in certain wireless connections, after a certain time network-manager stops working.
read morePosts
Leveraging git hooks
Adding tag support to Jekyll Now This blog is a forked version of a popular github blog project called Jekyll Now. It’s based on ruby and is a really elegant and easy to use tool that I have found. Being bare minimum version it doesn’t have tagging support for blog posts.
I have added tags to all the blog posts. This particular plugin isn’t supported by github so running it just like that doesn’t create ’tags’.
read morePosts
SDKMAN, Java9, Jshell, REPL
Working with multiple versions
Most of the times we as developers are working on multiple version of the language or the framework. If not managed properly it can be a nightmare dealing with different projects which use different versions of the same language. Say, project A uses python2 and project B uses python3. In python we have virtual environments which can be managed using, among many others, pipenv. Likewise for Ruby we have rbenv.
read morePosts
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 more