I had tried to learn some languages using online resources on the net(freely accessible ones tho). Didn’t actually commit to it with a plan.
Curious on how others went about it.

Do mention the resources that you liked/found useful.

  • Achyu@lemmy.sdf.orgOP
    link
    fedilink
    arrow-up
    8
    ·
    6 months ago

    Human languages or programming languages?

    Yes.

    Actually, the former. But curious to know about both experiences.

    • OmanMkII
      link
      fedilink
      arrow-up
      2
      ·
      6 months ago

      For the latter, a good approach is to pick a project or idea and try to make it. If you’re familiar with the logic you can look up the syntax for the new language, but it you’re fresh off the boat then there is a bunch of good stuff on YouTube, Khan academy and stack overflow that are geared to newbies.

      Some starting ideas:

      • Make a text based tic Tac toe/card game
      • Make a number guessing game
      • Find all prime numbers under a number given by the user

      Once you’ve got a decent grip on the logic involved, it can be quite effective to implement more complex approaches to the solution. Instead of guessing randomly, implement a binomial (1:N divided by 2) search algorithm, or have the game play against itself. Go back over how you wrote the solution, and add some good comments, improve the functions descriptions, even refactor some code to be more efficient and more readable. I learnt how to code through doing, textbooks are great for some people but my preferred approach is to make something, break it, and learn how to fix it.

      • Achyu@lemmy.sdf.orgOP
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        6 months ago

        Thank you.
        I did try a bit of that.
        My issue comes when more than 2 functions are used. I do plan to practice more of that.

        Are there any resources that you recommend?