Category: Uncategorized

  • Setting up MacBook Pro M1 2021 – 14″ (macPro Monterey)

    After a long time I finally switched to a new MacBook Pro. Here is the list of things which I use as a developer:-

    The first thing to install on M1 Pro machine is rosetta

    softwareupdate --install-rosetta

    Install command line tools for Xcode

    xcode-select --install

    Next would be my favourite package manager Homebrew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    I have been using iTerm since years and just cannot live without it.

     brew install --cask iterm2

    Install zsh and oh-my-zsh

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

    Install Node from nodejs.org

    Visual Studio Code

    Dot Files are available on my Github Repository

    https://github.com/samaybhavsar/dotfiles

    For those who work a lot on terminal can refer to Paul‘s repository. It is much more exhaustive.

    https://github.com/paulirish/dotfiles

    Install PHP 8

    brew install php@8.0
    brew link php

  • KISS, YAGNI & DRY

    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

  • Setting up Development Environment for MacBook Pro (MacOS Sierra)

    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