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

Suggestion: deprecate diffie-helman #2149

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Conversation

kytrinyx
Copy link
Member

The diffie-helman exercise is not a very interesting exercise.
It's a math formula, and it doesn't lend itself to playing
around with approaches.

Thoughts?

@jiegillet
Copy link
Contributor

jiegillet commented Nov 12, 2022

Is "not very interesting" a strong enough criterion to deprecate an exercise?

I, for one, find it interesting. Admittedly I have a strong interest in math and science, but for example I find the modular exponentiation algorithm fascinating, it's also a cornerstone of modular arithmetic and cryptography. Totally worth being exposed to.
There is also the aspect of generating a random number, it's not trivial in all languages (Haskell, Elm...).

Copy link
Member

@junedev junedev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I see some arguments for keeping it, my tendency is towards deprecating it.

Here some thoughts:

  • In Go, this exercise can be used to practice big integers but then again, there is not much to it. A student would simply google how to add/subtract big ints etc. and type out the formula. To be fair, students that finish some learning exercise (e.g. for big ints in Go in this case) often ask for simple exercise to practice this concept a bit more than just with the one learning exercise. For that, this exercise is a good fit. Sidenote: @BethanyG and I discussed on the call at some point that it felt there is an exercise type missing between learning exercises and what we call "practice exercises".
  • That something is difficult in a couple of languages does not sound like a good argument to have it in problem spec. It sounds more like it should exist only on those languages then if it really has good value to students there.
  • My guess is that most students would not go into "wow, what a cool algorithm, let me read more about it" mode here as there is no reason to do this. They would type out the formula as Katrina described and move on.
  • However, in general I agree with @jiegillet that this is an interesting topic but I feel a practice exercise like this is not the right format to explore it. In the community call, we talked about having Exericsm wide content about various programming topics. If we would have something about encryption there, that would be a better fit to talk about this and then end with some "try it for yourself" prompt maybe. I know this is far out on the timeline but in general I feel a lot of the mathy/algorithm topics would benefit from some custom content that introduces the topic well instead of just the exercise or exercise + link to hardly understandable Wikipedia content.

@kytrinyx I feel there is an underlying topic here about properly specifying what practice exercises are about. What makes a good practice exercise? It what ways should they challenge the student? Do we want to leave some ambiguity in the descriptions to make it more like real life or should descriptions always be as clear as possible? What are the criteria for adding a new exercise to problem spec or a track? etc Bethany and I were searching for a document like this a while back but didn't find anything. I can make an issue in the docs repo for this if it doesn't exist already.

The diffie-helman exercise is not a very interesting exercise.
It's a math formula, and it doesn't lend itself to playing
around with approaches.
@kytrinyx kytrinyx force-pushed the deprecate-diffie-hellman branch from 17af868 to 41db7a7 Compare November 12, 2022 13:38
@kytrinyx
Copy link
Member Author

I feel there is an underlying topic here about properly specifying what practice exercises are about.

@junedev I think you're right. We have lots of thoughts about this, and nothing written. I've flagged this as something to discuss before we write something down, to make sure that we're roughly on the same page. Or maybe I'll write something in order to start the conversation. Either way I've made a note. Thank you!

Copy link
Member

@ErikSchierboom ErikSchierboom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this exercise in multiple tracks and have never once felt like I've actually learnt something. That to me is the biggest issue with this exercise, so I'm all for deprecating. Pair that with the fact that mathy exercises in general are less appreciated by students.

@BethanyG
Copy link
Member

Hurm. I am solidly ... ambivalent.

I think the only counter-argument I could offer (purely from the Python perspective) is that this particular exercise introduces (well - ok - less introduces than mentions) that Python has two different modules that deal with random and pseudo random numbers: random and secrets. And that only secrets is capable of generating cryptographically secure random numbers.

But beyond that, it's essentially a drill-and-kill exercise in using either random.choice() or secrets.choice() + a formula which is not particularly interesting at first glance. But I could see making some approaches that might be interesting ... if (and only if) a student was inclined toward cryptography or crypto-adjacent topics.

I could also see starting over with the topic and coming up with multiple exercises that got into randomness with some maybe less obviously "mathy", and others that are very "mathy".

@ErikSchierboom
Copy link
Member

@BethanyG Part of our reasoning was that we have two other exercises that also deal with randomness:

  • simple-cipher
  • dnd-character

And those exercises are likely more "fun"

@ErikSchierboom
Copy link
Member

Oh and even if we deprecate the exercise here, it doesn't mean that tracks can't implement it (or have to deprecate it themselves), just that we suggest tracks doing that.

@BethanyG
Copy link
Member

BethanyG commented Nov 17, 2022

@ErikSchierboom - Good points. I agree that both simple-cipher & dnd-character are more engaging (for those who are not inclined to dig into the math). 😄 And I would be fine with general deprecation here. Although I'd probably want to then figure out either a concept or practice exercise for Python that got at using secrets vs random. Or maybe trying to take a shot at making a Diffie-Helman that was actually engaging to the less math inclined ... despite the math. 😄

As a "using randomness" sidetrack, I've long had in my head an exercise like this foxes ad rabbits simulator - where rules and randomness model predator/prey in an ecosystem. It would have to be simplified or modified to not include graphs, but I think it would be fun.

Another randomness exercise that I encountered in my Python class was this one. Although when I took the class it used viral resistance as opposed to bacterial resistance. Again, it would have to be simplified to not include graphs, but I think its a really interesting "real world"-ish application of randomness.

@BethanyG
Copy link
Member

BethanyG commented Nov 17, 2022

As a follow-on stream-of-conciseness on @junedev side note - I do think there's a space/need for some "bridge" or "drill" problems that aren't necessarily constrained like concept exercises or wide-open like practice exercises.

I think (maybe?) this is what some students are getting at when they ask for topic flagging or notes in instructions about recommended functions/methods. But it doesn't have to be Diffie-Hellman for randomness. I'm sure we could come up with others that were good as bridges and more engaging. Magic 8-Ball, anyone?. 😉

@ErikSchierboom
Copy link
Member

@BethanyG I would love to have some more randomness exercises! We really are lacking in that regard.

@kytrinyx
Copy link
Member Author

I would also love more randomness exercises. (Magic 8-ball sounds like a very nicely small-sized and easy-to-understand exercise!)

Okay. I am going to go ahead and deprecate this one, with the note that -of course- tracks can always keep it, and even implement it if they decide to.

@kytrinyx kytrinyx merged commit e5fe0fa into main Nov 17, 2022
@kytrinyx kytrinyx deleted the deprecate-diffie-hellman branch November 17, 2022 08:02
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

Successfully merging this pull request may close these issues.

5 participants