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

  • melsaskca@lemmy.ca
    link
    fedilink
    arrow-up
    0
    ·
    4 days ago

    Lots of good advice here. I’ll add a bit more that is non-technical. Get and study the book “Symbolic Logic” by Irving M. Copi. It’ll help you to think more critically and expose you to different logic patterns. More philosophical than technical but I see it as being like math for words. As with everything, you get better over time if you keep at it.

  • jcr@jlai.lu
    link
    fedilink
    Français
    arrow-up
    0
    ·
    4 days ago

    Self taught Python (and using linux OS) over the last 15 years ; the only ways I found real progress in my code/coding were while doing the following : 1/ (at start): following strictly a “school manual” with lessons and ALL exercices. It was Python 2.3 I think, a manual (in French) by Swinnen. To be honest I stopped before reaching the GUI and network programming, and guess at what I suck today in Python programming … 2/ projects, personal projects. I did pro (paid) projects on the side, but with the impetuous to deliver results to be paid, I can not progress. On personal projects I can take the time to try stuff, to rewrite functions or programs, and to “improve” existing code with new/better coding constructs.

    So here I am with a rather random level of Python programming proficiency, currently being average at most but enough proficient to have workable programs.

  • ViperActual@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    5 days ago

    Generally I start with an end goal, and break it down into logical pieces. For instance I recently wanted to make a custom soundboard for discord. First thing I needed to figure out was how to play sounds. Next was playing those sounds to a specific sound device so that it can be routed into the audio input for discord. Then I needed to figure out how to play the same sound at the same time through the audio output. Then I needed a form to interact with so I could click a button to play a sound. Then I needed to be able to load a config file so that I could update that form when I wanted to add or delete sounds. Then I needed a way to choose files to add to the sound board. And conversely a context menu so I could right click a button to remove it. Then I needed to figure out how to save and load this config file from the filesystem. Then I needed to be able to search for and update the form so I could now quickly find sounds if the list got too long. And then once I had all that working, figure out how to play the same sound multiple times before it finished resulting in a multi threaded soundboard that can interact with any sound device on the machine and saves and loads sound lists all in Python.

  • BilboBargains@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 days ago

    Identify a problem that you can solve using code. Use ai to help with syntax and code structure. Chip away at the problem a little bit each day.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    5 days 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
      0
      ·
      4 days 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.

  • theherk@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 days ago

    There is a lot here with varying degrees of helpfulness. I’ll add one thing. Many have commented essentially “build stuff”, and that is solid truth. That’s how you get better. But just like the whole perfect practice makes perfect, there is one fundamental detail that must be included. Build systems that you understand deeply. Not the code; that you are learning. But it is best to build things where you understand the outcome behavior of the system.

    For example, if you don’t really understand what graphics rasterization is, building a raster program, even with a good guide, isn’t going to help as much as you might think. Though it will help you understand graphics, so go nuts. But if you really understand how baseball stats are calculated, do something with that. It will be much more gratifying and the code will be the part you’re learning, not the system it is implementing.

  • morphballganon@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    5 days ago

    Be result-focused. You’re trying to achieve x. Look at however many tutorials you need to achieve x. Now x is part of your repertoire. Then repeat, with a new x.

    Later, you’ll think “I need to do y. I’ve done it before. I’ll just copy that syntax, with new variable names etc” and boom, you’re good at programming.

  • sobchak@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    5 days ago

    Working with/on things I found interesting helped a lot. I.e. lots of small projects/scripts, using different frameworks/libraries/languages that looked interesting. Experimenting and exploring different ways things could be done. Programming is one of those “10,000 hours” things; you need to be interested in what you’re doing to do something like that for so long. Computer Science coursework helped a lot too, especially the courses heavy on algorithms, data structures, big-o, proofs, etc.

    In my CS coursework, we were exposed to many different languages and programming paradigms at the very beginning. It’s fine to experiment and start learning multiple languages at once (preferably, all being quite different, such as a pure functional language, procedural language, object-oriented, declarative logic, etc).

    • inzen@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      5 days ago

      This. For me personally It helps to think of programming as as craft. It also helps a lot if you have someone more skilled than you available to discuss.

        • inzen@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          5 days ago

          I’m not sure I understand the question but I will try to answer. I did not mean to question you skill in particular, I know nothing about you.

          I agree that programming requires repetition e.g. more programming, that’s why I said “This”.

          What followed was a generic advice that helped me personally to improve a lot as a developer. I got the chance to work side by side with developers experienced in different types of projects, developers I consider more skilled than me in different ways. I consider this avaluabe experience.

          Hope that clears it up a little, nothing to do with you’re skill in particular. English is not my first language so maybe my phrasing is a little weird.

          • Diplomjodler@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            5 days ago

            You wrote:

            It also helps a lot if you have someone more skilled than you available to discuss.

            Which could be read as you addressing me directly. Which of course I’m aware was not what you meant. I was just trying to be funny.

  • zerofk@lemmy.zip
    link
    fedilink
    arrow-up
    0
    ·
    5 days ago

    The things you mentioned are very good, but what I’m missing is feedback and a good foundation.

    Feedback should come from other developers - ideally experienced, but a good dialogue between beginners can also teach both sides a lot. For me this came only after I started working, through code reviews. But you could also try contributing to open source, or putting your own code online. Although I fear you won’t get much feedback.

    A good foundation is about software and hardware designs. Without this you will inevitably come to a point where you made a fundamental mistake in design.

    For hardware design I recommend YouTube. Many channels talk about low level hardware. You don’t need to become an expert, just get a high level understanding.

    For software design, check out the gang of four’s Design Patterns. It is a seminal work. You don’t need to read it all but be aware of the patterns, and study a few like factories and facade in detail.

  • dream_weasel@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    5 days ago

    Write code, get feedback, write more (better) code, get more feedback and repeat.

    Just hacking your own stuff 10 hours a day isn’t making you better if you’re just doing what you have already done or doing things the same way you’ve done them before.