Live data from Hacker News

Practicing Elixir or any programming language

ericdouglas.github.io

11–20 of 59 posts

Re: Practicing Elixir or any programming language

#11
personally i think algorithm or hacker rank-like problems are probably a poor way to actually pick up a new language.

pass one for me is usually "read all the books that are needed to cover the main parts of the language, toolchain, frameworks, idioms, etc and make sure to type in the code as you go." for elixir this means all the pragprog books and probably one book on OTP/beam.

second pass is once that surface level knowledge has been exposed and digested immediately start trying to solve real problems with the thing, using said books and code written above, in addition to language docs, as a primary reference, the internet (stack overflow, etc) as a secondary reference only when absolutely necessary.

if you don't have the first part of dedicated learning and wide exposure (without a motivating problem per se) you inevitably end up doing the lazily evaluated "stack overflow driven development" since you haven't been exposed to the breadth of the language, frameworks, etc systematically. in other words, you don't know what you don't know. the first part also sets you up to have some working examples you built yourself (with the help of books and documentation) as handy references that you are comfortable with since you've been in that code.

if you don't have the second part of solving a real problem you never actually form the skills that come from applying the tool to a real problem with no hand holding.

i think academic algorithmic problems are kind of the worst of both worlds. they don't really give you a systematic way of being exposed to the APIs and language quickly, and they also aren't real motivating problems so you end up probably only really learning a narrow scope of things that are practically useful for building stuff.

Re: Practicing Elixir or any programming language

#12
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…

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

#13
I always find it interesting how people learn so differently. Personally, I learn a language by building something in it. I want a feel for it, before digging deep and learning about theory. I only do that stuff much later, after I'm relatively proficient in the language.

This is probably why I wasn't very good at picking up musical instruments. I was never satisfied learning at a slow pace and only being able to play "twinkle twinkle little star". Programming is perfect for me because you can build things before you really know what you are doing.

Re: Practicing Elixir or any programming language

#14
I learn programming languages today the way I learned my first one. I have (what is now an ancient) copy of the old DEC book, "101 BASIC Computer Games" and I port some of those games to the new language. Sometimes I add bells and whistles and it's not porting attempting to be true to the original; but they offer small enough problems to get at least the syntax under my fingers and some of the larger ones can start to give me a sense of how I'll need to think should I try something serious.

And the first language I learned was... well BASIC... but it was on the VIC-20 & later C-64; but that still required a translation as the PDP-11 BASIC was rather different that was was on the Commodore machines.

Re: Practicing Elixir or any programming language

#15
For Clojure I'd recommend ... http://www.4clojure.com/

Follow some of the top-code-golfers, get all the tests passing, and then marvel at how concise other people were able to make their solutions. Fun and educational.

Edit: bonus, got nerdsniped.. Clojure solution - https://gist.github.com/minikomi/4e42de3643118b5381c4d7e70a1...

Re: Practicing Elixir or any programming language

#16

Semi-OT, but I really want to steal whatever slick CSS you used to get that full page load then slam-in sidebar.

Here is a link to the actual CSS used on the blog post. https://github.com/ericdouglas/ericdouglas.github.io/blob/ma...

I'm gonna try pointing to the relevant CSS, but be warned, I am not a CSS wizard. I am also probably not a smart man, posting about CSS on HN while not being a wizard.

The relevant classes seem to be .sidebar, .sidebar-toggle, .motion-element, and .posts-expand, the last of which seems to control the transforms and durations. This is where my knowledge breaks down, since I'm not sure how they .sidebar or .motion-element trigger .posts-expand or any of the other animation CSS. Hopefully someone can help fill in the rest! ¯\_(ツ)_/¯

Re: Practicing Elixir or any programming language

#17
post #13

I always find it interesting how people learn so differently. Personally, I learn a language by building something in it. I want a feel for it, before digging deep and learning about theory. I only do that stuff much later, after I'm relatively proficient in the language. This is probably why I wasn't very good at picking up musical instruments. I was never satisfied learning at a slow pace and only being able to pla…

I am reading Haskell Programming from First Principles right now. If I did not know how the language works from doing this reading, then I do not see how I could make anything useful without quickly getting annoyed by the compiler

Re: Practicing Elixir or any programming language

#18

Semi-OT, but I really want to steal whatever slick CSS you used to get that full page load then slam-in sidebar.

Three quarters OT, but I really don't. Yet another ill-informed, misguided piece of flashy form before content. I have given the text a miss. I generally do if it can't be arsed to show itself without a load of js trickery.

Re: Practicing Elixir or any programming language

#19
post #13

I always find it interesting how people learn so differently. Personally, I learn a language by building something in it. I want a feel for it, before digging deep and learning about theory. I only do that stuff much later, after I'm relatively proficient in the language. This is probably why I wasn't very good at picking up musical instruments. I was never satisfied learning at a slow pace and only being able to pla…

Most programmers I know are like yourself. I'm the opposite, I'm the person you say you can't be, I will study and read until I feel I have a good handle on some nitty gritty before I ever put hands to keyboard

At some point in my career i became a team lead and that's where this difference became obvious. It took me a long time to adapt to the fact that everyone but me on the team learned by doing

Re: Practicing Elixir or any programming language

#20
for me, when I'm learning some new language or tech I start off with whatever basic info / tutorials that are available, play around with a few mini projects (like algorithms), but the most important thing, LET OTHER PEOPLE SEE YOUR CODE, for me that often involved trying to answer questions on stackoverflow and posting on codereview, for instance when I was learning ramda I posted a simple solution for fizzbuzz - https://codereview.stackexchange.com/questions/108449/fizzbu... for review and followed up on other peoples variations and it helped a lot.

when I thought I was too rusty on regex I went and tried to answer as many regex questions on stackoverflow

The great thing about stackoverflow is it presents real world problems that are often not straightforward. Even if you can't solve it, someone else more than likely will and you will have an "aha!"

Post reply on HN