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

help-circle








  • gornius@lemmy.worldtoSelfhosted@lemmy.worldShould I move to Docker?
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    10 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.


  • gornius@lemmy.worldto196@lemmy.blahaj.zonerule
    link
    fedilink
    arrow-up
    32
    ·
    10 months ago

    Java used to lack many features to make the stuff you wanted it to do, so most Java programmers adapted design patterns to solve these problems.

    Honestly, older versions of Java are utter garbage DX. The only reason it got so popular was because of aggressive enterprise marketing and it worked. How can a language lack such an essential feature as default parameters?

    So, anyway after the great hype Java lost its marketshare, and developers were forced to learn another technologies. And of course, instead of looking for language-native way of solving problems, they just used same design patterns.

    And thus MoveAdapterStrategyFactoryFactories were in places where simple lambda function would do the same thing, just not abstracted away three layers above. Obviously used once in the entire codebase.

    Imo the only really good thing about Java was JVM, while it was not perfect, it actually delivered what it promised.



  • gornius@lemmy.worldto196@lemmy.blahaj.zoneraytracing rule
    link
    fedilink
    arrow-up
    18
    ·
    edit-2
    10 months ago

    I might be wrong, but even for games like Cyberpunk 2077 there is a finite set of world states that define lighting conditions (time of day weather etc.).

    So prebaking lighting information for all these combinations and then figuring out a way to create transitions between them would maybe not be the perfect representation, but best of both worlds.

    However, given how fast RayTracing improves hardware-wise, in my opinion it would make no sense to even consider researching and developing a solution of that kind.



  • English is not my first not language. When I write something down in my first language (polish), it feels more like I’m transcribing things I silently say to myself, while with english I’m actually thinking about every word I type.

    The funny thing is, the better I am getting at English, making those types of mistakes is getting easier for me.

    But idk, this is just my experience.



  • 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.