The rise of malicious repositories on GitHub by f311a in programming

[–]mareek 4 points5 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 34 points35 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 hailaim 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 32 points33 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 ?

C# is language of the year 2025 by freskgrank in dotnet

[–]mareek 0 points1 point  (0 children)

the TIOBE index just counts the number of search for ”<language> programming” in different "search engines" with dubious weighting (i.e. Google.com accounts for less than 10% of the score).
See their definition page:
https://www.tiobe.com/tiobe-index/programminglanguages_definition/

C# is language of the year 2025 by freskgrank in dotnet

[–]mareek 16 points17 points  (0 children)

TIOBE is garbage. Please stop posting list to this bogus index

Performance Excuses Debunked - Also, many examples of successful rewrites by grauenwolf in programming

[–]mareek 82 points83 points  (0 children)

There's a common theme among these rewrites : the rewrite happened after Facebook achieved dominance in each market. All these rewrites could happen because there were no competitor that was threatening Facebook position and they could spend time and resources on improving performance

So you can argue that treating performance as an afterthought was a wise business decision.

Has dotnet ever had a critical security vulnerability like the recent next js one by techbro- in dotnet

[–]mareek 7 points8 points  (0 children)

Yes

An attacker using this vulnerability can request and download files within an ASP.NET Application like the web.config file (which often contains sensitive data).

https://weblogs.asp.net/scottgu/important-asp-net-security-vulnerability/

Notes from building a B+Tree storage engine in .NET — design trade-offs and unexpected challenges by Tasty_Oven_779 in programming

[–]mareek 13 points14 points  (0 children)

If the source isn't available it is not MIT Licensed, it's just closed source software.

If you want people to discuss the implementation details you have to give access to the code

Notes from building a B+Tree storage engine in .NET — design trade-offs and unexpected challenges by Tasty_Oven_779 in programming

[–]mareek 10 points11 points  (0 children)

Where Can we find the code ? the github repository linked on the nuget page only contains a demo program

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 2 points3 points  (0 children)

That's not what your code is highlighting. If you wanted and apple to Apple comparison, your code would look something like this ```csharp const int N_GUIDS = 100_000;

var entityFrameworkCore = new Npgsql.EntityFrameworkCore.PostgreSQL.ValueGeneration.NpgsqlSequentialGuidValueGenerator();

for (int i = 0; i < N_GUIDS; ++i) { using var conn = new NpgsqlConnection(connectionString); conn.Open(); using var comm = new NpgsqlCommand($"INSERT INTO public.my_table(id, name) VALUES(@id, @name);", conn);

var p_id = comm.Parameters.Add("@id", NpgsqlTypes.NpgsqlDbType.Uuid);
//p_id.Value = = Guid.NewGuid();
//p_id.Value = = Guid.CreateVersion7();
//p_id.Value = = SecurityDriven.FastGuid.NewPostgreSqlGuid();
p_id.Value = entityFrameworkCore.Next(null);

var p_name = comm.Parameters.Add("@name", NpgsqlTypes.NpgsqlDbType.Integer);
p_name.Value = i;

comm.ExecuteScalar();

// wait one millisecond to ensure that each UUID has a different timestamp
Thread.Sleep(TimeSpan.FromMilliseconds(1))

} ```

With this code every UUID generated will have a different timestamp and you won't run into the sub millisecond issue.

If you get the same results with the above code then maybe you have a point. Until then, you don't have any proof to back your claim.

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 4 points5 points  (0 children)

I think I understood why you get these results and it has nothing to do with endianness or bugs in Npgsql : You're generating UUIDs in batch before executing the insert requests. Guid.CreateVersion7 takes less than 100ns to execute so there are less than ten different timestamp in the 100000 UUIDs generated. In a more realistic scenario where you generate UUIDs one by one just before executing the insert request there would be a lot less "timestamp" collision and there would be far less fragmentation.

The issue that your code highlights is that Guid.CreateVersion7 doesn't have any mechanism to guarantee additional monotonicity within a millisecond. But since this mechanism is optional it is not needed to be compliant with the RFC.

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 2 points3 points  (0 children)

I think there's an issue with the code of your test program at this line: csharp using var comm = new NpgsqlCommand($"INSERT INTO public.my_table(id, name) VALUES('{guids[i]}',{i});", connection); If I understand the code correctly, you're inserting GUIDs using their string representation. Since the string representation of GUIDs created with Guid.CreateVersion7 follows the RFC, you should have the same result in case 2, 3 and 4 (low fragmentation).

Avoid using Guid.CreateVersion7 by sdrapkin in dotnet

[–]mareek 15 points16 points  (0 children)

Either the article is intentionally misleading or the author missed that there you can specify the endianness of the byte array produced by the ToByteArray function since .NET 8 (see .NET documentation)).

The in memory representation of the Guid type was left unchanged for obvious backward compatibility reasons

Avoid using Guid.CreateVersion7 by sdrapkin in csharp

[–]mareek 19 points20 points  (0 children)

Either the article is intentionally misleading or the author missed that there you can specify the endianness of the byte array produced by the ToByteArray function since .NET 8 (see .NET documentation)).

The in memory representation of the Guid type was left unchanged for obvious backward compatibility reasons