• 0 Posts
  • 34 Comments
Joined 6 months ago
cake
Cake day: May 20th, 2024

help-circle



  • One example for self documenting code is typing. If you use a language which enforces (or at least allows, as in Python 3.8+) strong typing and you use types pro actively, this is better than documentation, because it can be read and worked with by the compiler or interpreter. In contrast to documenting types, the compiler (or interpreter) will enforce that code meaning and type specification will not diverge. This includes explicitly marking parameters/arguments and return types as optional if they are.

    I think no reasonable software developer should work without enforced type safety unless working with pure assembler languages. Any (higher) language which does not allow enforcing strong typing is terrible.


  • I have worked on larger older projects. The more comments you have, the larger the chance that code and comment diverge. Often, code is being changed/adapted/fixed, but the comments are not. If you read the comments then, your understanding of what the code does or should do gets wrong, leading you on a wrong path. This is why I prefer to have rather less comments. Most of the code is self a explanatory, if you properly name your variables, functions and whatever else you are working with.











  • It seems like part of your thinking is: Why would a criminal invest effort to attack an average John Doe? The answer is: With a popular (widely used) operating system, the effort goes close to zero. Attacks can be automated, so they will be. Also, even if they are not interested in your data, they will be interested in other benefits they gain from controlling your computer:

    • Computing power e.g. for Bitcoin mining
    • Your internet connection to attack other computers via yours, taking your computer to hide their identity and location. This is commonly done as DDOS for blackmailing businesses or silencing websites. Or for sending spam or fake reviews.
    • Your identity. If they can get your name, they can order stuff on your name, which will get you a bad credit score or even criminal charges (identity theft)
    • Access to your local network. Many devices are easier to hack via local network access than from the internet. A criminal who took control of your computer could for example take over your “smart” appliances or WiFi printer.



  • Netguard is a FOSS Android app which kinda works like a firewall. You can allow/block network access on a per-application basis. You can limit access e.g. on WiFi or on mobile etc. It also supports blocklists, supplementing your ad blocker.

    To the Android OS, Netguard acts as if it were a VPN.

    Limitations:

    • if you want to filter Android system services, you will break things. You will need to spend some time to do it right.
    • Chaining it to another VPN is only possible via SOCKS proxy
    • if you want to route some app’s traffic via VPN and others not, I think that is not possible. You could, however, manually turn off an app’s internet connection before disconnecting the VPN, if that is not too error-prone for you.

    The app is very stable, I have been using it for about 5 years without problems. For most use cases it is fire-and-forget, i.e. I rarely open the app any more.