Scarica dall’App Store

Esempi di codice errati per l'insegnamento

Compila questo prompt

Genera esempi di codice realistici con un solo errore per un argomento e un livello di competenza scelti, completi di spiegazioni dettagliate e soluzioni corrette.

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

Guida al prompt

Ideale per

  • Partire da un prompt strutturato e riutilizzabile invece di una chat vuota.
  • Adattare il prompt ai propri input mantenendo intatto l'intento originale.
  • Flussi di lavoro legati a Education & Academic.

Come usarlo

  1. Copia il modello di prompt completo.
  2. Sostituisci ogni variabile con il tuo contesto o scegli una delle opzioni suggerite.
  3. Incolla il prompt completato in ChatGPT, Claude, Gemini o un altro assistente IA.

Variabili in questo prompt

Example Count

5

Topic

e.g. SwiftUI State Management

Language Stack Elenco predefinito

[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

Esempio di partenza

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

Come funzionano le variabili

Sintassi delle variabili

Le variabili sono racchiuse tra {{ e }} e seguono questo schema:

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

Variabili predefinite

Una selezione può fare riferimento a un elenco di variabili predefinito usando le parentesi quadre. Appaiono in [arancione] e forniscono valori di uso comune come colori, toni o lingue.

{{Tone: [tones] }}

Elenchi di scelta personalizzati

Puoi anche fornire un elenco di scelte in linea, separate da virgole.

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

Suggerimento: non hai bisogno dell'app PUCO per usare questi prompt! Copia semplicemente il modello e sostituisci ogni sezione {{…}} con il tuo testo direttamente in ChatGPT, Claude, Gemini o qualsiasi altro assistente IA.