Write It Pseudo — Fix It Later
🧠 Write It Pseudo — Fix It Later
You've been writing code for years. In multiple languages. Now you’re solving a Leetcode problem… You’ve already figured out the solution — but then you pause:
“Wait… how do I get the index of this character again?”
“What’s the method to push to the front of an array?”
“How do I check if a hashmap has a key in Python?”
Don’t stop.
Don't open autocomplete. Don’t reach for docs.
Just write what you mean, however it comes to mind.
Use whatever your brain throws up first:
// Maybe it’s from another language:
str.indexOf(char)
arr.unshift(val)
// Or maybe it’s made up:
arr.pushToFront(val)
string.getIndexOf(char, 2)\[1]
Or from today:
if not keyExists(i):
counts[i] = 1
That’s what I wrote while building a frequency hashmap in Python. I blanked on the real syntax to check for a key — but my intent was crystal clear.
Later, I fixed it:
if i not in counts:
counts[i] = 1
That’s idiomatic Python — and part of the reason the in
keyword is so versatile.
👉 See all the powerful uses of in
→
✍️ Why This Works
-
Keeps momentum Flow is precious. Don’t break it because of an API detail.
-
Intent is obvious When you revisit the pseudo-call, you’ll know exactly what you meant.
-
Fixes are fast Tools will highlight it, and it takes seconds to correct once the structure is there.
🔁 Pattern
“I don’t know the exact method name, but I know what I mean.”
So write what you mean — then move on.
🧩 Bonus: Pseudo Is a Superpower
As you get used to this, you’ll start solving problems in raw logic and structure, not locked to any one syntax. That’s real programming — language just becomes the final coat of paint.