Why I dislike meetings?

One aspect of work that I don’t like is meetings. The reason I have hard time at meetings is because they force you to come up with a magical solution to a problem that you don’t understand completely. You are forced to put forward your incomplete thoughts just to justify your presence in the meeting.  This then turns out to a mess where everyone tries to run over each other. It becomes a battle of who can come up with a sentence that has all the right keywords that decision makers want to listen. Rather than listening to others and logically arguing about each other thoughts our mind is thinking what to say next to score brownie points.

I don’t have a solution to this problem. I try to be quiet in such meetings that makes me ineligible for the follow up meeting 🙂

Understanding Akka Dispatchers

This week I had to work on tuning a execution engine that is built using Akka. Akka is a toolkit and runtime for building highly concurrent, distributed and resilient message driven systems. This post assumes you already know Akka. Actor needs a dispatcher to perform its task. A dispatcher relies on executor to provide thread. There are two types of executors a dispatcher can have: 1) fork-join-executor 2) thread-pool-executor. In this post, we will understand how you can configure fork-join-executor and thread-pool-executor to meet your needs. Continue reading “Understanding Akka Dispatchers”

Actor System Termination on JVM Shutdown

In my day job, I work on a backend system that uses Akka. Akka is a toolkit and runtime for building highly concurrent, distributed and resilient message driven systems. I will write an in-depth Akka tutorial some other week. This week I will talk about a specific problem that I was trying to solve. We have two applications that talk over each other via Akka remoting. First application can shutdown the second application programmatically by sending a message to the second application ActorSystem. Shutdown here means you can exit the JVM. To make sure we do a clean shutdown, we added JVM shutdown hook that terminates the ActorSystem. Continue reading “Actor System Termination on JVM Shutdown”

Sentiment Analysis in Scala with Stanford CoreNLP

In this post, we will learn how to use Stanford CoreNLP library for performing sentiment analysis of unstructured text in Scala.

Sentiment analysis or opinion mining is a field that uses natural language processing to analyze sentiments in a given text. It has applications in many domains ranging from marketing to customer service. Few years back, I wrote a simple Java application using Naive Bayes classifier to determine whether people liked a movie or not based on sentiment analysis of tweets about a movie. Continue reading “Sentiment Analysis in Scala with Stanford CoreNLP”

React License

Yesterday, I wrote a private note on my organization Slack channel educating people on React license. We use React in few of our projects.

Everyone please read this as it is important to understand what you get into when you decide to use React or any of the Facebook’s open source project. All open source projects uses some form of license like Apache, MIT, BSD, etc.

Facebook uses BSD license along with the patent clause. BSD license is a very open license, that allow you to do anything with React. The culprit here is patent clause. The use of patent clause means following:

If you file a patent claim against Facebook or React, then your React patent clause will be revoked automatically. Facebook will in return counter claim that you violated Facebook’s patent clause so you are doomed now.

On the surface this doesn’t mean much to us as most of us are not in the capacity to sue Facebook.

But devil is in the details, Patent clause give Facebook the power to held any organization hostage that uses Facebook open source projects. To get the point through. Let’s take an hypothetical example that Facebook decided to offer a tool that infringes your company’s IP. Facebook can force your company to allow them to use your patent for free. Otherwise, your license will be revoked and you might have to rewrite the application as it uses React. As we all know rewrites are very costly so an organization might be forced to accept Facebook request.

Apache foundation and WordPress has decided not to use React in future. They are planning to move to some other open source project.

Couple of hours later, Facebook made a press release stating Facebook has decided to relicense React and few other projects. This is great news for the community but this will be applicable from React version 16. React 16 is rewrite of React from scratch. Also, majority of other Facebook open source project have the patent clause. It would be interesting to see if Facebook relicense other projects as well or not.

The decision to relicense React came after backlash from the community. I think the biggest influencer in this decision is WordPress deciding not to use React in their project.

Matt Mullenweg from WordPress wrote in his blog,

the Gutenberg team is going to take a step back and rewrite Gutenberg using a different library. It will likely delay Gutenberg at least a few weeks, and may push the release into next year.

Thank you WordPress. You forced Facebook to make this change.

Building an Angular 4 Drag And Drop Application in 15 Minutes

Last week, I had to build an application that required drag and drop functionality. This made me learn about couple of third party Angular 4 drag-and-drop APIs. The popular options in Angular 2+ world are ng2-dragula and ng2-dnd. I found ng2-dnd more extensible and feature rich so I used it in my application. In today’s blog, we will learn how to add drag-and-drop functionality to a todo application. We will use Addy Osmani Angular 4 todomvc application as the starting point. This post does not cover basics of how to build Angular 4 applications. There are many good references on the web that can teach you building Angular 4 applications from scratch.

Pro Programming Tip : Migrate your software development/testing environment into the hassle free cloud with high performance citrix xendesktop at an affordable xendesktop pricing from CloudDesktopOnline and remotely access your preferred programming tools such as emulators and IDE`s on your preferred device(PC/mac/Linux/android/iOS). Learn more about MS Azure and managed azure services by visiting Apps4Rent.

Continue reading “Building an Angular 4 Drag And Drop Application in 15 Minutes”

Finatra Tutorial: Building Scalable Services The Twitter Way

Finatra is an open-source project by Twitter that can be used to build REST APIs in Scala programming language. Finatra builds on top of Twitter’s Scala stack — twitter-server, finagle, and twitter-util.

  1. Finagle: It can be used to construct high performance servers.
  2. Twitter Server: It defines a template from which servers at Twitter are built. It uses finagle underneath.
  3. Twitter-Util: A bunch of idiomatic, small, general purpose tools for Scala.
    Continue reading “Finatra Tutorial: Building Scalable Services The Twitter Way”