• 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle






  • If you’re lucky enough to successfully create an account on Oracle Cloud, you can also try Oracle Cloud Free Tier. You can have free ARM64 x4 CPU and 24 GiB RAM totally free of charge. There might be problems with availability during VM registration, but there are scripts that automate spamming for checking every 80 seconds.

    I’ve been using it for 2 years and it’s great. However be aware that your VM might get erased if you have a free account. That too can be remedied if you update to a premium subscription (You still get Free Tier resources without a charge). Nobody has reported an erased VM on a premium plan yet.

    Still, I am pretty sure they can erase it if you do illegal stuff with it. I’ve been using it only to host Minecraft Server, as well as other services using Docker. So far so good.



  • gornius@lemmy.worldtoSelfhosted@lemmy.worldShould I move to Docker?
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    7 months ago

    Learn it first.

    I almost exclusively use it with my own Dockerfiles, which gives me the same flexibility I would have by just using VM, with all the benefits of being containerized and reproducible. The exceptions are images of utility stuff, like databases, reverse proxy (I use caddy btw) etc.

    Without docker, hosting everything was a mess. After a month I would forget about important things I did, and if I had to do that again, I would need to basically relearn what I found out then.

    If you write a Dockerfile, every configuration you did is either reflected by the bash command or adding files from the project directory to the image. You can just look at the Dockerfile and see all the configurations made to base Debian image.

    Additionally with docker-compose you can use multiple containers per project with proper networking and DNS resolution between containers by their service names. Quite useful if your project sets up a few different services that communicate with each other.

    Thanks to that it’s trivial to host multiple projects using for example different PHP versions for each of them.

    And I haven’t even mentioned yet the best thing about docker - if you’re a developer, you can be sure that the app will run exactly the same on your machine and on the server. You can have development versions of images that extend the production image by using Dockerfile stages. You can develop a dev version with full debug/tooling support and then use a clean prod image on the server.



  • If you’re a beginner:

    I almost gave up programming once, I thought I was too stupid.

    Then I learned Linux and figured out starting out in IDEs as a beginner is the worst thing you can do. It doesn’t teach you anything, it just lets you get the job done - the thing that you should avoid while learning.

    If you can’t build your software with only CLI - you probably have no idea how technology you’re programming in works.

    If you are intermediate:

    Reinventing the wheel is a great way to learn how libraries you’re using actually work.


  • I disagree (mostly). What’s the difference between library and language built-in? PHP and C++ has a ton of built-ins. It doesn’t make it less complex than using library.

    Problems that look simple at the first glance are in most cases are complex with too many edge cases.

    I think I have never written a single utility function that had no non-obvious bug, and imagine that in more complex problems

    Not to mention in many cases any function you write is possibly dangerous.

    Just take a look how many things you have to consider when checking for odd number in JS:

    https://www.npmjs.com/package/is-odd?activeTab=code

    And of course most of that can be fixed be using strongly typed language.







  • gornius@lemmy.worldtoFediverse@lemmy.worldI can't code.
    link
    fedilink
    English
    arrow-up
    14
    ·
    1 year ago

    Software engineering nowadays is really complex. There is no way you’re going to know what’s going on, nobody is.

    It’s just the more experience you have, the easier it is to figure out what’s going on. If you want to learn coding, just start coding.

    I will start from something no one mentioned - start with Linux. Windows has its own very “special” ways of compiling stuff, while Linux is very simple. If you start on Windows, you’ll probably use IDE which will set up everything for you (cause setting up thing in Windows is messed up), and it will still be a black magic for you how the code transforms into binary.

    Many people recommend python, but I would start with C (not C++, C++ sucks). It will give you the understanding of basic concepts like memory management.

    Then start using something like javascript, which will get you wide range of libraries, which you can use to build anything.

    Then at the end learn how infrastructure works, how are services communicating with each other, how to put your server to the public, learn Docker, set up reverse proxy, run stuff in cloud.