Category Archives: C#

It’s Pronounced “See-Wee”

At least, that’s how Wayne Chang explained it. Since he’s one of the cofounders, I trust him. 🙂

In any case, the first iteration of siwe-nethereum is now done, using the first iteration of the official Nethereum SIWE implementation! It’s nothing fancy, but it does work. Since last time, there’s been more parties expressing their interest in SIWE, including Auth0 and Time Magazine. And in the future, there might be possible integrations with other chains/platforms (like Ceramic), making the future of DIDs and decentralized logins to be very exciting. Maybe its time has officially come!

And now I have to read more about CACAOs, whatever those are…

I Throw My Dunce Cap into the Ring

So, after gushing over the SIWE project in my last post, the Spruce ID team finally created their first reference implementation on Github. And after a couple tweeks (since Mozilla seems to be a little troublesome), it worked! Hurray!

And other people are beginning to discover the project and get involved, especially within the channels of Discord. Talk about something like standardizing UI controls for login (much like Apple does) gets me excited at all the potential. The more basic and fundamental the discussion, the more it all seems like it could be real someday soon. 🙂

So, with much hubris, I thought that I could somehow contribute to this whole movement, by attempting to port their reference implementation to C#. And so siwe-nethereum was born! I had to steal some code from the Nethereum project to get it started, and I’ve probably made a mess of it…

Hopefully, Juan Blanco will forgive me. It was done with the best of intentions, and I hope that it doesn’t ruin our friendship. 🙂

ONIX-Data Can Now Go on a Date

For all 12 of us out there, the ONIX-Data project is a useful set of .NET classes to parse the ONIX XML format for books’ data (along with other media)…but it’s just never appeared the part. It had food in its hair, shabby clothes, and…well…let’s be honest: it smelled a little sour. It got the job done, but it wasn’t much to look at.

But with a great deal of help from StanisÅ‚aw SzoÅ‚kowski, now ONIX-Data looks like the real deal! It’s got unit tests, benchmarking, continuous integration, shiny badges…everything that would have been there if I wasn’t so damn lazy! But now, you can take ONIX-Data out to dinner, and nobody would look at you in horror.

Check out the new solution, along with the new .NET Standard version of the library at Nuget!

Hall of the Newbs: Lesson 001

While reviewing some legacy C# code from a long-gone colleague, I noticed that the constructor of a class was instantiating a disposable member object, and in the Disposable() method of the class, that object was being closed/disposed/etc. Which is great…unless, of course, something happens (like a thrown exception) in the constructor of the class, and then you’ve lost any chance of garbage collection for that member object, possibly even locking up a resource for the duration of the program. Why? Because you can’t call Disposable() on an object that was never actually created (i.e., the constructor completed). So, it’s good to be mindful of what happens in the constructor.

Not that I’ve ever done something like that.

No. Definitely not. Nope.

Stop laughing.

The Way Forward

So, if you’re involved in the Ethereum world at all, you’ve noticed the high gas prices, a bummer for Ethereum’s user community. Which is why Optimism might be the very thing that we all need to get out of this mess.

Not so familiar with Optimism or don’t really understand it at all? Me neither, so welcome aboard! (Based on what happened when I tried to understand Karl’s lecture on Plasma in Osaka, I know that my brain is scheduled for a beating as I read about Optimism.) But I know someone who does understand it all: Juan Blanco! And if you’ve got some .NET skills and if you’re looking to learn more (along with get your hands a little dirty), check out his Optimism Template in order to test out his libraries and get a feel for the whole thing. That’s exactly what I’m gonna do!