Discuss selective application of representer
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
Direzione di ricerca
Non vengono menzionati file, test o punti di ingresso. Inizia esaminando la tabella di riscrittura attuale in C# e le tre domande di policy; questa issue sarà completata quando il progetto avrà una posizione concordata sulle riscritture selettive, sulle dipendenze tra concetti e sulle future modifiche al representer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Whilst many representer rewrites need to be applied to all exercises there are cases where a rewrite should be disabled for a particular exercise. For example, the readonly modifier should not be removed from code in the constants exercise where the concept is introduced.
The requirement to disable a rewrite for the exercise in which the related concept is introduced is fairly clear cut. However, the related issue of whether a rewrite should be disabled where its inclusion would prevent good/bad practice being reported to the student needs some discussion.
Which of the following is Excercism's position:
A. "Once a concept (which may be associated with some good practice or other) has been introduced then a rewrite that would suppress the good practice should be disabled and bad practice reported to the student"
or
B. "Reports to the student should be concerned only with the concepts that the exercise is designed to demonstrate"
Good practice relates to the writing of robust, maintainable and performant code.
These are the current C# rewrites:
| Rewrite | Concept | Excercise | Good Practice Importance |
|---|---|---|---|
| Add Braces | None | None | None |
| Expression extensions | ?? | ?? | ?? |
| Invert Neg Conditions | None | None | None |
| exponnt form to ucase | None | None | None |
| normalize identifiers | basics | basics | High |
| normalize whitespace | None | None | None |
| remove comments | None | None | None |
| optional parentheses | None | None | None |
| remove readonly | readonly | constants | High |
| remove usings | accessibility | namespaces | None |
| simplify bool equals | booleans | booleans | Medium |
| String->string | strings | strings | Low |
| Fully Qualified Name | basics | basics | Very Low |
Although Identifiers are a major element in good practice and rewriting will eface them, the practicalities of representations rule out dealing with them as we would wish in the concept exercises.
Of the current rewrites, removing readonly has a fairly high impact on good practice and simplifying boolean expressions (if (x == true) -> if (x)) is medium to high. casing string less important and reducing fully qualified names is low (maybe because it would probably take care of itself - I think we are entitled to rely on that).
Three questions:
-
Should we disable rewrites for exercises where there is a dependency on a concept with high or medium importance?
-
Should we increase the number of exercises where concepts which have a high or medium good practice importance are taken as a dependency?
-
What kind of rewrites will be added to the representer in the future?
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 7
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di exercism/csharp-representer
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Enable nullablesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
exercism/csharp-representer#18 · 2 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
exercism/csharp-representer#11 · 1 commento ·
-
Normalize `readonly`Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
exercism/csharp-representer#4 · 1 commento · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
exercism/csharp-representer#3 · 1 commento · 2 reazioni ·
Tutte le issue di exercism/csharp-representer
Issue simili
-
bug effort:S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
nightscout/nocturne#3093 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 3 giorni
-
Add 'upm' tag on githubAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100