Re:Practicing Elixir or any programming language
by ericdouglas on Thursday August 24, 2017 @08:47PM
(#15095294)
I agree with you.
But I believe that solving this kind of challenges forces one in a good way to know more about what the language has to offer, while keeping motivated to learn its constructs before being able to create real apps.
The goal is practicing a new language.
Re:Practicing Elixir or any programming language
by paultopia on Thursday August 24, 2017 @09:11PM
(#15095407)
I'm using the [cryptopals challenges](https://cryptopals.com/) to learn java ATM, seems like a good approach because they pretty quickly force you to do stuff that expose important parts of the language ("how do I get bytes out of a string?" "how do I do i/o?" "how do I xor two strings?" "how do I find a crypto library and use it?")
I think this kind of thing is more useful than hackerrank or euler-style problems, at least if you're learning a language in a paradigm you already know? If you can hack together a binary search in one functional language you can probably do it in another one pretty easily. Though might be more challenging moving from one paradigm to another.
Re:Practicing Elixir or any programming language
by coltonv on Thursday August 24, 2017 @09:36PM
(#15095493)
It's important to be able to look at a problem and think "i bet I could find a function in the standard library that could help me solve this problem" or "I should just solve this from scratch with the basic functions I know, like map/filter/reduce/etc. So I disagree somewhat here.
Re:Practicing Elixir or any programming language
by ericdouglas on Friday August 25, 2017 @06:59AM
(#15097552)
Yeah, that's the point: "i bet I could find a function in the standard library that could help me solve this problem"
Re:Practicing Elixir or any programming language
by coltonv on Friday August 25, 2017 @10:39AM
(#15098763)
Yeah, in my opinion that's an important skill to have when learning a language. I already know how to write quicksort, writing it in Elixir will give me some sense of understanding of the language, but knowing how to find it in the standard library will make me more efficent of a programmer in Elixir.
Re:Practicing Elixir or any programming language
by ericdouglas on Sunday August 27, 2017 @07:55AM
(#15110371)
Totally!
> Because this kind of problem is an interesting way to put yourself searching all the API of the language in order to solve the challenge in the more elegant/concise way you currently can.
Bullcrap. APIs are either going to be irrelevant for solving an algorithm, or will simply do the job for you. "Implementing an algorithm" usually means writing it from scratch using simple data structures, primitives and basic flow control constructs.