yoshuawuyts / ama

Open issues, ask me questions
MIT License
4 stars 0 forks source link

What is your way to learn programming language? #1

Closed lockys closed 6 years ago

lockys commented 7 years ago

Hi, @yoshuawuyts :) As title, Do you read books, trace others' code? Or do you have your own way to become such a good developer that having abilities to develop a framework or library?

Thanks a lot!

yoshuawuyts commented 7 years ago

:D hey! That's a cool question!

Umm, I'm honestly not that good at learning languages I think. JS is the only language I feel completely comfortable in. Runner's up would probably be Shell and then Rust. I'm supposed to know C also but yeah that's been a few years haha.

Rust is the most recent language I've started learning. I'm honestly not that good at it yet, as there's a lot to unpack. I found the shift in paradigm to be quite tricky. Suddenly there are no more dynamic inputs and the event loop is gone. Even basic stuff like creating data structures becomes weird. I remember going through the same with Shell, and JS before that. It's just... weird. But fun too, and that's what matters most to me.

But the best way I've found to learn stuff is get through it building projects. It's how I learned all my languages actually. Well, but def coupled with a linter and compiler haha - and maybe someone that's good at it already close by. I'm not that good at reading books.

I've also studied other people's code a lot. When I was starting out with JS I read the koa source perhaps like 50 times front to end. There was so much going on in there that I just had to figure out what it was. In hindsight I can say there was too much going on in there, but it was a great study project regardless!

For Shell I co-authored a port of Docker to POSIX shell called shocker; got all close and personal with the language and figured out some neat patterns for string parsing and handling status codes. Turns out Shell is neat once you realize it's all about string parsing and status code handling :D. It definitely helped the person I wrote the code with knew their stuff real well, so I got to ask a lot of questions in the process.

I'm still learning stuff each day though; there's some incredible code out there on GitHub that's been stable for years. For example today I went through the source of disc and browser-unpack. Both are tools I use daily, but haven't been updated in years. Despite their complexity they're practically bug-free so to say. I feel stuff like that is worth digging into, as the authors probably got it right.

But umm, yeah I think that's most of my thoughts on how I learn things. I do things because I think they're fun to do. If something's complicated I generally try and skip learning it unless there's absolutely no way around it. Even if it's popular. I try and favor knowledge that'll last a while rather than gaining knowledge that'll be irrelevant soon. Obviously you can't always get that one right, but making an effort to do so has worked out for me.

uehhhhh, I hope that answers your question! - Now a question for you: how do you like to learn things? :grin:

yoshuawuyts commented 6 years ago

Doing an issue cleanup; closing for now!