Hack
ELI5 — The Vibe Check
In coding, a hack is a clever but ugly solution that works without being pretty or proper. It is duct tape on a leaky pipe. It solves the problem right now but everyone is a little embarrassed about it. The word 'hacker' originally meant someone who makes clever hacks — not someone breaking into systems.
Real Talk
In software development, a hack is an expedient solution that works but violates good design principles, relies on undocumented behavior, or is fragile. Hacks are characterized by comments like '// TODO: clean this up' or '// don't ask'. They contribute to technical debt. The term 'hacker' in its original MIT sense means a skilled programmer who builds clever solutions.
Show Me The Code
// Classic hack: hardcoded magic number with a guilty comment
function getMaxUsers() {
return 42; // HACK: hardcoded limit until billing system is done
// See ticket #892 — do not ship this forever!
}
// Another hack: CSS nuclear option
.broken-component {
position: absolute !important; /* HACK: overrides third-party CSS */
z-index: 9999 !important; /* TODO: fix properly */
}
When You'll Hear This
"It's a hack but it unblocks us for the demo." / "There are too many hacks in this codebase — time to refactor."
Related Terms
Bug
A bug is anything in your code that makes it behave wrong.
Code Review
A code review is when another developer reads your code before it gets merged, looking for bugs, bad practices, or anything confusing.
Refactor
Refactoring is cleaning and reorganizing your code without changing what it does — like tidying your room without throwing anything away.
Technical Debt
Technical debt is the coding equivalent of putting things on a credit card.
Workaround
A workaround is a way to avoid a problem without actually fixing it. The door is broken so you use the window.