My Development Workflow 2022

December 3, 2022 (2y ago)

In this article, we will take a look at my personal development workflow in 2022. I will share with you the tools, apps, and settings that I use on a daily basis to maximise my productivity and efficiency as a developer. This includes my favorite IDE and its theme, the terminal aliases that I use to save time, and the database set-up I have. Whether you are a beginner or a seasoned developer, I hope that you will find some useful tips and inspiration in this article.

I'll walk you through everything I use from my workstation, to my IDE, to my terminal, and even my database set-up.

My Workstation

After first making the transition to Apple Silicon last year, I have recently made the switch to a 14-inch MacBook Pro with an M1 Max (10-core CPU, 32-core GPU), 64GB RAM and a 2TB SSD. I am enjoying the performance boost from the M1 Max, and the 14-inch screen is a nice size when I am on the go.

For years I have had a single 27-inch 5K monitor, and never believed in the need for 2 displays, but a few weeks ago I purchased a second identical display and I have felt a massive productivity boost. I would certainly recommend it if you felt in the same situation as me, with one monitor and feeling like you don't need a second one - I did this, and now I cannot live without it.

My Workstation

My IDE

My day to day workflow involves Laravel, Vue, and Tailwind, so I use PHPStorm as my primary IDE. I have been using PHPStorm for a few years now, and I have found it to be a great IDE for my needs. I have tried other IDEs such as VS Code, but I always come back to PHPStorm.

I use GitHubs light theme with colours customised similar to the "InspiredGitHub" theme for Sublime Text, as much controversy as there is around light themes, I find them to be much easier on the eyes than dark themes. I also use the MonoLisa font for my IDE, which is a paid font but I find it to be worth the money.

My IDE

I also utilise the Laravel Idea plugin for PHPStorm, which is a paid plugin but it is extremely worth it. It provides a lot of useful features such as code completion, code generation, and much more. I have found it to be a great tool for my Laravel development.

Taking Notes

I have tried dozens of note taking apps over the years like Trello and Linear for my ToDo's, and I have struggled to remain consistent with them. After using apps I moved back to Pen and Paper and loved it since, the ease of having your notes in front of you rather than needing to load up an app is great.

Then a week ago I discovered Remarkable, and I have been using it ever since. It is a digital note taking device (similar to an iPad) that is a great alternative to pen and paper. I have been using it for a few days now and I am loving being able to create "notepads" for work and personal projects.

Terminal

I've tried many different terminal emulators over the years, from Warp to iTerm2, but I have always come back to the default macOS terminal. I have found it to be the most lightweight and the most reliable, and I have never had any issues with it.

I pair my terminal with Fig, which adds IDE-style autocompletion to your terminal. I have found it to be a great tool for my workflow, as I am able to quickly navigate through folders and run commands (with descriptions).

My Terminal

Aliases

I have a few aliases that I use on a daily basis to speed up my workflow, and I have found them to be extremely useful. I have included a few of my most used ones below:

alias pa='php artisan'
alias pint='./vendor/bin/pint'
alias nah="git reset --hard && git clean -df"
 
db() {
    if [ $# -eq 0 ]; then
        [ ! -f .env ] && {
            echo "No .env file found."
            return 0
        }
 
        DB_HOST=$(grep DB_HOST .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
        DB_PORT=$(grep DB_PORT .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
        DB_DATABASE=$(grep DB_DATABASE .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
        DB_USERNAME=$(grep DB_USERNAME .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
        DB_PASSWORD=$(grep DB_PASSWORD .env | grep -v -e '^\s*#' | cut -d '=' -f 2-)
 
        DB_URL="mysql://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_DATABASE}"
    fi
 
    if [ $# -eq 1 ]; then
        DB_URL="mysql://127.0.0.1/$1"
    fi
 
    open $DB_URL
}

Here I use the db alias to quickly open the database for my current project in TablePlus, this automatically reads my local .env file which saves me time. I also use the nah alias to quickly reset my git repository if I have made changes that I don't want to keep.

I have also configured Jetbrains Toolbox to open in my terminal, so I can quickly open my IDEs from the terminal using pstorm or idea like so..

alias pstorm="~/Documents/Development/CLI/phpstorm"
alias idea="~/Documents/Development/CLI/idea"

Note, this would need to reflect your own custom path, but I am showing it as an example.

Lastly, I have a few projects that need to utilise Java 8 and while my machine runs on the latest version, I have an alias to run the Java 8 version of the JDK.

alias java8='/Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/bin/java'

Databases

While many look towards MongoDB and other NoSQL databases, I have always been a fan of MySQL and have used it for years now, and I have found it to be a great database for my needs.

I use the DBngin app to locally host my databases, as it is isolated which makes it easier to delete and update without random files everywhere. I pair this with their TablePlus app to manage my databases, as it is a great GUI for MySQL.

I also use SingleStore for my production databases, as it supports the MySQL protocol and is more suited for data-intensive applications that require fast aggregation and scalability. I use their Docker image to host SingleStore locally for development, which lets me tune my queries and test my application locally before deploying to production. It works amazingly well on Apple Silicon, and I have found it to be a great tool for my development workflow.

Other Tools

Debugging

I use Spaties Laravel Ray app to debug my Laravel applications, as it is a great tool for debugging and profiling. I have found it to be a great tool for my workflow, as it is easy to use and provides a lot of useful information.

Testing

Prior to this year I saw zero appeal in testing, I always felt as I was testing it myself in the browser I didn't need to write automated tests. However, after purchasing Spaties Testing Laravel course, I realised how easy they were to set-up and gave me a lot of confidence when pushing to production. It gives me assurance that my application is working as expected, if I happen to break a feature when changing code.

I currently use PHPUnit for my testing, as it is the default testing framework for Laravel and I am still learning. I still haven't got round to diving into PEST, but I have heard great things about it and I am looking forward to trying it out some day.

SSH

I use 1Password to manage my SSH keys, it is also a great tool for managing passwords and other sensitive information. I like that I can store my SSH keys in 1Password and use them across multiple devices, while still being able to lock it down to a physical hardware key.