• funkless_eck@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    arrow-down
    1
    ·
    1 year ago

    learning to use a raspberry pi. the interpreter that works on the mini Python I’m learning seems to have no linting so when I missed a colon in a for loop it took me ages to find.

    • Fushuan [he/him]@lemm.ee
      link
      fedilink
      English
      arrow-up
      13
      ·
      1 year ago

      use something like vscode with ssh - remote to code in a real editor with proper linting, or code in a proper environment and then use a git repo to deploy to the pi, idk. If what you are doing is basically ssh-ing to the device and opening a console editor (a well set up vim does have linting, but anyway) it’s no wonder it is being hard to work on it.

      It’s better to invest time investigating proper tools to work on than to bruteforce the work and then spend tons of time hotwiring everything. Hotwiring code is not the end of the world but if it reaches a point where the tools frustrate you, search for alternatives dammit.

      • funkless_eck@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        I have vscode, I’m just following the tutorial and this particular software works with uploading to the pi and runs the code and I didn’t want to get distracted following other ones about how to shift those functions to other software, I just wanted to play

        Does vscode work with the pi out of box?

        • Fushuan [he/him]@lemm.ee
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          Iirc, when you try to connect to a device through the SSH-Remote extension it downloads whatever it needs in the device and you connect to it. I have not connected to a Pi yet, but in any other cloud based or local linux machine it has worked flawlessly so I don’t think it will be different. The terminal window also opens a ssh’d terminal, so you can do whatever you do locally, through the app.

          I did a quick search and the first link stated “All you have to do is to install the Remote-SSH extension on VS Code” so I guess that yeah, it works just like any other linux device. As an addendum, the folder browser UI works as a sftp drag-and-drop window, you can drop local files and they will get transferred into the SSH’d device.

      • blackbirdbiryani@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I will never understand people in programming who do stuff in tedious/inefficient ways without stopping to consider the alternatives. 9/10 if it feels stupid, it probably is.

    • cole@lemdro.id
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      you can install VSCode on the raspberry pi even, it’s just linux