How do I go about this? Are there any free resources that’ll help me get started?

I see people advising to start with a small project, but you need to get some basics down right? What language? How to develop it and stuff?

My only experience is some very basic C programming classes I took during school.

  • mrnarwall@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    19 days ago

    I always recommend https://automatetheboringstuff.com/ as it helps teach you python basics, as well as learning some coding fundamentals. Its free at the website, while offering a book version you can purchase. I have been coding in python professionally for 5 years, but I started with these tutorials (after doing a non-python coding bootcamp that focused on full stack web development)

  • Feathercrown@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    19 days ago

    Step 1 is determining what kinds of projects you want to make and selecting a language and/or libraries that will help you do that. Eg. if you want to code for the web, there’s JS. Then you can follow tutorials, and/or jump into making small projects.

  • Christov@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    18 days ago

    Like others have said it depends on the field you want to code for and language choice. The field might inform your language choice.

    I’d highly recommend python as your first if you’re just looking to get stuck in. It’ll teach good fundamentals, it doesn’t have a steep learning curve and it has a very wide set of applications plus loads of community support. This website is what I recommend to anyone wanting to learn python: https://futurecoder.io/

    Good luck!

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    28
    ·
    19 days ago

    Harvard CS50 on YouTube might be a good start. Teaches python and you can then pivot to another language from there.

    • starshipwinepineapple@programming.dev
      link
      fedilink
      arrow-up
      8
      ·
      19 days ago

      This is how i initially got started and i always like to recommend it. CS50x (introduction to computer science) is their college curriculum made available for free as opencourseware. Their lectures are very engaging imo, and you get problemsets to practice and check your answers. The problems are done in an online environment which i like so you don’t get bogged down in setting up your computer before you’ve even learned how to code. And then at the end you pick a project of your own and when you finish you get a free certificate (don’t bother paying for the “verified” one)

      One other thing i think cs50 does pretty well is help teach you how to solve problems and how to read documentation. The reality is that learning how to code isn’t just learning a coding language. Knowing how to solve different types of problems and how to read documentation are core skills that let you get away from “tutorial hell” and start working on a project that excites you.

  • Eheran@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    19 days ago

    Not sure why nobody mentioned it, but use GPT or whatever you like to create code for you and explain everything. It is like talking to someone with some experience. Not everything is perfectly correct etc. if you get into more complicated stuff but you will certainly learn a lot and fast. The learning curve got a lot flatter with these tools.

  • AwkwardLookMonkeyPuppet@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    19 days ago

    CodeAcademy.com used to have great free classes, but idk if they’re free now. The language you choose depends on what you want to do. Share more details about what sort of stuff you want to code. You develop your coding skills through use, and practice. Pick a project slightly above your skill level and do it. You’ll learn a lot during that project and retain the information much more than if you were just going through a tutorial. Then pick another project slightly above your new skill level and do that too. Repeat for 20 years.

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    18 days ago

    Start my picking what you want to do with programming. Then do a couple of simple challenges in any language like advent of code and such in python just to get your feet wet and solve some problems.

    After that you should have the main building blocks and then you scale up into making a “thingy” sized project. I personally liked making games with progression like.

    1. Text adventure
    2. Tic tac toe
    3. Another text adventure but with battles and hit points.
    4. Tetris

    Then you can start learning separation of code into modules like “This is the game and this is just how it’s shown” which applies to pretty much every application with a user interface.

    After that you have enough skill to learn anything and you can go about learning a specific skill or technology that you want to work with and you’ll be at a skill level of a junior programmer.

    Advancing beyond that I’d recommend reading a couple of books (crazy I know) that go over best practices and why they exist. You use those guidelines and get better at working with larger amount of code and then you get to mid level. During this time you should also basic rules of thumb on how long each thing takes to run, both algorithm complexity and how http requests are usually the bottleneck.

    For senior level you’ll need to gain a lot of experience and become a library of solutions and bug knowledge while also having a good grasp of tradeoffs. You’ll need to know when to insulate yourself from change and when it’s overkill to deliver the code in a timely manner while not sacrificing tomorrow.

    It’s very hard to skip any step in my opinion but reading a couple of books really helped me advance through the junior phase quickly just by knowing what solutions are out there. Books are not as valuable when you don’t have experience since it’ll stick 10x better if you encountered the problem described in the book.

    To get started just pick anything and get your feet wet. Good luck!

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        18 days ago

        Clean Code, in overly idealistic and speaks like it’s the holy truth but ideas are generally good. Same with Clean architecture. The guy talks like it’s the only way but in my experience it’s just a collection of tricks you could do but maybe shouldn’t because of time pressure. One off code with a single purpose doesn’t have to be that clean and functions almost never have to be that small.

        Pragmatic programmer is also good and there are also more books on non-programming part as well. You could also ask ChatGPT since it’s really good at exactly these questions.

        Still, no use reading this until you ran the gauntlet of building up basic programming skills :)

  • SpicyTaint@lemmy.world
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    19 days ago

    I’ve been going through The Odin Project for full stack web development. It’s been great and is completely free.

    I would advise against using Chat GPT or any other LLM; they “hallucinate” and can give you wrong information.

    • Grimy@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      19 days ago

      Imo, the main problem is that it does the job for you and you don’t learn anything. It’s great at explaining concepts though.

      Along the same lines, I would suggest to never copy/paste code. Physically writing it helps your brain remember.

      • SpicyTaint@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        19 days ago

        Yea, just copy/pasting code without already understanding it is a bad move.

        If you deliberately drive GPT into a certain direction with the prompts about a specific topic and the model has been trained on the subject matter, its accuracy will be higher. If you ask GPT about a less popular language that it has little or no training on, its answer will likely be garbage.

  • TheBananaKing@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    19 days ago

    I know you’ve heard it, but seriously, the biggedst hurdle to learning programming is having a solution looking for a problem. You can learn all kinds of stuff in the abstract, but your brain will either handwave over it or bounce off, if it can’t contextualise the knowledge into a problem-solving tool.

    A source of small but genuine needs is the scarcest resource.

    I know the world has moved on to big cosy high-level languages that let you think semantically about everything but honestly I’m still a big fan of starting with C; it is something of an austere discipline, but it gives you a boots-on-the-ground view of the problems you’re working with, and I think that really helps shape your understanding of what you’re dealing with.

    (you could do a fair bit worse than the game ‘human resource machine’ for a slightly gentler introduction, then pick up some exercises in C, then move to python or similar - it will let you appreciate the cosy high-level stuff, and have a better feel for why you’re doing stuff)

    • amldvk@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      19 days ago

      My only real exposure to coding is C in Turbo C++ it was not a nice surprise when I later looked at other IDEs and was not sure where to begin. Maybe I’ll just get started with Turbo again lol.

      • TheBananaKing@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        19 days ago

        aw hell yeah, that ruled back in the day.

        Might be challenging to get it running in a modern environment, but I admire your taste in the classics :)

  • antlion@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    5
    ·
    18 days ago

    Pick a language to start. If you want to automate CAD, maybe it has an existing scripting language built-in?

    Learn the basics from the documentation. Look at the examples. Learn how to search for specific answers.

    Finally, practice a lot. Most of the challenge is breaking a problem down into discrete steps (your algorithm), which can be written in pseudo-code. The implementation of that algorithm may look different depending on what the target language is, or what library/tools you can leverage within that language.

    https://codingbat.com/ if you choose Java or Python

    https://www.freecodecamp.org/

    https://adventofcode.com/ has easy-to-challenging problems suitable for any language

  • go $fsck yourself@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    19 days ago

    One thing that has not been mentioned that will make a big difference: join an online community.

    When you get stuck or you’re confused and need to ask a question, you need to have a place you can reliably go to for that. You will also be able to see others go through their learning journey which will encourage you to keep going.

    Someone mentioned The Odin Project already, but they have a very big and wholesome community.

    My specialty is web development, but the concepts of programming is pretty universal. Feel free to DM me personally if you want some help.

  • stoy@lemmy.zip
    link
    fedilink
    arrow-up
    5
    ·
    18 days ago

    IT guy here, I don’t really program, but I do write scripts in Powershell and Bash from time to time.

    I mostly learn by doing, so I have a task that I need to write a script to accomplish.

    One script I often use is a tool I made to ping devices in a network range.

    This breaks down into several smaller steps.

    1. Define the start IP address
    2. Define the stop IP address
    3. Issue a ping command
    4. Repeat the ping command for every adress in the defined range.
    5. Output the data
    6. Colour code the data
    7. Make every IP address ending with a 0 be colourded in the output.

    Each step is fairly simple to find out how to solve, together they make a good script to solve the initial issue.