▲ 107 r/SoftwareTips+1 crossposts

Why Stateless REST API is the way to go ?

i have been working with spring boot and angular for a few years now and every api i have built or inherited is stateless. jwt in the header, no server session, done. nobody ever questioned it on any project i was on.

but i realized i never really asked myself why we do this by default. i know the usual answers like it scales easily and any instance can handle any request. but it feels like the state just moves somewhere else, to the token, to redis, to the database. so what are we really gaining ?

reddit.com
u/MousTN — 7 days ago

My favorite combo

why the hell Porta is broken lvl 1 , his cooldown in his weapon in lvl is none exsiting , combing that with game killer arcana which make stay lvl 1 u have a massive burst , its a good combo for boss rush

u/MousTN — 24 days ago

Entity Graph seems to defeat the purpose of Lazy Loading?

So I've been dealing with an N+1 problem in my Spring Boot app. FYI I didn't set up the lazy loading myself, it was already like that in the codebase I inherited. But basically I'm hitting the DB, then because of lazy loading, some attributes aren't there yet, so I end up going back to the DB again in a separate query just to grab them. Classic N+1.

I looked into it and found that Entity Graphs are supposed to fix this by fetching everything (or specific attributes) in one go instead of triggering extra queries.

But now I'm confused... isn't that basically the same as just using EAGER fetch? Like what's even the point of setting up LAZY loading in the first place if I'm just going to turn around and use an Entity Graph to eagerly fetch the exact attributes I need anyway?

Is the difference just that Entity Graph lets you choose which relations to fetch eagerly on a per-query basis, instead of committing to EAGER globally on the entity itself? So it's more like "controlled/selective eager fetching" rather than actually lazy?

reddit.com
u/MousTN — 1 month ago

When is Swarm ever coming back? It's been over 2 years and I'm going insane

I was just thinking about it today and realized it's already been over two years since it dropped. I remember grinding that mode nonstop and maxing out every single stat and evolving all the weapons and unlocking everything the game had to offer.

for a temporary event mode, it genuinely felt better and more addictive

anynews ?

reddit.com
u/MousTN — 1 month ago
▲ 1 r/Sfax

Famechi chkoun yechri claude pro lyoum urgent ?

ahla chabeb famechi chkoun yechrili claude pro lyoum netkablou nmedlou flous w yekhouli hajti biih lyoum

reddit.com
u/MousTN — 2 months ago
▲ 2 r/Sfax

first time doing this

chabeb , belehi ken namel echtirak fl maktba l 3oumoumiya najm nhez ktob men ghad ? khater netfkr kbal ki kont etudiant nmchi just nrivez w tawa madch etudiant can i still do it ?

reddit.com
u/MousTN — 2 months ago
▲ 42 r/Backend

How do you actually handle two people editing the same row at the same time?

So we've got this invoicing system at work, Spring Boot + Angular backend/frontend, and I ran into "two people touching the same record" problem.

Basically my coworker and I both work off the same invoice table. Say I'm exporting a PDF list of invoices while he's creating a new one, that part's fine, DB transactions handle the reads/writes without anything breaking.

But the annoying case is when we both open the same invoice to edit at the same time. Like invoice #12, both of us load it, both start editing, whoever saves last just silently overwrites the other person's changes and nobody even knows it happened until later when someone's like "wait where'd my edit go."

Our older guy on the team who's been doing desktop C# since like 2005 was telling me back in the day they used DataTables that basically act like a disconnected snapshot of the table, you work on your local copy and there's some comparison logic before the actual update hits the DB. Made me realize this isn't a new problem at all, just curious how it's solved in a modern web/API context.

So far I went with the standard route, optimistic locking using a "@Version column so JPA/Hibernate throws an exception if the version in DB doesn't match what you loaded. Also messed around with pessimistic locking (SELECT FOR UPDATE) for cases where you really want to lock the row the second someone opens

Optimistic locking feels like the default for most CRUD apps but idk how people handle it on the UX side when a conflict actually happens. Just throw an error and make them reload? Try to merge stuff? Or do people build like a "someone else is editing this" indicator in the UI?

reddit.com
u/MousTN — 2 months ago
▲ 76 r/webdev

How do you actually handle two people editing the same row at the same time? (invoice app, Spring Boot)

So we've got this invoicing system at work, Spring Boot + Angular backend/frontend, and I ran into "two people touching the same record" problem.

Basically my coworker and I both work off the same invoice table. Say I'm exporting a PDF list of invoices while he's creating a new one, that part's fine, DB transactions handle the reads/writes without anything breaking.

But the annoying case is when we both open the same invoice to edit at the same time. Like invoice #12, both of us load it, both start editing, whoever saves last just silently overwrites the other person's changes and nobody even knows it happened until later when someone's like "wait where'd my edit go."

Our older guy on the team who's been doing desktop C# since like 2005 was telling me back in the day they used DataTables that basically act like a disconnected snapshot of the table, you work on your local copy and there's some comparison logic before the actual update hits the DB. Made me realize this isn't a new problem at all, just curious how it's solved in a modern web/API context.

So far I went with the standard route, optimistic locking using a "@Version column so JPA/Hibernate throws an exception if the version in DB doesn't match what you loaded. Also messed around with pessimistic locking (SELECT FOR UPDATE) for cases where you really want to lock the row the second someone opens

Optimistic locking feels like the default for most CRUD apps but idk how people handle it on the UX side when a conflict actually happens. Just throw an error and make them reload? Try to merge stuff? Or do people build like a "someone else is editing this" indicator in the UI?

reddit.com
u/MousTN — 2 months ago

Help me improve my Resume

first should i try to squeez it inti 1 page

also should i make fewer details ?

and what skills should i focus on more ?

u/MousTN — 2 months ago

is there a fix to this ?

whenever i search for something in google in incognito mode (im using brave browser ofc)
i always get this page first to check

u/MousTN — 2 months ago
▲ 1 r/Sfax

chabeb andkomchi fekra mourakeb jamousi bech ijib The Odyssey movie wlaa

naref ken mourakeb jamousi fih cinema fama blasa okhra fi sfax ?

reddit.com
u/MousTN — 3 months ago
▲ 24 r/webdev

i need some advice ,feeling behind because I love web dev while everyone else chases AI and data

I'm about to graduate with an engineering degree in software engineering. I study night courses while working full time in a company as a web dev for over three years now. During the program we covered a huge amount of stuff. Big data machine learning deep learning data warehousing business intelligence on top of the regular software engineering track. I've been working as a web developer for over three years doing full stack work backend and frontend and some devops on the side like CI/CD and docker deployments.

Lately I've noticed literally everyone around me especially classmates and people in my field are rushing toward AI and data work. Every single thesis every final year project every side project has to be oriented around AI or big data or some kind of model no matter how simple the actual problem is. There's this culture where people love throwing around the big buzzwords even when a normal web app or a simple script would solve the problem just fine. It feels like the label matters more than the actual engineering sometimes.

Meanwhile I keep finding myself deep in backend work. Designing entities writing clean services optimizing database calls and API performance. I can lose hours in that stuff and actually enjoy it. I still genuinely love web dev and building solid systems but I still feel behind when I look around and see how few people in my environment still enjoy it the way I do.

And what I mean by AI here isn't tools like Claude Code or Codex. I use those every day in my line of work and they're just tools that make me faster at what I already do. What I mean is projects that force AI in as a feature and throw it in as a label just to sound impressive.

A friend recently told me I'm one of the only people she knows who genuinely loves development as a whole instead of chasing whatever's trendy. It was meant as a compliment but it got me thinking. Am I actually missing something by not jumping on the AI wave like everyone else? Is pure software engineering still going to have room for people like me in a few years or is specializing in backend and web development going to become a niche while everyone else moves into AI and data roles because it sounds more impressive.

reddit.com
u/MousTN — 3 months ago
▲ 1 r/webdev

Over 4 years of experience and i still cant learn to like frontend, how do i fix this mindset

I genuinely enjoy backend, Spring Boot is my thing, i can sit for hours designing entities, fixing weird transactional bugs, optimizing queries, writing clean service layers and i feel alive doing it. but the second i have to touch angular or react for actual ui work or styling or making things responsive, dealing with css, i just shut down. i dont hate api integration tho, calling endpoints, managing state for that, thats fine, thats basically backend logic in disguise lol, its the actual visual stuff, layout, design decisions, making stuff look good, that i cant stand

how did u guys manage to enjoy it more, what changed for u, was it a specific project, using a component library, switching frameworks, or just forcing urself thru it for a while

its not like im unfamiliar with the tools, i just dont enjoy using them past the functional part

would love to hear how other backend heavy devs dealt with this, 4 years in and still feels like a chore every time

reddit.com
u/MousTN — 3 months ago

I need an advice

ahla chabeb

ena na9ra cour de soir cycle ing , sna dekhel 3 eme pfe nchlh , i have over 2 YOE , ama charika eli nkhdem fiha (nkhdem fil domain btw ) kol chy aliya with the lowest paycheck possible hkit maahom but famech chance lel zyeda w njmch nbatel khater mandich an other source of income bech nkhales biha l fac , donc 9arart nlawej ala PFE l bara fi September hedha w nekhou risque miselech , ama i have no idea about my chances my CV is decent stack and projects are good too , ama manich aref win najm nlawej w aslan est ce que ki bech npostili l PFE yekhdhou b 3ayn l e3tibar el exp eli andi , and in an other hand nkhaf la net9bel w nal9ach embauche w naakd maghir khedma...

reddit.com
u/MousTN — 3 months ago

HTTP getting a new method called QUERY (RFC 10008)

RFC 10008 just dropped a new HTTP method called QUERY. the problem it solves is simple, right now if you want to search or filter data you either cram everything into a GET URL (which breaks when your filters get complex) or you use POST (which works but feels wrong because POST is meant for creating stuff, not reading it). QUERY fixes this by giving us a method that has a request body like POST but is explicitly safe and idempotent like GET, meaning its read-only and can be retried without side effects. Also because its safe CDNs and caches can actually store the results which is huge for performance. so basically, you send your search criteria in the body, the server processes it, and you get your results back and all without abusing GET or POST.

chkawlkom chabeb ?

reddit.com
u/MousTN — 4 months ago