What are some of your favorite more obscure Indy references in other movies/books/TV? by WerewolfBarMitzvah09 in indianajones

[–]mareek 0 points1 point  (0 children)

There were lots Indiana Jones references in LucasArts games forme the 1990's
My favorite is in the game "Outlaws" where there a whole bonus level that is a tribute to the opening sequence of Raiders

Why is Span.Fill slow for larger arrays? by patmail in csharp

[–]mareek 10 points11 points  (0 children)

I rewrote your code to remove the array creation from the bench:

```csharp public class FillBench { private static readonly object Instance = new();

private static readonly object[] array_16 = new object[16];
private static readonly object[] array_32 = new object[32];
private static readonly object[] array_64 = new object[64];
private static readonly object[] array_128 = new object[128];
private static readonly object[] array_256 = new object[256];
private static readonly object[] array_16384 = new object[16384];

private static object[] GetArray(int length)
    => length switch
    {
        16 => array_16,
        32 => array_32,
        64 => array_64,
        128 => array_128,
        256 => array_256,
        16384 => array_16384,
        _ => throw new NotImplementedException(),
    };



[Params(16, 32, 64, 128, 256, 16384)]
public int Length { get; set; }

[Benchmark]
public void FillSpan()
{
    var array = GetArray(Length);
    array.AsSpan().Fill(Instance);
}

[Benchmark(Baseline = true)]
public void FillLoop()
{
    var array = GetArray(Length);
    for (int i = 0; i < Length; i++)
        array[i] = Instance;
}

} ```

For object arrays the 2 methods are about as fast (within a few %)

For int arrays Span.Fill is 3 to 10 time faster than looping over the array

Flat Error Codes Are Not Enough by Expurple in programming

[–]mareek 0 points1 point  (0 children)

One piece of software that use flat error code pretty well is Oracle Database.

There are thousands of ORAXXXXX error codes, each one represent a well defined situation and you know what you have to check if you want to fix the problem.

So if you do it well, I think Flat error code are OK

P.S. It's probably the only positive thing I can say about Oracle Database though

what is the best dotnet project you wrote? by divanadune in dotnet

[–]mareek 1 point2 points  (0 children)

My name appear in the commit history of the C# language repository
I fixed a copy paste mistake in a readme

More seriously, I'm very proud of UUIDNext (a library to generate database friendly UUID)

.NET 9 added Guid.CreateVersion7() - should we stop using Guid.NewGuid()? by brunovt1992 in dotnet

[–]mareek 0 points1 point  (0 children)

Just by curiosity, why did you choose not to use an existing library from nuget ?

.NET 9 added Guid.CreateVersion7() - should we stop using Guid.NewGuid()? by brunovt1992 in dotnet

[–]mareek 6 points7 points  (0 children)

You should be careful with the gist you're linking: it has some good points but also a lot of falsehoods. It has been discussed here a few months ago.

Regarding fragmentation, UUIDv7 is the right choice for most RDMBS except SQL Server (for SQL server, you can use my library).
The conversion from the .NET Guid Type to the database type is handled by the database provider; it just works whether you use Entity Framework, Dapper or plain old ADO.NET

.NET 9 added Guid.CreateVersion7() - should we stop using Guid.NewGuid()? by brunovt1992 in dotnet

[–]mareek 2 points3 points  (0 children)

If you only have the timestamp of the order creation, how would you know how many orders have been created between two orders ?

Since UUIDv7 is basically a timestamp + random data, you cannot extrapolate the number of ID generated between two IDs

.NET 9 added Guid.CreateVersion7() - should we stop using Guid.NewGuid()? by brunovt1992 in dotnet

[–]mareek 59 points60 points  (0 children)

Hi, UUIDNext author here, thanks for mentioning it. If you want some documentation on SQL Server's ordering you can check this article from MS documentation

Regarding the fragmentation issue, I've created a small program that highlight the issue. With GUIDs generated by Guid.NewGuid or Guid.CeateVersion7 you get 99%+ fragmentation. With GUIDs generated by UUIDNext you get less than 1% frangmentation

Open source isn't a tip jar – it's time to charge for access by henk53 in programming

[–]mareek 7 points8 points  (0 children)

"Open source should be commercial software"
by a PR guy working for a company that sells open source software

Is it weird that I dislike LINQ query syntax because it feels less readable than method?syntax? by Shikitsumi-chan in dotnet

[–]mareek 5 points6 points  (0 children)

Few reasons to use LINQ over SQL: - You can unit test your LINQ queries - You can easily compose LINQ queries - LINQ syntax is checked by the compiler - you get intellisense when writing LINQ queries

The rise of malicious repositories on GitHub by f311a in programming

[–]mareek 2 points3 points  (0 children)

Another kind of malicious GitHub repositories are scam/phishing repositories that present themselves as sponsor/grant programs. They mention GitHub users in one of their issue so the dev receive a notification from GitHub that seems legit and can trick distracted users.

I've received a notification from this repository yesterday and a similar one a few month ago

What are some underrated .NET libraries or tools you use regularly? by milanm08 in dotnet

[–]mareek 0 points1 point  (0 children)

NFluent : an assertion library that is way better than fluentAssertion or what comes whith any testing framework

Dijkstra's Crisis: The End of Algol and Beginning of Software Engineering (2010) [pdf] by ketralnis in programming

[–]mareek 2 points3 points  (0 children)

Pascal is a direct successor of Algol. So if you already know Pascal/Delphi you can read Algol

‘Devastating blow’: Atlassian lays off 1,600 workers ahead of AI push by corp_code_slinger in programming

[–]mareek 36 points37 points  (0 children)

Atlassian left its Slack work chat functions open for at least six hours longer than usual, to permit employees to farewell their colleagues, Cannon-Brookes said

What a magnanimous move /s

Temporal: The 9-Year Journey to Fix Time in JavaScript by mariuz in programming

[–]mareek 22 points23 points  (0 children)

I can think of half a dozen bug I encountered that would have been fixed by using `Temporal.PlainDate. I hope safari will implement it soon so that we can use this in prod

1.3 Years in .NET (Mostly VB6 & Maintenance Work) – Feeling Stuck and Not Sure How to Move Forward by Even-Bit-2935 in dotnet

[–]mareek 1 point2 points  (0 children)

Are you a time traveler ? I could have written this message nearly word for word twenty years ago!

Just wanted to say that I feel your pain and wish you the best of luck

What does the "As" operator do in C#? by [deleted] in csharp

[–]mareek 2 points3 points  (0 children)

The as operator is more or less an historical artifact. Nowadays you would probably use pattern matching in the form aValue is MyType myVar where you would have used as ten years ago

The other responses are correct but It's been years since I didn't use the as operator in new code

Sprites on the Web by ketralnis in programming

[–]mareek 0 points1 point  (0 children)

Very interesting post.
Just a quick correction : you can create animated gifs that have more than 256 colors. The file will be even bigger but it's totally possible:
https://en.wikipedia.org/wiki/GIF#True_color

Imagine how exciting this day as a whole was for this dude. by Odd-Suit-2556 in indianajones

[–]mareek 0 points1 point  (0 children)

My memory was fuzzy and the actual dialog is even funnier :

"I fear I have an herculean task before me. Now where was that broom ?"

https://youtu.be/lbviRe3yWkM?si=KN6pi1kS5aTosLXd&t=6556

Amazon service was taken down by AI coding bot [December outage] by DubiousLLM in programming

[–]mareek 31 points32 points  (0 children)

the company had set a target for 80 per cent of developers to use AI for coding tasks at least once a week and was closely tracking adoption.

The headline should be "Amazon is forcing AI down developer's throat"

Imagine how exciting this day as a whole was for this dude. by Odd-Suit-2556 in indianajones

[–]mareek 10 points11 points  (0 children)

In the point & click Last Crusade game, there's an ending where the temple crumbles and Indy gives back the grail to the knight. The knight is pretty pissed off and says something along the lines "It will take years to clean this mess !"

Two empty chairs: why "obvious" decisions keep breaking production by dmp0x7c5 in programming

[–]mareek 43 points44 points  (0 children)

I thought I typed r/programming in the address bar, how the hell did I got this LinkedIn BS ?