Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teach libraries or skills in addition to languages #3113

Closed
jimrybarski opened this issue Sep 18, 2016 · 22 comments
Closed

Teach libraries or skills in addition to languages #3113

jimrybarski opened this issue Sep 18, 2016 · 22 comments

Comments

@jimrybarski
Copy link

jimrybarski commented Sep 18, 2016

I'd like to be able to give people a nice resource where they can learn introductory image analysis with Python and scikit-image, but in general it would be nice to be able to support any third party library or skillset. I feel that just adding some exercises into the general Python problem set would be problematic since having external libraries is its own can of worms, and you'd also get a huge explosion of exercises once everyone adds their favorite library.

Would it be reasonable to add a "Libraries" section for each language, where these things could be sequestered and clear that its not for immediate beginners? Is this too far out of scope?

@catb0t
Copy link

catb0t commented Sep 18, 2016

In my humble opinion, Exercism just isn't fit for teaching libraries, except for perhaps a very specific type of library which allows for general-purpose programming like a whole programming language itself does.

The (current) Exercism model works well for teaching the general skills needed to get comfortable using a general-purpose (or even DSL-ish, in the case of PL/SQL) language. There is a long, growing list of exercises, and each exercise teaches (more or less) a couple skills in that language.

But because libraries are so disparate in their uses, and by their nature are not just for general-purpose things, a whole new list of exercises would need to be designed, implemented and tested for each different library. The current exercise pool has been carefully curated and crafted to be language-agnostic and achievable in nearly any language.

At least from my perspective as a maintainer of a much less popular track, eager contributors to any part of the project are few and far between, and the fact that the addition of libraries would be such a sweeping change to Exercism's architecture would outweigh the number of willing contributors.


On another note, what types of other libraries than scikit do you think could possibly fit the Exercism model? I don't use many libs that often but just off the top of my head,

  • C++'s Boost patches up missing features from the C++ standard and implements useful utility functions with blazing speed. It's algorithmic and possibly quite "general" though I've never used it. This might be a good candidate, but would require the interest of Boost experts to design problems only achievable using Boost functions.
  • JavaScript's recent cascade of functional-style libraries, like underscore.js. These might be a good candidate because they are quite "general" (if they mostly provide mapping and function operations we take for granted in functional languages), but there are so many and they fade so quickly it's IMO a bad use of time to bother making exercises for.
  • Other web-focused JS libraries like JQuery (not easily unit-testable, at all), Angular, what have you. Exercism exercises need to be unit-testable, as TDD is a huge part of the Exercism model, and many web frameworks make this difficult. The point of rapidly changing waters from the previous bullet also applies.
  • Python's NumPy or SciPy. These are quite domain specific, but very testable. It might even be possible to share an exercise pool between NumPy and Boost.
  • Cross-platform GUI toolkits / libraries like Tcl, Qt, GTK, Java's Swing and AWT, etc. These again might be a good candidate, although I'm not sure how unit-testable they are -- also, they are a pain in the butt to use if you're not an expert in your language of choice.
  • The Linux Kernel API, The MSVC Windows.h library, the OSX or iOS SDKs, the Android SDK, etc. An interesting type and the last I'm going to be able to conjure up, but none are very testable and all are very not cross-platform.

@kytrinyx
Copy link
Member

@exercism/track-maintainers I'd love to hear your thoughts on this.

@IanWhitney
Copy link

In Rust we bring in crates if the exercise needs functionality that's not currently part of the standard library (date handling, random numbers). I like the idea of a Rust exercise being able to show students how to find & use external libraries. But I would hesitate to go beyond that. Like an exercise that introduced "Here's how you write C bindings" would be too much, I think.

@rbasso
Copy link

rbasso commented Sep 20, 2016

Sometimes I miss the possibility of creating a customized Haskell learning experience, with a slow progression of exercises that would make more sense in the language.

But I have to agree with @catb0t.

The current exercise pool has been carefully curated and crafted to be language-agnostic and achievable in nearly any language.

To accommodate special use cases effectively, exercism would have to transform itself in a very different beast, allowing the creation of multiple tracks per language, with exercises specific for each track.

Probably, that would be the end of the jointly curated set of exercises.

I'm not saying that I wouldn't love a more generic platform that allows teachers to set custom tracks of exercises and everybody to comment the solutions online. That would be huge!

Should exercism turn into that? Right now, I don't think it so!

Even if everybody agreed with that path, we have a scaling problem. Custom exercises would create a lot more maintenance, and that would hurt badly the less popular languages, that depend essentially on cross-language contributors.

...but in general it would be nice to be able to support any third party library or skillset.

I think that the library problem is a different thing. We solved that in Haskell using stack, so that any test suite or solution can use any library available in Hackage Stackage without trouble.

@jtigger
Copy link

jtigger commented Sep 20, 2016

The goal of Exercism (as I understand it) is to create a space for programmers to talk about our craft so that everyone can learn and get better.

The content of those conversations needs to be weighty enough to spark interesting and meaningful conversation... anything more complex/involved than that and the dialogue loses focus and the value of this space starts to diminish.

Sometimes, there are libraries that fill in the gap where a language's standard library either falls down or explicitly leaves unimplemented. The need is so great, that those libraries become de facto standards. In this case, I believe it adds to the conversation to include such libraries.

After that, it becomes a whole 'nuther thang. I'm sure there are needs there, but they are scoped to a specific sub-community within the universe of programmers. Let's let those communities solve those problems.

@rchavarria
Copy link

In my opinion, the possibility to include libraries in specific exercises would broaden the possibilities of the platform. But, as @rbasso stated, it'd broaden it so much that exercism would change drastically. And I feel I won't like that change.

If included libraries were small, or if they served a single and very focused goal, I would agree on include them. For example, @catb0t talks about including Underscore for JS track. But that would open a dangerous door, because where is the limit to include a library or another? Underscore could be accepted, but what about bigger libraries, or not-so-well-known ones? A lot of people would like to add exercises for Angular, or React, or Ember. And that would create exercises that are not language agnostic ones, and they serve another purpose.

So, I see very risky to enable include libraries.

@parkerl
Copy link

parkerl commented Sep 20, 2016

IMHO, this should be tackled on a track by track basis. I certainly do not want to encourage this in the Elixir track. The burden of reviewing, vetting, and particularly of rejecting PRs with someone's pet library would be large.

I believe that Exercism is a place for practicing our craft in small and focused exercises. It is not a replacement for tutorials on a language or libraries.

@devonestes
Copy link

This doesn't feel like the right fit for Exercism (as it exists now) to me. It's already difficult enough trying to find common ideas across all the existing languages (and there are still some major leaks in that simpler abstraction for sure - for any language with linked-list based arrays, binary-search is kind of tricky...), so I can't see how we could maintain additional, more specific concepts right now.

However, I think that there is room for language specific features in the existing framework. For example, we have one exercise in the Elixir track right now where the tests pretty much force the users to use the OTP features in Elixir. For that specific example it isn't entirely necessary, but I think it's a really good way to vary the exposure to as much of the language as possible. I'm sure there are tons of language-specific things that can be worked into the existing structure given a little work, but I can't see how broadening out the scope of the existing structure would be maintainable.

@aarti
Copy link

aarti commented Sep 26, 2016

I like the idea of teaching concepts, such as

  1. Concurrency - How does your program respond to race conditions? This is generic across languages.
  2. Scalability - Does your program perform with large datasets, HackerRank does this quite well. It forces you to revisit your algorithm.
  3. Iterators - A few exercises deal with data manipulation. This is an opportunity to teach iterators. Iterator implementations vary across languages and I find it fascinating to compare.
  4. Error Handling - This is also generic for languages and one or two exercises that deal with it could be useful.
  5. Memory Management - For languages that are not garbage collected.

@wobh
Copy link

wobh commented Sep 27, 2016

If anyone is interested, I started making notes for an application-level exorcism-like service. The idea was that a student would set up a project and the service would update a features directory with Gherkin specs for miscellaneous features for implementation. I did some research and learned that there is a cucumber or cucumber-like library for BDD in all the major languages web-application platforms I could think of.

My notes are mostly as lists of features one can find in popular websites, APIs, and services. I have a few vague ideas of what sort of community activities could be with this sort of thing. I've been too busy with other stuff to push this project out of note-taking stage, but if anyone else is interested, the project is here:

https://github.com/wobh/foobar

It's called "foobar" since I couldn't come up with another infernal-fitness related pun to use, but lately, I've been thinking about alternative names on the theme of "exquisite corpse" since that's basically the idea.

@kotp
Copy link
Member

kotp commented Sep 27, 2016

s/exorcism-like/exercism-like/ but unsure, since you mention corpses and infernal, so confused on if that is a typographical error. One is fun, the other a little scarier, though it is Halloween time soon.

@ErikSchierboom
Copy link
Member

IMHO, the exercises on Exercism should be about learning a language and its base libraries, not any external libraries (save for the testing framework that is used). That's not to say that there can't be exercises where you are encouraged to use a specific library to solve a problem. This is for example what happens in the wordy exercise on the Haskell track, where people are encouraged to use the Parsec library to solve the problem. However, and this is the crucial point I feel, people can solve the problem without using a library. To me, this should be the crucial point. If an exercise cannot be solved without a library, I don't think it's a particular good fit for Exercism.

@rbasso
Copy link

rbasso commented Oct 3, 2016

Before asking if we should have library-specific exercises, I think we have to answer another more fundamental question:

Are the exercises in x-common really supposed to be language-independent?

If yes, they are general computing problems and have nothing to do with specific libraries or idioms. It should be possible to port them to most of - if not all - the languages.

If we decide that the exercises can be language-specific, we should consider allowing support for track-specific problems outside x-common, otherwise we will "pollute" it with exercises like lens-person, that makes absolutely no sense for most of the languages.

Just to be clear, I have nothing against lens-person, but I can easily imagine hundreds of language-specific exercises taking over x-common.

@jtigger
Copy link

jtigger commented Oct 3, 2016

Are the exercises in x-common really supposed to be language-independent?

oh, wow, I had no idea this was even a thing (i.e. that we'd house a language-specific exercise)... and lens-person is very Haskell specific. wow.

So, @kytrinyx laid out a bit of a vision in the latest revision of the exercism.io/README:

Exercism is especially well-suited for three types of practice:

  • gaining fluency in your first programming language
  • ramping up in a new programming language
  • developing the skills to be a great lead developer: code review, refactoring, and mentoring

Can you consider yourself fluent in a language like Haskell without specifically working with lenses?

So, to answer your question, directly, @rbasso, I would say, yes: x-common ought to be exercises that are language-independent. There's tremendous value in seeing the same problem in multiple languages.

That said, what would stop a track from being able to include some language-specific amendments (should such a mechanism exist)? Perhaps we could have the best of both worlds?

@kytrinyx
Copy link
Member

kytrinyx commented Oct 4, 2016

So... what if language-specific exercises get defined only in the specific language repository.

Maybe we could have a directory next to the "exercises" directory ("metadata"? "problems"?), and that would have the same structure as in x-common.

$ tree metadata
metadata/
└── lens-person
    ├── description.md
    └── metadata.yml

@ricemery
Copy link
Member

ricemery commented Oct 4, 2016

As an FYI: lens-person is also defined for Scala. The suggested solution is
to use the Monocle library.

On Mon, Oct 3, 2016 at 6:44 PM Katrina Owen [email protected]
wrote:

So... what if language-specific exercises get defined only in the specific
language repository.

Maybe we could have a directory next to the "exercises" directory
("metadata"? "problems"?), and that would have the same structure as in
x-common.

$ tree metadata
metadata/
└── lens-person
├── description.md
└── metadata.yml


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
#3113 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeHG7hedzTIRqsEvA7UMwrMaKn-cVLHks5qwa9_gaJpZM4J_9W5
.

@ErikSchierboom
Copy link
Member

I like the idea of putting language-specific exercises in the language repositories themselves. However, I think that we should always check if an exercise is perhaps not actually language-specific. If not, it should also go in the x-common repository.

@kytrinyx
Copy link
Member

kytrinyx commented Oct 4, 2016

One thing we could do is find a way to expose language-specific problems to people who want to implement exercises, with a note that this might be language-specific. Then, if we find that someone wants to implement it too, we can move it to x-common.

@tmcgilchrist
Copy link

Reading through everyone's replies has been enlightening. I do think the
current setup works well to get people started on a particular language and
nicely pushes them to use the fundamentals to solve the problems.

The next stage in learning a language IMHO is building something real like
a web service or compiler (your chose of real here) where you need to
explore some libraries and muddle through setting up project level
configuration, bolting together different pieces. Finding an up to date
thing like this for your chosen language can be very difficult.

I like the idea of providing something like this, that hopefully spans
enough languages, and putting it into exercism.

On Wednesday, 5 October 2016, Katrina Owen [email protected] wrote:

One thing we could do is find a way to expose language-specific problems
to people who want to implement exercises, with a note that this might be
language-specific. Then, if we find that someone wants to implement it too,
we can move it to x-common.


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
#3113 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKbufpfvckiciBuJAD1T47cOBBjC3l2ks5qwqJMgaJpZM4J_9W5
.

@kytrinyx
Copy link
Member

kytrinyx commented Oct 4, 2016

The next stage in learning a language IMHO is building something real like
a web service or compiler (your chose of real here) where you need to
explore some libraries and muddle through setting up project level
configuration, bolting together different pieces. Finding an up to date
thing like this for your chosen language can be very difficult.

I've been thinking a lot about this, and I would absolutely love to find a way to put this together.

I actually think that there's a step between Exercism and what you describe, which is small, focused real-world-ish projects that you're given and asked to fix or change in specific ways. This lets you get familiar with the technology and libraries without having to start from scratch.

It also (critically) means that you have to start reading code in order to get things done, which is an important skill that we don't have a lot of ways to help train people in.

I touched on this in my GopherCon talk this year: http://kytrinyx.com/talks/mind-the-gap

I don't particularly want to put this into Exercism, since Exercism is already big and pretty unweildy as it is, but I would be very interested in discussing a sister-project to Exercism. Can we leverage everything we've learned working on this to kick off something that would be fairly stand-alone and sustainable?

@kytrinyx
Copy link
Member

I've just read through this entire thread again, and wanted to thank you all for adding your thoughts to it.

My conclusion is that this sort of thing sounds like a great idea, but that Exercism is not the right place for it.

@kytrinyx
Copy link
Member

Oh, one more thing. If anyone here cares enough about the "language-specific exercise" idea, would you collect the comments/thoughts about it from this discussion and open a new issue in https://github.com/exercism/discussions/issues?

ErikSchierboom pushed a commit to exercism/problem-specifications that referenced this issue Jan 19, 2017
At the time it was added (#97), indeed [Haskell][haskell] was the only
implementing track, and it was marked Haskell-specific.

However, the [Scala][scala] track has also implemented this exercise.
I predict it is confusing for Scala students to see "Haskell specific"
in the list of the Scala exercises. The proposal is to change it to
"specific to languages with immutable data".

[haskell]: exercism/haskell#84
[scala]: exercism/scala#157

Lenses can be a fit for any language that has immutable data and data
structures that can be nested.

In such a language, updating a deeply-nested field can be a lot of work,
but made easier with lenses. This exercise demonstrates the use of
lenses and is applicable to **any** language with immutable data, not
just Haskell.

The alternative considered was to use "functional programming" specific,
but the term "functional programming" is a little too broad. It's
altogether possible that a functional programming language could have
mutable data and a non-functional programming language could have
immutable data, so let's be precise about where lenses are helpful.

As of this writing, I do not believe any other exercise is
language-specific. Questions to this effect have been asked in:

* #352
* exercism/exercism#3113

If you are curious about having language-specific exercises, you may be
interested in exercism/DEPRECATED.trackler#22.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests