this post was submitted on 15 Oct 2023
478 points (95.6% liked)

Programmer Humor

32453 readers
713 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 8 points 1 year ago (2 children)

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.

[–] [email protected] 14 points 1 year ago (3 children)

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.

[–] [email protected] 3 points 1 year ago (1 children)

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?

[–] [email protected] 2 points 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.

[–] [email protected] 2 points 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.

[–] [email protected] 0 points 1 year ago (1 children)
[–] [email protected] 3 points 1 year ago (1 children)

Well the extension I just proposed is a Microsoft proprietary one, so, unless there's an alternative, VSCode it is.

[–] [email protected] -1 points 1 year ago

Vscodium is vscode with proprietary microsoft stuff stripped out.

[–] [email protected] 1 points 1 year ago

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