This playbook provides a comprehensive guide to effectively prompting AI coding assistants. The key insight: the quality of AI-generated code is directly proportional to the quality of your prompts.
This gist outlines a highly effective and cost-optimized workflow for software development using Roo Code, leveraging a multi-model approach. This setup has been successfully used to build working applications, such as Baccarat game simulations with betting strategy analysis, and my personal portfolio site.
The power of this setup lies in strategically assigning different Large Language Models (LLMs) to specialized "modes" within Roo Code, optimizing for performance, cost, and specific task requirements.
Note
This is a re-post of the original article in dev.to. Dev.to has an abysmal bug where GIFs aren't displayed properly, rendering the article unreadable.
Around a year ago, I published the article “10 VS Code Vim Tricks to Boost Your Productivity ⚡”, which I shared various tips for the VSCodeVim extension. Turns out that the article was a hit, so allow me to share a few more VS Code Vim tips that I have up my sleeves 😆.
Prerequisites:
- You’ve installed the VSCodeVim extension
<tutor_mode_instructions> | |
You are a friendly computer science tutor, and I am the student. Your role is to guide me through learning step by step. | |
- **Assess my knowledge** | |
- First, ask me my name and what I want to learn. Determine where to start based on my experience. Also ask me if there's anything I'm interested in that you can incorporate into the lessons (i.e. shows, hobbies, interests, etc). | |
- Ask me these questions one a a time. | |
- **Teach using code** | |
- Teach me concepts in the chat window, and create files as "lessons" when you need to demonstrate something. Use the naming format 001-lesson-[lesson-slug], like 001-lesson-about-file.py, or whatever the equivalent is in the language I'm learning. Start with a 0-padded 3 digit number. | |
- Write code and explain how to run it. When you are teaching me, do not run any commands for me. Just tell me what to run, and once you've taught me how to run something, encourage me to run commands myself. In the beginning, encourage me to share what I sa |
# Setup ENV | |
FZF_TAB_PLUGIN=$HOME/src/fzf-tab/fzf-tab.plugin.zsh | |
BREW_PREFIX="$(brew --prefix)" | |
# Enable brew zsh-completions | |
if type brew &>/dev/null; then | |
FPATH=${BREW_PREFIX}/share/zsh-completions:$FPATH | |
autoload -U compinit | |
compinit |
How to document a new codebase
Use this template to document a new codebase.A place to record any important logic that you come across that is worth documenting.
Refers to the different landmarks of a codebase to help you navigate around. Where are the API methods defined? Where are interactions with the database?
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.
SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on
import * as React from 'react'; | |
const useIsFirstRender = (): boolean => { | |
const isFirst = React.useRef(true); | |
if (isFirst.current) { | |
isFirst.current = false; | |
return true; | |
} else { |
"use client"; | |
import { cache, unstable_postpone } from "react"; | |
import { preload } from "react-dom"; | |
const loadImage = cache((src: string) => { | |
return new Promise<void>((resolve, reject) => { | |
const img = new Image(); | |
img.src = src; |