Category Archives: Projects

Personal projects that I am either working on or thinking of working on.

Flying home from California

Heading for home after a few days in California for my daughter’s wedding. Going to try to keep up with the C# sandbox projects and fit in a bit of playing with Kotlin and the intellij idea IDE.  I’m thinking that Kotlin looks like a less constrained Java and there is so much JVM code out there that it could be an interesting option in my kit of tools.

Also looking as if I should get my PHP back in shape as this hosting runs PHP and I’d like to do a little single page application game work. As that will need a back end I will need some restful PHP code for persistence and some rules engine logic.

A C# implementation of ‘which’

The ‘which’ tool from unix had long been a small but useful part of my command line toolbox. For years now I’ve used the cygwin implementation when I needed to find out where the executable I was running lived.

The cygwin implementation isn’t ideal for use on windows as cygwin has its own approach to drive letters and simulates a unix style environment.

I’ve been working with C# quite a bit lately (and rather enjoying working with the language) and decided to put together some tools in C# that would streamline things.

I had a few hours between things over the last few days and put together the initial form of a more windows-y which written in C#. The current, partial version is on my github as C9Which.

I expect this to acquire more commmand line switches to control its behavior and a bit more polish in terms of what it looks for.

Currently it takes the full name of the file and returns all hits on the path in order with the first item being the one that would run if you typed the name on the command line. It also gripes about folders that are present in the path that don’t correspond to actual folders in the filesystem.

I expect to keep these features but likely hide them behind command line switches. I’m looking at command line switch processing library code out there and there seems to be a somewhat standard library shared by Microsoft called CommmandLineUtils  that looks promising. I’ll likely try using that one and see where it gets me.

Finished my quick read of ‘Learning JavaScript’

Came across a few items I had not seen before. WeakMap and the Map and Set types in ES6 look useful. I think I had seen the map, reduce and filter methods on array but had not really considered their usefulness.

There were probably a bunch of other minor items that I picked up along the way. All in all, worth the small investment of time. I learned a few things and can feel more comfortable that there aren’t core concepts that I’ve missed by jumping into the middle up front.

One day soon I’ll likely read through the ES6 standard document. Ultimately that is the only way to hit all of the high points (missing details of products specific quirks, but then that is what the other books can do).

What I really need to do now is put together a small node based sandbox project with a web UI on the front end…

Struggles with Ubuntu

I have Ubuntu 17.04 installed on one of my NUC machines as a place to run Linux code. I haven’t used it in a while and now I’m finding that it fails to connect with its apt-get repositories and cannot update to 17.10. I’ve done enough google digging and come up with nothing convincing and so I’m on the cusp of blowing everything up and loading it clean.

I think I may just go with the LTS version 16.04.3 as I expect that will have longer useful life and be easier to upgrade to version 18 when it drops. I’m mildly tempted to go to 17.10 and just accept that upgrades to Linux are really clean installs. Not thrilled with that as it means reinstalling everything else each time but I’m finding that I don’t do enough Linux work to maintain the skills to dig deep and fix the routine issues that pop up.

More Functional Programming and some MERN

Functional and Haskell

I’ve been reading through the Haskell book I bought (the C# functional programming book isn’t here yet). So far, Haskell functional programming still looks like a gimmick more than a set of useful tools. I’ll keep reading through to the end and likely play with the language a little before I’m done.

I’m looking forward to the C# functional programming book as I’m hoping it will provide a more practical view of what functional methods bring to the table. Working in a hybrid environment should allow the best of both worlds to shine and allow any awkward spots on one side of the other to be worked around.

MERN and Bootstrap and Things…

I’ve also been rummaging through a book on using node with react rather than angular 2/4. Seems like an interesting option as react sounds less proscriptive than angular. As with angular 2 the react tool still needs a CSS library and also similarly this book suggests bootstrap.

I need to sit down and code up a simple sample program that self-hosts a web server (probably OWIN based) and presents a web UI and perhaps a handful of RESTful web methods as a trial. Not sure whether I’ll go with react or angular 2 for this. Stay tuned…

Oh…also picked up ‘Learning Bootstrap 4, Second Edition‘ to read a bit more about bootstrap along the way. The Amazon web UI framework was bootstrap derived I believe so I expect this to  be somewhat familiar…

I am looking at self-hosting partly because node doesn’t play as nicely with windows as it does with linux and I’m mostly windows based. It is also rather nice to have a one-stop simple web UI hosting option that can get access to native code as needed. The NSSM package seems as if it provides a reasonable way to host something like node as a boot time startup service…I’ll probably play with that at some point.

Interesting…there is a package manager for windows called ‘Chocolatey‘ that seems to be an option for deploying NSSM… 

Continuing to read about functional programming

Functional programming techniques are becoming more mainstream (and more generally useful) and I’ve been doing some reading to come up to speed.

I’ve just ordered a book on Haskell. Haskell seems to be the functional programming equivalent to SmallTalk for object oriented design…a pure functional language.

 

I’ve also ordered a book on functional programming in C#. While C# isn’t a purely functional language, I am far more likely to build things in C#. I’m expecting the combination of these two books to give me a decent combination of theory and useful practice.

Javascript is really where I first began running into functional approaches. I’m still working on getting my javascript up to where I’d like it to be. The javascript world is currently pretty hard to keep up with as things continue changing at a frantic rate. I’m expecting to spend a weekend soon adding a self hosted web UI to one of my ongoing sandbox projects…probably something Angular 2 with a C# back end, but we’ll see…

Continue reading Continuing to read about functional programming

Hmm…and Kestrel in .NET Core

Ok..and Kestrel seems to be the .NET Core alternative to the OWIN stuff under .NET classic.

Yet another option…in my case the OWIN side is likely more interesting as I’m almost certainly going to be doing things that need interop or similar windows-centric functionality. Interesting as a Linux facing option though. May also be lower overhead in cases where a particular micro-service doesn’t need access to native capabilities.

I am also expecting to need some sort of SSL certificate to enable TLS on these links (don’t need the full commercial cert probably as these are likely going to be expose by IP address and not on the open web). I need to understand what is needed to deploy TLS, ideally with cert verification on both ends using certs I’ve created myself and that don’t correspond to a particular URL.

In this case I’m looking to ensure no MITM attacks and to encrypt the traffic but not to ensure much more than that. I don’t want further authentication to leak and I want to protect the connection (for example for a web UI on a small ‘appliance’ that may at times be exposed to an open internet connection).

Mostly saving these to read/watch in more detail later. Options on top of options here…

C#: Self Hosting Web UI or WPF?

I continue to bounce back and forth between self-hosted web UI and WPF UI for implementing simple user interactions.

WPF is likely to be easier to build the right sort of thing with but is a bit less flexible and more ‘backward looking’. Web interfaces require a self-hosting solution if they’re going to be stand-alone and cross more lines of language and environment.

On balance the web UI path is better as a learning experience and aside from a few corner-cases (OpenGL say) likely to  result in a better user experience in the long run.

I’m still looking for the right self-hosting solution and UI framework solution. I’m going to have to settle on one shortly so that I can being experimenting in the ninecrows sandbox and getting a feel for the technology.

Current links of interest on the self-hosting front:

There also seem to be some hard choices between versions of the framework…classic and core in particular.

More to learn as things move forward. I expect I’ll wind up doing things with both/all before I’m done as they have different strengths. The sorts of things a WPF/WinForms/MFC UI can do in terms of digging into the system and being screen real-estate aware along make them of great interest.