HOPE for the Web

hope-1

The above diagram is a high level view of what I’ve implemented with .NET Core 2.0 and Docker.  The idea is to take the work I’ve done with semantic types and allow users to create public or private repos of semantic types and microservices that operate on those types whenever they are “published” in the user’s environment.

With .NET Core 2.0, all the core pieces that I need (reflection, NewtonsoftJson, HttpListener, to name a few) are all fully usable with C# 7.  And while I’ll eventually return to supporting Python, it is a pleasure work with this concept in a strongly-typed language, as that’s a really key component to semantic processing (yes, of course it can be done in a dynamically-typed language with Python as well, as I’ve demonstrated in previous posts and an article.)

And the beauty of doing this with .NET Core is that it can run in a Linux container, which is so much faster than using Docker for Windows!

I’ll be posting more about the implementation details and writing some articles on Code Project on the subject.

Advertisements

Kademlia Peer-to-Peer Distributed Hash Table Implementation in C#

kademlia

Over the last several months I’ve been working on implementing the Kademlia P2P DHT in C#, as per the specification here.  This is a very complete implementation with a couple demos.  SyncFusion will be publishing an e-book that I wrote documenting the implementation, hopefully it’ll be out in December.

The source code is on GitHub here.  I’ll soon be updating the GitHub readme page with examples of setting up the DHT.

How to Conduct Code Reviews

codereviews

A good post to start with is here: https://css-tricks.com/code-review-etiquette/

I thought I’d share my own “wisdom” on the subject, regarding what I do:

1) I conduct the code review to cover the good, the bad, and the ugly.
2) I ask myself the question “if I had to maintain this code, what would I want to know?”
3) I ask others to speak up if they see anything in my algorithms or structure that I’m doing wrong.
4) I often present alternate implementations with pros and cons (for example, using metadata and reflection vs. imperative code, using LINQ vs. “old style” coding.)
5) And most importantly, I don’t lead code reviews of other people’s code, I ask them to lead a code review of their own code.

The result is a learning experience for everyone (including me) and particularly the discovery of algorithm deficiencies or where comments would really be helpful.

My View of WPF

To tell the truth I’ve never worked with a larger pile of crap than WPF. It is a complicated, HTML duplicating, half baked, non updating, patterns over killing … anomaly … that provides zero productivity boost over WinForms and I’m still seeking for a cult that actually divides programming between a C# writing programmer and a XAML writing graphical designer. That’ll be the day.

They should’ve detached WinForms from underlying Windows and extended it instead. WinForms is a result of three decades of event driven GUI development. Bloody Bill’s Che Guevaras threw it away for a poor experiment in complicating what has already been simplified in the 90ties. — Tomaž Štih

I couldn’t have said it better!

The First Nail in the Crypt of CryptoCurrency

nailInCoffin

Sorry, couldn’t help myself with that bad pun.  The National Conference of Commissioners on Uniform State Laws, or Uniform Law Commission (ULC, visit their website) which “provides states with non-partisan, well conceived, and well drafted legislation that brings clarity and stability to critical areas of state statutory law” has a committee on the “Regulation of Virtual Currency Businesses Act.”  On July 19, 2017, it released the “approved text” of a draft “approved and recommended for enactment in all the states,” the PDF which you can read here.

This recommends some very specific regulations with regards to cryptocurrencies, or “virtual currencies.”  Here’s a couple of the more interesting recommendations:

SECTION 201. LICENSE. A person may not engage in virtual currency business
activity, or hold itself out as being able to engage in virtual currency business activity, with a resident unless the person is:
(1) licensed under this [act];
(2) licensed to conduct virtual currency business activity by a state with which this state
has a reciprocity agreement;
(3) a registrant operating in compliance with Section 210; or
(4) exempt from this [act] under Section 103.

And with regards to what “virtual currency” means:

“Virtual currency” means
(A) a digital representation of value that:
(1) is used as a medium of exchange, unit of account, or store of value; and
(2) is not legal tender, whether or not denominated in legal tender; and
(B) does not include:
(1) a transaction in which a merchant grants value as part of an affinity or
rewards program, which value cannot be taken from or exchanged with the merchant for legal tender, bank credit, or virtual currency; or
(2) a digital representation of value issued by or on behalf of the publisher
and used within an online game, game platform, or family of games sold by the same publisher or offered on the same game platform.

This is the beginning of the process of controlling cryptocurrency, both in terms of license and regulation as well as constraining the exchange of cryptocurrency to essentially “play money.”

Regardless of the many voices decrying this recommendation, and regardless of China’s recent move to ban Initial Coin Offerings (ICO’s), we will most likely see laws put into place making it illegal, and therefore punishable by prison and fines (and not payable in virtual coins!) for anyone that attempts to create a cryptocurrency as a means of exchange of value, except for reward programs and games.

So if you’re one of those futurist people that thinks they can build a better, more equitable world by creating a community based on untaxed, unregulated exchange of goods and services (think organic food growers, alternative schools, natural building materials, and magical thinking healers) with your own virtual currency, think again.

RIP, Cryptocurrency!