Skip to main content

· 2 min read

I've been a .Net developer since the beta days of .Net 3.0, Now i find myself doing less and less coding related with .Net related stuffs. However, the new strategy from Microsoft  encouraged all the developers including me to once again start doing some .Net work from time to time. One of the highlighting tool among them was the Visual Studio Code.

Sublime text has been my favorite text editor all these time.When i downloaded it and looked at the first time my impression was nothing more than a plain editor with very little added value. Before VS code I have tried all popular editors - Sublime, Atom, Brackets etc. After trying it for few weeks now I feel developers  have everything they need .

Some of the highlights of VS Code are as follows,

  • Default integrated git system is really awesome.
  • Powerful debugging option.
  • Very smart code completion.
  • Huge list of Languages Support
  • Multi panel for side by side editing
  • Always-On IntelliSense
  • Debugging support
  • Peek Information like grammer correction
  • Command Palette

Choice of editor is a personal preference. If you like an lightweight IDE environment that's cross platform, you might enjoy VS Code. Give it a try, you will definitely love it.

· 3 min read

It's been exactly 2 years since i started to learn Angular and it's sad that i dint write even a single blog on the same. Finally decided to start a series on the same topic. AngularJS is a JavaScript MVC Framework that integrates two-way data binding, web services, and build web components. There are enough number of blogs and tutorials to follow on the same.

The current product which i am working is a data visualization tool which is built on AngularJS  and has many visualization  been integrated with D3.js.

In this blog, will be describing how to build a directive using d3.js and angular.

Directive is very powerful feature of AngularJS. It easily wired up with controller, html and do the DOM manipulations.

Building a Decomposition Force directed d3 directive:

 App.directive('forceGraph', function() {  
return {
restrict: 'EA',
transclude: true,
scope: {
chartData: '='
},
controller: 'hierarchySummaryCtrl',
link: function(scope, elem, attrs) {
var svg;
elem.bind("onmouseover", function(event) {
scope.svg = svg;
console.log("hierarchy svg", scope.svg);
scope.$apply();
});
scope.$watch('chartData', function(newValue, oldValue) {
if (newValue) {
scope.draw(newValue.data,newValue.id);
}
});
scope.draw = function(rootData,divID) {
var width = 400,
height = 320,
root;
var force = d3.layout.force()
.linkDistance(80)
.charge(-120)
.gravity(.05)
.size([width, height])
.on("tick", tick);
var divid = "#" + divID;
d3.select(divid).selectAll("*").remove();
svg = d3.select(divid)
.append("svg").attr("viewBox", "0 0 400 400")
.attr("width", '100%')
.attr("height", '100%');
var link = svg.selectAll(".link"),
node = svg.selectAll(".node");
root = rootData;
update();
console.log(svg);
scope.setSvg(svg[0][0].innerHTML);
function update() {
console.log(nodes)
var nodes = flatten(root),
links = d3.layout.tree().links(nodes);
var nodes = flatten(rootData),
links = d3.layout.tree().links(nodes);
force.nodes(nodes)
.links(links)
.start();
// Update links.
link = link.data(links, function(d) {
return d.target.id;
});
link.exit().remove();
link.enter().insert("line", ".node")
.attr("class", "link");
// Update nodes.
node = node.data(nodes, function(d) {
return d.id;
});
node.exit().remove();
var nodeEnter = node.enter().append("g")
.attr("class", "node")
.on("click", click)
.call(force.drag);
nodeEnter.append("circle")
.attr("r", function(d) {
return Math.sqrt(d.size) / 5 || 4.5;
});
nodeEnter.append("text")
.attr("dy", ".25em")
.text(function(d) {
return d.name + ", Count: " + d.size;
});
node.select("circle")
.style("fill", color);
}
function tick() {
link.attr("x1", function(d) {
return d.source.x;
})
.attr("y1", function(d) {
return d.source.y;
})
.attr("x2", function(d) {
return d.target.x;
})
.attr("y2", function(d) {
return d.target.y;
});
node.attr("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")";
});
}
function color(d) {
return d._children ? "#FFEB3B" // collapsed package
:
d.children ? "#F44336" // expanded package
:
"#D32F2F"; // leaf node
}
// Toggle children on click.
function click(d) {
if (d3.event.defaultPrevented) return; // ignore drag
if (d.children) {
d._children = d.children;
d.children = null;
} else {
d.children = d._children;
d._children = null;
}
update();
}
// Returns a list of all nodes under the root.
function flatten(root) {
var nodes = [],
i = 0;
function recurse(node) {
if (node.children) node.children.forEach(recurse);
if (!node.id) node.id = ++i;
nodes.push(node);
}
recurse(root);
return nodes;
}
};
}
};
});

My Repository With the sample

· 3 min read

Well, i was one of the speaker at Colombo Big Data Meetup which was held yesterday and i spoke about Google's bigquery. Hence i have decided to write a blog on that so that you could get benefited if you are a BigData Fan.

What is Big Data?

There are so many definitions for Big Data , let me explain what does it really mean? In the near feature, every object on this earth will be generating data including our body.We have been exposed to so much information everyday.In vast ocean of data, complete picture of where  we live where we go and what we say, its all been recorded and stored forever.More data allows us to see new , better different things.Data in the recent times have changed from stationary and static to fluid and dynamic.we rely a lot on data and thatch is  major part of any business.we live in a very exciting world  today, a world where technology is advancing at a staggering pace, a world data is exploding, tons of data being generated. 10 years before we were measuring data in mega bytes, today we are talking about data which is in petabyte size, may be in few years we are going to reach zetabyte era, that means the end of English alphabets.Does it means the end of Big Data? .No . If you have shared a photo or post or a tweet on any social media,You are one of them who is generating data, and you are doing it very rapidly.

Once you have decided to use bigquery there are certain things you need to know before using for optimizations and less cost.

Do not use queries that contains Select * , which is going to execute entire dataset and hence it will result in a high cost.

Since bigquery stores values in nested fields it is always better to use repeated fields.

Store in multiple tables as possible since it is recommended not to have JOINS

Bigquery also supports extensions such as ebq and dry run to encrypt the data and for executing the query to actually check how much resources that actual query is going to consume, which makes lot of developers and data analysts job easy.

I will be writing two separate blogs in the coming days on how to integrate with Bigquery and How to ingest the data into bigquery.

You can find the slides of the presentation from here

· 3 min read

Business Intelligence and It's impacts:

Hello! I am back, after what I realized was my first extended blog break in four years. This time something technical, which is very much relevant to the product which i am currently working on. First of all, what is Business Intelligence?  It is the process, tools and infrastructure for generating insights from raw data is collectively called Business Intelligence.

Every organization generates data as part of its operations. Every organization also has access to some form of external data. But in order to analyze and take informed decisions, the data has to be processed and turned into information, and the information has to be presented in a meaningful way to be able to identify patterns or to see key performance indicators (KPIs), and thereby generate insights out of the information.          

This blog mainly describes the importance of BI in an insurance industry since i have to do my final project  where a BI solution can be used and come up with a solution with a collection of tools.

BI Solution for an Insurance Industry:

With rising globalization and growth, Business intelligence has become important for many firms. Business Intelligence solutions help these firms to transform into a dynamic enterprise through actionable intelligence. One of the important sector in this modern world is the insurance firms. In terms of technology, insurance companies are generally not at the forefront of technology and their systems are way behind. I have taken this domain as my project with some of the open source and commercial business intelligence tools that could help this sector.

The Organization i picked was HNB assurance PLC, it is a leading Sri Lankan Insurance corporation which provides Life Insurance solutions for Sri Lankan citizens.

The following are the Analysis that i have performed on the sample data that i have collected.

Classification of their Customer profiles using Decision tree and plotted in GeoMaps
Sentimental analysis of the company's Facebook Page
Various insights for their Insurance Claims
Sales forecasting – Dashboard

BI Tool that i have used : 

DigIn 

DigIn is the only true end-to-end analytics platform that allows you to easily visualize your structured and unstructured data in one place.Also it has On-demand data ingest capabilities and in-memory caching allows anyone to access data from anywhere at anytime from any device.

Conclusion: 

Use of business intelligence and analytic tool/solution is very vital for any insurance company wanting to succeed in an increasingly competitive industry. The ability to turn large volumes of raw data into actionable insights represents a significant value proposition for these businesses. These insights can be priceless in terms of the limitless opportunities they can unearth across the business with the help of social media analytics. Hope, This BI tool that i have suggested for this organization is a wonder not a
blunder.

You could find the slides that i have used for my presentation Here

· 3 min read

Time has gone extremely fast, and I can still recall the day that I joined Duo. I can safely say that Duo is an awesome place to work at since I have had the opportunity to work with awesome, highly motivated people who loves the company. I never had much trouble with work life balance as I only worked more when I felt like it, rather than someone telling me to do. It truly is a different experience working for a Product Company which gives you an environment (Innovation engine) and Core focus on developing cutting-edge components.

Unlike most of the top IT firms in Sri Lanka, Duo gives  much importance to innovation and out of the box thinking. If you have something new and substantial to offer, trust me you are going to go a long way. It is a great place to start your career. Work culture is very positive and is full of energy. Talents are recognized and appreciated. Most importantly, one of the places which gives importance to work life balance!

Why I think it’s a great place to work?

Flat Hierarchy and Freedom of Ideas:

One of the things I love about Duo Software is that there's no sense that management is hiding somewhere making decisions and then condescendingly telling you what to do without listening to input. From CEO to the person who provides tea is constantly asking for input from everyone in the company and is available for discussing where we should go. It is a company, still at a size where you can get to know everybody and things still feel like a family. And it's exciting to watch the company itself evolve and grow.

Great Learning:

Duo Software has a lot of smart, hard-working people. The best engineers I have ever had the privilege of working with. For developers out there it’s a company that uses “GoLang”, a fun new language, as well as Couch Base, Redis, AngularJS and a range of other cool new technologies that will be good to know for the rest of your career.

Here at Duosoftware,

“Developers don't need dress code,

                                          They do write best code!”

Awesome office:

Some heavy metal music to keep you awake, a pool table which is free to be used by the team whenever they like, a reception hall with a pretty receptionist, a group of crazy people from different places belonging to one family. What more  could you ask for?

More Opportunity and Responsibility:

As of my knowledge, DuoSoftware is producing an exciting product that is constantly evolving and exploring the cutting edge, thereby a developer can become a full professional stack developer.

The Best “CEO”:

Last but not the least, one of my inspirations Mr.Muhunthan Canagey. As an aspiring tech entrepreneur, I think his best asset and what led him to success was being optimistic. He sees the problem in many perspectives and he thinks of solving the problem in many dimensions. An outstanding human being, that any employee  would be proud to to have as CEO.

Finally, my journey with Duo Software is remarkable, and I hope the upcoming days will be equally fulfilling and challenging, towards my next goal. I hope this blog will also serve some help to new members of team Duo  or laterals willing to join Duo Software.