Descargar en el App Store

Ejemplos de código erróneos para enseñar

Rellenar este prompt

Genera ejemplos de código realistas con un solo error para un tema y nivel de habilidad elegidos, con explicaciones detalladas y soluciones corregidas.

Plantilla de prompt

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.

Guía del prompt

Ideal para

  • Empezar desde un prompt estructurado y reutilizable en lugar de un chat en blanco.
  • Adaptar el prompt a tus propios datos manteniendo intacta la intención original.
  • Flujos de trabajo relacionados con Education & Academic.

Cómo usarlo

  1. Copia la plantilla de prompt completa.
  2. Sustituye cada variable por tu propio contexto o elige una de las opciones sugeridas.
  3. Pega el prompt completado en ChatGPT, Claude, Gemini u otro asistente de IA.

Variables de este prompt

Example Count

5

Topic

e.g. SwiftUI State Management

Language Stack Lista predefinida

[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

Ejemplo de partida

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...

Cómo funcionan las variables

Sintaxis de variables

Las variables van entre {{ y }} y siguen este patrón:

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

Variables predefinidas

Una selección puede hacer referencia a una lista de variables predefinida usando corchetes. Aparecen en [naranja] y proporcionan valores de uso común como colores, tonos o idiomas.

{{Tone: [tones] }}

Listas de selección personalizadas

También puedes proporcionar una lista de opciones en línea, separadas por comas.

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

Consejo: ¡no necesitas la app PUCO para usar estos prompts! Solo copia la plantilla y sustituye cada sección {{…}} por tu propio texto directamente en ChatGPT, Claude, Gemini o cualquier otro asistente de IA.