Skip to main content

🧰 Developer Tools

"A craftsman is only as good as their tools - and their mastery of them."

Maximize productivity with the right tooling and configuration.


πŸ“ Git Advanced​

Essential Commands​

# Interactive rebase - clean up history before PR
git rebase -i HEAD~5
# Commands: pick, reword, edit, squash, fixup, drop

# Cherry-pick specific commit
git cherry-pick abc123

# Find who changed a line
git blame -L 10,20 src/App.java

# Binary search for bug introduction
git bisect start
git bisect bad # Current commit is bad
git bisect good v1.0 # This version was good
# Git will binary search commits

# Stash with message
git stash push -m "WIP: feature implementation"
git stash list
git stash pop stash@{0}

# Undo mistakes
git reset --soft HEAD~1 # Undo commit, keep changes staged
git reset --mixed HEAD~1 # Undo commit, unstage changes
git reset --hard HEAD~1 # Undo commit, discard changes (dangerous!)
git reflog # Find lost commits

Git Flow vs Trunk-Based​

Useful Aliases​

# ~/.gitconfig
[alias]
st = status -sb
co = checkout
br = branch
ci = commit
lg = log --oneline --graph --decorate -20
undo = reset --soft HEAD~1
amend = commit --amend --no-edit
wip = !git add -A && git commit -m "WIP: work in progress"
cleanup = !git branch --merged | grep -v main | xargs git branch -d

πŸ’» IntelliJ IDEA​

Essential Shortcuts (Mac)​

ActionShortcut
Search Everywhere⇧⇧ (Double Shift)
Find ActionβŒ˜β‡§A
Go to FileβŒ˜β‡§O
Go to Symbol⌘βŒ₯O
Recent Files⌘E
Navigate to Class⌘O
Rename⇧F6
Extract Variable⌘βŒ₯V
Extract Method⌘βŒ₯M
Generate⌘N
Quick FixβŒ₯Enter
Find UsagesβŒ₯F7
Go to Definition⌘B
Go to Implementation⌘βŒ₯B
Show Parameters⌘P
Quick DocumentationF1
Reformat Code⌘βŒ₯L
Optimize ImportsβŒƒβŒ₯O

Must-Have Plugins​

PluginPurpose
GitHub CopilotAI code completion
SonarLintCode quality analysis
Rainbow BracketsColorful bracket matching
Key Promoter XLearn shortcuts faster
GitToolBoxEnhanced Git integration
String ManipulationText transformation tools
Indent RainbowVisual indentation

Live Templates​

// Type: sout + Tab
System.out.println($END$);

// Type: psvm + Tab
public static void main(String[] args) {
$END$
}

// Custom: Create your own in Settings > Editor > Live Templates
// log + Tab
private static final Logger log = LoggerFactory.getLogger($CLASS$.class);

πŸ–₯️ Terminal & Shell​

Zsh Configuration​

# ~/.zshrc

# Oh My Zsh
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"

plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
docker
kubectl
fzf
)

source $ZSH/oh-my-zsh.sh

# Aliases
alias ll='ls -la'
alias ..='cd ..'
alias ...='cd ../..'
alias gs='git status -sb'
alias gco='git checkout'
alias gcm='git commit -m'
alias gp='git push'
alias gl='git pull'
alias k='kubectl'
alias d='docker'
alias dc='docker compose'

# Functions
mkcd() { mkdir -p "$1" && cd "$1"; }
port() { lsof -i :"$1"; }
killport() { lsof -ti :"$1" | xargs kill -9; }

Essential CLI Tools​

ToolPurposeInstall
fzfFuzzy finderbrew install fzf
ripgrep (rg)Fast grepbrew install ripgrep
fdFast findbrew install fd
batBetter catbrew install bat
exa/ezaBetter lsbrew install eza
jqJSON processorbrew install jq
htopProcess viewerbrew install htop
tldrSimplified man pagesbrew install tldr
httpieBetter curlbrew install httpie
lazygitGit TUIbrew install lazygit

Vim Essentials​

# .vimrc or neovim config basics
set number # Line numbers
set relativenumber # Relative line numbers
set tabstop=4 # Tab width
set shiftwidth=4 # Indent width
set expandtab # Spaces instead of tabs
set autoindent # Auto-indent
set clipboard=unnamed # Use system clipboard

# Essential motions
h j k l # Left, Down, Up, Right
w b # Word forward/backward
0 $ # Beginning/End of line
gg G # Beginning/End of file
/pattern # Search
n N # Next/Previous match

# Essential commands
i a # Insert mode (before/after cursor)
dd yy p # Delete/Yank line, Paste
u βŒƒr # Undo/Redo
:w :q :wq # Write/Quit/Write+Quit
:%s/old/new/g # Replace all

🐞 Debugging & Profiling​

JVM Debugging​

# Remote debugging
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar app.jar

# Memory analysis
jmap -histo <pid> # Object histogram
jmap -dump:format=b,file=heap.hprof <pid> # Heap dump

# Thread analysis
jstack <pid> # Thread dump
jcmd <pid> Thread.print # Alternative

# Performance profiling
java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder ...
jcmd <pid> JFR.start duration=60s filename=recording.jfr

Browser DevTools​

TabUse For
ElementsDOM inspection, CSS debugging
ConsoleJS execution, logging
NetworkAPI calls, performance
PerformanceRuntime profiling
ApplicationStorage, cookies, cache
LighthousePerformance audit

πŸ“ Detailed Topics​


Productivity Tips
  1. Learn keyboard shortcuts - Every mouse click costs time
  2. Customize your environment - Invest time in .dotfiles
  3. Automate repetitive tasks - Scripts save hours over time
  4. Use version control for everything - Including dotfiles
  5. Stay updated - Tools evolve, so should your workflow