Why doing a project you love is a terrible and great way to learn a new programming language

in Programming & Dev4 years ago (edited)

This is personal experience, your mileage may vary.

image.png
Image by 200 Degrees from Pixabay

Hey Hivers,

Today I want to talk about my method of learning a new programming language and the upsides and downsides of my method.

I have tried using tutorials to learn new languages, but it usually bores the shit out of me and in the end, because everything was mostly done for me, I rarely retain anything from them (or at least that's how I feel).

The Great:

  • It's a project I enjoy, and thus I am more motivated to work on it (and hence learn the language that I'm trying to).
  • I learn a few "quirks" of that language that best apply to me, as I'm usually developing stuff for Hive, so Hive-related libraries/systems knowledge is transferrable, and I don't have to go and learn about it afterwards.
  • It works for me... that's sort of the main thing. It's the way I learn and so it's the way I learn 🤪
  • Output, quickly - I quickly get feedback about what I'm doing wrong (thanks compiler and stack overflow) - this is probably what keeps me motivated to power on through the learning.

The Terrible:

  • Spaghetti Code - Looking back at my first React project, I can now see that it is in fact written very poorly, and before I release it I'm going to have to rewrite it from scratch (which I'm not going to be pumped for)
  • For larger projects, the above can mean that I'm still working on some of these projects, but they've grown so large already that poor practice is programmed in, and now I gradually (as I get time) have to remove these issues.
  • It has to be a project I really want to do, because otherwise I'll just cheap out and write it in some language that I already know for speed.
  • It should be something suited towards the new language, which can take time to come up with because not every language is a great fit for every task... let's not write my new website frontend in python (not the server, the code that excecutes in the browser)

How do you learn a new language, or have you given up on any endeavour like that for a while?
Please let me know in the comments & thanks for reading!
~ CA

Sort:  

It's a project I enjoy, and thus I am more motivated to work on it

Fully the only reason I can truly learn anything. Hate having to make stuff I don't enjoy.

Have you tried Legal Meth™?

This comment is sponsored by @someguy123 & Legal Meth.

Yeah for real, working on stuff that you don't like fucking sucks!

When "finishing" a project, one could theoretically rewrite it again based on the learnings. But still, nothing beats learning by actually working on project/s.

Buuuuuuuuuuuuuuuuuut wolfie, I just wrote it and it works :/

I never thought about completely rewriting it afterwards, although I feel it'd be better to do a couple more projects before doing so, it usually takes a couple more for all the improvements that I can reasonably discover... I guess I could make my next 2 projects the same thing, but that'd make it boring for me I think (and I'd probably just ctrl+c ctrl+v), whereas looking back on the project now I can see it's so gone that it needs to be rewritten.

Thanks for the suggestion,
~ CA

Don't get me wrong, just because you could rewrite it, doesn't mean you should. I usually do it when starting a new project, with that I mean taking more time and looking at what can be improved on a fundamental level.

Hmmmm.....I bet you can remember the last time i tried to write code.🤣😂🤣 I wish you the best luck, even though I know you won't need it brother. How are you and the family? We send our love!🤗🤗🤗

Thanks John, yup I remember that. We're all good fortunately, and you?

Doing well, except for a recent event of me attempting to cut off my own finger on accident. But I believe it will be better in a few weeks, I hope. I need to get back to working at the homestead..

Yeah, 0/10 can't recommend cutting off your own finger. I hope you feel better soon so you can get back to it all.

Similar to how I work and learn as well. I learn about building website because I enjoy the quick feedback and results you get being about to just open a file in the browser and see what's going on.

Most recently is learning how to use git working on the Gridcoin website. Never got on well with git until then.

Great minds think alike? Currently having some fun writing caching, but don't worry, I'm still getting output by logging the output after every change. Yup, I do like my web development too, the only issue is I have to write the backend too.

I know a friend advocates against git because he hates it that much. Meanwhile I'm gradually onboarding everyone into it (like 2 ppl ngl). I don't want to count how many times git has saved my ass... oops, that worked 2 updates ago... ahhh I changed that! 😀

Thanks for the comment,
~ CA

I was the same with git, hated it too all hell, now I'm alright with it though I only use it basically for the moment.

Fair enough.

I would agree.
Find a project you like or have a passion for and jump right in.
Normally why I am doing design or coding I have videos going of other people doing the same thing.
I don't really listen to them (more background noise) but it helps me stay in the code/writing and plug away.

I love to run something and have it not work and after many edits when it does finally work. It is like
Hell yeah!
let's do this.

Keep plugging away
code on

Nice strat. Thanks for sharing. Yup, the feeling of working code is lovely.

Keep smashing them keys,
~ CA