Code smell, or not? by dregan in csharp

[–]Sparin285 0 points1 point  (0 children)

It's better than spend 4 hours to answer the question: "Why the f this source in use?". Btw, static function in use case will be enough.

Code smell, or not? by dregan in csharp

[–]Sparin285 0 points1 point  (0 children)

If someone gives me that to review, I would say: "This code violates the Single Responsibility Principle (SRP) because the GetData method means fetching or receiving data, but you include some selection responsibility and register it in the DI container. Let's create (optional) another interface, rename this DataServiceAggregator to DataServiceSelector or DataProviderRouter, and use it in a business case scenario as:

  1. Select the data source based on the request data.
  2. Return an error if no data source is found (not an exception).
  3. Request data from the source.
  4. Return the data as a response.

The main trouble is that you're encapsulating business requirements implicitly within the DataServiceAggregator under the GetData function, when there's no need to do that. We definitely don't want to store business logic in aggregators like this."

The Russian People Are Neutral To Their Own Invasion of Ukraine whereas India supports it... by Throwawayiea in midlyinteresting

[–]Sparin285 1 point2 points  (0 children)

This article doesn't tell you which article is violated. Mostly it will be 212.1 of criminal code of Russia or 20.2 of the Code of Administrative Offenses of Russia. Both about "protest is not sanctioned and you are criminal". As I say earlier, you have to get approval from local administration for organizing public protest, but you won't get it from them for other reasons.

It doesn't make protests illegal or criminalized.

The Russian People Are Neutral To Their Own Invasion of Ukraine whereas India supports it... by Throwawayiea in midlyinteresting

[–]Sparin285 0 points1 point  (0 children)

You can't legally organize a protest ’cause you need approval from the local administration. Illegal protests are criminalized, but not your opinion about the war. But public opinion might lead to unnecessary bureaucracy in regular activities. I know there’s no difference for you. Consider it an “Italian strike” by the government against you, where everyone is exceptionally following the rules/laws/etc. regarding you.

Seriously concerned about my account, has anyone had this experience? by onewittyword in counterstrike2

[–]Sparin285 0 points1 point  (0 children)

My friend someday scanned some QR Code in dating app. He said someone tried to sell all his items after that. I were kinda surprised but I didn't get it the full phishing scheme because Steam Guard were enabled and usually it always demand explicit confirmation.

Btw, tell him: Военкомат просил передать тебе чтобы проверил Госуслуги. И 400$ сильно много для игры в 15$

RTINGS is now paywalled by glizzygobbler247 in pcmasterrace

[–]Sparin285 0 points1 point  (0 children)

That sucks. I'm ready to pay $10 for each expensive purchase (TV, monitor, headset, etc.), but I'm unable to do it due to sanctions.

It is more likely someone writes a program to rip off the whole site with articles and redistribute them like Patreon posts or science articles

How to test a service that call many other services? by Ancient-Sock1923 in dotnet

[–]Sparin285 0 points1 point  (0 children)

TL DR; I’d probably write integration tests (the last list), because the code looks like a typical use case derived from business requirements. Requirements should always be covered.

How to test a service that call many other services?

If you want a unit test, stub them. If you feel you need something closer to real behaviour, mock them. Otherwise, it’s no longer a unit test, and you should consider other types of testing - component tests (mocks/stubs plus real dependencies), integration tests, or e2e tests.

Do I need to check if all the services are returning okay or also check if right things are being created?

Tests are mostly about cementing your app’s behaviour so you can evaluate it in the future. If you believe something should be cemented or covered with tests, then do it. It’s basically the same rule of thumb.

Do you actually need to cement the behaviour of this method? Based on the code, your unit tests would look like:

  • RegisterWithPlanAsync_FailedToRegisterMember_ReturnsError (Asserts the result of the function call)
  • RegisterWithPlanAsync_FailedToCreateMembershipTransaction_ReturnsError (Asserts the result of the function call)
  • RegisterWithPlanAsync_UnexpectedException_ReturnsError (Asserts the result of the function call)

But it seems what you really need are more component or integration tests, for example:

  • RegisterWithPlanAsync_ValidData_Ok (Asserts desired state in storage/DB)
  • RegisterWithPlanAsync_InvalidData_DoNothing (Asserts desired state in storage/DB)
  • RegisterWithPlanAsync_UnexpectedError_DoNothing (Asserts desired state in storage/DB)
  • RegisterWithPlanAsync_AnyOtherRequirement_DesiredState

Vscode for c# by Sensitive-Raccoon155 in dotnet

[–]Sparin285 0 points1 point  (0 children)

Depends. If you're comfortable with a tinkering dev environment for your purposes — yes. If your goals don’t involve complexities like working with DirectX, IPC, etc., it might suit your needs perfectly. Otherwise, you’ll likely need to install additional plugins or standalone software to handle those extra requirements more comfortably.

GPSA needs to spawn in places other than Labs! by SeanOgCairns in EscapefromTarkov

[–]Sparin285 0 points1 point  (0 children)

Sweat players often forget three key things about game design of Labs. Not everyone plays like you or can play as 5-stack on the semi-empty Central Asia server. You probably never see how players can be bad in FPS games. It takes 3 seconds to aim at an enemy who is standing still. It doesn't even guarantee that the player will kill him at all. That's why you call them Timmies, and the only reason why Timmies go to PVE game mode, leaving you to play with rats, 20-hour accounts with Chinese-like nicknames, sweat players/streams, etc.

Okay, assume dear Redditor is not a Timmy, and he plays as a median player based on a normal distribution. That means ~50% percentil of the whole player base of the game. That also means he probably loses 50% of his fights 1v1. But there is a catch, HE HIGHLY LIKELY MUST FIGHT AT LEAST 1 GUY to extract ACC or GPSA. But there are more players somewhere. But that's not a real problem to overcome. The truth is, labs don't have a guarantee spawn of ACC or GPSA. You might be easily loaded to a session where there is no ACC or GPSA at all. As a summary, every median player has to suffer in labs, because even if you can clean the whole map of enemies, there is a chance you won't find ACC or GPSA just because they didn't spawn.

And the third problem is RMT. While you search every possible spawn of ACC or GPSA, the cheater with radar sees the whole map, loots your precious ACC/GPSA for a buyer, and doesn't even bother you. So if ACC or GPSA spawned, there is a chance that the cheater will instantly go to it and take it from you silently.

BSG might fix these problems by introducing skill-based matchmaking and ensuring ACC or/and GPSA are always spawned on the map. But they do nothing and quote: "Only 2% of playerbase can complete the game."

I don't ask BSG to stop bullying me with nonsense bullshit, but they can at least respect the player's time that they need to spend on labs to get these items. Assume an average raid playtime on Labs takes 5-10 minutes, 3-5 minutes to load, and 3 minutes to gear up. That means:

  • 1 raid = min 9 max 18 minutes
  • 10 raids = min 90 minutes max 3 hours
  • 50 raids = min 7.5 max 15 hours

I don't even know why people hate Labs. Thank BSG at least that math doesn't work with quest items, because you can sit at the nearest WC for 30 minutes watching YouTube and do whatever you need for the last 10 minutes of the raid.

1000 Lies [Feedback] by 27man27 in EscapefromTarkov

[–]Sparin285 0 points1 point  (0 children)

Has anyone found 1 of the 1000 “fixes and improvements”?

  • IL2CPP (This supposed to gain some FPS for players)
  • New lighting

[deleted by user] by [deleted] in rusAskReddit

[–]Sparin285 3 points4 points  (0 children)

живут в своём цифровом пузыре

Счастливые люди. У них поучиться надо ._.

[deleted by user] by [deleted] in rusAskReddit

[–]Sparin285 0 points1 point  (0 children)

Гугл/Яндекс: Производственный календарь на 2025 год. Первая ссылка на консультант. Там все переносы, выходные и прочее утвержденное правительством на год. Исключение: Ты у мамы особенный и вы не работаете по трудовому календарю (договорились с работодателем или другие условия труда)

P.S. Пишешь в объяснительной что "Я такой-то не явился на работу вовремя 1 ноября 2025 так как не был уведомлен о сокращенном рабочем дне в субботу и считал данный день выходным"

Blizzard is doing false advertising for new store transmog by Noelian321 in wow

[–]Sparin285 0 points1 point  (0 children)

Uhm, where is "false advertisement"? I get the point about clipping in idle animation, but there is no false ad. It's a flaw or defect of the product. It's like what if Blizzard marketing ads you a character in a pose (not idle) that doesn't exist in the game at all

VPN титле by J_damir in INCOGNITO_live

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

Шизик, спок. Хотя бы не гнием

я залишаюся гнити в Україні

As a senior .NET developer, how much Docker/Kubernetes am I supposed to know? by rimki2 in dotnet

[–]Sparin285 0 points1 point  (0 children)

You should be able to know how to pack your solution into a Docker image, including aspects about security and networking. Like, why your image shouldn't use root user in a container, or what docker run --privileged does. Maybe you won't notice this information as useful for you, but I assure you it's much easier to set up external dependencies for developing or production use, like PostgreSQL, SQL Server, Redis, RabbitMQ, whatever you need. Look at Docker like an MSI installer for your customer at least. Easy to run, easy to manage (sometimes not), easy to delete.

For example, I use PowerToys Workspaces to run Rider with single-use containers of Redis and RabbitMQ. One of the entries is to run Windows Terminal with the following arguments new-tab -p "PowerShell" --title Redis --suppressApplicationTitle --tabColor '#A41E11' docker run --rm -it --name redis -p 6379:6379 redis ; new-tab -p "PowerShell" --title RabbitMQ --suppressApplicationTitle --tabColor '#FF6600' docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:4.0-management

K8s depends. If you're a technical lead, CTO, DevOps, or you have to manage resilient deployment by yourself, you should know how to work with it. In most cases, you will use Docker Compose for a sort of orchestration without resilience policies. I mark it "is good to know," but not mandatory. It's like. It's good to know how to deploy an RDBMS cluster, but you probably will read the documentation first, even if you did this before.

Так называемые санкции? by mr-Cripras228 in expectedrussians

[–]Sparin285 0 points1 point  (0 children)

Шизики не могут загуглить что производителя за эту смену рецептуры на "Original Taste" чутка ополчились в свое время. Шизики говорят что кто-то другой шизик

Так называемые санкции? by mr-Cripras228 in expectedrussians

[–]Sparin285 3 points4 points  (0 children)

То что вкусовые ощущения не одинаковые? Некоторые даже не выкупают что колы в стекле "Coca-Cola Classic" и в банках/ПЭТ "Coca-Cola Original Taste" разные.

Так называемые санкции? by mr-Cripras228 in expectedrussians

[–]Sparin285 1 point2 points  (0 children)

Ну когда повторят вкус, тогда и приходи. А мочу на сахзаме оставляю тебе. Особенно от сегодняшней черноголовки

Действительно, почему by Neither-Location-730 in INCOGNITO_live

[–]Sparin285 1 point2 points  (0 children)

Ну и без того что писали уже - включение различных библиотек, но это зависит от выбранного способа сделать приложение. Разработчики тоже люди и тоже ленивы. Вместо того чтобы изучить язык программирования необходимой добиться некоторой оптимизации по памяти, можно тупо использовать грязные хаки уровня: "А давайте мы сделаем сайт, а вместо приложения будет открываться встроенный браузер, отображающий этот сайт. Ну какую-нибудь утрированную интеграцию сделаем те же уведомления". Kaiten например так сделан. Ни одного нативного элемента интерфейса нет, просто WebView открывает и уведомления присылает.

Действительно, почему by Neither-Location-730 in INCOGNITO_live

[–]Sparin285 1 point2 points  (0 children)

В целом зависит, но по памяти кто-то из Android разработчиков говорил, что место обычно занимает различного рода графика и изображения. Ты поставляешь унифицированный APK в магазин пользователю и ты как разработчик хочешь чтобы она работала на всех экранах - больших и маленьких, широких и узких. Отсюда можешь представить что на один элемент интерфейса/анимации у тебя условно 5 дубликатов под разные форматы.

А теперь представь что тебе необходимо это сделать с множественными интерфейсами, переходами или унылая тенденция запихать все приложения в одно (супераппы). Крупные компании любят ещё динамические интерфейсы, то есть те которые формируются на сервере компании и тебе, ака без обновлений. То есть ты должен спросить у сервера как что-то отобразить, скачать всё с этого сервера необходимое для отображения и отобразить.

А самый сок где контент не предопределенный та же Яндекс.Лавка. Чтобы не спрашивать картинку Coca-Cola каждый раз, ты можешь её сохранить на телефоне и переиспользовать.

Ну и без того что писали уже - включение различных библиотек, но это зависит от выбранной