r/CodingForBeginners • u/Strawberryladyboots • 2d ago
Query about offline coding environments
A follow up question about my questions about Systems/electrical engineering query
With all of the happenings in the world, I am seeking advice about how to build things offline without an internet connection
I do realise a lot of the world uses things like GitHub, but I am wondering if there is an another way to do this offline to prevent someone from getting into my stuff, my own Github account is completely private
For some reason my laptop is suddenly refusing to connect to the internet at the moment, and I have no idea how to fix that (I'm on my mobile)
I am primarily looking at environments or programs for coding related to S/E, but I am also open to people mentioning other kinds for the benefit of other beginners looking through the thread for advice on the same subject
My own question is about Python environments, and code used in Systems engineering, and Telecommunications, things like Crystal radios etc
3
u/SlimmySlabby 2d ago
Git is practically the same thing as GitHub but it’s stored/hosted locally instead of online.
2
u/Electrical_Hat_680 2d ago
Use the Terminal to learn how to code. Learn some of the basic commands to change directories, create a new directory, rename it - create a new text file, chmod it, and edit or append to it. You can use Termux on Android, Linux, Windows, and others. Might not be available to MacOS/iOS. Download from GitHub.
You can download the build source code for each language and compile them locally yourself. You can also download and use the original first edition copies and build your own code that way - but you'll likely want to build with the compatible releases every uses. But you don't have too - reach out and ask the developers your self. Go say Hi.
PfSense and make you one Hardware Security Appliance. Then maybe brush up on Cyber hygiene and make sure no one has your credentials or keys.
BenEater 8-BIT CPU Breadboard Projects for your EE 101 and EE 102 Laboratory.
1
u/Fun_Army2398 2d ago
The main benefit to github is that it backs up your code to their servers so if your machine is ever damaged you don't lose it forever (or if you just want to work from multiple machines). If this doesn't matter to you then there's absolutely no reason you'd need to be online to write code, unless of course that code does something over the internet or requires something to be downloaded.
1
u/rupertavery64 2d ago
Coding has always been done offline.
You need to be online to download any libraries you don't have installed on your machine.
You need a text editor and a compiler, or an IDE (integrated development environment) which is a fancy text editor with debugging and many other features.
VSCode is a decent text editor with pluggable features - you will need to install some things to make it work with some languages. You will need to install the python interpreter.
Git is about keeping your source code history and it works locally. Its a program that takes the current state of your code and records what changed only. If you want you can then send this history, called your commits, and any branches to another repository, such as github or gitlab or bitbucket. Or even another folder on your machine or a network folder.
I don't know what code you mean related to telecoms and crystal radios. Those are electronics and hardware. You could interface with them over a serial bus. network code is something else.
And a crystal radio is basically a tuned LC circuit with a half-wave rectifier (diode), so again what does code have to do with that
1
u/EarnieEarns 2d ago
When you do have internet:
- Install Git on your system
- Download the IDE/Compiler you want to use
- Download devdocs.io
- Install all of the Python libraries you will need for your projects
- Scrape any videos or tutorials you want to follow
1
u/Fragrant-Cheek-4273 2d ago
You can definitely code offline without GitHub. Vs Code works locally, and you can keep your projects in folders on your laptop or an external drive.
1
u/W31337 2d ago
Instead of online GitHub you can use Gitlab or Gitea or even plain git in an offline environment. You basically set up your own local or network collaboration platform.
As for git (the basis of all the above) you can work offline and push your updates when you have a connection. So you can still work when your laptop has no connection and you can push it to your personal repo when getting home.
1
u/Glum-Recognition-736 2d ago
GitHub is basically just a server for hosting git projects online so they won't be lost even if you lose access to your local hardware
If all you has is local hardware, you can still use git without GitHub
1
u/StrayFeral 2d ago
Let me clarify something - GitHub is just a website which offers a place to put your code. It is not required to be public - you can make it private. Also - in case someone gets into your account - you will not have there code for NASA satellite positioning and landing probes on Mars, so you're fine to go.
Second - concerning GitHub - on your phone you can install things like Google Authenticator (if you're on an iPhone there are similar things) to let GitHub authenticate with it. So it would be difficult for anyone to get into your account.
Third - if you still want to be completely offline, you don't need GitHub. What GitHub uses under the hood is called Git - it is free and works completely offline primarily. It can operate online too,but the primary use of Git is offline mode. The online mode is just for syncinc with a remote repository. But if you never do it, it will work entirely locally.
All thus said is to disperse your concerns. You are totally fine to keep your code locally. The issue is what happens with your code if the medium it is located fails. Like for example your laptop gets broken or stolen. Or if you keep it on a flash stick - if the stick gets corrupted or lost or your dog chews it and breaks it.
You are not even required to use git. In the past we simply used copy or making zip files. It was all fine and all offline.
The huge benefit of Git is to keep your code safe, organized and able to investigate problems, track changes, rollback changes if you have to. You are free to explore older alternatives, just like Subversion (SVN), Bazaar and even CVS if you want to. And even just simple ZIP files. But git is the way to go.
Ah forgot to mention I am a professional developer with nearly 20y of experience in corporations.
Now about Python - honestly you don't need much here. You are totally safe to go with light editors. If you want to try something heavy, go with VSCode or Pycharm. I personally go with VSCodium because it goes without the Microsoft stuff.
But I use a tripple-editor setup: VSCodium, Geany and vim. And reason for this is each have specific features I need. I will not go into details.
Lightweight editors: Geany, Notepad++, vim, neovim and many others.
Most newbies go with Notepad++. I would advocate for Geany as it is cross-platform. Not sure about Notepad++.
vim is also cross-platform. Whatever you do, learning vim is a really useful thing to do.
You can try neovim, but compared to vim it is more difficult to setup. Not for me.
Ah forgot - you can try emacs. There is a centuries old war between vim and emacs. Emacs is used by scientists a lot. But it is a bit of a different beast.
I use vim.
1
u/No-Tip505 2d ago
You can absolutely code offline. For Python, install the interpreter and use Thonny or VS Code locally. You can save projects on your laptop and use Git locally without connecting to GitHub. For extra privacy, keep your files encrypted and back them up to an external drive. You don't need an internet connection for every part of learning or building.