khalidabuhakmeh, to random
@khalidabuhakmeh@mastodon.social avatar

System.Text.Json loves throwing exceptions. I’m surprised there isn’t a “Is this JSON” kind of method.

TimPurdum,
@TimPurdum@dotnet.social avatar

@mikegoatly @KirillOsenkov @khalidabuhakmeh is there a TryParse or TryDeserialize method? Seems like that's the idiomatic way of handling this. Not that I don't like custom result types that pass errors, but there are none thus far in the standard stuff AFAIK.

DiazCarrete, to haskell
@DiazCarrete@hachyderm.io avatar

The #Rel8 #Haskell library lets you construct #Postgresql #SQL queries using a monadic interface.

Interesting bit: "Rel8 has a fairly unique feature in that it’s able to return not just lists of rows, but can also return trees."

https://rel8.readthedocs.io/en/latest/cookbook.html#tree-like-queries

image/png

DiazCarrete,
@DiazCarrete@hachyderm.io avatar

Post about Entity Framework, touching on how to extract across a foreign key relationship
https://blog.ploeh.dk/2023/09/18/do-orms-reduce-the-need-for-mapping/
https://twitter.com/ploeh/status/1703782709422657939

anomalocarididae, to programming
@anomalocarididae@furry.engineer avatar
anomalocarididae,
@anomalocarididae@furry.engineer avatar
cwoodruff, to random
@cwoodruff@mastodon.social avatar

🖊️ Excited to announce my upcoming book: "Practical Network Programming Using C#." Dive deep into and , exploring everything from fundamentals to advanced networking techniques. Stay tuned for launch details! 📚💻
https://woodruff.dev/practical-network-programming-csharp/

cwoodruff,
@cwoodruff@mastodon.social avatar

Would love to know what niche corners of network programming I should investigate for the book I am writing.

khalidabuhakmeh, to CSharp
@khalidabuhakmeh@mastodon.social avatar

It would be neat if syntax lets you define a default constructor like this.

ernstgreiner,

@khalidabuhakmeh

There is a 'default' constructor in
It looks like this

public Person() {}

And if it's the only constructor it looks like this

Discuss

shanselman, (edited ) to dotnet
@shanselman@hachyderm.io avatar

Very proud of my team! Announcing the release of the new Foundational C# Certification in collaboration with freeCodeCamp. The certification is completely free, globally available, and includes a full 35-hour C# training course hosted on Microsoft Learn. Get started at https://msft.it/60199TYZv today, it’s FREE!!!

SmartmanApps,
@SmartmanApps@dotnet.social avatar

@shanselman
Hey Scott. Very cool! 🙂 I'd suggest editing your post to include the tag as well.

smalls, to CSharp
@smalls@ocw.social avatar

Finally getting around to playing with the unified Blazor updates coming in .NET 8. I've been super excited about this ever since they announced it.

This is me running the index page with server-side rendering (SSR), but the weather page is running with both SSR and WebAssembly (The forecast table component is what is using WebAssembly).

video/mp4

smalls,
@smalls@ocw.social avatar

Basically Blazor has had two hosting models for web projects: Server and WebAssembly. Server does all of the rendering on the server and requires the client to have a consistent SignalR connection; however, WebAssembly does not require the client to have a consistent connection and instead the client has to download and run all of the WASM and DLL files, which can be extremely heavy on file size (The download size will be small if you use gzip or brotli compression, but it will be larger in the cache once it's uncompressed).

This new model combines those two into one, but also adds plain old server-side rendering (SSR). Now I can pick and choose how a specific component is rendered on the page and the logic is performed. It's so cool that I can combine SSR, WebAssembly, and a SignalR connection in one single project.

DiegoCrespo, to CSharp
@DiegoCrespo@mastodon.social avatar

I'm astonished that dotnet does not have a commandline parsing library in it's standard library yet

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@DiegoCrespo True, but there are several good ones out there:

joaofbantunes, to CSharp
@joaofbantunes@mastodon.social avatar

New one up on the blog ✏️
'"Parse, don't validate" and other type safety driven shenanigans (plus a C# wishlist)'

In this one, I'm messing about, trying (and likely failing) to come up with ways to make more use of the type system with

I'm probably in the minority of folks wishing for features related to type safety in , but one can dream 😅

https://blog.codingmilitia.com/2023/08/17/parse-dont-validate-and-other-type-safety-driven-shenanigans-plus-a-csharp-wishlist/

khalidabuhakmeh,
@khalidabuhakmeh@mastodon.social avatar

@joaofbantunes Cool post.

I’ve learned that there’s the code I want to write with , and then the code makes me write. 😅

The language and the runtime aren't always on the same page.

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

This a unit test suite for a DateTime Converter, but do you notice what’s missing?

flq,
@flq@freiburg.social avatar

@khalidabuhakmeh always thought idiomatic would be „boolean Try…(input, out value)“

alfredbaudisch, to windows
@alfredbaudisch@mastodon.gamedev.place avatar

bflat: Small, self-contained C# executables https://github.com/bflattened/bflat

"bflat is a native compiler for C# that comes with everything you need to build C# apps for any of the supported platforms. No additional SDKs or NDKs needed"

With it, it's even possible to build C# applications to 3.1 (!?)

Author: Michal Strehovský - "I work remotely at the .NET Runtime team at Microsoft."

alfredbaudisch,
@alfredbaudisch@mastodon.gamedev.place avatar
voltagex, to vscode
@voltagex@aus.social avatar

What are people using instead of ? While the remote editing is good, I've just had a not-great experience with the devkit that is enough for me to want to look at alternatives (and alternatives to C# as I no longer use it for work...)

bitbonk,
@bitbonk@mastodon.social avatar

@voltagex I am using (for )

khalidabuhakmeh, to CSharp
@khalidabuhakmeh@mastodon.social avatar

This sounds outlandish, but it would be neat in if you could “name” Func variables and return values.

This would give tooling and developers an idea of what to expect when constructing a lambda.

SmartmanApps,
@SmartmanApps@dotnet.social avatar

@khalidabuhakmeh
Sorry. I just gotta say how weird it is seeing , when my eyes are expecting c#. I mean sure, csharp or c#, but is screwing around with my brain 😂

hazelnoot, to random

Came up with a solution for a complex software design problem, but idk if its genius or just fully insane ​:neofox_think_woozy:​

hazelnoot,

The short version is that I've modeled the ActivityStreams types using a hybrid between inheritance and the decorator pattern. It abuses the everloving fuck out of virtual properties and probably kills performance, but it supports multiple inheritance and extensions while remaining 100% type-safe.

I did this in C#, a language that doesn't support any of those features natively. The proof-of-concept works, but committing to this fully requires a huge refactor that will permanently shape the public API of this project. Is this a bad idea? Am I dumb for trying this?

xunit, to random

We are in the process of switching from MyGet to feedz.io for our CI packages. We'll send an update when this work has completed.

xunit,

The move to feedz.io is complete. Note that only new package builds will go here; if you're currently using the MyGet feed for prerelease packages, please ONLY update to feedz.io when you're ready to take newer dependencies.

New package list: https://feedz.io/org/xunit/repository/xunit/search
New feed URL: https://f.feedz.io/xunit/xunit/nuget/index.json
Updated packages docs: https://xunit.net/docs/nuget-packages
Updated v3 alpha docs: https://xunit.net/docs/v3-alpha

khalidabuhakmeh, to CSharp
@khalidabuhakmeh@mastodon.social avatar

The latest version (2023.3 EAP 1) of will show you the return values of each step in a fluent call chain.

You can learn to love fluent API calls all over again.

khalidabuhakmeh, to dotnet
@khalidabuhakmeh@mastodon.social avatar

If you’re just getting into and deconstruction of types, you can let generate a stub for you based on the code you’ve written. That’s pretty cool! 😎

That should save you a lot of time. ⏳

JetBrains Rider generating deconstruct method.

ms_michel, to Blog French
@ms_michel@pouet.chapril.org avatar

Comment générer un dynamiquement en C# quand qu'il n'existe pas d'image statique correspondante

https://blog.pagesd.info/2023/08/14/generer-avatar-csharp/

beeoproblem, to CSharp
@beeoproblem@mastodon.gamedev.place avatar

Today in "why the hell wasn't this crashing sooner"

Ran into this lovely little pair of lines at work yesterday.
var thing = couldBeNull ?? isNotNull;
couldBeNull.DoSomething();

Turns out the thing being checked for null could actually be null. Doing a null check then not bothering with the result causes NullReferenceException. Who knew? 🤷

moffintosh, (edited ) to random Italian
@moffintosh@berserker.town avatar

Adding levels to my custom game engine (C#/MonoGame)
https://youtu.be/mh_eG-VMeis

ms_michel, to Blog French
@ms_michel@pouet.chapril.org avatar

Comment gérer des clés étrangères avec SQLite et activer les contraintes liées pour assurer réellement l'intégrité référentielle

https://blog.pagesd.info/2023/08/16/sqlite-cles-etrangeres/

peterdrake, to unity
@peterdrake@qoto.org avatar

Working on the Prospector Solitaire tutorial from Bond. CRIKEY that was a lot of boilerplate code to implement a deck of cards! 30 pages of the book and I haven't even shuffled them yet.

cincura_net, to CSharp
@cincura_net@mas.to avatar

Blogged: WUG: Na co mám/můžu použít Roslyn (Olomouc)

https://www.tabsoverspaces.com/id/233926

FrankKruse, to CSharp

Could novice programmers write clean code from the start?

Clean code is not just for professional developers. Especially beginners quickly lose track of their code. Clean code would help against that. I think we can explain clean code principles to absolute programming beginners, for example the DRY principle:

https://frank.woopec.net/2023/08/13/hexafour-05-variables-loops-dry.html

@edutooters

Crell, to Kotlin
@Crell@phpc.social avatar

documentation > documentation.

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