Vigyata.AI
Is this your channel?

CLUTTERED CODE

72 views· 6 likes· 29:38· May 14, 2026

🛍️ Products Mentioned (2)

Declutter Apps Script Code with AI: Commenting, Token Limits, and Readability Tips Course: https://bettersheets.co/courses/spreadsheet-automation-101 Consulting: http://bettersheets.co/consulting The video explains how long, cluttered Google Apps Script code becomes hard to manage when repeatedly copying it into ChatGPT/Gemini, leading to misplaced edits, unreadable output, and confusion. Using a Gmail “declutter command center” Sheets/Apps Script tool as an example (auto-labeling and archiving senders, adding them to a sheet, and a “snooze everything to tomorrow” option), the creator shares a core workflow tip: heavily comment code to make it readable for yourself now, yourself later, and other users/helpers. He shows checking code size with OpenAI’s tokenizer (about 3,000 tokens, 451 lines), then crafting a precise ChatGPT prompt with reasons, comment-style examples (inline vs multiline), and constraints (“do not rewrite functionality; only comment,” vary detail by function importance). He pastes the commented output back into Apps Script, doubling lines but improving clarity, and invites viewers to request a future “rewrite for readability” prompt. 00:00 Cluttered Code Problem 00:40 Apps Script Copy Paste Pain 01:38 Course Recommendation 02:12 Gmail Declutter Tool Idea 03:35 Inbox Zero Snooze Workflow 05:06 Best Tip Comment Everything 06:15 Why Comments Help Everyone 08:05 Tokenize Before ChatGPT 10:00 Writing The Commenting Prompt 11:48 Readable Code Not Rewrites 14:48 Comment Styles And Examples 21:54 Execute Prompt And Review Output 25:43 Next Steps Rewrite Or Ship 28:10 Wrap Up Consulting And Release

🎬 More from Better Sheets