Comments (17)
I think it would help, I thought this was how they all worked as I've otherwise done python, elixir, and elm.
I was just coming to report on this, and to volunteer to generally make this easier for linux users such as myself. I completed the hello world exercise using dotnet core, and added nunit to a project file I created such that 'dotnet test' ran the tests. I'd like to investigate having that work for others, but I need to ramp up on both csharp and exercism a bit more first.
from csharp.
@ckhrysze I am currently waiting on the .NET Core CLI to be finalized. Once that is released, I will be converting all exercises to run on .NET Core, including a project for each exercise that contains an empty implementation file. Thanks for the feedback!
from csharp.
@ErikSchierboom when you say that you're waiting for the .NET Core CLI to be "finalized" what do you mean? I thought 1.0 has already been released.
from csharp.
@robkeim Well, the .NET Core CLI has been released, but they are still preview releases (not even beta releases thus). Alongside the CLI work is the MSBuild work, which will replace the current .NET Core project.json format. This work is also not done. Once both of these are done, we will be able to do some very cool stuff such as:
- Create very minimal project (.csproj) files for each exercises, which makes it easier for users to get started.
- Have the exercises run on .NET Core, which makes the cross-platform support much better and allows us to have better instructions.
- .NET Core allows us to have people build and test the projects on the command-line.
Adding a default file to those project files (this issue) is already technically possible, but I think this would fit in better with the above rewrite.
from csharp.
Ok that makes sense, thanks for the explanation!
from csharp.
This was the post I was looking for (I added this comment to #183) before finding this one.
@ErikSchierboom It looks like the CLI tooling is no longer in preview... finally :)
https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes
Updated .NET Core and ASP.NET Core - No longer a preview workload. Fixed several bugs and improved usability of .NET Core and ASP.NET Core tooling. Project migration from project.json/xproj to csproj is much more reliable. The “Configure Continuous Delivery...
.NET Core tooling is now automatically included in “ASP.NET and web development” workload and an optional component in “.NET desktop development” workload in the installer. It is also available as a workload called “.NET Core cross-platform development” under “Other toolsets” section in the installer. We have fixed several bugs and usability issues for .NET Core and ASP.NET Core tooling. The csproj project format has been simplified and project migration from project.json/xproj to csproj is much more reliable.
from csharp.
@robkeim I'm busy porting the C# exercises to Xunit (on a branch of mine). I'll then work next on creating the new .csproj files.
from csharp.
Sounds good @ErikSchierboom!
from csharp.
I'm working on this in the .NET Core branch.
from csharp.
While working on this, a question arose. I am creating a minimal skeleton file for each exercise. That means the user can focus on the actual implementation, instead of the boring and repetitive creating of files. For simple exercises, I think this is a huge win. Consider the following default file for the acronym
exercise:
using System;
public static class Acronym
{
public static string Abbreviate(string phrase)
{
throw new NotImplementedException("Please implement this function");
}
}
Looks clean to me, and it will let the user focus on the implementation. However, do we also want to create stubs for any required constructors? I'm leaning towards yes, but what do you feel? @balazsbotond @robkeim @jwood803 @bressain?
Would you like this:
using System;
public class Anagram
{
public string[] Match (string[] potentialMatches)
{
throw new NotImplementedException("You need to implement this function.");
}
}
or this:
using System;
public class Anagram
{
public Anagram (string baseWord)
{
throw new NotImplementedException("You need to implement this function.");
}
public string[] Match (string[] potentialMatches)
{
throw new NotImplementedException("You need to implement this function.");
}
}
Note that the tests require that specific constructor, so we could supply it instead of having users use ReSharper or Visual Studio to generate it for them.
from csharp.
Note that for some exercises, it might make sense to do require the user to specify the constructors. An example of this is the dot-dsl
exercise, for which I would create the following stub:
public class Node
{
}
public class Edge
{
}
public class Attr
{
}
public class Graph
{
}
from csharp.
You can check my progress here: https://github.com/ErikSchierboom/xcsharp/tree/default-file
from csharp.
@ErikSchierboom I'm kind of in the "no stubs" camp. I think it's fine to include a stubbed out file for the first few exercises but after that, I feel there is value in the user creating files from scratch. Yes it's repetitive but repetition is how you learn the language and I wouldn't want to take that away from the user.
That said, I understand that decision may have already been made which is fine since I've been mostly MIA. My opinion however, is if we're going all in on stubs, let's keep it to a minimum so that we're not being too prescriptive.
from csharp.
@bressain Thanks for chipping in! We had the same sort of discussion on the F# track. We can leave this issue open, as we can easily remove stubs if more people agree with your sentiment :)
from csharp.
To @bressain's point, I think that we definitely need stubs for the first few exercises in order to reduce friction and on-boarding to the track.
Given the fact that we're providing the tests we're already being fairly prescriptive in terms of function composition, naming, etc so I don't feel the stubs should take out much of the "meat" of the exercises as opposed to just reducing a few lines of boilerplate code.
(Disclaimer: I'm just getting back from vacation and catching up on everything, so this thinking hasn't taken everything that's happened in the past few weeks into consideration)
from csharp.
I understand @bressain's point, but it kinda depends on who you think is your target audience. For people completely new to C#, it might make sense to have them create the files at some point. However, for people already having some C# that want to hone their C# skills, it doesn't really bring anything to their table I feel. Also, when you get to the later exercises, you must already have some C# skills otherwise you wouldn't get there. For those people, which thus are relatively proficient, creating the stubs wouldn't be a problem, but they also wouldn't learn anything from it.
I've also done worked on several other language tracks, with some tracks providing stubs (Haskell), some providing stubs for some exercises (Java) and some not providing any stubs (F#). It is probably no surprise, but I really like the Haskell track where a stub was provided for me. The Java track at some point didn't provide me with a stub, but all I did was to use my IDE to generate the stub for me. That did not teach me anything useful, expect how to use my IDE.
So I do get the point @bressain is making, and it is a good one, only I feel that the previous points give the stubs approach the edge.
from csharp.
With #199 merged, this issue can now be closed! 🎉
from csharp.
Related Issues (20)
- New C# concept exercise: Stack HOT 2
- New C# concept exercise: Queue HOT 1
- XOR operator for booleans HOT 1
- Missing closing parentheses in instructions HOT 2
- New approach to Perfect Numbers exercise HOT 1
- 🤖 Sync error for commit 2e1c3c
- 🤖 Sync error for commit 2793b1 HOT 3
- C# track, Hyper-optimized Telemetry exercise - unclear instructions HOT 6
- elons-toys: Inconsistent object instantiations in tests HOT 1
- C# Log level exercise needs tests cases with numbers HOT 1
- Building a training set of tags for csharp HOT 21
- Missing example in do-while loops introduction in C# track HOT 3
- Deprecate `accumulate`? HOT 1
- Wrong instructions in Dominoes exercise HOT 1
- Improved and consistent "Please implement..." messages HOT 3
- Fix and improve the generator HOT 1
- Bowling and Nullability HOT 1
- Bowling and Nullability HOT 1
- Bowling and Nullability HOT 2
- Either support the current C# language or tell us what language version is being used for tasks. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csharp.