Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MunifTanjim/31c0d8ce23aa7a7dd078f95cbbdc178c to your computer and use it in GitHub Desktop.
Save MunifTanjim/31c0d8ce23aa7a7dd078f95cbbdc178c to your computer and use it in GitHub Desktop.
Optimizely-Internship-2024-Training-Session-KnowYourTools.md
title sub_title author theme options
Know Your Tools
Work Smarter, Not Harder
Munif Tanjim
name override
terminal-dark
execution_output
colors
background
black
end_slide_shorthand
true

Know Your Tools

"A poor workman always blames his tools" β€” but even the best workman struggles with dull blades.

You simply can't do your best work without amazing tools and the skills to wield them well.

β€” Marc Edwards @ https://hackdesign.org/lessons/4


Know Your Tools

Tools give us super powers.

  • Know your tools so well that you can only focus on the work at hand
  • Do things that others think are impractical and impossible

Editor

The tool you'll be using almost everyday.

Example


Linter

The tool that warns you about silly mistakes.

Example

  • ESLint
  • Ruff

(Sometimes you probably won't appreciate it, but it IS your friend)


Formatter

The tool that makes your code look consistently aligned...

Example

  • Prettier
  • Ruff

...and keeps you from arguing endlessly with other engineers.


Formatter


The tool you probably didn't even know you're using.

What Can It Do?

  • Diagnostic
  • Code Actions
  • Code Completion
  • ...Sweet Stuffs 🍬

Server Example

  • TSServer
  • Pyright

Editor Plugins and Extensions

Make sure your editor is properly set up.

  • Linter
  • Formatter
  • LSP
  • Language specific plugins
  • ...whatever makes your life easy 🀘🏼

Terminal

Example


Shell

Example

  • Bash
  • ZSH
  • Fish

CLI Tools

echo

echo "Hello Optimizely!"
echo "I'm ${USER}..."

CLI Tools

pwd

Print Working Directory

pwd

CLI Tools

cd

Change Directory

cd .. && pwd

CLI Tools

ls

List files

ls
ls -al

CLI Tools

curl

Tool for making network request.

curl -s https://jsonplaceholder.typicode.com/posts

CLI Tools

JSON Query

curl -s https://jsonplaceholder.typicode.com/posts | jq -C

CLI Tools

jq

curl -s https://jsonplaceholder.typicode.com/posts | jq -C 'length'
curl -s https://jsonplaceholder.typicode.com/posts | jq -C '.[0:3] | .[].title'

CLI Tools

jq

/// touch .is_running
curl -s https://jsonplaceholder.typicode.com/posts \
    | jq '.[].title' > post_titles.txt
/// rm .is_running
/// sleep 0.5
/// while test -f .is_running; do sleep 0.1; done 
ls
echo "---"
cat post_titles.txt
/// rm post_titles.txt

CLI Tools

Fuzzy Search and Select

ls -1 | fzf

CLI Tools

htop

Process Viewer

htop

Scripting

Languages

Bash / Python / JavaScript

Why Bother?

  • Automate repetitive tasks
  • Simplify frequently used workflows
  • ... 'cause Β―\_(ツ)_/Β―

Scripting

function insult() {
  wget http://www.randominsults.net -O - 2>/dev/null |
    grep '<strong>' |
    sed "s:^.*<i>\(.*\)</i>.*$:\1:"
}

insult

Scripting

Source: https://github.com/MunifTanjim/scripts.sh/blob/main/aws-whoami

aws-whoami

Scripting

/// # export PATH="${PATH}:/Users/munif.tanjim/.local/share/chezmoi/.scripts.sh"
ncd on:vpn
/// sleep 1 && echo "VPN Connected!"

Browser and DevTools

  • Inspecting
  • Debugging
  • Profiling
  • Extensions
    • JSON Viewer
    • React Developer Tools

More Things to Look Into


What's Next?

Keep Learning...

Keep Exploring...

Stay Curious...


πŸ€” Q/A ❓

@MunifTanjim
Copy link
Author

MunifTanjim commented Nov 27, 2024

formatter.png:

formatter

How To Run:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment