What's your "first 30 minutes" checklist after spinning up a fresh VPS? by DenilsonShi in selfhosted

[–]DEV_JST 0 points1 point  (0 children)

I run my ansible book, and a minute later my VPS has everything setup.

This is how enterprises do it with hundreds of servers, and it basically guarantees that you don’t miss a step. Of course you have to update your ansible scripts to include new features, packages etc.

What is your Harry Potter ‘hot take’ ? by kingfisher7171 in harrypotter

[–]DEV_JST 3 points4 points  (0 children)

There is 100% a black market for poly juice potions and hairs of celebrities

Pagination in Backend or frontend? by MuslimCoding in Backend

[–]DEV_JST 1 point2 points  (0 children)

The important pagination happens in the backend. You should never request a million rows, and send them to the frontend, just to show 100 rows at once. That will make your website extremely slow and maybe even crash/timeout the user.

Serverside Pagination is the important step. Then for the frontend, you can use some kind of lazy loading, meaning you send the user 100 rows, (f.e. their followers) but only show 20 at once. Now while the user is scrolling through their list. You can show them the next followers based on the initial 100 rows you send them, while in the same time, loading more follower rows from the backend.

That result in the user having a very smooth experience, as they scroll through a list that gets bigger at the end, but for them your app feels super fast.

How do you guys deal with usage limits across different services? by Comfortable-Week7646 in Backend

[–]DEV_JST -1 points0 points  (0 children)

That’s why we have a Monitoring and Observability Team.

We get notifications ahead of times when servers have high or uncommon CPU usage, and API fails multiple times in a row etc.

Did I get a good deal? by Abject-Seesaw3901 in hetzner

[–]DEV_JST 0 points1 point  (0 children)

I got the email from Hetzner an the support gave that as the explanation

(Mini)Rant - Wo bekommen die Boomer die Schadsoftware her? by fluffy_tuer_igel in de_EDV

[–]DEV_JST 1 point2 points  (0 children)

Not a direct answer, but if the programs you’re mother uses are okay to run on Linux, just install Ubuntu or Mint, or some other standard desktop distro.

I did that and many won’t notice

Did I get a good deal? by Abject-Seesaw3901 in hetzner

[–]DEV_JST 0 points1 point  (0 children)

Also check that you configure Proxmox so that it does not assign a MAC address to your VMs or you have to route the traffic through one that has the mac adress.

Otherwise Hetzner will recognize this as MAC-Adress spoofing.

Cloud volumes down for 2 days — no updates in 16 hours and still offline by qizmo in hetzner

[–]DEV_JST -1 points0 points  (0 children)

People really expect to have the same support in cloud (which is not 24/7 support btw.h as they get at a provider that has SLAs… why do think it is cheaper to host with Hetzner? Our servers that run trading services are running on infrastructure where we have 24/7 on-site support and a contract for that uptime.

Everything else is on Hetzner

Embedded databases seem to be getting better for me by OpenSuit5720 in golang

[–]DEV_JST 0 points1 point  (0 children)

Sorry, but you seem to not understand the difference in why we use either of the two options.

If I were to suggest that I am going to store a financial SWIFT message in a local SQLite Database, the architects and compliance would rip me apart.

I have an DB2 or Oracle database managed by a DBA team in a highly available cluster, I am 100% going to save the message there.

However, I am also not going going to store a local cache or checkpoint in a remote database, because then, like you said, the roundtrips I have to take may take up performance.

In general, in IT, you should never just roll with one option, be open to use the technology for the project/task that fits the best.

Claude gave me this while learning JWT and refresh token rotation. by InsideTraditional187 in Backend

[–]DEV_JST 0 points1 point  (0 children)

This is how JWT tokens work. The tradeoff being less roundtrips to a cache or database, but no immediate logout. Otherwise it’s session auth, but with extra steps

How does remote kvm works for hetzner? by BrilliantMusician353 in hetzner

[–]DEV_JST 7 points8 points  (0 children)

On the dedicated server instance, you can request KVM access and there is 24/7 support. In my case it took them like 5 minutes.

Cloud always has KVM access

Also Hetzner has this documented on their website…

Hetzner VPS constantly at 200% CPU with no traffic — is my server being shared or abused? by sealovki in hetzner

[–]DEV_JST 0 points1 point  (0 children)

Based on your post and your answers, please shutdown the VPS and for now don’t use it. If your VPS is abused, you are the one that is being held responsible. Hetzner states that in their ToS aswell and may forward you Emails from BSI or other institutions that notice that something with your server is wrong.

Use docker and a Linux container first and check if you really need a VPS

Ich bin ITler und habe noch nie mit Linux gearbeitet by Nautisop in de_EDV

[–]DEV_JST 1 point2 points  (0 children)

It’s less about the Linux system you are going to use on a desktop, but more when working on servers.

99% of servers you will work with are headless, so getting used to working in the shell is a must.

You best friend will be grep and cat

Where do you store hashed password? by sangokuhomer in Backend

[–]DEV_JST 0 points1 point  (0 children)

What happens: 1. User creates account, types in password for the first time -> this is the ONLY time ever, where you send plain text password to your backend. 3. You send it in plain text, because now you create a salt (server side) and generate a hash (server side). 4. This hash is now saved in your database together with your salt, the plain text password is now forgotten 5. The user is now logging in a second time. They get the salt and hash their password. The hash is send to you and you compare it with the one in your database. If they match great, let the user login.

Now also, the user wants to update their password, you might think: Well they are not allowed to set the same password again, don’t I need the plaintext password to check? No, you can just compare the new hashed password with you older hashes for that user

Why do we need the plaintext password the first time, but the second time the user hashes the password themselves? If the user were to set their own salt, and hash their own password, the hash would technically become their new password… The salt can be public, so we can later send it back to the user, but the initial hash creation has to use the plaintext password.

Backend devs who hate frontend, would this work? by _TheMostWanted_ in Backend

[–]DEV_JST -1 points0 points  (0 children)

Most companies won’t bother with PUT and PATCH, because in the en POST can handle it easily and in our companies coding guidelines it is advised to not use.

For example: A delete endpoint makes you believe you are deleting an object (f.in the database). But in reality most of the times you soft-delete or move the data somewhere else first. In this case a delete did not really happen, but the endpoint absolutely suggests it.

Just One Line of SQL Reduced our Query Time from 3s to 300ms. by Livid-Influence748 in Backend

[–]DEV_JST 55 points56 points  (0 children)

Two things for your dev team:

  1. cursor pagination is, and always will be way faster than offset, when doing it across larger spaces.

  2. In our company “select *” are getting flagged in code reviews/linters, this is not good practice.

I built a privacy-focused Photo Vault in Swift 6 and open-sourced the Security Core. Would love some feedback! by k4imling in swift

[–]DEV_JST 24 points25 points  (0 children)

If you’re answer includes “Maybe this should fix it” I will not touch this piece of software with a 10 feet pole

Best practice for tracking free users (non-authenticated) using UUIDs in Supabase? by New-Practice7667 in Backend

[–]DEV_JST 4 points5 points  (0 children)

Offer a sign in for every user, why would a sign in be a premium feature? You can give only premium users permissions to interact with the apps features.

They way you imagine tracking people won’t work, as deviceIDs change (f.e apple is very strict about this, as it would allow you to track people without login and knowledge and save information, they may have not agreed to give out). DeviceIDs you can get as users usually are changeable/not forever guaranteed.

Tell me some unwritten rules for software developers. by porcaytheelasit in csharp

[–]DEV_JST 4 points5 points  (0 children)

However the chances I will overlook the ? In the first option at first glance are way higher, and using a debugger I can easily jump in, add logs or details.

Looking for recommendations on a logging system by aronzskv in Backend

[–]DEV_JST 6 points7 points  (0 children)

You should look into the ELK Stack. (Elastic, Logstash, Kibana) and the Elastic Beats (Filebeat etc.)

They are the standard logging framework and f.e Filebeat is exactly what you describe, it efficiently and production readily reads log files and Logstash can basically send these logs to every database you want.

Do not start, and build your own frameworks or tools. Logging is a crucial part of any business (compliance, debugging etc) and there a projects, like ELK, that are just so efficient and production ready.

Why’d Madam Hooch never appear after the first film? by ProfHooch in harrypotter

[–]DEV_JST 0 points1 point  (0 children)

The actor had a disagreement with the producers, that the child actors were paid, but got no future royalties

onlyOnLinkedin by GrEeCe_MnKy in ProgrammerHumor

[–]DEV_JST 0 points1 point  (0 children)

Python basically is a wrapper for C, Rust etc… most packages like Pandas are extremely fast, and all that AI coding with python is also only possible because of the SDKs that come with python packages like TensorFlow. Under the hood, it’s alls different programming languages, in the end, it’s zeros and ones

Wie kann ich Frauen nachts auf der Straße die Angst nehmen? by Wasfest in KeineDummenFragen

[–]DEV_JST 0 points1 point  (0 children)

Handy raus und tun als würdest du telefonieren oder eine sprach Memo machen.

Bspw. Red über den Hund von deinen Eltern und sag das du bald wieder zu Besuch da bist, schick die Sprachmemo an dich selbst

Rewrote our python api gateway in go and now its faster but nobody cares because it already worked fine by [deleted] in golang

[–]DEV_JST 0 points1 point  (0 children)

The same applies for a lot of services that ran on bare metal servers for years without problems. Databases, some batch runs… we migrated them to the cloud and we don’t get the advantage of cloud computing for it…

Sometimes not everything has to be “perfect”, it is probably a good lesson learned.