Category Archives: Uncategorized

Monday, Dec 10, 2018

Trying to get back on track with sandbox work at home.

I’m taking another run at the tool for archive management and de-duplication processing that has been on the plate for some time. This tool wants to read files, determine uniqueness of files (based on content) and maintain an index (likely in MongoDB) of files that have been scanned and are expected to exist. I’m writing things in C# mostly. The current user interface approach involves WPF but may also make use of ASP.NET (probably core) at some point. Looking to solve a problem and play with some coding tools on this front.

I’ve got better versions of my interop C++/CLI code to provide access to Win32 volume and file information functions in place and tested. I have not yet pushed these up to github as they’re still just free-standing code without anything to actively run them.

I’m expecting to put in place some more helper code shortly and then build out a simple WPF interface to run things. I also want/need to build a more capable MongoDB back end to hold file scan results as part of the process,

So many languages…

…and tools and environments that matter. Back on C++ for the moment as the APIs I’m looking to use are only available to native Win32 code. I also want to broaden my comfort zone in C++ 2011/2014/2017 a bit more as I’ve been doing far more C#, Java and JavaScript lately than C++.

I expect to finish the current piece of tool code in C++ and then look at wrapping it (or perhaps a C++/CLI equivalent) in a WPF/C# UI tool for managing file duplication/archiving. Depending on how things go I might play with some ASP.NET Core/Angular code on this front too but not sure at the moment. I need to get a better handle on my current sprawl of archival storage without losing anything that matters.

Reading through Effective Java Third Edition and re-reading Effective Modern C++ (with some digressions into The C++ Standard Library Second Edition). 

It does take a bit of reorienting when switching between Java/C#/JavaScript and C++ as C++ is the only language where most things aren’t pointers (references, but effectively the same thing).  Keeping things local and cleanly life-cycle managed is a rather different mind-set than the more free-wheeling approaches that the garbage collected languages encourage.

Looking at CAN bus over lunch

I’ve been looking at low level communications interfaces for microcontrollers for a while. Things like SPI and I2C seem limiting as operating voltage levels vary (at least 3.3v and 5v) and for SPI fan out is clunky/limited.

I’ve had several people whose opinion I respect say good things about CAN. It seems to be predominantly an automotive standard but the interface parts seem to be cheap enough and the interface more than flexible enough to work for general embedded projects. It runs at 5v on the physical layer and the controllers appear to be voltage flexible so that is a big plus.

A quick search turned up some microchip interface components and they have DIP versions so they’d be easy enough to use in a prototype environment.

The MCP2515 (datasheet) appears to be a reasonably priced SPI to CAN controller that would likely work nicely with either an RPi or AV controller (as in an arduino). Mouser has then for $1.88 for singles and $18..50 for ten so pretty reasonably priced.

The MCP2561 (datasheet) seems to be the physical layer companion part, also available in DIP packaging and DigiKey has these for $0.93 each or $19.31 for 25. 

I’ll likely do some more reading tonight. Once I get my workbench in the basement cleared and ready for use, I’ll likely buy a few of each of these and see what I can do with them.

PC/USB to CAN interfaces seem harder to come by. Most of what I saw online are $100.00 and up diagnostic probes. Useful items for development, but very expensive is all you want to do is talk to a device. I did find one break-out board from a side called tindie that seems to offer a $25.00 solution for the basics. Still seems a bit expensive and suggests putting together something ad-hoc with an AVR board and a controller/phy. As an initial, easy to use bootstrapping solution it looks potentially interesting though.

Building g++ 8.2.0

I’m building the latest release of g++ to play with. It probably isn’t necessary as the 7.3.0 version that is currently in stock cygwin (and something close in Ubuntu) covers most of the interesting c++ 2011 and 2014 ground. I expect g++ 8.x.x. to add in more c++ 2017 features.

I’ve been a bit focused on C# and Java of late and I’m planning on knocking the rust off of my c++ over the next few months. Not sure exactly what I’m going to sandbox, but there are plenty of options…

Glad that last week is over…

Well…last week was pretty unpleasant all around. I’m expecting the coming week to shape up better. The craziness is settling down and I’m getting things squared away to get some more sandbox coding done on the home front.

Just got my RPis updated, located g++ 8.x for the RPi. Linux NUC is good to go. Still lots of work to get the basement squared away, but that has needed work for some time and projects will be easier to push forward with the downstairs work-bench easily accessible.

Malcolm has offered plastics to complete the RepRap 3D Printer that I’ve had some of the parts for sitting around for years. The HTC Vive is still waiting for some OpenGL code to do interesting things. Plenty to get to…

RPi updates…G++ 7.x or 8.x

Getting my Linux systems updated to current versions and pulling a C++ 2014/2017 capable g++ in.

May wind up re-imaging some of the RPi boards. Need to dig up the arduino/AVR boards. Moving forwards to get some more interesting embedded sandbox things going.

That looks better…the red RPi wasn’t associating with the non-guest WiFi…apt update going now. Convenient having the no-password guest WiFi SSID…I’d recommend UniFi enterprise APs to anyone with an area too big for a single AP footprint…decent price, good features and relatively easy setup.


Thinking I need a better landing page theme

The landing page theme I’m currently using displays nothing but a large image, the blog name and a (rather skimpy) arrow down to content.

I’m afraid that this is likely less functional than I’d prefer…it would be pretty easy to drop in here and miss the actual contents of the page and thus all of the links to ‘real’ content.

I’m going to take a look at available free themes and see if I can find something that meets my needs better. I’d be willing to pay a one-time fee for a theme that did a great job, but I’m not convinced that I’ll find one readily.

I am likely to start digging into PHP and WordPress theme creation sometime soon to see is I can modify one of the stock themes to get the job done. I’m not certain that I’ll be willing to spend the required level of effort at this time, but it is worth some initial investigation.

Definitely need to cycle back to C++

A few recent conversations have reminded me that while I’ve been focused on bringing my Java, C# and JavaScript up to a high polish, I’ve been doing very little C++.

C++ has been my go-to language for most of my career. I haven’t written any significant amount of C++ code in a couple of years though so now is likely a good time to circle back in the sandbox at home. Not sure what I’ll write, but I’m sure I’ll find something.

Still trying to deal with a bunch of house stuff at the same time so this is likely to be slow going in the near term…

That being said, I’m still inclined to view C#, Java and JavaScript as important parts of the whole picture. Developer productivity in C# and Java is much higher than in C++, even for someone skilled in both languages. JavaScript offers an easy and dynamic environment for tasks that benefit from ease of change and don’t involve huge amounts of code. JavaScript driving a web UI very much seems to be the way things are heading…at least for serious commercial user interfaces…combine ease of development with local/remote transparency and a wealth of tools and things like MFC, WPF and JavaFX have a hard time competing.