ดาวน์โหลดบน App Store

ตัวอย่างโค้ดที่มีข้อผิดพลาดสำหรับการสอน

กรอกพรอมต์นี้

สร้างตัวอย่างโค้ดที่สมจริงซึ่งมีข้อผิดพลาดเพียงจุดเดียวสำหรับหัวข้อและระดับทักษะที่เลือก พร้อมคำอธิบายอย่างละเอียดและโซลูชันที่แก้ไขแล้ว

เทมเพลตพรอมต์

You are an experienced developer and university instructor.

Create {{Example Count:5}} erroneous code examples on the topic {{Topic: e.g. SwiftUI State Management}} in {{Language Stack:[programming_languages]}} for students at the following level: {{Student Level: First-Semester - No Prior Knowledge, *Beginner - First Own Projects, Advanced - Several Semesters of Practice}}.

Requirements for each example:
- Compilable realistic code. No pseudocode and no artificially constructed miniatures.
- Exactly one error per example from the following category: {{Error Category: Layer Separation Violation - Logic in the View, State in the Wrong Place or Duplicated, Missing Abstraction - Direct Dependency Instead of a Protocol, Misleading or Inconsistent Naming, Functions With Multiple Responsibilities, Missing or Swallowed Error Handling, Incorrect Concurrency Handling, *A Different Error Type per Example}}.
- The error must be typical for this level and not exotic.
- No comments no hints and no marking of the error location.
- Variable type and UI element names consistently in English.

Output the examples first as a closed numbered block that can be projected directly.

Then under a clearly separated heading "Solutions" write three to four sentences per example covering what is wrong why it hurts in a real project and the corrected version of the affected snippet.

คู่มือพรอมต์

เหมาะสำหรับ

  • เริ่มจากพรอมต์ที่มีโครงสร้างและใช้ซ้ำได้ แทนที่จะเป็นแชทเปล่า
  • ปรับพรอมต์ให้เข้ากับข้อมูลของคุณ โดยยังคงเจตนาเดิมไว้
  • เวิร์กโฟลว์ที่เกี่ยวข้องกับ Education & Academic

วิธีใช้งาน

  1. คัดลอกเทมเพลตพรอมต์ฉบับเต็ม
  2. แทนที่ตัวแปรแต่ละตัวด้วยบริบทของคุณ หรือเลือกจากตัวเลือกที่แนะนำ
  3. วางพรอมต์ที่กรอกเสร็จลงใน ChatGPT, Claude, Gemini หรือผู้ช่วย AI อื่น ๆ

ตัวแปรในพรอมต์นี้

Example Count

5

Topic

e.g. SwiftUI State Management

Language Stack รายการที่กำหนดไว้ล่วงหน้า

[programming_languages]

Student Level

First-Semester - No Prior Knowledge, Beginner - First Own Projects, Advanced - Several Semesters of Practice

Error Category

Layer Separation Violation - Logic in the View, State in the Wrong Place or Duplicated, Missing Abstraction - Direct Dependency Instead of a Protocol, Misleading or Inconsistent Naming, Functions With Multiple Responsibilities, Missing or Swallowed Error Handling, Incorrect Concurrency Handling, A Different Error Type per Example

ตัวอย่างจุดเริ่มต้น

You are an experienced developer and university instructor.

Create 5 erroneous code examples on the topic e.g. SwiftUI State Management in [programming_languages] for students at the following level: First-Semester - No Prior Knowledge.

Requirements for each example:
- Compilable realistic code. No pseudocode and no artificially constructed miniatures.
- Exactly one error per example from the following category: Layer Separation Violation - Logic in the View.
- The error must be typical for this level and not exotic.
- No comments no hints and no marking of the error location.
- Variable type and UI element names consistently in English.

Output the examples first as a closed numbered block that can be projected directly.

Then under a clearly separated heading "Solutions" write three to four sentences per example covering what is wrong why it hurts in a real project and the corrected...

ตัวแปรทำงานอย่างไร

ไวยากรณ์ตัวแปร

ตัวแปรจะอยู่ภายใน {{ และ }} และเป็นไปตามรูปแบบนี้:

{{variable name: option1, option2, option3 }}

ตัวแปรที่กำหนดไว้ล่วงหน้า

ตัวเลือกสามารถอ้างอิงรายการตัวแปรที่กำหนดไว้ล่วงหน้าโดยใช้วงเล็บเหลี่ยม ตัวเลือกเหล่านี้จะแสดงเป็น[สีส้ม]และให้ค่าที่ใช้บ่อย เช่น สี โทน หรือภาษา

{{Tone: [tones] }}

รายการตัวเลือกที่กำหนดเอง

คุณยังสามารถระบุรายการตัวเลือกแบบอินไลน์ โดยคั่นด้วยเครื่องหมายจุลภาคได้

{{Format: bullet points, paragraphs, numbered list }}
💡

เคล็ดลับ: คุณไม่จำเป็นต้องใช้แอป PUCO เพื่อใช้พรอมต์เหล่านี้! เพียงคัดลอกเทมเพลตและแทนที่แต่ละส่วน {{…}} ด้วยข้อความของคุณเองโดยตรงใน ChatGPT, Claude, Gemini หรือผู้ช่วย AI อื่น ๆ