Posts

Coding best practices - Part 3

Coding best practices Published Version:  1.0 To check the 2nd part click the below link; Coding best practices - Part 2 DRY Principle DRY  stands for  Don't Repeat Yourself . Also known as  DIE :  Duplication is Evil . The principle states: " Every piece of knowledge must have a single, unambiguous, authoritative representation within a system. "  —  Wikipedia The purpose for most applications (or computers in general) is to  automate repetitive tasks . This principle should be maintained in all code, even web applications. The  same piece of code should not be repeated  over and over again. For example, most web applications consist of many pages. It's highly likely that these pages will contain  common elements . Headers and footers are usually the best candidates for this. It's not a good idea to keep copying and pasting these headers and footers into every page. Instead, put that header and footer code  in separate source ...

Coding best practices - Part 2

Image
Coding best practices Published Version: 1.0 To check the 1st part click the below link; Coding best practices - Part 1 Avoid Obvious Comments Commenting your code is fantastic; however, it can be overdone or just be plain redundant . Take this example: Fig 1: Incorrect example with Avoid Obvious Comments When the text is that obvious , it's really not productive to repeat it within comments. If you must comment on that code, you can simply combine it to a single line instead: Fig 2: Correct example with Avoid Obvious Comments Note: If you have to write more than a one-line comment to explain what the code is doing, you should consider rewriting the code to be more readable.

Coding best practices - Part 1

Image
Coding best practices Published Version: 1.0 What Does Coding Really Mean? The definition of " coding " means inputting commands in a language that computers can understand, to build websites, apps and software. Computer coding is the process of using a programming language to deliver instructions to a computer. The code tells the machine what tasks to perform and how to perform them. These detailed instructions are written in multiple lines of code, and a document full of code is called a script . The script directs the computer to carry out your desired actions. You have to ensure your code is correct, simple, clean and readable.  Purpose of Having Coding Standards Maintaining the coding standards is the best practices at the time of coding as because of; A coding standard gives a uniform appearance to the codes written by different engineers . It improves readability, and maintainability of the code and it reduces complexity also. It helps in code reuse and helps to de...

Root Cause Analysis (RCA)

Image
Root Cause Analysis (RCA) Published Version: 1.1 Summary After reading this document we may aware about the concept of Root cause analysis and why its required, 2 techniques how to do RCA with real examples.

GIT - Cheat Sheet

Image
Source: Edureka Published Version: 1.0 Git (most of us know to some extent), is a freely available, distributed and decentralized version control system that helps developers to collaborate with multiple people on their projects and makes their life easy. A few of the git commands including basics and advance are listed below; # initial setup git init git clone # ignore Untracked files git status / git status -uno git branch git branch prod # will show remote branches as well git branch -a # delete a local branch git branch -d <branch-name> git branch --merged   git checkout prod # create a new branch with current branch code and checkout on that git checkout -b <branch-name> git pull git pull origin prod git fetch git pull = git fetch + git merge   # add file to index/stage for commit git add . git add <folder-name>/* # remove file from index/stage git reset <file_path> / git restore  --staged  <file_path> # to view changes in workin...