Besides some of the very, very obvious (don’t copy/paste 100 lines of code, make it a function! Write comments for your future self who has forgotten this codebase 3 years from now!), I’m not sure how to write clean, efficient code that follows good practices.

In other words, I’m always privating my repos because I’m not sure if I’m doing some horrible beginner inefficiency/bad practice where I should be embarrassed for having written it, let alone for letting other people see it. Aside from https://refactoring.guru, where should I be learning and what should I be learning?

  • y8h8do3a2vg5@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    4 months ago

    Since the first lines of your linked site mention SOLID and design patterns, you’re already onto the right stuff there. That’s the framework side of things. Beyond that, I advise you to go study the advanced features of your preferred language so you know how to code “correctly” and idiomatically in that language (although not in a way that obscures intent). Then it’s perhaps a mental hurdle to open your repos and know that all code has imperfections. Opening it may indeed help to improve it - code review is arguably the single most useful practice in code quality.