exercism / dart

Exercism exercises in Dart.
https://exercism.org/tracks/dart
MIT License
57 stars 98 forks source link

[v3] Roadmap to Launch #280

Open Stargator opened 4 years ago

Stargator commented 4 years ago

This issue is to track the Dart v3 roadmap. If you intend to help with this track, please read this entire document, and find the section about "How can you help".

@exercism/dart Please update and revise this as I pulled much of it from a template.


I have been working on the Dart v3 track by compiling a list of Dart specific concepts, transition documents from various languages and starting writing exercises. The concepts can be found here.

Folder structure

Specifics for Dart concepts can be found in the /info folder. There are other special folders such as /keywords, which take the keyword, and explain what they do, as they are language-specific (mostly), and the /types folder in many other languages: it lists the global objects available.

Concept exercises

The concept exercises in the Dart track are a work-in-progress and can be found in /concept-exercises. Important types of concepts to target are things that only exist in object-oriented programming (for people coming from non-oop languages), functions as a first class citizen (for people coming from non-functional languages), and Dart specifics.

It is important to understand we never explain a specific type or syntax as a concept, but teach the more "abstract" concept around it, using the type(s) or syntax(is).

A list of exercises that we must have is compiled below, and is not at all a complete list:

⚠ Note ⚠: The idea here is to use a concept name for the folder, but perhaps use some sort of "progression", so they will naturally become a sort of path to traverse. In this example, the numbers exercise only teaches basic number usage, and doesn't look into more advanced subjects. I would expect to see

It's only important that it's reasonably easy to find the exercise. It's okay if the name isn't perfect. We will iterate on this.

Concept interpretation

Here is how I've interpreted the following concept-keywords. This should be synced across tracks.

concept interpretation
basic-numbers Know of the existence of the number type and (for this language) see that it's whole numbers, and floating points. Know of basic operators such as multiplication. Know where it's documented, or at least how to search for it.
basic-strings Know of the existence of the string type. Know of some basic functions (like looking up a character at a position, or slicing the string). Know where it's documented, or at least how to search for it.
futures Know of the future construct (promise or observable type in some other languages), chain-ability, and .then. Know where it's documented/how to search.
basic-iterables Know of the Iterable construct (array type in some other languages). Know of some basic functions.
basic-errors Know how to create an error, how throw it and how to catch it
callbacks Know how to use a function as a first-class citizen, that is, pass it into a function as a value, and call it somewhere inside that function. Know that you can pass in values and retrieve out return values.
recursion Know how to call a function from itself
type-conversion Know that there exist functions that can convert between "objects" (instances of classes) and types (primitives).

This also indicates that for example basic-strings does not include knowing that Dart strings aren't strings in the compsci sense as in, they are made up of UTF-16 codepoints, and therefore there are a lot of catches with this.

How can you help?

This track

Globally

There are concepts missing.

Exercises

We need two types of exercises. The concept ones, as explained above -- you can chose to pick one from the list above or suggest, in this issue, one that's not listed. The other ones are the practice ones, which are like the v2 exercises.

Analyzers

TBD

devkabiir commented 4 years ago

Some of my thoughts:

basic-iterables Know of the Iterable construct (array type in some other languages). Know of some basic functions.

I think that in dart List would be the closest equivalent to what array is in other languages. Since dart's Map is made up of two iterables (keys, values). It might cause confusion to those that think of it as a container of two arrays. Since in other languages arrays have explicit [] and []= operators while Iterable in dart does not. List stands out to be the closest equivalent.

I also believe that with the introduction of iterable concept there should be (in the logical progression) intro to iterator, generators (sync and async).

So perhaps we could have concept progression like:

type-conversion Know that there exist functions that can convert between "objects" (instances of classes) and types (primitives).

Dart doesn't have type conversion in the sense of a loosely typed language. We could call this concept type-casting, since in some dynamic/loosely typed languages type conversion does not throw any runtime errors unless something tries to access/change something in the converted object that doesn't exist at runtime. Dart also has automatic type casting, take for example:

var a = ''; // a is type casted to a String

if(a is Pattern) {
 // Scoped type casting
 // a now guaranteed to act as an object of type Pattern
}

Due to the surrounding scope of variable a dart can give us some guarantees about it's type. So I believe we could have concepts progression like

Other concepts from exercism/v3#3:

Note worthy concepts that we could discuss in future iterations:

devkabiir commented 4 years ago

Should this issue be moved over to exercism/v3 repo to gain more visibility?

Stargator commented 4 years ago

@devkabiir I am fine with a lot of what you said. A lot of this was just to get a draft up and get the conversation started.

iHiD commented 4 years ago

Done :)

Stargator commented 4 years ago

@exercism/dart I created a first draft of a concept exercise for Futures. Please check it out and leave comments.

I'm still trying to figure out what the tests can be, I haven't used mockito uch before and that was awhile ago. If there are any suggestions for different ways to develop tests for Futures, let me know.

I also dropped concept exercises for numbers and strings. But I will likely reverse that. We want to showcase Dart's unique features/API for these, we do not try to teach CompSci to the students.

I still struggle with thinking the targeted audience already knows what some of the concepts are. But they may not know Dart's unique approach to them.

ErikSchierboom commented 4 years ago

I still struggle with thinking the targeted audience already knows what some of the concepts are. But they may not know Dart's unique approach to them.

I've highlighted the important part in that sentence. With v3, you're not expected to teach people what strings or numbers are (one can expect people to know about that), but you should teach people how to work with those concepts in Dart. Does that make sense?

Stargator commented 4 years ago

@SleeplessByte yes, that's what I was getting at. I have to constantly remind myself of that.

md-weber commented 4 years ago

I tried to collect all the concepts of dart to a first draft.

Concepts in Dart

Variables

Built-in types

Functions

Operators

Control flow statements

Exceptions @Stargator

Classes

Generics @Stargator

Libraries and visibility

Asynchrony support @Stargator

Generators @Stargator

Callable classes

Isolates @Stargator

TypeDefs

MetaData

Comments

Type Safety

Stargator commented 4 years ago

Thanks @md-weber. I did some minor edits (in bold) and fixed some typos, that's a good list.

I think the stuff in the first section (before Variables) are too high level to test. We can definitely mention these things, but most junior programmers shouldn't need concept exercises specifically for them.

Similarly for the Variables section, that may be too high level, but we sure do what to write out these concepts in our docs.

I suggest each @exercism/dart Maintainer edit the post by @md-weber. We'll do a multiple choice vote on which things each of us think would make good concepts to bring a single exercise around. Let's have the goal of finishing voting by 12:01am EST March 14th.

You would vote by tagging the concept with your username (ie: @Stargator). Concepts tagged that contain sub-bullets would include everything in the sub-bullets.

ErikSchierboom commented 4 years ago

This list looks nice! Some tiny nits:

Stargator commented 3 years ago

Linking a conversion that was ongoing in the Dart track here. As many other concepts were brought up. https://github.com/exercism/dart/issues/174