@joaofbantunes@mastodon.social
@joaofbantunes@mastodon.social avatar

joaofbantunes

@joaofbantunes@mastodon.social

Code, headbang, grouch, repeat! ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿค˜๐Ÿ˜ˆ๐Ÿ”
Writing and talking about code, headbanging @ concerts, ranting @ anywhere, Microsoft MVP.
He/him

Often talking about #DotNet, #CSharp, #SoftwareDevelopment, #SoftwareArchitecture, #microservices and a bunch of other stuff

This profile is from a federated server and may be incomplete. Browse more on the original instance.

joaofbantunes, to dotnet
@joaofbantunes@mastodon.social avatar

My company just made the official IDE for development ๐Ÿ˜

I don't have anything against VS, but I just enjoy that we really make use of the available options, instead of being completely locked into everything Microsoft.

We build applications using .NET, Java and other stacks, deploy to Kubernetes on AWS, use Kafka, plus a bunch of other technologies, all working nicely together, without using everything from a single company. Love this!

joaofbantunes,
@joaofbantunes@mastodon.social avatar

Doesn't really affect me, I was already using it and other things from the all products pack, but find it nice anyway ๐Ÿ™‚

Also, I didn't really actively advocate for it, I just used it, folks noticed it and tried for themselves. Now, here we are ๐Ÿ˜…

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh didn't do anything though, but thought about sharing ๐Ÿ™‚

joaofbantunes, to Kubernetes
@joaofbantunes@mastodon.social avatar

Exploring some ideas, messing with the API using the client ๐Ÿ™‚

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

#dotnet right now

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh /me mostly ignoring both ๐Ÿ˜…

joaofbantunes, to dotnet
@joaofbantunes@mastodon.social avatar

๐Ÿ“ข New one up on the blog!

"A .NET parallel Kafka consumer proof of concept (feat. Akka.NET and the actor model)"

For some time now, I've been thinking about implementing a parallel Kafka consumer in C#, finally got around to do it ๐Ÿ˜…

https://blog.codingmilitia.com/2024/01/08/a-dotnet-parallel-kafka-consumer-proof-of-concept-feat-akkadotnet-and-the-actor-model/

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

Hey folks, I need your help.

In your opinion, what are the core concepts of memory management in the .NET space?

Please boost for reach.

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh inspired by this "back to basics" tip: don't call ToList/ToArray blindly everywhere, creating a crap ton of collection copies.

For example when R#/Rider warns about possible multiple enumerations of an IEnumerable, folks response to it is adding a ToList/ToArray in there, very likely, unnecessarily.

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

users, how do you feel about using 8 C# language features instead of DataAnnotation attributes?

On the one hand, I like that it reduces noise. On the other hand, you will likely have a mix of attributes and C# language features, which can lead to mental context switching.

Thoughts?

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh I haven't used attributes with EF Core in years. I rely on either language features or fluent configuration.

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh why would everyone be changing the configuration for an entity at the same time? ๐Ÿ™‚

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh IEntityTypeConfiguration is your friend, or in this case, my friend ๐Ÿ˜…

joaofbantunes,
@joaofbantunes@mastodon.social avatar
joaofbantunes, to dotnet
@joaofbantunes@mastodon.social avatar

๐Ÿ“ข New one up on the interwebs!
"Byte array as a dictionary key? Trying out some options"

Using arrays as a dictionary key is not really something very common, but I had the need for it, so got myself into a rabbit hole, trying to figure out a good way to go about it.

#DotNet #CSharp

https://blog.codingmilitia.com/2023/12/06/byte-array-as-a-dictionary-key-trying-out-some-options/

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh here it is

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh true. The code wasn't, at all, optimized for reading ๐Ÿ˜›

joaofbantunes, to random
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh ๐Ÿคฃ

joaofbantunes, to dotnet
@joaofbantunes@mastodon.social avatar

Messing around to try and figure out a good way to use a byte[] as a dictionary key

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@xoofx ah, didn't know about this method, will give it a try, thanks!

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@xoofx it's indeed the fastest approach from the ones I've tried. Allocates a bit more than the custom equality comparer, but overall, it's faster.

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh I can try, but Iโ€™m not a performance expert, just trying to implement something that doesnโ€™t suck (too much ๐Ÿคฃ)

Moke, to random

That's a bummer, Rider :\

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh @Moke only 3 months? ๐Ÿ˜… I think I've been using it (in Rider) since March or something, when the first preview was made available ๐Ÿ™‚

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh @Moke same. Unless thereโ€™s some issue that really blocks me, Iโ€™m always on EAP (and was always in Preview when I used VS).

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

Given project Aspire is about orchestrating applications, where does that leave teams who've decided on a polyglot approach to microservices with implementations written with , , and ? Probably not for those teams, right?

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh while Aspire looks interesting, I feel like its usefulness scope is smaller than the team thinks (or maybe I'm not the target audience).

Taking my current company as an example, even if we built all microservices with (which we don't, we're polyglot), we don't spin up all of them locally at the same time, as they're developed in isolation.

Needing to spin up all the services locally smells like a distributed monolith ๐Ÿคทโ€โ™‚๏ธ

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh the telemetry stuff still looks interesting though, even if developing a single service at a time

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@bjorkstromm @khalidabuhakmeh I also didnโ€™t care much about Tye for the same reason. Sure, it can be useful for the dependencies, but not much else, and even then, I prefer something like Docker Compose as itโ€™ll work for all teams, not just the ones working with .NET.

Now, given Aspire adds something more than just spinning up dependencies (i.e. telemetry), it can be worth a look, but even so, when youโ€™re polyglot, youโ€™re probably better off finding a solution that works for all teams.

joaofbantunes,
@joaofbantunes@mastodon.social avatar

@khalidabuhakmeh @bjorkstromm I know, itโ€™s just a matter of spinning up targets for the telemetry data locally. The Aspire thing is that the target and UI is built-in.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • โ€ข
  • megavids
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • ngwrru68w68
  • JUstTest
  • cubers
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • lostlight
  • All magazines