You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: building/tracks/practice-exercises.md
+138-1Lines changed: 138 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -312,7 +312,144 @@ Note that:
312
312
- The order of authors and contributors is not significant and has no meaning.
313
313
-`language_versions` is a free-form string that tracks are free to use and interpret as they like.
314
314
315
-
the articles
315
+
### File: `.approaches/introduction.md`
316
+
317
+
**Purpose:** Introduction to the most common approaches for the exercise
318
+
319
+
**Presence:** Optional
320
+
321
+
This file describes the most common approaches for the exercise.
322
+
Check the [documentation](/docs/building/tracks/approaches) for more information on what should go in this file.
323
+
324
+
#### Example
325
+
326
+
````markdown
327
+
# Introduction
328
+
329
+
The key to this exercise is to deal with C# strings being immutable, which means that a `string`'s value cannot be changed.
330
+
Therefore, to reverse a string you'll need to create a _new_ `string`.
331
+
332
+
## Using LINQ
333
+
334
+
```csharp
335
+
public static string Reverse(string input)
336
+
{
337
+
return new string(input.Reverse().ToArray());
338
+
}
339
+
```
340
+
341
+
For more information, check the [LINQ approach][approach-linq].
342
+
343
+
## Which approach to use?
344
+
345
+
If readability is your primary concern (and it usually should be), the LINQ-based approach is hard to beat.
346
+
````
347
+
348
+
---
349
+
350
+
### File: `.approaches/config.json`
351
+
352
+
**Purpose:** Metadata for the approaches
353
+
354
+
**Presence:** Optional (required when an approach introduction or approach exists)
355
+
356
+
This file contains meta information on the exercise's approaches:
357
+
358
+
-`introduction`: The GitHub username(s) of the exercise approach introduction's author(s) (optional)
359
+
360
+
-`authors`: The GitHub username(s) of the exercise approach introduction's author(s) (required)
361
+
- Including reviewers if their reviews substantially change the exercise approach introduction (to the extent where it feels like "you got there together")
362
+
-`contributors`: The GitHub username(s) of the exercise approach introduction's contributor(s) (optional)
363
+
- Including reviewers if their reviews are meaningful/actionable/actioned.
364
+
365
+
-`approaches`: An array listing the detailed approaches (optional)
366
+
-`uuid`: a V4 UUID that uniquely identifies the approach. The UUID must be unique both within the track as well as across all tracks, and must never change
367
+
-`slug`: the approach's slug, which is a lowercased, kebab-case string. The slug must be unique across all approach slugs within the track. Its length must be <= 255.
368
+
-`title`: the approach's title. Its length must be <= 255.
369
+
-`blurb`: A short description of this approach. Its length must be <= 350. Markdown is _not_ supported (required)
370
+
-`authors`: The GitHub username(s) of the exercise approach's author(s) (required)
371
+
- Including reviewers if their reviews substantially change the exercise approach (to the extent where it feels like "you got there together")
372
+
-`contributors`: The GitHub username(s) of the exercise approach's contributor(s) (optional)
373
+
- Including reviewers if their reviews are meaningful/actionable/actioned.
374
+
375
+
#### Example
376
+
377
+
```json
378
+
{
379
+
"introduction": {
380
+
"authors": ["erikschierboom"]
381
+
},
382
+
"approaches": [
383
+
{
384
+
"uuid": "448fb2b4-18ab-4e55-aa54-ad4ed6d5f7f6",
385
+
"slug": "span",
386
+
"title": "Use Span<T>",
387
+
"blurb": "Use Span<T> to efficiently reverse a string.",
0 commit comments