Live data from Hacker News

Practicing Elixir or any programming language

ericdouglas.github.io

1–10 of 59 posts

Re: Practicing Elixir or any programming language

#2
> Why algorithms?

> 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.

Re: Practicing Elixir or any programming language

#4
post #2

> Why algorithms? > 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, primit…

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

#5

So his approach is to go through hackerrank exercises to learn the language. Anyone familiar with hackerrank able to comment on that vs say project Euler?

The approach is actually learn enough about the language (through docs or a book) and practice such knowledge solving code challenges and writing your on tests first to get exposed for a more real environment.

Re: Practicing Elixir or any programming language

#6

So his approach is to go through hackerrank exercises to learn the language. Anyone familiar with hackerrank able to comment on that vs say project Euler?

I'm mildly familiar with both. I'm of the opinion that hackerrank would be better for learning a language, whereas Euler might be better for math problem solving.

Re: Practicing Elixir or any programming language

#7

So his approach is to go through hackerrank exercises to learn the language. Anyone familiar with hackerrank able to comment on that vs say project Euler?

I would say that Hacker Rank helps with learning syntax of a language. I'm not sure if it helps greatly with learning how to implement framework type ideas or large programs.

Hacker Rank is best at teaching algorithms & problem solving. I did a couple the other day & at first I thought they looked difficult. After breaking them down & thinking about them, they surprisingly weren't all that hard.

Re: Practicing Elixir or any programming language

#9
post #2

> Why algorithms? > 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, primit…

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.

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.

Post reply on HN