Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

[C#] Exercises in Priority Order #1533

Closed
mikedamay opened this issue May 26, 2020 · 9 comments
Closed

[C#] Exercises in Priority Order #1533

mikedamay opened this issue May 26, 2020 · 9 comments
Labels
status/help-wanted Extra attention is needed track/csharp

Comments

@mikedamay
Copy link
Contributor

mikedamay commented May 26, 2020

*********** Out of date (as of 8:47, 28-May-2020) *********

The following is a list of exercises based on the concept list.

Exercises are shown in draft order of "importance". The aim is to produce a track initially with the 50 most important exercises. 40 of the exercises should be general C# and 10 should be to introduce LINQ. Please comment on the order so we can agree on a coherent set of exercises for the initial launch of the track for students.

The columns are as folllows:

  • Row number
  • Name of exercise of concept
  • Priority (Rank)
  • Further information 1
  • Further Information 2
  • Original line number on the concept document (mentioned above).

Rank has the following meaning

  • 5 means exercise already implemented
  • 10 - 49 general C# exercises in priority order
  • 50 - 55 LINQ related exercises
  • 800 - assumed duplicate / handled in a previous exercise (denoted by information 1)
  • 900 - background info.
  • 997 - 998 I did not really understand how these fitted in.
  • 999 - assumed these where meant to be headings.

The challenge is to poplate rows 1 to 40 with a definitive list of exercises to provide general C# fluency and populate 10 rows with a rank of 50 to 60 to provide the required LINQ exercises. You will note that row 40 gets as far as string interpolation but excludes tuples, streams, reflection etc. On the other hand the LINQ exercises starting at row 77 look in good fettle.

Row Exercise Name Rank Info 1 Info 2 Orig
1 - [Classes][classes] 5 11
2 - [Inheritance][inheritance] 5 16
3 - [Methods][methods] 5 19
4 - Constructors 5 20
5 - Properties 5 33
6 - Null 5 95
7 - Numbers 5 100
8 - [Booleans][bool] 5 129
9 - [Arrays][array] 5 132
10 - [Dictionaries][map] 5 133
11 - Dates 5 141
12 - Enums 5 144
13 - Floating point numbers 5 150
14 - [Strings][string] 5 154
15 - [Interfaces][interfaces] 10 17
16 - [Generics][generics] 10 70
17 - [Equality][equality] (Equals, GetHashCode) 10 75
18 - [Characters][char] 10 130
19 - Conditionals: do-while 12 82
20 - Conditionals: switch 12 83
21 - Conditionals: while 12 84
22 - [Conditionals: if][conditionals] 12 85
23 - [Conditionals: ternary][conditionals] 12 86
24 - Explicit (casts) 12 89
25 - Implicit 12 90
26 - Exceptions 12 94
27 - [Lists][list] 12 136
28 - Nested types 15 148
29 - Delegates 18 143
30 - Indexers 20 15
31 - Out parameters 20 25
32 - [Optional arguments][optional_arguments] 20 26
33 - Structs 20 36
34 - Expression-bodied members 20 42
35 - Bitwise manipulation 20 102
36 - Imports (usings) 20 113
37 - Namespaces 20 114
38 - String formatting 20 117
39 - Formatting types 20 118
40 - Interpolation 20 119
41 - StringBuilder 20 120
42 - [Sets][set] 20 139
43 - [Tuples][tuple] 20 157
44 - Regular Expressions 24 106
45 - Attributes 25 61
46 - Nullable values 25 99
47 - Reflection 25 105
48 - Boolean logic 27 81
49 - Resource cleanup (IDisposable) 28 108
50 - Resource lifetime 28 109
51 - Immutable collections 28 135
52 - Randomness 29 104
53 - [Local functions][local_functions] 30 47
54 - Arithmetic overflow 30 101
55 - Resource passing (by reference/by value) 30 110
56 - [Resource allocation][memory_allocation] 30 111
57 - [Queues][queue] 30 137
58 - [Ranges][range] 30 138
59 - Time zones 30 142
60 - Events 30 145
61 - Time 30 156
62 Abstract classes and members 30 1001
63 - Streams 35 153
64 - Tasks 35 155
65 - Asynchronous programming 40 60
66 - Generics Constraints 40 71
67 - Covariance/Contravariance 40 72
68 - Concurrent collections 40 78
69 - Locks 40 79
70 - Boxing/unboxing 45 88
71 - Slicing 45 116
72 - Unsafe code 45 121
73 - Lazy<T> 45 147
74 - [Stacks][stack] 48 140
75 - Explicit Interface Implementation 49 18
76 - Destructors 49 after 21
77 - Extension methods 50 LINQ 22
78 - Statics 50 LINQ 35
79 - [Anonymous functions][anonymous_functions] 50 LINQ 45
80 - [Higher-order functions][higher_order_functions] 50 LINQ 46
81 - [LINQ][linq] 50 LINQ 49
82 - Anonymous types 50 LINQ 128
83 - Enumerables 50 LINQ 134
84 - Advanced (GroupBy, Join, Zip, Cast, GroupJoin, AsEnumerable) 55 LINQ 50
85 - Query Syntax 55 LINQ 52
86 - SelectMany 55 LINQ 53
87 - Iterators (yield) 55 68
88 - Async iterators 49 69
89 - Fields 800 classes 14
90 - Method arguments 800 methods 23
91 - Named arguments 800 methods 24
92 - Method overloading 800 methods 27
93 - Return values 800 methods 28
94 - [Polymorphism][polymorphism] 800 methods 32
95 - Comments 800 basics 73
96 - Null-coalescing operator 800 null 96
97 - Null-conditional operator 800 null 97
98 - Null-forgiving operator 800 null 98
99 - Math operators 800 numbers 103
100 - Visibility (public, private, etc.) 800 basics 115
101 - Assignment 800 numbers 123
102 - Signed integers 800 numbers 151
103 - Unsigned integers 800 numbers 152
104 - [Composition][composition] 900 background classes 12
105 - [Encapsulation][encapsulation] 900 background classes 13
106 - [Mutation][mutation] 900 background 29
107 - [Objects][objects] 900 background classes 30
108 - [State][state] 900 background 34
109 - Expressions vs statements 900 background 43
110 - [Immutability][immutability] 900 background 48
111 - Method Classification (deferred, non-streaming etc.) 900 background 51
112 - [Pattern matching][pattern_matching] 900 background 54
113 - [Recursion][recursion] 900 background 55
114 - [Type inference][type_inference] 900 background 56
115 - Collections 900 62
116 - Collections: combining 900 See LINQ 63
117 - Collections: filtering 900 See LINQ 64
118 - Collections: mapping 900 See LINQ 65
119 - Collections: ordering 900 See LINQ 66
120 - Collections: reducing 900 See LINQ 67
121 - Concurrency 900 background 77
122 - Default values (a bool being false by default, etc.) 900 background Fields 124
123 - Ordering 997 76
124 - [Enumeration: for loop][enumeration] 997 92
125 - [Enumeration: foreach loop][enumeration] 997 93
126 - Object initializers 998 31
127 - Indexes 998 146
128 - [Functions][functions] 999 44
129 - Comparison 999 74
130 - Conditionals 999 80
131 - Conversions 999 87
132 - Enumeration 999 91
133 - Resources 999 107
134 - Scoping 999 112
135 - [Variables][variables] 999 122
136 - Collections 999 131
137 - Numbers 999 149
@ErikSchierboom
Copy link
Member

@mikedamay In #1540, I've added the following Concepts to the list:

These should also be added to the list.

@ErikSchierboom
Copy link
Member

Some clarifications on the list categorization:

The above concepts can also be argued to be background, but I think I'd prefer them as being covered by an existing exercise (category 800).

@ErikSchierboom
Copy link
Member

The following concepts are already covered by existing exercises:

@ErikSchierboom
Copy link
Member

I really like the priority ordering you've created. My only minor remarks are that I feel that the Nested types and Delegates concepts are placed too high. I'd move them back quite a bit.

@mikedamay
Copy link
Contributor Author

I've moved nested types outside the "top 40".

I've left delegates for the time being as I see them as an on-ramp to lambdas and LINQ. We can move them later when the full structure emerges.

@ErikSchierboom
Copy link
Member

Sure. Sounds good.

@mikedamay
Copy link
Contributor Author

mikedamay commented May 28, 2020

**** Out-of-date as of 14-June-2020 ****

Please see comment below for up-to-date list.

The following is a list of exercises based on the concept list.

Exercises are shown in draft order of "importance". The aim is to produce a track initially with the 50 most important exercises. 40 of the exercises should be general C# and 10 should be to introduce LINQ. Please comment on the order so we can agree on a coherent set of exercises for the initial launch of the track for students.

The columns are as folllows:

  • Row number
  • Name of exercise of concept
  • Priority (Rank)
  • Status
  • Further information 1
  • Further Information 2
  • Original line number on the concept document (mentioned above).

Rank has the following meaning

  • 5 means exercise already implemented
  • 10 - 49 general C# exercises in priority order
  • 50 - 55 LINQ related exercises
  • 700 - Possible exercises or possibly just background info
  • 800 - assumed duplicate / handled in a previous exercise (denoted by information 1)
  • 997 - 998 I did not really understand how these fitted in.
  • 999 - assumed these where meant to be headings.

Status:

  • E = exercise (where info 1 contains a link to the design doc)
  • I = new concept exercise issue raised (where info 1 contains a link to the issue)
  • D = duplicate (concept included in another exercise) (where info 1 is the main exercise)

Info 1 links work only where status is E or I.

The challenge is to poplate rows 1 to 40 with a definitive list of exercises to provide general C# fluency and populate 10 rows with a rank of 50 to 60 to provide the required LINQ exercises. You will note that row 40 gets as far as user defined exceptions but excludes nested types, streams, reflection etc. On the other hand the LINQ exercises starting at row 76 look in good fettle.

Row Exercise Name Rank Statis Info 1 Info 2 Orig
1 - [Classes][classes] 5 E Link 11
2 - [Inheritance][inheritance] 5 E Link 16
3 basics (including methods) 5 E Link 19
4 - Constructors 5 E Link 20
5 - Method overloading 5 E Link 27
6 - Properties 5 E Link 33
7 - Null 5 E Link 95
8 - Numbers 5 E Link 100
9 - [Booleans][bool] 5 E Link 129
10 - [Arrays][array] 5 E Link 132
11 - [Dictionaries][map] 5 E Link 133
12 - Dates 5 E Link 141
13 - Enums 5 E Link 144
14 - Floating point numbers 5 E Link 150
15 - [Strings][string] 5 E Link 154
16 Flag Enums 5 E Link 2006
17 - [Interfaces][interfaces] 10 I Link 17
18 - Method arguments / parameters 10 I Link 23
19 - [Generics][generics] 10 70
20 - [Equality][equality] (Equals, GetHashCode) 10 I Link 75
21 - [Characters][char] 10 I Link 130
22 - Signed integers 10 I Link 151
23 Constants/readonly 10 I Link 2008
24 - Conditionals: do-while 12 82
25 - Conditionals: switch 12 83
26 - [Conditionals: if][conditionals] 12 85
27 - [Conditionals: ternary][conditionals] 12 86
28 - Explicit (casts) 12 I Link 89
29 - Exceptions 12 I Link 94
30 - [Lists][list] 12 I Link 136
31 - Delegates 18 143
32 - Indexers 20 15
33 - Structs 20 I Link 36
34 - Expression-bodied members 20 I Link 42
35 - Imports (usings) 20 113
36 - Namespaces 20 I Link 114
37 - String formatting 20 I Link 117
38 - [Sets][set] 20 139
39 - [Tuples][tuple] 20 I Link 157
40 User Defined Exceptions 20 I Link 2004
41 - Regular Expressions 24 106
42 - Attributes 25 I Link 61
43 - Reflection 25 105
44 - Resource cleanup (IDisposable) 28 108
45 - Resource lifetime 28 109
46 - Immutable collections 28 135
47 - Randomness 29 104
48 - [Local functions][local_functions] 30 47
49 - Arithmetic overflow 30 I Link 101
50 - Resource passing (by reference/by value) 30 110
51 - [Resource allocation][memory_allocation] 30 I Link 111
52 - [Queues][queue] 30 137
53 - [Ranges][range] 30 138
54 - Time zones 30 142
55 - Events 30 145
56 - Nested types 30 148
57 - Time 30 156
58 Pattern Matching Types 30 I Link 2002
59 Pattern Matching Tuples 30 I Link 2003
60 Resource Pooling 30 I Link 2005
61 - Streams 35 153
62 - Tasks 35 155
63 - Asynchronous programming 40 60
64 - Generics Constraints 40 71
65 - Covariance/Contravariance 40 72
66 - Concurrent collections 40 78
67 - Locks 40 79
68 - Boxing/unboxing 45 88
69 - Slicing 45 116
70 - Unsafe code 45 121
71 - Lazy<T> 45 147
72 Pointers 45 I Link 2007
73 - [Stacks][stack] 48 140
74 - Destructors 49 21
75 - Async iterators 49 69
76 - Extension methods 50 I Link LINQ 22
77 - Statics 50 LINQ 35
78 - [Anonymous functions][anonymous_functions] 50 LINQ 45
79 - [Higher-order functions][higher_order_functions] 50 LINQ 46
80 - [LINQ][linq] 50 LINQ 49
81 - Anonymous types 50 LINQ 128
82 - Enumerables 50 LINQ 134
83 - Advanced (GroupBy, Join, Zip, Cast, GroupJoin, AsEnumerable) 55 LINQ 50
84 - Query Syntax 55 LINQ 52
85 - SelectMany 55 LINQ 53
86 - Iterators (yield) 55 LINQ 68
87 - [Composition][composition] 700 background 12
88 - Expressions vs statements 700 background 43
89 - [Immutability][immutability] 700 background 48
90 - Method Classification (deferred, non-streaming etc.) 700 background 51
91 - [Pattern matching][pattern_matching] 700 background 54
92 - [Recursion][recursion] 700 background 55
93 - Concurrency 700 background 77
94 - [Encapsulation][encapsulation] 800 D classes 13
95 - Fields 800 D classes 14
96 - Explicit Interface Implementation 800 D interfaces 18
97 - Named arguments 800 D method arguments 24
98 - Out parameters 800 D method arguments 25
99 - [Optional arguments][optional_arguments] 800 D method arguments 26
100 - Return values 800 D basics 28
101 - [Mutation][mutation] 800 D basics 29
102 - [Objects][objects] 800 D classes 30
103 - [Polymorphism][polymorphism] 800 D inheritance 32
104 - [State][state] 800 D classes 34
105 - [Functions][functions] 800 D basics 44
106 - [Type inference][type_inference] 800 D basics 56
107 - Collections 800 D 62
108 - Collections: combining 800 D See LINQ 63
109 - Collections: filtering 800 D See LINQ 64
110 - Collections: mapping 800 D See LINQ 65
111 - Collections: ordering 800 D See LINQ 66
112 - Collections: reducing 800 D See LINQ 67
113 - Comments 800 D basics 73
114 - Conditionals 800 D numbers 80
115 - Boolean logic 800 D booleans 81
116 - Conditionals: while 800 D floating point numbers 84
117 - Implicit 800 D explicit casts 90
118 - Null-coalescing operator 800 D null 96
119 - Null-conditional operator 800 D null 97
120 - Null-forgiving operator 800 D null 98
121 - Nullable values 800 D null 99
122 - Bitwise manipulation 800 D flag-ennums 102
123 - Math operators 800 D numbers 103
124 - Scoping 800 D basics 112
125 - Visibility (public, private, etc.) 800 D classes 115
126 - Formatting types 800 D string formatting 118
127 - Interpolation 800 D string formatting 119
128 - StringBuilder 800 D string formatting 120
129 - [Variables][variables] 800 D basics 122
130 - Assignment 800 D numbers 123
131 - Default values (a bool being false by default, etc.) 800 D classes 124
132 - Numbers 800 D numbers 149
133 - Unsigned integers 800 D signed integers 152
134 Abstract classes and members 800 D inheritance 1001
135 Pattern Matching Constants 800 D enums 2001
136 - Ordering 997 76
137 - [Enumeration: for loop][enumeration] 997 92
138 - [Enumeration: foreach loop][enumeration] 997 93
139 - Object initializers 998 31
140 - Indexes 998 146
141 - Comparison 999 74
142 - Conversions 999 87
143 - Enumeration 999 91
144 - Resources 999 107
145 - Collections 999 131

@mikedamay
Copy link
Contributor Author

mikedamay commented Jun 14, 2020

The following is a list of exercises based on the concept doc.

The list is split into 4 sections

  1. Introduction to C#
  2. Introduction to C# (Duplicates & Non-Exercises)
  3. Essential C# Topics (not covered by C# Introduction)
  4. Advanced C# Topics

If we wanted to do a beta then section 1 provides a coherent set of topics sufficient to allow a graduate to write console programs in a fluent fashion (assuming we explain Main() to them). There are exactly 42 topics, a number that speaks for itself. Some of the decisions hurt in reducing the number of topic to around 40 so I hope any commenter will also support the ambition to minimize the number of topics.

A minimum full track would require 23 more topics (the first 23 lines of section 3).

The columns are as folllows:

  • Row number
  • Name of exercise of concept
  • Priority (Rank)
  • Status
  • Link
  • Further Information

Rank has the following meaning - these are the original ranks roughly agreed between @mikedamay and @ErikSchierboom and I have not touched them. They relate to the full track rather than an introductory track.

Rank:

  • 5 means exercise already implemented
  • 10 - 49 general C# exercises in priority order
  • 50 - 55 LINQ related exercises
  • 700 - Possible exercises or possibly just background info
  • 800 - assumed duplicate / handled in a previous exercise (denoted by Further Information)
  • 997 - 998 I did not really understand how these fitted in.
  • 999 - assumed these were meant to be headings (in the original concepts doc).

Status:

  • E = exercise (where Further Info contains a link to the design doc)
  • I = new concept exercise issue raised (where Further Info contains a link to the issue)
  • D = duplicate (concept included in another exercise) (where Further Info is the main exercise)
Concept Name Rank Status Link Further Info
Introduction To C#
6 - [Classes][classes] 5 E Link
7 - [Inheritance][inheritance] 5 E Link
8 basics (including methods) 5 E Link
9 - Constructors 5 E Link
10 - Method overloading 5 E Link
11 - Properties 5 E Link
12 - Null 5 E Link
13 - Numbers 5 E Link
14 - [Booleans][bool] 5 E Link
15 - [Characters][char] 5 E Link
16 - [Arrays][array] 5 E Link
17 - [Dictionaries][map] 5 E Link
18 - Dates 5 E Link
19 - Enums 5 E Link
20 - Floating point numbers 5 E Link
21 - [Strings][string] 5 E Link
22 Flag Enums 5 E Link
23 - [Interfaces][interfaces] 10 I Link
24 - Method arguments / parameters 10 I Link
25 - [Equality][equality] (Equals, GetHashCode) 10 I Link
26 - Signed integers 10 I Link
27 Constants/readonly 10 I Link
28 - Conditionals: do-while 12
29 - Conditionals: switch 12
30 - [Conditionals: if][conditionals] 12
31 - [Conditionals: ternary][conditionals] 12
32 - Exceptions 12 I Link
33 - [Lists][list] 12 I Link
34 - Object initializers 20
35 - Structs 20 I Link
36 - Expression-bodied members 20 I Link
37 - Namespaces 20 I Link
38 - String formatting 20 I Link
39 - [Tuples][tuple] 20 I Link
40 User Defined Exceptions 20 I Link
41 - Regular Expressions 24
42 - Resource cleanup (IDisposable) 28
43 - Resource lifetime 28
44 - Randomness 29
45 - Arithmetic overflow 30 I Link
46 - Nested types 30
47 - Time 30 156
Introduction To C# (Duplicates & Non-exercises)
51 - [Composition][composition] 700 background
52 - Expressions vs statements 700 background
53 - [Pattern matching][pattern_matching] 700 background
54 - [Encapsulation][encapsulation] 800 D classes
55 - Fields 800 D classes
56 - Explicit Interface Implementation 800 D interfaces
57 - Named arguments 800 D method arguments
58 - Out parameters 800 D method arguments
59 - [Optional arguments][optional_arguments] 800 D method arguments
60 - Return values 800 D basics
61 - [Mutation][mutation] 800 D basics
62 - [Objects][objects] 800 D classes
63 - [Polymorphism][polymorphism] 800 D inheritance
64 - [State][state] 800 D classes
65 - [Functions][functions] 800 D basics
66 - [Type inference][type_inference] 800 D basics
67 - Collections 800 D
68 - Comments 800 D basics
69 - Conditionals 800 D numbers
70 - Boolean logic 800 D booleans
71 - Conditionals: while 800 D floating point numbers
72 - Implicit 800 D explicit casts
73 - Null-coalescing operator 800 D null
74 - Null-conditional operator 800 D null
75 - Null-forgiving operator 800 D null
76 - Nullable values 800 D null
77 - Bitwise manipulation 800 D flag-ennums
78 - Math operators 800 D numbers
79 - Scoping 800 D basics
80 - Visibility (public, private, etc.) 800 D classes
81 - Formatting types 800 D string formatting
82 - Interpolation 800 D string formatting
83 - StringBuilder 800 D string formatting
84 - [Variables][variables] 800 D basics
85 - Assignment 800 D numbers
86 - Default values (a bool being false by default, etc.) 800 D classes
87 - Numbers 800 D numbers
88 - Unsigned integers 800 D signed integers
89 Abstract classes and members 800 D inheritance
90 Pattern Matching Constants 800 D enums
91 Marker interfaces 800 D Equality and Interfaces-(discussion only)
92 Generics Introduction 800 D Lists
93 - Explicit (casts) 800 ID Link signed integers
94 Indexers Introduction 800 D dictionaries
95 - Imports (usings) 800 D namespaces
96 - [Sets][set] 800 Equality
97 - Ordering 997
98 - Indexes 998
99 - Comparison 999
100 - Conversions 999
101 - Enumeration 999
102 - Resources 999
103 - Collections 999
Essential C# Topics (Not Covered By Introduction)
107 - Delegates 18
108 - Attributes 25 I Link
109 - Reflection 25
110 - Events 30
111 - Streams 35
112 - Tasks 35
113 - Asynchronous programming 40
114 - Generics Constraints 40
115 - Covariance/Contravariance 40
116 - Concurrent collections 40
117 - Locks 40
118 Serialization 45
119 - Extension methods 50 I Link LINQ
120 - Statics 50 LINQ
121 - [Anonymous functions][anonymous_functions] 50 LINQ
122 - [Higher-order functions][higher_order_functions] 50 LINQ
123 - [LINQ][linq] 50 LINQ
124 - Anonymous types 50 LINQ
125 - Enumerables 50 LINQ
126 - Advanced (GroupBy, Join, Zip, Cast, GroupJoin, AsEnumerable) 55 LINQ
127 - Query Syntax 55 LINQ
128 - SelectMany 55 LINQ
129 - Iterators (yield) 55 LINQ
130 - [Immutability][immutability] 700 background
131 - Method Classification (deferred, non-streaming etc.) 700 background
132 - Concurrency 700 background
133 - Collections: combining 800 D See LINQ
134 - Collections: filtering 800 D See LINQ
135 - Collections: mapping 800 D See LINQ
136 - Collections: ordering 800 D See LINQ
137 - Collections: reducing 800 D See LINQ
138 - [Generics][generics] 40 This refers to user-defined generics.
139 - Indexers 20 This refers to user-defined indexers
140 - [Recursion][recursion] 30
141 Pattern Matching Types 30 Link 2002
142 Pattern Matching Tuples 30 I Link
143 - [Enumeration: for loop][enumeration] 997
144 - [Enumeration: foreach loop][enumeration] 997 93
Advanced C# Topics
148 - Immutable collections 28
149 - Resource passing (by reference/by value) 30
150 - [Resource allocation][memory_allocation] 30 I Link
151 - [Queues][queue] 30
152 - [Ranges][range] 30
153 - Time zones 30
154 Resource Pooling 30 I Link
155 dynamic 30
156 - [Local functions][local_functions] 45
157 - Boxing/unboxing 45
158 - Slicing 45
159 - Unsafe code 45
160 - Lazy<T> 45
161 Pointers 45 I Link
162 multi-dimensional array (incl Array.CreateInstance 45
163 - [Stacks][stack] 48
164 - Destructors 49
165 - Async iterators 49

@mikedamay
Copy link
Contributor Author

Superseded by #1645

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/help-wanted Extra attention is needed track/csharp
Projects
None yet
Development

No branches or pull requests

2 participants