Category Archives: Software Engg

Why consider using Guava-like Libraries for API Contract Conditions Checks

This article represents a perspective on why one should consider using Pre/Post condition checks libraries rather than writing it down time and again in their code. While doing code reviews, many a times, I have found people using preconditions checks such as “Not Null” in a casual manner rather than based on API contracts requiring pre and post conditions checks. Such checks, at times,  do make code difficult to read, learn or understand. One may want to rather use home-grown or external (proven ones) libraries for doing such checks. Not only does it enhance code readability and learn-ability but also, it does make you aware of contracts you put in the code thereby including only necessary checks and, …

Continue reading

Posted in Code Review, Software Quality, Tools. Tagged with , .

Liskov Substitution Principle with Java Code Examples

This article describes what is Liskov Substitution Principle along with code examples in Java. Please feel free to comment/suggest if I missed mentioning one or more important points. Also, sorry for the typos. In this post, you will learn some of the following: What is Liskov Substitution Principle (LSP)? Code Samples to Illustrate LSP What is code quality characteristic that represents by LSP? You may also want to check another code quality principle such as Single Responsibility Principle explained with Java Examples. What is Liskov Substitution Principle (LSP)? Take a look at this paper on Liskov Substitution Principle which provides great details on Liskov Substitution Principle. As per LSP, functions …

Continue reading

Posted in Java, Programming, Software Quality. Tagged with , .

SonarLint for Eclipse – Do Proactive Code Quality Check

This blog talks about SonarLint tool for Eclipse IDE which could be used by developers to get on-the-fly feedback for code quality issues when they are writing the code. This feature was always one of the most awaited feature of Sonar and thankfully, it’s out there for Java, Javascript, PHP developers to try it out for themselves. Following is how one could get started: One needs to download and install SonarLint for eclipse within Eclipse IDE. All one needs to do is go to this page (http://www.sonarlint.org/eclipse/ ), click on “Marketplace” button which takes you to install page. Drag and drop “install” button in your eclipse workspace and it would …

Continue reading

Posted in Software Quality. Tagged with .

Docker – How to Install Mean Environment

This blog represents tips and code samples in relation with how to install MEAN Docker Container for working with MEAN web app.

Posted in Software Quality.

Top 8 Areas to Consider for Application Architecture Review

This article represents top 8 areas to consider when you are going to review an application architecture. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Hardware and Operating System: Following areas need to be reviewed: Hardware and operating system choices Financial analysis Processes for evaluating hardware and operating system System capabilities involved in high-frequency, high volume data transfers Software Services and Middleware: Following areas need to be covered: Coding standards Data structures Architecture layers Design patterns (stateful vs stateless) Design for change Communication protocols Code review processes Unit testing Applications Infrastructure: In case, the applications are infrastructure applications, …

Continue reading

Posted in Application Assessment, Architecture, Enterprise Architecture, Software Engg.

Sublime – How to Install TypeScript Package on Windows

This article represents code snippets which could be used to install TypeScript package for Sublime 2 and Sublime 3 IDE. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key topics for which code samples are provided: Install TypeScript Package for Sublime 2 Install TypeScript Package for Sublime 3 Install TypeScript Package for Sublime 2 Execute following command to install TypeScript package. cd C:\Users\<yourWindowsUser>\AppData\Roaming\Sublime Text 2\Packages git clone –depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript Install TypeScript Package for Sublime 3 Execute following command to install TypeScript package. cd “%APPDATA%\Sublime Text 3\Packages” git clone –depth 1 https://github.com/Microsoft/TypeScript-Sublime-Plugin.git TypeScript  

Posted in Software Engg, Tools. Tagged with .

Javascript – Jasmine Unit Tests for Promise Object

This article represents tips and code samples in relation with how to write unit tests for Promise object when using Jasmine framework. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: Sample Promise Object Unit Tests related with Promise Object Sample Promise Object Pay attention to some of the following in the code below: Auth module returns a Promise object that returns a User object when resolved or returns an error object in case of error. A JSON object is passed to resolve or reject method. Save the file …

Continue reading

Posted in Javascript, UI, Unit Testing. Tagged with , , .

5 Reasons Why Every Developer Must Adopt Dockers

This blog represents some of the key reasons why every developer must consider adopting for development. 1. Setup clean Dev environment within no time. Many a time, while developing, we end up changing configuration. Installing new libraries etc. With this act, the Dev environment deviates to a new state which may be different from expected QA and Production environment. With Dockers, one could rather update the image and create new containers in case new libraries need to be installed. 2. Setup Dev environment within minutes. As a matter of fact, developers could actually recreate the Dev environment every morning before starting his work. This ensures that he maintains the state …

Continue reading

Posted in Software Engg, Software Quality. Tagged with , , .

Dockers – Top 5 Use Cases for Dockers Adoption

This blog represents top 5 use cases why IT enterprises (product & software-service vendors) should consider adopting Dockers in their SDLC. 1. Quicker Developer Onboarding into Projects: We all are aware of development environment setup related issues when taking about developers on boarding. In my recent experience, I almost spent a week to get manually setup for a recently started project comprising of just 3-4 members. I had to refer to couple of documents which was last updated few weeks back and thus was not up to date. This led to productivity loss. In my earlier experience, I saw the usage of VMs images for developer onboarding. This worked very …

Continue reading

Posted in Dockers, Software Engg, Virtualization. Tagged with , .

Dummies Notes – How SAML-based SSO Authentication Works?

This article represents dummies notes on how could one go for SSO implementation using SAML. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are the key points described later in this article: What is SAML? How does SSO authentication happen using SAML? What are Key Components of SSO Design, in general?   What is SAML? For those of you unaware of what is SAML, here is the definition from WIKIPedia page on SAML: Security Assertion Markup Language (SAML, pronounced sam-el[1]) is an XML-based, open-standard data format for exchanging authentication and authorization data between parties, in particular, between …

Continue reading

Posted in Application Security, Software Engg. Tagged with .

Dummies Notes – What is B-Tree and Why Use Them?

This article represents quick notes on what is B-Tree Data structure and why use them. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. I found this page (Memory locality & the magic of B-Trees!) on B-Trees as a very interesting read and, would recommend anyone and everyone to go through it to quickly understand the nuances of B-Tree. B-Tree could be defined as a linked sorted distributed range array with predefined sub array size which allows searches, sequential access, insertions and deletions in logarithmic time. Simply speaking, B-Tree is nothing but the generalization of a Binary Search Tree. One may …

Continue reading

Posted in Data Structure, Dummies, Software Engg. Tagged with .

Quick Notes on What is CAP Theorem?

This article briefly talks about what is CAP theorem and provides appropriate examples. I have come across many candidates appearing for architect interview who failed to answer the question such as some of the following: What is CAP theorem? RDBMS system such as Oracle achieves which of the following two: Consistency, Availability, Partition Tolerance NoSQL datastore such as HBase tends to achieve which of the following two: Consistency, Availability, Partition Tolerance The article below addresses some of the above questions. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following points are discussed later in this article: What is …

Continue reading

Posted in NoSQL, Software Engg.

API – How to Get Started with Facebook API Integration

This article represents steps to get started with Facebook Graph API. In later articles, I shall explain how to integrate using Java and maybe other programming languages. The primary reason I am hooked to Facebook integration these days is my need for getting exploratory data from facebook for data analysis for my Big Data projects. Before getting onto use framework such as RestFB, it is recommended to play with these APIs in the Facebook-provided playground.  I shall be talking in detail about how to get started with RestFB in later articles. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the …

Continue reading

Posted in Software Quality. Tagged with , , .

How to use Sonar Dashboard to Report on Software Code Quality

This article represents methods one could adopt to read the sonar dashboard and gather data appropriately to monitor and control the software code quality. The primary reason why I am writing this blog is the fact that I have come across several team leads who asked me the questions related with data on sonar dashboard and what all they could do with it. Please feel free to comment/suggest if I missed to mention one or more important points. Also, sorry for the typos. Following are three different aspects of software quality which could be tracked using Sonar Dashboard: Maintainability (testability, reusability & modularity) Usability (readability and understand-ability) Security Following are …

Continue reading

Posted in Software Quality. Tagged with .

Code Quality – Why Avoid Higher Cyclomatic Complexity?

This article represents my thoughts on why one should avoid a higher cyclomatic complexity (value more than 15 or so). Recently, I have been doing code reviews for multiple projects using Sonar. This is where I came across the rule called as “Cyclomatic Complexity”. The rule raises an alert for all the methods whose cyclomatic complexity is found to be more than 10. Thus, I thought of listing down reasons why one should pay attention to the cyclomatic complexity of method when he/she is writing fresh method or making changes to existing method. Personally, I do agree and strongly believe that one should avoid writing methods/function of code complexity higher than 15 or …

Continue reading

Posted in Software Quality. Tagged with .

JArchitect Version 4.0 on Mac OSX is GA for Download

Version 4.0 of JArchitect on Mac OSX is now available for anyone wishing to download and try it. JArchitect manage complex code base and achieve high Code Quality. With JArchitect, software quality can be measured using Code Metrics, visualized using Graphs and Treemaps, and enforced using standard and custom Rules via CQLinq queries. Features in JArchitect v4.0 include: A dashboard panel that shows the state of the current code base at a glance as well as a comparison to a baseline. Monitoring trends on 50 default “Trend Metrics” as well as custom trend metrics. These can be displayed through Trend Charts. Focus on recent rules violations (by using filters) that occur …

Continue reading

Posted in News, Software Quality.