I have some background in Python and Bash (this is entirely self-taught and i think the easiest language from all). I know that C# is much different, propably this is why it is hard. I’ve been learning it for more than 4 months now, and the most impressive thing i can do with some luck is to write a console application that reads 2 values from the terminal, adds them together and prints out the result. Yes, seriously. The main problem is that there are not much usable resources to learn C#. For bash, there is Linux, a shit ton of distros, even BSD, MacOS and Solaris uses it. For python, there are games and qtile window manager. For C, there is dwm. I don’t know anything like these for C#, except Codingame, but that just goes straight to the deep waters and i have no idea what to do. Is my whole approach wrong? How am i supposed to learn C#? I’m seriously not the sharpest tool in the shed, but i have a pretty good understanding of hardware, networking, security, privacy. Programming is beyond me however, except for small basic scripts

  • atzanteol
    link
    fedilink
    English
    arrow-up
    5
    ·
    3 days ago

    Like i don’t know how i was supposed to learn multiple languages at once and understand both

    Because the differences between languages isn’t often that big (in most cases).

    They have the same concepts with different syntax. Like with spoken languages - you know there are verbs, nouns, etc. but not what the other languages call a “library”.

    Nearly all computer languages have an entrypoint, conditionals (if … then), loops (for, while), datatypes (integers, floating points, strings), complex structures (class, objects, structs) and functions.

    You seem motivated to learn but struggling with your instructor. Copy/paste from course material in an annoying way to learn. What helps is to really “get in there”. To debug something. Only then will you truly hate programming 😁.

    Others have suggested a personal project and I’d recommend it too. Even simple things are fine - but try to modify them to do more and more. The more you’re iterating over the same codebase the more comfortable you’ll become with it.

    Harvard University makes CS50 (an intro to programming course) freely available and it’s excellent. It does use Python, which won’t help with the specifics of C#, but it would help with the other gaps in your knowledge.

    And remember - concepts translate between languages, so if you understand classes in Python then you just need to learn “how does C# do classes?”.

    • kekmacska@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      The languages i used up until now do not have entry points (intrepeted). I know what is that, but i don’t know where they should be. Up until now, i only used llms for debugging, i’m far from correcting source code, i’m happy if i can write something that even remotely resembles to the correct structure. Also, is it a good idea to start adding smaller functions to already existing c# projects made by others on github (not to publish, just for myself, don’t want to ruin someone’s work with malicious commits). My python understanding is vague too. Only class i ever defined was a csv file reading class like class Class: def init(self, stuff1, stuff2): self.stuff1 = str(stuff1) self.stuff2 = int(stuff2)

      • atzanteol
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        Checkout CS50. It’s free and should help with the basics, even if it does use Python rather than C#. As I said before - the concepts are transferable. You need to learn more than just “syntax”.

        Programming can be hard at first. Don’t be discouraged if you find it confusing or if you need to start with very simple things. There is a lot to learn so keep your expectations low, and feel free to return and ask questions. And if you’re comfortable using AI you can use it to explain concepts and code rather than just having it spit out solutions. It’s usually pretty good for this since there is a lot of material on the internet for it to have learned from.