So I’m an on/off noobie but have been focusing on actually sticking with programming what I’ve been working on is Python but this question is for programming in general. For me it’s hard but I want to see how I can get better

Like are these good ways to get good:

Follow tutorials, then work on ways of adding your own twists or changes? Or trying to code it in something else?

Work on assignments from a resource you’re using like in my case Python Crash Course and attempt to redo the assignments without looking back?

Experiment with multiple libraries and library methods or built in methods?

Please share any other ways especially ones that helped you

Also when would be good to start a new language after learning one

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago

    I would say:

    1. Just practice, do projects. Also if you can work on projects with other people because you’ll read a lot of bad code and learn how not to do things (hopefully).

    2. Learn lots of programming languages. They often have different and interesting ways of doing things that can teach you lessons that you can bring to any language. For example Haskell will teach you the benefit of keeping functions pure (and also the costs!).

    If you only know Python I would recommend:

    1. Learn Python with type hints. Run Pyright (don’t use mypy; it sucks) on your project and get it to pass.

    2. Go is probably a sensible next step. Very quick to learn but you’ll start to learn about proper static typing, multithreading, build tools (Go has the best tooling too so unfortunately it’s all downhill from here…), and you can easily build native executables that aren’t dog slow.

    3. C++ or Rust. Big step up but these languages (especially C++) will teach you about how computers actually work. Pointers, memory layouts, segfaults (in C++). They also let you write what we’re now calling “foundational software” (formerly “systems software” but that was too vague a term).

    4. Optionally, if you want to go a bit niche, one of the functional programming languages like Haskell or OCaml. I’d probably say OCaml because it’s way easier (it doesn’t force everything to be pure). I don’t really like OCaml so I wouldn’t spend too much time on this but it has lots of interesting ideas.

    5. Final boss is probably a dependently typed language like Lean or Idris. Pretty hardcore and not really of much practical use it you aren’t writing software that Must Not Fail Ever. You’ll learn loads about type systems though.

    Also read programming articles on Hacker News.

    • the_strange@feddit.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      22 hours ago

      I generally agree with your statement, just one thing to keep in mind: Mypy sucks for any library larger than a few thousand lines spread over a couple of files, but pyright is developed by M$ and might be part of their usual Embrace, extend, and extinguish strategy. The other two contenders are pytype (google) and pyre (facebook), so it’s not like there’s a good selection of independent, good and FOSS type checkers out there at the moment.

      Astral - the people behind the ruff linter - are currently developing ty, yet another static type checker for python, with a lot of promise, but it’s going to be a couple of months, maybe a year before it is in any shape to be used in production code.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        7 hours ago

        Yeah I’m watching Ty. Pytype and Pyre are not serious options. Nobody really uses them, and Pytype is discontinued. Facebook have a new project called Pyrefly that’s also worth watching.

        But for now, use Pyright. No argument. If you’re really worried about Microsoft (and not Facebook or Google for some reason) then use BasedPyright.