• Skip to primary navigation
  • Skip to main content

Samay Bhavsar

  • Home
  • About

KISS, YAGNI & DRY

June 28, 2019 by Samay Leave a Comment

KISS – Keep It Simple, Stupid

The KISS principle states that most systems work best if they are kept simple rather than made complicated; therefore simplicity should be a key goal in design, and that unnecessary complexity should be avoided. Wherever possible, complexity should be avoided in a system—as simplicity guarantees the greatest levels of user acceptance and interaction. KISS is used in a variety of disciplines, such as interface design, product design, and software development.

https://people.apache.org/~fhanik/kiss.html

YAGNI – You aren’t gonna need it

YAGNI is principle of extreme programming (XP). It states that a programmer should not implement functionality until deemed necessary. Ron Jeffries who is the founder of XP states that “Always implement things when you actually need them, never when you just foresee that you need them.”

https://ronjeffries.com/xprog/articles/practices/pracnotneed/

DRY – Don’t Repeat Yourself

The DRY principle is principle of software development which aims to reduce repetition of code by abstraction. A simple example would to create a function for a piece of code which is repeated and replace it with the function calls.

DRY has been formulated by Andy Hunt and Dave Thomas in their book The Pragmatic Programmer. It has been stated that “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”.

https://www.artima.com/intv/dry.html

Filed Under: Uncategorized

Setting up Development Environment for MacBook Pro (MacOS Sierra)

May 14, 2018 by Samay Leave a Comment

Run the command below to install command line tools for Xcode.

xcode-select –install

Homebrew is one of the most popular package manage for MacOS. It is written in Ruby Programming Language by Max Howell. To install Homebrew, copy and paste the following command in terminal,  hit “Enter” and follow the steps.

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

To run brew on your terminal, you need to add its path to .bash_profile or .zshrc depending on the shell you are using.

echo ‘export PATH=”/usr/local/bin:$PATH”‘ >> ~/.bash_profile

To verify, if it is install successfully, run the following command.

brew doctor

iTerm2 is an open source replacement for Apple’s Terminal. It’s highly customizable and comes with a lot of useful features.

brew cask install iterm2

Oh-My-Zsh is an open source, community-driven framework for managing your ZSH configuration.

Install zsh

brew install zsh zsh-completions

Install oh-my-zsh

sh -c “$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)”

If you are into web development, it would be a good idea to have the different browsers. It comes handy whenever required.

Install Google Chrome

brew cask install google-chrome

Install Firefox

brew cask install firefox

Code Editors – Sublime and Atom are amongst the popular and widely used editors.

brew cask install sublime

brew cask install atom

brew install wget –with-iri

The Node Ecosystem

NodeJS

brew install node

MongoDB

brew install mongodb

brew services start mongodb

PHP Ecosystem

brew install composer

brew install php71

brew link php@7.1 –force

brew install mysql

brew cask install postman

Filed Under: Uncategorized

Copyright © 2021