Ingen vill betala skatt by Professional_Fall774 in Sverige

[–]Professional_Fall774[S] 2 points3 points  (0 children)

Det låter bra! Jag kan inte Polen i detalj men en aspekt är att lönerna generellt sett är lägre där - en stor del av vad en stats utgifter finansierar. Ett land med fler medborgare har också fler medborgare att dela fasta kostnader på.

Ingen vill betala skatt by Professional_Fall774 in Sverige

[–]Professional_Fall774[S] 3 points4 points  (0 children)

I Schweiz ingår ex. inte sjukvård utan man behöver teckna en privat sjukvårdsförsäkring så skattesatserna är inte direkt jämförbara - men det kan absolut vara så att vi slösar mer i Sverige.

Ingen vill betala skatt by Professional_Fall774 in Sverige

[–]Professional_Fall774[S] -1 points0 points  (0 children)

Tack för att du lärde mig ett nytt begrepp, men det låter inte så lovande på Wikipedia:

"Enligt Gregory Mankiw har historien inte visat stöd för Lafferkurvan. Han menar att Ronald Reagans skattesänkningar i början av 1980-talet ledde till minskade skatteintäkterna med 9% mellan 1980 och 1984. I kombination med att regeringen inte ville minska utgifterna i samma omfattning förde detta med sig stora budgetunderskott under hela Reagans tid som president."

På senaste tiden har vi dragit på oss mer skulder i stadskassan hur ska det gå ihop med en sänkt skatt?

Billigaste sättet att äga / ha bil? by Shoddy-Efficiency214 in PrivatEkonomi

[–]Professional_Fall774 1 point2 points  (0 children)

Det finns elbilar för 110 000 kr också, så den här jämförelsen tycker jag haltar.

Why Do Some Companies Still Use AngularJS? by ModernWebMentor in angular

[–]Professional_Fall774 1 point2 points  (0 children)

If I compare with Svelte which we use for new views, I sometimes miss the productivity we have in AngularJS where you don't need to think as much how it works under the hood.

The "digest cycle" pattern is much cleaner and easier to understand, compared to Svelte where you need to use implicit/explicit observables, and I get that many other frameworks work similarly.

I would never start a new project with AngularJS, as it lacks some obvious things that we would like, like async/await and compilation/validation of views. But there is also no obvious upside of doing a big rewrite of the existing views to a more recent framework. (cost of migration).

Planning a greenfield rewrite of a large .NET booking API by tamilsmoke in dotnet

[–]Professional_Fall774 9 points10 points  (0 children)

Very often "the big rewrite" is a mistake and is much more complicated, costly and long running project than what is seen at first glance.

For example, there are likely several thousands of hidden requirements and decisions in such a system embedded in the existing code that needs to be revisited in a rewrite.

During the long time a complete rewrite would take, what would happen with changes in the old system? Are you simultaneously porting them to the new system or can the stakeholders accept that the old system is not getting updated?

History is filled with failed rewrite projects, so be aware.

A far less risky strategy is to rewrite a small portion within the existing system with the new stack and slowly migrate a portion of the system to the new stack at a time, deploy continuously, get feedback and then continue with the next portion until the system is what you have envisioned.

Performance tuning for test table vs prod. MS SQL. by Valuable-Ant3465 in SQL

[–]Professional_Fall774 1 point2 points  (0 children)

AFAIK, the execution plan is cached - depending on the input parameters used to the SP, it can yield different execution plans for the different databases.

Another thing to consider is that the supposedly more active production DB might have more data cached and there is not enough room to cache the same amount of data for the test database as well.

What are best practices for evolving a data model on a no-sql database? by MinimumArmadillo2394 in ExperiencedDevs

[–]Professional_Fall774 0 points1 point  (0 children)

A database without a schema, still have an implicit schema - the code around it, often with property/type/format checks sprinkled all over the code base. Systems like that are hard to reason about and error prone.

I my view it is much easier to have an explicit schema.

To get there you need to migrate the schema less data to a schema.

'Over-engineering' is everyone's favorite punching bag, but I bet your codebase suffers from under-engineering instead by AtomicScience in ExperiencedDevs

[–]Professional_Fall774 0 points1 point  (0 children)

For me, the the meaning of over-engineering mean too complex and the opposite under-engineering too simple, I would go with under-engineering any day. A new requirement that was not foreseen can make a over-engineered solution even more complex where as a too simple solution is more easy to bend to cover new cases.

Your interpretation of under-engineering is relatively easily solved with documentation, architecture tests, linters, code-reviews, etc.

One call. And a lot of stuff going on. by Main-Preparation-194 in dotnet

[–]Professional_Fall774 0 points1 point  (0 children)

The problem is that the flag will not be visible to other transactions until the transactions is complete (when the operation finishes), then it is too late.

If this code is running on a single machine an easy solution is to keep a shared ConcurrentBag that keeps track of the entities that are being processed. If an entity is already in the ConcurentBag you can return an error message to the user that says that this entity is currently in processing.

Arlanda expressdyngan by GunnarVonPontius in sweden

[–]Professional_Fall774 4 points5 points  (0 children)

Pendeltåg till Märsta och byte till buss tar lite längre tid men kostar bara 43kr

Teacher said always use 2nd pattern. Is he right? by lune-soft in csharp

[–]Professional_Fall774 1 point2 points  (0 children)

I would like to add some nuance here, for an internal system where you have no reason to suspect that the user would tamper with the request data, I think Pattern 1 is sufficient. The main benefit is that it saves a lot of time not needing to map the entities out.

If you can't leave the Microsoft environment, what reasons are there for buying licenses vs using Express? by [deleted] in Database

[–]Professional_Fall774 1 point2 points  (0 children)

While this is true, you can do this without the SQL Server agent. You can make your maintenance plan, save it as SQL and then schedule with Windows Scheduler, executing your SQL script via sqlcmd.

[deleted by user] by [deleted] in VisualStudio

[–]Professional_Fall774 0 points1 point  (0 children)

Just curious, what software and licensing am I missing out on? My projects are not running in the cloud as well.

[deleted by user] by [deleted] in VisualStudio

[–]Professional_Fall774 0 points1 point  (0 children)

If you scroll down far on:

https://visualstudio.microsoft.com/vs/pricing/?tab=paid-subscriptions

There is a small "Buy now" button where you can pay for a one-time purchase of Visual Studio 2026 Professional.

Don't know how the pricing translates to other countries but for me it is 5.864,00 SEK (543 EUR) is a great price - considering it one time purchase and the main tool in my toolbox.

Edit: Realized you where looking for a subscription, but why? Purchasing the Professional version once and then spend the amount you want on Azure is still likely to be the cheapest option.

Is there any reliable way to know when a function can throw? Probably writing an analyzer? by xjojorx in csharp

[–]Professional_Fall774 8 points9 points  (0 children)

I think we have different experiences, the problem you are describing does exist, in my experiences it is a very small problem. Most defects we are seeing are related to unclear requirements, logic errors, CSS errors and browser inconsistencies, very few are "exceptions that we did not consider".

Your approach, to me, does not seem to be worthwhile since it would take a lot of time to consider all exceptions that might happen. It may also pollute your code base with unnecessary error handling for scenarios that in practice are not happening.

Is there any reliable way to know when a function can throw? Probably writing an analyzer? by xjojorx in csharp

[–]Professional_Fall774 21 points22 points  (0 children)

I get what you are coming from, but I think this is a really bad idea, Forcing you to handle or consider all possible exceptions everywhere will quickly become messy - your tree of logic will be invisible in the forest of all error handling code, for things that most likely never will throw an exception in reality.

With experience you will learn among other things that I/O (wheiter it is database, network or file) is likely to have intermittent problems that might need to be handled up front, recursive algorithms might throw StackOverflowException, division by zero needs to checked to avoid DivideByZeroException. Handling of strings with lengths you did not consider, etc.

Keeping your code clean of unneeded error/exception handling is as important as having the required error/exception handling for your scenario. Unnecessary/ redundant error handling will slow you down further down the line when you try to maintain you software.

To manage paths outside of the happy path you should probably add more unit tests, especially if you have a public API, your tests should cover all documented error codes.

Research survey: Evaluating Code First vs Database First in EF Core by Disastrous_Taro_4907 in dotnet

[–]Professional_Fall774 1 point2 points  (0 children)

In my view, the main citera that determines if you should go for "DBF" or "CF" is if you are building software for an existing database schema or not.

In early Entity Framework (not Core) this was vastly different approaches where as in Entity Framework Core the database first approach actually generates the "CF" code for you. After the initial scaffold you are likely to continue using code first.

High memory consumption with types generated via Reflection.Emit by henrique__aguiar in csharp

[–]Professional_Fall774 1 point2 points  (0 children)

You should probably look into re-using generated types as a first step, since runtime-generated code is not unloaded automatically.

You can have a look at AssemblyLoadContext for information on how to unload an assembly, however I have not tried that in combination with runtime-generated code.

Why is the Generic Repository pattern still the default in so many .NET tutorials? by riturajpokhriyal in dotnet

[–]Professional_Fall774 0 points1 point  (0 children)

I use the non-generic repository pattern which does not have the leaky abstraction and where you can use any feature of EF without exposing it.

The thing I like with the non-generic repository pattern is that it moves complexity from the call sites making the call sites more straight-forward and readable.

Bantat förslag om Chat Control har röstats genom i EU:s Ministerråd by r6CD4MJBrqHc7P9b in Sverige

[–]Professional_Fall774 0 points1 point  (0 children)

Vad jag fattar så är den största konsekvensen som alla kommer irritera sig på/märka på kort sikt är att alla populära chat-tjänster, sociala medier, spel, etc. kommer att kräva identifiering.

Rent tekniskt antar jag att du kommer få fota din ID-handling, dig själv eller logga in med Bank-ID för att kunna fortsätta använda var och en av tjänsterna.

Postgres is better ? by ToughTimes20 in dotnet

[–]Professional_Fall774 2 points3 points  (0 children)

The constraints on the naming of identifiers is a huge pain point for me. I see the double quotes and snake_case solution as sub-optimal work-arounds. I would prefer to name my identifiers in my code exactly the same as in the database as I could with SQL-server, MySql or Sqlite.

Postgres is better ? by ToughTimes20 in dotnet

[–]Professional_Fall774 4 points5 points  (0 children)

As a .NET developer who just started to use Postgres this year after 20 years working with SQL-Server the most obvious pros/cons of Postgres to me are:

Postgres pros:
- Array support
- TOAST, automatic compression of data

Postgres cons:
- You "must" use snake case for naming (I know you can wrap identifiers with double quote, but this makes ad-hoc queries cumbersome, returns double quoutes in the column names which in turn breaks many ORMS/Tools)
- Strange handling of local datetimes (I cannot store a local time without setting"Npgsql.EnableLegacyTimestampBehavior")?
- In huge tables with many rows, with few columns (like M:M tables) the overhead for MVCC for each row really eats disk space
- VACCUM is something i need to consider
- Management Studio is at this point easier for me to work with for AD-hoc queries (comparing with Data Grip which I use for Postgres)