JavaScript Indonesia Channel
9.95K subscribers
682 photos
7 videos
7 files
19.9K links
Channel yang berisi kumpulan berita atau konten seputar JavaScript, Typescript, HTML, CSS, Library, Framework JS, Node.js , dan juga engine-nya

Untuk pencarian artikel,gunakan fitur pencarian di channel ini,dan bisa juga dicari berdasarkan hashtag #
Download Telegram
Coding with AI? It can be a great critical thinking partner and not just a code generator.

Begin with a high-level goal then drill down by asking questions like:

- Why this approach?
- Pro/Cons of this design?
- Alternatives with tradeoffs?
- A version that's faster?

https://x.com/addyosmani/status/1954814228751065289?t=y0m_abyJTQN-sndEubth7g&s=19
JavaScript Indonesia Channel
Photo
Tip: To improve AI coding, don’t just jump straight into tasks without planning. Planning first makes a big difference, as does managing context.

🧵👇

1. AI tools thrive on structure.

When you start with a clear spec, you guide the model’s reasoning. One good spec often performs better than 8 vague prompts.

2. A great spec includes:

– Purpose & Requirements
– Inputs & outputs
– Constraints
– APIs
– Milestones
– Coding conventions

This acts as both a blueprint and documentation.

3. Use Test-driven Prompts.

First, ask AI to write tests for your task.
Then, have it implement code that makes those tests pass.

Classic red → green → refactor.

4. Break your work into small chunks.

Decompose complex prompts.

Keep tasks focused so the model can produce cleaner, more reliable code.

5. Share context.

Feed the model your style guide, architecture, or prior code.

More context = more consistency.

6. Use the AI to generate diagrams

Helps with architecture planning and makes prompt inputs more grounded.

7. Always review AI output.

Check logic, refactor if needed, run the tests. AI coding is collaborative, not fire-and-forget. Keep the human in the loop.

Summary:

– Plan before you prompt
– Write specs
– Use test-driven dev
– Add context
– Break down tasks
– Iterate

💡 Vibe coding is fun. But planned prompting gets you further, faster.

https://x.com/addyosmani/status/1950457229171384821?t=w-_aeYmYTPsxqYVGbKdSFA&s=19
🔥1