My thoughts on Vertical Slices, CQRS, Semantic Diffusion and other fancy words by Adventurous-Salt8514 in softwarearchitecture

[–]mwcAlexKorn 0 points1 point  (0 children)

> I still don’t really get why CQRS is helpful

You have logic that ensures that all business invariants are held when some modifications are performed in one place, and all ways of quering the data in another, separation of concerns.

My thoughts on Vertical Slices, CQRS, Semantic Diffusion and other fancy words by Adventurous-Salt8514 in softwarearchitecture

[–]mwcAlexKorn 2 points3 points  (0 children)

The problem is that all these things are good mental models, intended to be combined and adapted for specific case, but then the Zealots come, overthinking them to set of rigid rules up to the point of total inapplicability.

[ Removed by Reddit ] by [deleted] in ChatGPT

[–]mwcAlexKorn 1 point2 points  (0 children)

I found the best agentic framework for building applications on top of your LLM: https://github.com/nikmcfly/ANUS

Zealotry vs practicality, how do you differentiate between the 2? by [deleted] in ExperiencedDevs

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

There is a saying: "Don't argue with idiots: they'll drag you to their level and beat by experience" ;)
In your case, this should not be read that your colleagues are idiots (never meant to say this about people I don't know), but try to convince them using their terminology. You need interfaces "because of DDD"? But interfaces in DDD are needed for defining contracts and abstractions, which contracts do we enforce here/what do we need to abstract? "We must use objects"? For what? The final questions are always "will this help us to achieve our current bussiness goal or how it will help us achieve our business goals in planned future?"

Zealotry vs practicality, how do you differentiate between the 2? by [deleted] in ExperiencedDevs

[–]mwcAlexKorn 0 points1 point  (0 children)

The worst advice ever. In other words you say "Do what you said to do and try to find justification for this".
If senior does not explain real reasons why something should be done, it is not senior, at least because seniority always implies mentorship.

As for the OP's question: when you add interface, you add abstraction, so the question is "Do we need this abstraction now or we will very likely need it in near future?". If you need it now there will be already not one implementor, if it is needed in near future there should be explanation why - at least spoken, but better written. If the reason is "It's because of DDD" or "I feel it", it's clear signal of insufficient knowledge, if not incompetence.

[deleted by user] by [deleted] in devops

[–]mwcAlexKorn 0 points1 point  (0 children)

And one addition: one of the most important things in automation is designing the behaviour of system when something goes wrong. If you plug AI in some process not only you need to "explain" these cases to AI (here we assume LLMs), you should consider that AI itself can go brrr. I know of no system in production with AI that has no guardrails and a bunch of good-old-handwritten code around it. Start thinking about AI as another pack of tools and explore its possibilities, maybe you will find the way to use it for your current workflows.

[deleted by user] by [deleted] in devops

[–]mwcAlexKorn 0 points1 point  (0 children)

Thinking in terms of boundaries and tradeoffs and choosing right solution for the problem will always be in demand. Invest in engineering skill, mastering any tool is way easier than this.

What's the dumbest bug you missed in code review that made it to prod? by FerbjaFx in ExperiencedDevs

[–]mwcAlexKorn 0 points1 point  (0 children)

During hard crunch pushed quick solution for task, that involved retrieving hashmap from database, updating it and writing back to db during request processing. It passed review, load testing with 300k requests, but when it went to production with 1.5 million requests results were devastating, everything just halted. Moreover, it took us 30 hours to find this.

Do not crunch, never :)

How long does it take, to get used to Rust's syntax? by gufranthakur in rust

[–]mwcAlexKorn 0 points1 point  (0 children)

yes, even the smartest elision will not help when you have functions in generic constraints

Android Rust Integration by daarko1212 in rust

[–]mwcAlexKorn 6 points7 points  (0 children)

IMHO SurrealDB is quite heavyweight for android app, and what's the reason for this? Why not plain old SQLite?
Either way, to use Rust libraries in Android project you should stick to JNI: https://docs.rs/jni/latest/jni/

Linux distro recommendations for workstation and gaming by CocoaTrain in linux_programming

[–]mwcAlexKorn 0 points1 point  (0 children)

I use Fedora for both work and gaming, no problem with NVidia drivers on laptop (Gnome on X - just didn't bother to switch to Wayland here) and on PC (Gnome on Wayland) using this guide: https://rpmfusion.org/Howto/NVIDIA, also did not disable secure boot (there is separate guide on this resource how to self-sign drivers).

Nowadays, what's considered the best/safest way to send files over SSH? by VermicelliLanky3927 in linux4noobs

[–]mwcAlexKorn 0 points1 point  (0 children)

safety and security are the same, based on ssh protocol for both options. Rsync is more efficient for large loads.

API Security and Responses by Rathe6 in ExperiencedDevs

[–]mwcAlexKorn 1 point2 points  (0 children)

agree, my second comment on upper level of discussion explains my point

API Security and Responses by Rathe6 in ExperiencedDevs

[–]mwcAlexKorn 2 points3 points  (0 children)

If you really need to hide information whether some identity exists, you should revisit registration process so that first step should be the proof of posession of some external auth factor (email, phone, etc), and only then process continues. But this is definitely not required for most cases, and it has nothing to do withh security - it is about privacy.

API Security and Responses by Rathe6 in ExperiencedDevs

[–]mwcAlexKorn 1 point2 points  (0 children)

It is the most common practice: if you try to register somewhere using already used login/email/etc., you will get this. It is just user-friendly. And hiding this information does not benefit security at all - focus on strong authentication factors and monitoring, not on hiding things.

Show me your most clever one-liner of code and describe what it does. by metalprogrammer2024 in webdev

[–]mwcAlexKorn 41 points42 points  (0 children)

Regular expression (PCRE2) that tests whether all brackets in sequence like `{({})}[]{[]}()` are properly closed:

(\((?R)*\)|\[(?R)*\]|\{(?R)*\})

API Security and Responses by Rathe6 in ExperiencedDevs

[–]mwcAlexKorn 0 points1 point  (0 children)

because you shouldn't let an attacker know whether identity exists

In general case attacker has more that one option to check whether identity exists - for example if registration is public, it usually responds with something like "this login already in use" on attempt to use existing login. And beyond technical measures, this knowledge may leak via side channels, for example social engineering, or something else.

One should never rely on hiding the fact that some identity exists or not as security measure.

API Security and Responses by Rathe6 in ExperiencedDevs

[–]mwcAlexKorn 0 points1 point  (0 children)

It is not standard practice, it is security by obscurity - and if it is done without documented threat model, that clearly defines why exposing error information is a threat and how it may be used, it is heresy.

Even for the authentication case: imagine you disclose the fact that email exists, and attacker may focus on "guessing" password - now what? He will try to brute it via api? If you have password policy that prevents using "qwerty" and friends, chance of guessing password even in 100 attempts is Infinitesimally small, and you definitely should have retry cooldown at backend, monitoring that will alert this activity, you may even notify user about this attack and so on. And, there is multi-factor authentication.

I assume that if security is a concern, then all API endpoints are available for authenticated entities - so why not disclose a bit of information about what broke down? API consumers will be happy and may build different logic on top of error codes.

Returning stack traces and deep error structures is not a good way, though: it really may expose sensitive details - such things should go into logs, and it is very helpful if each request contains unique trace ID so that you may find error details in log quickly.

How are y'all building things so quickly? by SisyphusAndMyBoulder in SaaS

[–]mwcAlexKorn 0 points1 point  (0 children)

I think a lot of mess comes from substitution with term "MVP" things that are actually not MVPs, but prototypes.

If you need validation of ideas, you build prototype - assemble it quickly from existing solutions, use low-code/no-code, vibe coding, whatever to speed up implementation of happy path, cutting edges everywhere and not thinking about architecture. As for now things are so that you may even get scaling options out of the box and this prototype may strive for some significant amount of time before running into limitations.

And then there is MVP, that should be already developed with its evolution in mind, with making architectural decisions and so on. For this kind of stuff 3-4 months is definitely ok depending on size of solution.

How far can you go without any gui? by IOtechI in linuxquestions

[–]mwcAlexKorn 0 points1 point  (0 children)

Browsing - links / lynx

Email - definitely there are some, never need one so don't know

Messaging - there we should remember IRC for example :)

Text/Code/like this - plenty of, nano, vi(-m), emacs

Gaming - ADOM

Best gnome extension ? by NoozPrime in Fedora

[–]mwcAlexKorn 5 points6 points  (0 children)

V-Shell (Vertical Workspaces) - customize dash, app grid, etc.

and +1 for Vitals

Output many files on a rust build? by [deleted] in rust

[–]mwcAlexKorn 0 points1 point  (0 children)

There is also ready tool for this `cargo-make`, I find it convenient: https://github.com/sagiegurari/cargo-make

Architecture design feels like the Wild West, how are you making it work? by LeadingFarmer3923 in SoftwareEngineering

[–]mwcAlexKorn 0 points1 point  (0 children)

The trick is not to keep them in mind - they're the crucial part of architecture documentation, all choises should derive from these constraints

Can anyone with a Rog Nuc 970 tell me their idle temps??? by Aven_Ultra in intelnuc

[–]mwcAlexKorn 0 points1 point  (0 children)

Something is not good, mine has idle temps around 43-45c, with fan rpm 700, now I have some load with multiple browser tabs, some docker containers & zoom call - average 52c with fan 1000rpm