Category Archives: Projects

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

Thinking about home projects as we head into fall…

Long laundry list of home coding projects that have been on hold as work has been very busy for three years or so. Trying to list them and then get things rolling…

Probably more here as I think about things. One reason for this item is to provide a spot to accumulate the items on the docket. Probably going low tech as well with some cork-board and index card setup at home.

I’ve had lots of things on the list for a long time but getting them moved consistently forward while work intrudes on a regular basis has been challenging.

  • MongoDb work in C++.
    Done plenty of MongoDb work at home in C# but some things are better done in C++. Built the drivers with some messing about yesterday afternoon. Now time to try to do some stuff with those drivers.
  • MySQL refresher.
    I’ve done lots with MySQL (MariaDB these days) in the past. I’m looking at some networked stuff where PHP/MySQL would be the most appropriate persistent store option. Headed that way I need to do some refresher work.
  • Learn some Powershell programming
    On windows old school batch files are incredibly hard to use when building robust processes. Jenkins and other such want interactive scripts to drive activities and powershell seems to provide a .NET compatible scripting engine that would make things much cleaner.
  • C# Refresher
    I do a lot of coding in C# but mostly stick to the simpler parts of the language. Time to come up to date with version 10 and some of the more powerful features.
  • C++ 17 and 20 Refresher
    C++ has been my coding environment for a long time but the last few years I’ve been sticking to C++11 or earlier as the systems my work has been targeting are older and use older compilers. There is quite a bit of interesting looking stuff in C++20 and I want to come up to speed on that.
  • PHP programming
    My web hosting is PHP based and so anything I want to do that uses this hosting as a central point of contact will require PHP coding and back end into SQL. I have done a little PHP work but there’s lots to do on that front.
  • Javascript and WebUI coding…ThreeJS, Angular, React
    I’ve done a bit of Angular some time ago but now I’m looking at that or react as possible frameworks. Adding in a bit of ThreeJS and I’m hoping I can build some interesting things that run in the browser but have interesting display rendering. Again, lots to learn here.
  • Unity on a flat screen
    I’ve done a bit of unity coding for VR and found it to be a very nice environment for building 3D code. I have several reasons for wanting to put together some 3D games on 2D screens and that is a bit different and the focus in in a different place. I’m thinking of starting off with a simple space invaders clone in 3D mode and move on from there.
  • Unity in VR. Quest 2 and Vive
    I’ve done a bit of Unity VR coding several years ago using the Vive headset in my basement. I bought a quest 2 a while ago and want to get some coding running on that as well as the Vive. I am very interested in what VR can do for UI capability and ease of use as compared to flat screens and so this is on my list.
  • More file indexing work using C#, C++ and MongoDb
    I’ve been indexing my backups and archives to MongoDb using a C# based tool. This tool also handles duplicate removal in simple ways. I could use more tools on this front but the C# code ends up with some very, very messy PInvoke stuff to get to the Win32 API calls that aren’t available and getting MongoDb working with visual studio 2022 C++ will give me some interesting options.
  • Unity based space invaders on a flat screen
    As mentioned above. Simple exercise in doing some flat screen based unity work.
  • Space conquest game using PHP hub and VR UI
    This is the game I was looking at some time back but probably adapted a bit. Making it work in VR and flat screen would be interesting and making the back end to PHP/MySQL happen become important.
  • VR render of classic D&D random dungeon layout
    I’d love to be able to generate a classic D&D random dungeon layout and then see what it looks like from a VR headset perspective. Might go somewhere further but mostly just a toy idea.
  • Win32 ACL/ACE and ownership issues
    I keep running into archives where rsync has messed up the NTFS file ownership and the paths are very long too. Breaks takeown and icacls at times and I want more control over that so I’m looking at writing some C++/Win32 code to walk very long file name paths and then manipulate file ACEs and ownership along the way. Running as admin the process token should be able to enable rights that will make it possible to do what needs doing.
  • Win32 UI to display pdf files on screen and manage indexing
    It should be possible to launch a pdf viewer and manipulate the position of the resulting window(s) on screen and then record information in MongoDb based on user input. Needs some experimentation with windows C API functions and process management. Adds in registry stuff as CreateProcess is a better choice than ShellExec for this so the code needs to dig out the appropriate application and run it. Add in some screen probing as I run multiple monitors and would like to place the viewer app on one monitor while running the control UI on another and this gets interesting.
  • Python refresher/step up
    I’ve long used perl as my preferred quick script language across platforms. Python seems like the better choice these days so, while I use it now and again I could use some time to make my python better for those things that need a quick script.
  • Kotlin/Android coding
    It would be very nice to be able to put together code that runs on my phone (or those of family members). Kotlin seems nicer in many ways than Java (which I know pretty well but don’t particularly love) and getting some simple things working on Android would be nice.
  • Test target system setups for PHP/MySQL on Linux and Windows
    I’ve used XAMPP on windows in the past to host test code in PHP and local wordpress instances for various purposes. I need to get back to that and set up a test target that I can run debugging on (Jetbrains tools should enable this) and then transfer that code to my web hosting for public facing use.
  • RESTful interfaces to PHP code
  • PHP Debugging. Set up and get familiar with.
  • Javascript/Typescript debugging. Set up and improve familiarity.
  • Python to MongoDB work
  • Python, C# and C++ interface to MySQL/MariaDB
  • Programmatic interface to my GoDaddy EMail account
    GoDaddy changed things from IMAP to Outlook and I need to get back to figuring out how to replace the code I had previously to manage my email account that expected IMAP with something similar that works with whatever network interface outlook provides.
  • More? Probably more to be added here before I’m done…

Wednesday, September 9, 2020

Interesting times. Hitting a bunch of topics that are more than a little divergent but interesting.

Networking Security

Work keeps me deeply involved on this front. Down in the TLS RFCs, certificate stuff, algorithm and cipher suite options and some lower level work. This may sync well with some home project work as well at some point..later once I’ve gotten some other things back rolling.

WPF

I’m digging deeper into WPF coding for some of the simpler home-front tools. I’ve done a decent amount of JavaFX coding and MFC work but java doesn’t give me access to the low level APIs these tools need and MFC is old, crusty and much harder to work with.

WPF is a bit of an odd critter but seems to fit my needs decently. I’m still working through many of its oddities and figuring out what works well with its design but I’m optimistic that it will remain a good tool for prototyping on windows and for small home tools development.

Unity

Last year I did a good bit of Unity VR programming with a couple of friends.

The year since has been busy as I changed jobs and took on a very challenging set of problems at my new work (cybersecurity, networking security design and fitting it all into an existing architecture that goes back quite a way). I’m hoping that with the fall I will be able to put some more effort into home projects in off hours. Till now I’ve been working during work hours and digging into technology and background issues in off hours.

I’ve got the VR system downstairs back together and calibrated to the room. I’m still eyeing headset upgrades but don’t feel that I’m at the point where I want to throw the money at the systems that are out there.

I need to get back into the basic details needed to build out a VR Unity app. I know I have notes on this blog that will get me there. Once I have that together I’ll move forward with some ‘stretching exercises’ in VR.

I’m also realizing that both the VR environment and the flat screen environment Unity could be a nice environment for some amount of tooling so I’ll probably try to see if PInvoke and similar are supported. Being able to pull information out of a system and then render it and manipulate it in a Unity managed space seems potentially very interesting. With a bit of TLS and networking support and this might get even more interesting. Things to think about.

Rest of it…

I will almost certainly bite off more than I can chew on the home front. Hoping that some interesting bits will make it to a level where they’re useful. I’ll keep blogging here (and on my personal blog and pandamallet for more detailed game stuff). Hoping to reconnect with the friends I was working with a year ago and that a covid vaccine lets us all get back closer to normal life in 2021.

And a Look Back at WPF

Hmm…WPF VIewport3D or Unity 3D rendering. Being able to build a simple-ish windows program rather than something that requires a VR headset does have a sort of charm. Hit testing mouse clicks into the 3D view could be interesting. Choices, choices.

I expect to bump around here a bit.

I really like having the GPU handle display list rendering for me and then being able to change the world while the hardware handles keeping the user’s view consistent.

Seems like it may be worth playing with Unity VR, Unity on a monitor, WPF 3D viewports and perhaps even MFC hosting OpenGL or DIrect3D (Vulkan?). If I can make this stuff work it should prove helpful in many places. Making it work in a more general purpose environment (mostly meaning not Unity) seems alluring as it permits tools to be built with full access to native APIs and facilities.

I think this gives me a direction to head off in that is interesting. I’ll probably still start with a Unity VR implementation as that gives the most ‘bang for the buck’ and should be fun to play with.

THinking that VR Solves Everything :)

After a bit of thought and some time looking at WPF canvas and related items I realized that the same VR environment I planned to use for the random dungeon generator (toy program to play with Unity some more) would make a good environment for putting together an interactive room layout editor.

I was going to try to put together a room drawing tool in WPF. I would prefer to build something like that with interactive drawing as the user moves the mouse. Looking at WPF drawing primitives it seems as if that would get ugly quickly as I really want something closer to a rendering environment. Each frame should be redrawn with updates from any user input reflected.

The 2D APIs seem much more oriented towards static drawings. Update on clicks rather than the 3D style display lists where the image on the screen gets updated continuously. Given the hardware available on even low powered modern computers there is no good reason not to provide this sort of constant, interactive feedback (the equivalent of WSYWG for office tools 30 years ago.

Unity VR provides all of the tools to make this sort of thing happen and should actually provide a very pleasant UI experience along the way. I think I’ll try putting together a map drawing tool as an interesting exercise soon. It may or may not be the final approach but it seems worth trying.

Playing with WPF Canvas

I need to put together some 2D-ish editing tools for some home project work I’m doing.

I’m still working my way through WPF panels and controls so that seems like a good place to go with this.

Tonight I’m probably just going to try to get some basic mouse controlled drawing going in this thing. A throw-away toy program with some limited functionality to get familiar with the functions here.

In the end I may very well look at using 3D functions (and perhaps not WPF) to make this happen. Being able to do full renders would allow for some nice effects but if the 2D WPF functions are click enough I may make do.

Cybersecurity and Cryptography

I’ve been getting more deeply involved in the cybersecurity and cryptography end of things in the last few weeks.

Did some serious work looking into current best practices for password management. Found that the bcrypt algorithm I had been familiar with has been long ago superseded (no surprise there) and that there is a hash iteration algorithm that can be used to bump up the work involved in computing an off the shelf HMAC to levels where it is suited for use as a password hash (PBKDF2 and here).

I’ve been looking at TLS and related technologies. In the past I’ve tended to treat them as black box components. I’m digging a bit deeper on a few fronts now.

I knew that elliptic curve algorithms were available in the TLS cypher suite but had not realized that they were in active use. Last time I looked at elliptic curve algorithms the community was viewing them with suspicion after the Dual_ED_DRBG fiasco. I think that the reduced computational complexity when processing them may have also lent an air of insecurity to them. At this point it sounds as if they’ve passed muster and are in serious use. I picked up a book (Modern Cryptography and Elliptic Curves, A Beginner’s Guide) to get a better handle on the underlying mathematics and will be taking a closer look on a broader scale.

I’m setting up my raspberry pi controllers (at least a few of them) as TLS/DTLS test endpoints. I’ve loaded and built OpenSSL on them over the weekend and will be coding up some samples to play with in the evenings this week. I’ve got machines ranging from pi-2 to pi-4 so they should provide a nice range of performance for testing.

TLS on TCP

I expect to initially put together some simple TLS over TCP code to make sure I’ve got everything working properly and that my certs are set up correctly.

DTLS on UDP

Once I’ve got TLS working I’ll likely try to transition to point-to-point DTLS as that is also a standardized protocol and a good stepping stone to the proposed multicast adaptation.

Multicast on UDP

I haven’t worked with multicast datagram traffic much (pretty much never) so I’ll likely move on to simple, un-encrypted multicast traffic from there. If I can get some of the machines to join a multicast group and ping traffic off of them, I’ll count that as a win.

Multicast over DTLS on UDP

The final step of this exercise will involve taking the multicast sample and the DTLS sample and attempting to implement the proposed approach to providing multicast support to DTLS. This isn’t a standards track proposal, but seems like the closest thing we’ve got to secure multicast traffic support.

Hoping this comes together. It seems like an interesting exercise. If I can get this work done entirely off hours, I’ll share the resulting code on my github account

Building Out Cluster Web Parts

Schema fun

I’ve been through the basic pieces (many, small and fiddly) of the SQL schema for this game a couple of times now. Each time I get a certain distance down the road and run out of steam putting together the various details needed.

First web bits

I’m going to start in on the process of laying down the game logic and support structure at this point. Initially I’m not planning to lay in any significant security. I’ll likely skip password storage and focus on the first two big steps in getting a game setup.

  • Login and signup screen
    This gets me user creation and walks me through session management for players in the game.
  • Game creation screen
    I expect a logged in user to create a game and then perhaps invite other players (up to three more) into the game. Initially, I’ll probably make the invitation process very simple…you invite the others to the game at game creation time and when you login you see your active games and open invitations (where you can accept or decline).
  • Game administration screen
    Ideally useful to help with debugging of things. Getting a look at digested versions of the game tables in a helpful format should make it easier to see what is going on and when things are messing up.

Steps to follow

Once these pieces are in place (and perhaps backed by some RESTful API bits) I’ll want to set up the VR viewer to access the stored star information for a selected game.

I expect that user permission information will be pre-stored on a given computer/account separately and the VR lobby will simply provide a list of games to the user to select from.

Once a game has been selected, the full game VR will be displayed and the player may begin setting up a new turn (if the previous turn has completed).

A Weekend of Database and CertificateS

Spent some time over the weekend doing some more work on the MySQL database layout for the cluster game and working on getting self-signed certificates prepared for my various development machines.

PHP and MySQL

The database work went smoothly. Still largely on the whiteboard at the moment. I’ve also been going through a PHP re-familiarization as I’ll need to code this stuff in PHP for my hosting and I haven’t worked in that environment in some time. I did grab an evaluation license for PHPStorm a few weeks back, but I fear that was premature as I haven’t reached the point where I need such tools on this sandbox project yet.

Certificates

I finally took the time to create SSH certificates to permit direct logins to my linux machines from my windows systems. That part I’ve done many times before and it went flawlessly.

I created and installed self-signed certificates for various local systems and set up TLS on their Apache servers. The creation and installation went smoothly, but the end-result was not what I was hoping for.

After installing the certificates in several different ways on the systems/browsers involved, I still did not see the secure icon in the address bar. I’m not sure whether this is caused by the certificates being self-signed (shouldn’t be as I installed the keys directly from files into the trust stores) of something else I’m not doing properly. I’ll need to keep looking at that one.

I do want to verify that the connections are using TLS. If they’re encrypted but not ‘safe’ because they’re not signed by a major cert vendor then I’m probably ok with that. If the TLS handshake failed because they don’t have the right certs then there’s a bigger problem.

Sunday evening I started down the road to building a local CA to sign all of my certificates with. I’m wondering if setting this up and loading its public key as a trusted root may give better results. The process is a bit more involved but may be worth it if it gets closer to the results I’d get with a commercial certificate.

I still haven’t found a way to load a FreeTLS certificate on my GoDaddy hosting. One of these days I’ll spend the time to get on the phone with their support folks and see if this can be worked out.

I may try setting up a FreeTLS cert on my dynamic DNS connection that targets a port on my home firewall. That would provide more flexibility, but be less robust and scalable.

Samba SMB Shares

Toward the end of the evening I ran through samba installs on several systems. I had been pushing files around between my windows and Linux machines all weekend and wanted to make things closer to seamless.

I had no real luck on that front. I could get things to the point where windows recognized share names from the Linux machines. I could never get things to the point where my windows systems could connect to a share and see files inside. Not sure what I’m missing and the samba logs were not at all helpful.

I’ll probably re-visit this again sometime soon, but for now the convenience of having it working isn’t worth the effort involved in finding out why it isn’t.

Getting Back to PHP Work for Cluster

Since vacation I’ve been pretty busy working on photo post processing and around the yard.

At this point I’m going to be trying to get back to building a back-end for the unity based cluster game that runs in PHP on my web hosting (initial work on local sandbox PHP instances of course).

I think I’m going to try using Visual Studio Code with PHP Extensions to get this started. I’ve done a little PHP coding in the past, but this looks likely to be far more involved than any of that.

I’d like to get a TLS cert on my site before going live with this, but it appears that my hosting may not support free TLS or similar cert installs and I’m not happy adding the annual renewal cost for a cert to my site at this point so stay tuned. I’ll probably try hitting GoDaddy support some evening soon to see what they can tell me.

First steps will be getting a simple RESTful interface defined and then laying out some simple SQL schema to provide the back-end. If I can get that working, I’ll look at extensions necessary to provide the full back-end to the game as a whole. Not looking for commercial quality here, just something sufficient to allow multi-player turn based gaming.

CLuster Game Web Back Ends

Just reinstalled clean and up to date copies of XAMPP, MariaDB and MongoDB on one of my home machines. 

I need to write some RESTful PHP code that can run on my web hosting as the back-end for a VR game I’m playing with. This gives me a platform for building that code in a safe place.

I do need to stick to PHP 5.x features as my GoDaddy shared hosting does not support PHP 7.

I’ve got to get the basics stitched together, add an appropriate .htaccess to keep passwords out of inappropriate hands and then start working out a SQL schema that works for the persistent game data I need to store.

Spending a big chunk of this long weekend post processing pictures from our recent vacation (see them on the blog side of ninecrows if you’re interested). Watched the whole last season of Game of Thrones and saw Aladdin. Lots to still get done, but progress is progress 🙂