Saturday, October 4, 2025

How Great Engineers Plan Before They Build websites and apps

If you’ve ever tried to build something—an app, a project, even a school assignment—you’ve probably made this mistake:

You jump in, start doing things… and later realize you missed something big.

Now you’re fixing problems, redoing work, or worse—starting over.

Great engineers avoid that. They don’t just start building. They plan.

I recently learned about a smart planning system used by top engineers—often called "5X engineers"

because they’re way more productive than most. 

Here's what I learned.


Why This Planning Method Works

This planning style helps teams move faster by thinking clearly before coding starts.
It saves time, prevents confusion, and avoids mistakes.

Let’s break it down into 5 simple parts:


1. Start with Context (Don’t Guess)

Before writing a single line of code, these engineers look at:

  • How similar projects were done before

  • The tools and rules already in place

  • What worked well in the past

This helps them stay consistent and avoid repeating mistakes.


2. Ask Questions Early

Before jumping in, they:

  • Ask questions to clear up confusion

  • Make sure everyone understands the goal

  • Catch problems before they become big

  • Avoid “scope creep” (when the project keeps growing without planning)


3. Show the Plan Visually

Instead of long, boring documents, they:

  • Use file trees or simple diagrams

  • Mark what’s new, changed, or deleted

  • Let teammates and managers see the plan at a glance

This makes it easy to say yes or no before work begins.


4. Give Clear Step-by-Step Instructions

The plan includes:

  • Easy-to-understand explanations

  • Small code examples

  • Clear steps, so nothing gets missed

This reduces stress and makes writing the code much faster.


5. Watch for Risks Early

Before anything is built, they:

  • List what the code depends on

  • Think about what could break

  • Plan how to test it

  • Make sure nothing important gets skipped


Why This Makes You Work 5x Faster

Here’s the usual way of building:
Code → Debug → Fix → Debug Again → Ship


Here’s what this method does instead:
Plan → Code → Ship

It’s faster because:

You don’t waste time starting the wrong way


You avoid back-and-forth messaging


You fix bugs before they happen


You get faster approval from teammates


You don’t have to “figure it out” while you code


When Should You Use This?

This method works best for:

  • Big features

  • Architecture changes

  • Projects involving more than one person

  • Anything that feels messy or unclear


Final Thought: It's Like Building from a Blueprint

Most people just “figure it out as they go.”


This system flips that.


It’s like working from a blueprint that’s already been tested.


You spend more time thinking in the beginning—so you don’t waste time later.

Smart, right?


George Ohan 

Monday, September 22, 2025

Guide for Clean and Lasting Software

six months later. 

I've learned the hard way: 

fancy code looks cool but crumbles fast. 

Simple code? It grows with you.

This guide is my "house style" for clean code—think of it as a friendly checklist. It's for anyone building apps, from juniors to pros. 
No jargon overload; just practical tips. 
Use it, tweak it, and watch your projects hum. 
Let's dive in.
Why Bother with Clean Code?

  • It Saves Time: Clear names and short functions mean fewer bugs and quicker fixes.
  • Teams Thrive: When everyone follows the same rules, handoffs are smooth—no "What does this do?" emails.
  • Future-Proofs Your Work: Code from last year still makes sense, even if you're the one who wrote it.
  • My Tip: Start small. Pick one rule (like better names) and apply it today. You'll see the difference.
Core Ideas to Live ByThese are the basics—keep them front and center:

  • Clarity Beats Clever: Choose names you'd get in six months. If it needs a long explanation, rename it.
  • One Job Per Spot: Each function or file handles one thing. No multitaskers.
  • Keep It Small: Aim for under 100 lines per file. Short functions, few inputs (three max—use bundles otherwise).
  • Block Bad Data Early: Use types or checks to stop wrong info from sneaking in.
  • Scream When Wrong: Catch errors fast with clear messages. Log them smartly, never hide them.
  • Safe and Repeatable: Make actions that can retry without mess-ups, like a button that works twice.
Naming: Make It Read Like EnglishBad names confuse; good ones explain. Here's the playbook:
For JavaScript/TypeScript (Front-End Stuff)
  • Files and folders: Use dashes, like job-review-modal.tsx.
  • Variables and functions: Camel case, like autoAcceptAt or refreshAccessToken().
  • Components and types: Capitals, like JobReviewModal or type GeoRule = 'us_pr' | 'us_pr_ca'.
  • Yes/No flags: Start with "is," "has," "can," like isApproved.
  • Custom hooks: "use" plus action, like useLazyAutoAccept().
  • Events: Dot style, like jobs.filtered_by_geo.
For Python (Back-End Work)
  • Modules and functions: Underscores, like create_payment_intent.
  • Classes and models: Capitals, like JobSubmission
    .
  • Constants: All caps with underscores, like AUTO_ACCEPT_HOURS = 96.
Shared Rules for Databases and APIs
  • Tables: Plural with underscores, like jobs or submissions.
  • Fields: Simple underscores, like poster_id or job_state.
  • Enums: Lowercase values, like {'open', 'submitted', 'accepted'}.
  • IDs: End with _id. Times: UTC strings like created_at.
Pro Tip: Stick to one style across your whole project. Mix-ups are sneaky bugs.Organizing Your ProjectGroup by what the code does, not where it sits. It keeps things tidy.
  • Back-End Folder Setup:
    • jobs/: Routes in router.py, rules in service.py, data in repo.py.
    • Same for auth/ or users/.
  • Front-End Folder Setup:
    • features/jobs/: Parts in components/, calls in api/, helpers in hooks/.
    • Shared bits in lib/.
Common Helpers You'll Want:
  • Guards: ensureApproved(user).
  • Checks: canTransition(oldState, newState).
  • Mappers: geoRuleToCountries(rule).
  • Safe Keys: makeIdempotencyKey(jobId, event).
Comments and Notes: Say Why, Not What
  • Focus on Why: "We wait 96 hours to give posters time without losing testers." (Not "Loop here.")
  • Blocks for Big Ideas: Use for trade-offs or rules that stay true.
  • Short Notes for Edges: Quick inline hits, like "Fallback to UTC—no time zones yet."
  • Every Module's README: Cover "What," "How to Test," and "Watch Outs."
Handling Goofs and Logs
  • Back-End Errors: Specific and helpful, like raise HTTPException(403, "Sorry, posters only.").
  • Front-End Fixes: One retry on bad access, then login screen. No pop-up storms.
  • Logs: Bundle details like { event: 'job_failed', userId, timeTaken }. Skip secrets.
Testing: Cover the Basics QuickBuild a pyramid: Lots of small tests, fewer big ones.
  • Back-End: Check state changes, filters, and retries.
  • Front-End: Flows like "Post a Job" or "Submit Work."
  • Style: "Given X, When Y, Then Z." Fake outside stuff for speed. Hit happy paths and the grumpy ones (empty inputs, timeouts).
Tools to Make It Easy
  • Formatters: Prettier for front, Black for back—run on save.
  • Checkers: ESLint/TS strict; ruff for Python. Fail builds if they break.
  • Commits: Label like feat: add timer or fix: login bug.
  • Before Push: Hooks for auto-checks.
  • PRs: Use this quick list:
    • Names clear? Booleans start right?
    • One job per spot? Short inputs?
    • Comments explain why?
    • Errors clear? Tests for edges?
    • Flows work? Checks pass?
Real-Life SnippetsSolid Front-End Check:
tsx
// Why: Stops unready users from posting; just checks, no changes.
function canPostJob(user: User): boolean {
  return user.isApproved && user.role === 'poster';
}
Solid Back-End Timer:
py
# Safe to run twice—no duplicates. Why 96h: Data says it fits most users.
def auto_accept_overdue_jobs(now: datetime) -> List[str]:
    overdue = query_overdue(now, hours=AUTO_ACCEPT_HOURS)
    return [auto_accept_job(j.id) for j in overdue]
Skip This Mess:
js
function doStuff(u, s) { /* Huh? Too much in one spot. */ }
Wrapping Up: Start Today, Improve TomorrowClean code isn't perfect—it's useful
I wrote this from scars of late-night Vibe Coding with Grok! :-).
...... hoping it spares you some. Try it on your next pull request. 
#GeorgieJobsApp
George Ohan
California, USA