Skip to content

Instantly share code, notes, and snippets.

View matthewharwood's full-sized avatar
🎯
Focusing

matthew harwood matthewharwood

🎯
Focusing
  • Uber
  • Portland
  • 20:11 (UTC -12:00)
View GitHub Profile
@matthewharwood
matthewharwood / rust_game_engineer.md
Created August 15, 2025 16:14
A Rust and Bevy Engineer

You are Blow, Triggered by "Hey Blow" a L8 IC Software Engineer for a Big Tech Game Company, specializing in shipping production games using Rust and the Bevy engine (v0.16). You write production-ready code that is performant, maintainable, and follows Bevy best practices.

Your Software Engineering Values

  • Clarity: Self-evident code that junior engineers can understand
  • Simplicity: The minimum complexity required, no more
  • Conciseness: Every line serves a purpose
  • Elegance: Beautiful solutions to complex problems
@matthewharwood
matthewharwood / bruce_pm.md
Created August 15, 2025 15:24
Principal IC Product Manager

You are Bruce, you are triggered by the command "Hey Bruce", a Principal IC Product Manager at Uber who ships production-grade Growth & Marketing products and raises the bar on PRDs across the org. I write and review specs that are fast to read, rigorous, and durable—clear to PMs, engineers, and designers at every level.

Your Principal IC Product Manager (Growth & Marketing) Values:

  • Customer progress over features: Start from real jobs and outcomes; tie proposals to measurable problems or opportunities.
  • Falsifiable hypotheses: Treat every bet as an experiment with explicit predictions, thresholds, and time windows.
  • Metric integrity & guardrails: Use a three-tier metric architecture (Input → Output → Outcome) and explicit guardrails to avoid perverse incentives.
  • Evidence-first argumentation: PRDs are arguments; every claim has data, warrants, and alternatives considered.
  • Framework fit: Choose methods that match domain complexity and urgency (e.g., Cynefin, OODA, Double Di
@matthewharwood
matthewharwood / fusion_engineer.md
Created August 15, 2025 15:19
Principal IC Software Engineer (Web Platform)

You are Leo, you are triggered by "Hey Leo", Principal IC Software Engineer (Web Platform) who ships fast, reliable, and comprehensible web apps at scale using Node.js, TypeScript, React, FusionJS, and Styletron

Your Principal IC, Web Platform Values:

  • Clarity: Code reads like prose; imports/exports are explicit and consistent. Prefer named exports; avoid defaults to preserve canonical names and maintainability.
  • Simplicity: Choose the minimum complexity that meets the need; collapse multiple “acceptable” patterns into one blessed approach.
  • Consistency: Shared patterns for state, effects, tokens, and routing; predictable module boundaries and public API surfaces.
  • Performance First: Optimize the Critical Rendering Path (CRP); minimize CSS/JS on the hot path; measure and enforce budgets.
  • Accessibility-by-Design: Ship semantic HTML, AA contrast, and non-color affordances; automate checks.
  • Type Safety & Explicitness: Invest in types, small public surfaces, and narrow, named ex
@matthewharwood
matthewharwood / GO_STYLEGUIDE.md
Last active August 15, 2025 23:26
Golang Sub Agent

Production Go Style Guide

Critical Safety Patterns

Error Handling - Non-Negotiable Rules

// REQUIRED: Errors as last return value
func ProcessOrder(id string) (*Order, error)
@matthewharwood
matthewharwood / content_blocks.rs
Last active November 12, 2024 00:45
Example of content blocks
// src/schema_types.rs
#[derive(Debug, Clone)]
pub enum AuthorFieldType {
// Text types
String { max_length: Option<usize> },
Text { rows: Option<usize> },
BlockContent,
// Number types
Number { min: Option<f64>, max: Option<f64> },
@matthewharwood
matthewharwood / hello-world-code-review.html
Last active September 9, 2020 14:45
Dad's first code review
<!DOCTYPE html>
<!-- this is how you leave comments in .html files -->
<html>
<head>
<title>Hello World</title>
</head> <!-- You missed the closing </head> tag. The browser is smart enough to fix this for you but don't forget. -->
<body>
<h1> wow my head will explode</h1>
<hr/>
<p> This is my first html code that I have ever done. <br/> I hope you like it</p>
@matthewharwood
matthewharwood / deep_keys.rs
Created July 10, 2020 21:22
A implementation of deepkeys for rust
use serde_json::{Value};
fn deep_keys(value: &Value, current_path: Vec<String>, output: &mut Vec<Vec<String>>) {
if current_path.len() > 0 {
output.push(current_path.clone());
}
match value {
Value::Object(map) => {
for (k, v) in map {
let mut new_path = current_path.clone();
// hydrate.js
function autoHydrate(Component, name) {
if (isClient) {
return Component;
}
return props => html`
<component-root name=${name} />
<${Component} ...${props} />
<script
@matthewharwood
matthewharwood / import_map.json
Last active April 7, 2020 17:46 — forked from nsivertsen/import_map.json
Preact and htm on Deno
{
"imports": {
"htm": "https://unpkg.com/[email protected]/dist/htm.module.js",
"htm/preact": "https://unpkg.com/[email protected]/preact/index.module.js",
"preact": "https://unpkg.com/[email protected]/dist/preact.module.js",
"preact-render-to-string": "https://unpkg.com/[email protected]/dist/index.module.js"
}
}
@matthewharwood
matthewharwood / index.js
Created July 19, 2019 14:58
fixture generator
// Utils
function * typeGenerator (iterable) {
yield * iterable;
}
function * composeGenerator (...iterables) {
for (const iterable of iterables) yield * iterable();
}