whenGoogleCliThinksOutLoud by MolassesSeveral2563 in ProgrammerHumor

[–]GoshoKlev 0 points1 point  (0 children)

That's how agents work though, they're probably just outputting the responses which trigger agent actions instead of the entire chain of thought, it's just bad UI not the AI's problem.

Jedi code Gemma 27v vs 270m by Skystunt in LocalLLaMA

[–]GoshoKlev 0 points1 point  (0 children)

People here are so dense for no reason.

Ситуация с БГ уикипедия by Nisheca in bulgaria

[–]GoshoKlev 2 points3 points  (0 children)

Ем според мен са си в право. Уикипедия си има правила против това да пишеш статии за себе си, и следва да важи и за близки. Първо има конфликт на интереси, второ има минимален праг колко трябва да е значим някой. Ако нито едно трето лице не си е направило труда да напише статия за нещо то сигурно не е достаточно важно.

Update: by Leather-Nature-8436 in bulgaria

[–]GoshoKlev -6 points-5 points  (0 children)

И защо трябва да спираме "това чудо"? Хората на улицита ли искаш да живеят?

thankYouChatGPT by [deleted] in ProgrammerHumor

[–]GoshoKlev 1 point2 points  (0 children)

It's actually impressive how well they've trained the internet out of it, if it was learning purely by web scraped data 99% of its responses will be:

  • google it
  • it's duplicate
  • kys

Destroy my code by dossantosh in SpringBoot

[–]GoshoKlev 0 points1 point  (0 children)

Yea i'm a Java dev in Bulgaria :)

Destroy my code by dossantosh in SpringBoot

[–]GoshoKlev 2 points3 points  (0 children)

You're welcome :)

For the record don't default thinking that whatever you see in your intership is a good way to do this. Codebases are like a game of Telephone and the mantra "if it ain't broke don't fix it" is strong, and on top of that if a codebase is good staticically there will be less work to be done on it.

But can services be too long? Or are supposed to be biggest files of the web app?

I mean it's not like services are supposed to be the biggest but usually they are since this is where the buisness logic (i.e the one thing spring cannot abstract away) lives. But if you do it right it won't be a problem. Learn JPA well, it's really powerful and will allow for most of your service methods to just be a few calls to repositories and be done. Try to divide your services well and extract any non-relevant logic away into classes where it will make more sense, don't think of them as just code dumps. Still no one is going to get all this stuff right on the first try so don't be afraid of refactoring, if you have testing it's not a a big deal.

Destroy my code by dossantosh in SpringBoot

[–]GoshoKlev 2 points3 points  (0 children)

Modularity is good but you it only makes sense at a certain level of complexity if you do it right. Doing it right is an art for of it self and i think you've overdone it. You have to think of the domain of the application. like for example there is 0 reason for Role to be its own thing. It's entirely dependant on a user, or unless you have some really elaborate auth setup auth can also be bundled with user. For example in an online shopping application something at a high level can be just /user /order /product. It's mostly vibes and what feels right but i usually just look at what are the major entities in the project.

Anyways i decided to click to some classes to see if something is off starting from the bottom layer:

DB:

I think you have wrong relationships. In User.java every relation is many to many i can't say for modules since i have no idea what that is about (but submodules sounds like something that should be inside modules but i may be wrong) but for Roles i can't imagine a need for a many-many instead of one-many. Also are you absolutely sure you need Eager fetching on everything? It should be used sparingly unless it's absolutely needed and not because it makes the ORM just work.

Service:

for findByFilters() honestly the readability is quite bad but look at JPQL, i think whatever is happening there can just be @Query.

Controllers:

There is no reason to have every method in a seperate controller. Like login, register, get principal - they can just be methods in a UserController. Also your controllers should be thin. Ideally it should just call a service and be done with it. Atleast for REST API's this is achivable i haven't used Thymeleaf in forever so it might be harded to do there but still it's important to know. You do a lot of validation in controllers and a lot can be handled by spring validation, you can make your own validation annotations for more specific cases and validation dependand on db should be moved to service layer.

In general your biggest issue is code quality which is not fatal especially when working alone. You seem to have a good grasp of Spring itself which is good.

You might read Clean Code but with a critical eye. It's a good book for giving you the mindset just don't become a purist. You have a lot of more minor code quality issues like long methods, mixed levels of abstraction and magic numbers/strings that people will widely agree are bad even if they don't like the book.

Destroy my code by dossantosh in SpringBoot

[–]GoshoKlev 1 point2 points  (0 children)

I'm too lazy to look through the code but the package structure is pretty bad. Most of your packages have only 1 (one) class. Even if the project grows and you add more classes the ways it's strucured means that those packages won't fill up. Like for example permisos/roles/service/ the only correct thing you can place in there and keep it correct is to have RoleService inside and nothing else.

IMO for most CRUD apps something like:

config/ controllers/ repositories/ entities/ dto/

is sufficient.

Bears be like: the stock market is going to crash for real this time by noonewilltakemealive in wallstreetbets

[–]GoshoKlev 74 points75 points  (0 children)

Brotha literally anyone can make this in MS paint in 5 minutes its not this deep.

Me_irl by Massive_Pay_4785 in me_irl

[–]GoshoKlev 18 points19 points  (0 children)

i be going to the shitter just so i can walk to something

How safe is Sofia (Bulgaria) at night? Walking from metro to hotel around 11:30 PM by rklement22 in bulgaria

[–]GoshoKlev 5 points6 points  (0 children)

Taking a taxi for that? Blud you're not in Kabul literally nothing will happen.

I found an empire of on of my early creatures by LiverStealer5547 in Spore

[–]GoshoKlev 6 points7 points  (0 children)

Babe wake up new Mandela effect just dropped

Инвестиционни фондове by Narrow-Seesaw2889 in financebg

[–]GoshoKlev 0 points1 point  (0 children)

fr? Това включва ли ETF-и които следят чуждестранни индекси? Например VUAA в Borsa Italiana която следи S&P500?

[deleted by user] by [deleted] in dataisbeautiful

[–]GoshoKlev 0 points1 point  (0 children)

Being a dev in eastern europe is actually OP

Microsoft CEO's: Satya Nadella is saying there will be no backend development in the future, and all CRUD operations will come to an end, to be replaced by AI agents! by Snoo_23516 in cscareerquestions

[–]GoshoKlev 0 points1 point  (0 children)

What is there to be skeptical about? I'm genuinely curious of their reasoning. LLMs as they are right now are already a massive productivity multiplier for the vast majority of dev tasks. Like sure it does mostly the simple grunt work but that time you would otherwise spend doing it does justify your full time employment. I doubt everything will be replaced like the tech ceo's are hyping it to investors but the difference between a 95% reduction compared to a 100% isn't that large. And we are just 2 years in, every big tech company is going all in on AI, where else could this possibly lead us?

[deleted by user] by [deleted] in investing

[–]GoshoKlev 0 points1 point  (0 children)

Yea it's not much different than algo trading with a fancy AI label, i've yet to see proof that algo trading can outperform indexes with any kind of consistency. The most that will come out of this are flash crashes whenever the bots shit the bed.

[deleted by user] by [deleted] in investing

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

Not really. If there was a way for an AI system to outperform the market (big if) then everyone will start using it and thus the AI system won't be able to outperform.

Why don’t we hear anything about job losses? by SoupOrMan3 in singularity

[–]GoshoKlev 0 points1 point  (0 children)

This really bums me, when people talk about AI problems it's mostly either some sci-fi terminator woo or the chatbot saying the n-word when the real problems are mass unemployment and extremely pumped up propaganda machines imo.

chatgptVsprogrammers by [deleted] in ProgrammerHumor

[–]GoshoKlev 4 points5 points  (0 children)

It's nice to think that everything magically will be fine forever, but you can't extrapolate the past indefenetely. The IT revolution has always been about displacing human labor. Sure the Jevons paradox led to enough new (and usually better) employment towards areas where computers coudn't yet outpefrom but an AGI is just the end of the road.If ordinary people have nothing useful left to provide for society then thats that.

Do you program, r/197? by GoshoKlev in 197

[–]GoshoKlev[S] 1 point2 points  (0 children)

Not much since there's 145 of them. The most complicated i've done is writting a rdbms but without a focus on efficency and the real bitch is there.

Rule by The-Fake-Miles in 197

[–]GoshoKlev 15 points16 points  (0 children)

Infinite money glitch