From c4c64690657d76e026ed51923941d716f9932493 Mon Sep 17 00:00:00 2001 From: Tim Rayburn Date: Fri, 13 Sep 2019 08:45:31 -0500 Subject: [PATCH] doc solutions updated --- docs/_posts/2011-01-02-Numbers-Kihon.md | 2 +- docs/_posts/2011-01-19-String-Kihon.md | 2 +- docs/_posts/2011-01-20-Console-Kihon.md | 2 +- .../2011-01-22-Control-Structures-Kihon.md | 2 +- docs/_posts/2011-02-26-Sql-Kihon.md | 2 +- docs/_posts/2011-03-26-Linq-Kihon.md | 34 +++++++------- docs/index.md | 44 ++++++++++++++++++- 7 files changed, 64 insertions(+), 24 deletions(-) diff --git a/docs/_posts/2011-01-02-Numbers-Kihon.md b/docs/_posts/2011-01-02-Numbers-Kihon.md index 2375bd5..9c927f2 100644 --- a/docs/_posts/2011-01-02-Numbers-Kihon.md +++ b/docs/_posts/2011-01-02-Numbers-Kihon.md @@ -2,7 +2,7 @@ layout: default title: Numbers Kihon --- -``` +```cs protected override int Return_The_Maximum_Value_Of_Int32() { return int.MaxValue; diff --git a/docs/_posts/2011-01-19-String-Kihon.md b/docs/_posts/2011-01-19-String-Kihon.md index eb96ef8..efc87de 100644 --- a/docs/_posts/2011-01-19-String-Kihon.md +++ b/docs/_posts/2011-01-19-String-Kihon.md @@ -2,7 +2,7 @@ layout: default title: String Kihon --- -``` +```cs protected override string Convert_To_Uppercase(string data) { return data.ToUpper(); diff --git a/docs/_posts/2011-01-20-Console-Kihon.md b/docs/_posts/2011-01-20-Console-Kihon.md index d0ba8ce..c51f305 100644 --- a/docs/_posts/2011-01-20-Console-Kihon.md +++ b/docs/_posts/2011-01-20-Console-Kihon.md @@ -2,7 +2,7 @@ layout: default title: Console Kihon --- -``` +```cs protected override void Write_FooBar_To_The_Console(IConsoleWrapper console) { console.Write("FooBar"); diff --git a/docs/_posts/2011-01-22-Control-Structures-Kihon.md b/docs/_posts/2011-01-22-Control-Structures-Kihon.md index e20487b..657ae47 100644 --- a/docs/_posts/2011-01-22-Control-Structures-Kihon.md +++ b/docs/_posts/2011-01-22-Control-Structures-Kihon.md @@ -2,7 +2,7 @@ layout: default title: Control Structures Kihon --- -``` +```cs protected override void Call_Hit_On_a_If_val_Is_True_Else_Call_Hit_On_b(bool val, ITarget a, ITarget b) { if (val) a.Hit(); diff --git a/docs/_posts/2011-02-26-Sql-Kihon.md b/docs/_posts/2011-02-26-Sql-Kihon.md index d1851a0..8367211 100644 --- a/docs/_posts/2011-02-26-Sql-Kihon.md +++ b/docs/_posts/2011-02-26-Sql-Kihon.md @@ -2,7 +2,7 @@ layout: default title: SQL Kihon --- -``` +```cs protected override string Select_All_Fields_And_Rows_From_Person() { return "SELECT * FROM PERSON"; diff --git a/docs/_posts/2011-03-26-Linq-Kihon.md b/docs/_posts/2011-03-26-Linq-Kihon.md index d9526a8..c586ef0 100644 --- a/docs/_posts/2011-03-26-Linq-Kihon.md +++ b/docs/_posts/2011-03-26-Linq-Kihon.md @@ -2,24 +2,24 @@ layout: default title: Linq Kihon --- -``` - protected override IEnumerable<int> Select_the_Something_property_from_list(List<Product> list) - { - return list.Select(x => x.Something); - } +```cs +protected override IEnumerable Select_the_Something_property_from_list(List list) +{ + return list.Select(x => x.Something); +} - protected override IEnumerable<Product> Order_the_list_by_the_something_property_descending(List<Product> list) - { - return list.OrderByDescending(x => x.Something); - } +protected override IEnumerable Order_the_list_by_the_something_property_descending(List list) +{ + return list.OrderByDescending(x => x.Something); +} - protected override IEnumerable<Product> Order_the_list_by_the_something_property(List<Product> list) - { - return list.OrderBy(x => x.Something); - } +protected override IEnumerable Order_the_list_by_the_something_property(List list) +{ + return list.OrderBy(x => x.Something); +} - protected override IEnumerable<Product> Filter_the_products_where_something_is_equal_to_2_from_list(List<Product> list) - { - return list.Where(x => x.Something == 2); - } +protected override IEnumerable Filter_the_products_where_something_is_equal_to_2_from_list(List list) +{ + return list.Where(x => x.Something == 2); +} ``` diff --git a/docs/index.md b/docs/index.md index 369a107..50c9989 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,9 +1,40 @@ --- title: Squire --- -## License +## Summary + +Squire is a project meant to allow students to drill the syntax of C# +and help with retention of that syntax. This is accomplished by using MSTest +tests which evaluate the answers to the drill automatically, allowing a student +to receive feedback without the direct involvement of an instructor. + +### How to use as a Student + +Clone this repository locally, open the project in Visual Studio, then open your +first drill (we recommend `StringKihon`). Attempt to fill in all of the methods +with correct answers, then run all of the Unit Tests (`Ctrl-R-A` by default). +Any Unit Test which does not pass indicates you have an incorrect answer which +you should revisit. + +### How to use as an Instructor + +We recommend using these drills to supplement actual classroom education. We +generally will time box any given run of these drills (we use 30 minutes) at the +end of which you should review all of the correct answers with the student. + +If you reach the point of needing to know the correct answer and your instructor +is not available, then this page contains solutions to all of the Kihons below. -Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. +### What is a Kihon? + +Kihon is a term borrowed from the Martial Arts, just as Kata is also borrowed. +[Wikipedia defines it as follows](https://en.wikipedia.org/wiki/Kihon): + +> Kihon (基本, きほん) is a Japanese term meaning "basics" or "fundamentals." The term is used to refer to the basic techniques that are taught and practiced as the foundation of most Japanese martial arts. Kihon in martial arts can be seen as analogous to basic skills in, for example, basketball. + +These drills are meant to reinforce the fundamentals, they are not a complex form +meant to recreate real world scenarios (the rough definition of Kata) but instead +are the foundational skills. ## Solutions
    @@ -13,3 +44,12 @@ title: Squire {% endfor %}
+ +## License + + + Creative Commons License + +
+This work is licensed under a +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.