Saturday, September 23, 2017

How to connect to a MySQL database from another system (remotely)

Today we would discuss, how to connect to a MySQL database from another system? After going through this article, one would have the answers of below questions:
  • Unable to connect to a MySQL database from remote system in the same network?
  • Although able to connect to a MySQL database using localhost or 127.0.0.1 but unable to connect it using the IP address of the same machine in which MySQL database is present?

Table Of Contents

1. Prerequisites
2. The MySQL Access Privilege System
3. MySQL Error
4. Resolution
5. Conclusion

Sunday, September 17, 2017

PMD - A Step towards Writing Clean Code

Today I would throw some questions related to writing clean code, automation, static code analysis and see if you are with me in this exciting journey:
  • Is it practically possible to remember each and every code convention rules , best practices, bad practices, basic design principles while writing codes ? 
  • Is it possible for code reviewers to inspect every lines of code to find code flaws ?
  • Is it smart thing for code reviewers to waste their time, effort and energy to find code flaws related to conventions, bad practices, potential bugs, dead code, unused code and so forth when they could do so much more on the front of finding architecture, design, performance related issues ?
  • Is it good to find small bugs in UAT or QA instead of finding at development phase? 
  • Is it not a smart move to use open source tools to automate the process of reports generation based on customized rule sets?   
If the answer to the above question is No then you are on the right tract otherwise you need to think twice as in this Agile world, it's difficult to survive with this mentality because everyone is moving forward and welcoming DevOps culture, Agile, Automation with open arms.

Today we would discuss about PMD, an open source cross language static code analyzer tool.
In this article, we would discuss below points regarding PMD:
1. Overview
2. Configuring PMD for a Maven Project
3. Rule sets Overview
4. Running PMD
5. Example
5. Conclusion

Let's start our journey to explore PMD in some details!!

Saturday, September 16, 2017

A holistic approach towards streamlining the Code Review process with real word Use Case

Recently I have joined a new team and got a new responsibility for doing a code reviews. It's not that I haven't done the code reviews in the past but this time the volumes is large, timeline is tight and it's is a regular responsibility on my shoulder along with other jobs.

Several questions popped into my head (described below) not only because I can't imagine going through each lines of code to find the code flaws but also due to thinking that what would one think if I raise any concerns on their written code as I am new to the team.
  • What are things (parameter) one should practically cover while doing code reviews ?
  • Is there any scope for automation in the code review process?
  • What is the current process and tool sets used for code review process?
  • What should be the approach to share the code review recommendations / suggestions so that no one would get offended in any way? 
  • What are the best practices one should follow while doing the code review ? 

Although I had some knowledge about the answers of the above questions but it didn't stop me from peeping in the internet. As a results of this, I have got a good insight about the process and approach that could be used for Code Reviews. Therefore I am writing this piece today to share the holistic approach towards streamlining the code review process that one could follow.

Let's start our journey!!
  1. Identifying code review parameters
  2. Identifying the scope for automation in code review process
  3. Gap Match Analysis & accordingly taking action
  4. Right Approach of sharing code review recommendation / suggestion
  5. Important Pointer to keep in mind while doing code review
We will discuss each of these below in details.

Thursday, September 7, 2017

Industry Standard Use Cases of Apache HTTP Server

The Apache HTTP Server ("httpd") is an open source, free and most popular HTTP Web Server software that could run on both Unix & Windows type platform. Today we would discuss various industry standard use cases of Apache HTTP Server.

Industry Standard Use Cases of Apache HTTP Server


  • For setting up a common project specific software artifacts repository for all the developers in a team (Onshore & Offshore)
    You will think why one would want to use Apache HTTP Server for hosting software/project related artifacts? To answer this question, I would share my experience that is

    - Due to advent of Agile, DevOps culture in the software industry, people are rapidly opting various IT automation tool, Provisioning tool, Configuration Management tool for automating their Software Delivery pipeline. For example: Use Vagrant for easily and efficiently creating and configuring reproducible, portable development environments. It's becoming standard practice that project specific software artifacts like putty.exe, gradle.zip, jdk-7u51-linux-i586.gz, mysql-5.1.71-1.el6.x86_64.rpm, apache-maven-3.0.5-bin.tar.gz, centos65-x86_64.box etc are hosted in Apache HTTP Server. From this central location, software are downloaded in all the developers machines by using vagrant. In this way, every developers have the identical development environment which is similar to production/staging/qa. No more "It doesn't work on my machine" excuse.

    - Easily download the latest project specific artifacts from central location, no need to send mails to anyone, no follow up, no tension of downloading/having wrong version of artifacts, no more roaming around for finding desired version of software in the internet. 

  • For Load Balancing & Hosting Static Website Content
    While designing the technology stack for the enterprise application, it's most common and adapted practice to have Apache HTTP Server as their Web Layer which not only distribute incoming traffic to multiple Application Servers by using software load balancing techniques but also reduce loads of the Application server by directly serving request for all the static assets.

Here I have described the most widely used use cases of Apache HTTP Server that I have came across and used while my tenure in the IT industry. If you have any other use cases in mind, feel free to share through comments. Happy Learning!! :-)