Skip to content

Instantly share code, notes, and snippets.

@loftwah
Last active May 12, 2025 02:28
Show Gist options
  • Save loftwah/528fcfd9a46d61370ae859edeb417124 to your computer and use it in GitHub Desktop.
Save loftwah/528fcfd9a46d61370ae859edeb417124 to your computer and use it in GitHub Desktop.
fdd

Fuck Driven Development

Fuck Driven Development (FDD) is a reactive, emotionally-driven software development methodology that begins and ends with a single word: fuck. It embraces the chaos of real-world debugging with full emotional transparency and no apologies.

Core Philosophy

When things break, you don't reach for a debugger. You reach for rage.

You do not investigate before you express your contempt for the situation. FDD thrives in environments where hope has already died and only profanity remains.

Principles

These are the foundational actions of FDD. You do not need to understand them. You will feel when it is time to use them.


Fuck()

Initial reaction. Something’s broken. You say “fuck.”


Fuck.Fuck()

Now it’s recursive. You’ve tried something. It didn’t work. “Fuck.”


Fuck.You()

Blame-shifting phase. This is someone else’s fault. Usually Git blame. Possibly Jenkins.


FuckIt()

You try the “just restart it” method. Or delete node_modules.


Unfuck()

You begin rolling things back. Version control or server snapshots come into play.


FuckYeah()

It worked. You don’t know why. You’re afraid to touch it again.


Commit("fuck it it works")

The only reasonable commit message in a post-FDD world.


Example Output

(╯°□°)╯︵ ┻━┻ ➜ nginx git:(main✗) bun fuckDrivenDev.ts        9:18:34

\=== FDD Session: Fuck Everything ===

\[FUCK] FUCK (2025-05-11T23:19:24.796Z)
\[FUCKED] FUCK (2025-05-11T23:19:24.796Z)
\[TOTALLY\_FUCKED] FUCK you, Jenkins! (2025-05-11T23:19:24.796Z)
\[FUCKED] FUCK it. rm -rf node\_modules && restart everything. (2025-05-11T23:19:24.796Z)
\[FUCKED] FUCK this: git reset --hard HEAD^ (2025-05-11T23:19:24.796Z)
\[FUCK] FUCK yeah! no idea why it works, but ship it. (2025-05-11T23:19:24.796Z)
\[FUCK] FUCK commit -am "fuck it it works" (2025-05-11T23:19:24.796Z)

Fucks given:
\[
{
"fuck": "fuck",
"level": "fuck",
"timestamp": "2025-05-11T23:19:24.796Z"
},
{
"fuck": "fuck",
"level": "fucked",
"timestamp": "2025-05-11T23:19:24.796Z"
},
{
"fuck": "fuck you, Jenkins!",
"level": "totally\_fucked",
"timestamp": "2025-05-11T23:19:24.796Z"
},
{
"fuck": "fuck it. rm -rf node\_modules && restart everything.",
"level": "fucked",
"timestamp": "2025-05-11T23:19:24.796Z"
},
{
"fuck": "fuck this: git reset --hard HEAD^",
"level": "fucked",
"timestamp": "2025-05-11T23:19:24.796Z"
},
{
"fuck": "fuck yeah! no idea why it works, but ship it.",
"level": "fuck",
"timestamp": "2025-05-11T23:19:24.796Z"
},
{
"fuck": "fuck commit -am "fuck it it works"",
"level": "fuck",
"timestamp": "2025-05-11T23:19:24.796Z"
}
]

Totally fucked moments:
\[
{
"fuck": "fuck you, Jenkins!",
"level": "totally\_fucked",
"timestamp": "2025-05-11T23:19:24.796Z"
}
]

Still fucked? Fuck no, we're golden.

\=== FDD Session End ===

(╯°□°)╯︵ ┻━┻ ➜ nginx git:(main✗)

Licensing

MIT. Because fuck licenses too.

// fuckDrivenDevelopment.ts - Fuck Driven Development
type FuckLevel = "fuck" | "fucked" | "totally_fucked";
interface FuckRant {
fuck: string;
level: FuckLevel;
timestamp: Date;
}
// Store rants immutably
let fucksGiven: ReadonlyArray<FuckRant> = [];
// Terminal colors
const colors = {
reset: "\x1b[0m",
red: "\x1b[31m",
yellow: "\x1b[33m",
magenta: "\x1b[35m",
cyan: "\x1b[36m",
green: "\x1b[32m",
bold: "\x1b[1m",
dim: "\x1b[2m",
};
// Get color for fuck level
function levelColor(level: FuckLevel): string {
switch (level) {
case "fuck":
return colors.yellow;
case "fucked":
return colors.magenta;
case "totally_fucked":
return colors.red;
default:
return colors.reset;
}
}
// Core FDD function
export function Fuck(
message: string = ".",
level: FuckLevel = "fuck"
): FuckRant {
const fullMessage = message.startsWith(".") ? "" : ` ${message}`;
const rant: FuckRant = {
fuck: `fuck${fullMessage}`.trim(),
level,
timestamp: new Date(),
};
fucksGiven = [...fucksGiven, rant];
console.log(
`${levelColor(level)}${colors.bold}[${level.toUpperCase()}]${
colors.reset
} ${levelColor(level)}FUCK${fullMessage}${colors.reset} ${
colors.dim
}(${rant.timestamp.toISOString()})${colors.reset}`
);
return rant;
}
// Store reference to main Fuck function
const mainFuck = Fuck;
// Namespace for specialized fucks
export namespace FuckFunctions {
export function DoubleFuck(): FuckRant {
return mainFuck(".", "fucked");
}
export function You(target: string = "git"): FuckRant {
return mainFuck(`you, ${target}!`, "totally_fucked");
}
}
// Emergency measures
export function FuckIt(): FuckRant {
return Fuck("it. rm -rf node_modules && restart everything.", "fucked");
}
export function Unfuck(): FuckRant {
return Fuck("this: git reset --hard HEAD^", "fucked");
}
export function FuckYeah(): FuckRant {
return Fuck("yeah! no idea why it works, but ship it.", "fuck");
}
export function Commit(msg: string = "fuck it it works"): FuckRant {
return Fuck(`commit -am "${msg}"`, "fuck");
}
// Get all fucks given
export function GetFucks(level?: FuckLevel): FuckRant[] {
return level ? fucksGiven.filter((f) => f.level === level) : [...fucksGiven];
}
// Reset fucks
export function NoMoreFucks(): void {
fucksGiven = [];
}
// Always false to ensure we get to commit
export function StillFucked(): boolean {
return false;
}
// Pretty-print objects with colors
function prettyPrint(obj: any): string {
return JSON.stringify(obj, null, 2)
.replace(/"\w+"/g, (match) => colors.cyan + match + colors.reset)
.replace(
/: "([^"]+)"/g,
(_, value) => ": " + colors.green + '"' + value + '"' + colors.reset
)
.replace(
/: (\d{4}-\d{2}-\d{2})/g,
(_, date) => ": " + colors.magenta + date + colors.reset
);
}
// FDD in action
function solveWithFucks() {
try {
console.log(
`\n${colors.bold}=== FDD Session: Fuck Everything ===${colors.reset}\n`
);
// 1. Initial reaction
Fuck();
// 2. Recursive frustration (using namespace to avoid recursion)
FuckFunctions.DoubleFuck();
// 3. Blame shifting
FuckFunctions.You("Jenkins");
// 4. Nuclear option
FuckIt();
// 5. Rolling back
Unfuck();
if (StillFucked()) {
Fuck("this shit!", "totally_fucked");
} else {
// 6. Mysterious success
FuckYeah();
// 7. Final acceptance
Commit("fuck it it works");
}
console.log(
`\n${colors.bold}Fucks given:${colors.reset}\n${prettyPrint(
GetFucks()
)}\n`
);
console.log(
`${colors.bold}Totally fucked moments:${colors.reset}\n${prettyPrint(
GetFucks("totally_fucked")
)}\n`
);
const stillFucked = StillFucked();
console.log(
`${colors.bold}Still fucked?${colors.reset} ${
stillFucked
? colors.red + "Fuck yes."
: colors.green + "Fuck no, we're golden."
}${colors.reset}\n`
);
console.log(`${colors.bold}=== FDD Session End ===${colors.reset}\n`);
} catch (error) {
console.error(
`${colors.red}FUCK ALL: ${colors.reset}`,
error instanceof Error ? error.message : error
);
}
}
solveWithFucks();
@loftwah
Copy link
Author

loftwah commented May 12, 2025

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