Category Archives: Topics

Posts on technical topics. The sub-category provides the specific area of interest.

Pixel-C and Pixel-XL Filesystem Support

I’m finally getting the filesystem support on my Android pixel devices sorted out. I’ve had Samsung tablets and phones previously (until the Note 7 debacle) and they fully support exFAT. Given this is the default for almost everything larger than about 4GB that has been very useful.

When I got my two current Pixel branded devices I thought that my SD card readers were failing. It is not clear that the issue is a lack of exFAT support. Particularly curious as I appear to be able to read NTFS formatted SD cards in read-only mode.

I’m now at s point where things are workable but still rather annoying. Cards that I’ll use with my pixels are either small, crippled and FAT32 formatted (read/write) or NTFS and read-only. Cards I’ll use with my old Samsung tablet are exFAT formatted and won’t work with any of the pixel devices.

I suspect that if I rooted the tablets I could probably find a way to add exFAT filesystem support but I’d rather not make changes at that level. Really wishing that google had paid the extra bit to license exFAT for its flagship devices.

 

One major reason I’m not fond of fork/exec componentizing

In Debian Linux recently the CryptKeeper encryption package fails to properly set passwords due to a bug fix in the command line handling of a package it runs (see this Register article for more details) .

It appears that the code was tested and worked perfectly in previous versions. The tool being used had a minor bug in its command line processing that resulted in the password being accepted even though it was placed improperly. Once the maintainers of this package fixed their big, the string sent by the CryptKeeper package resulted in the letter ‘p’ being taken as the password and the actual password being ignored and it would appear discarded.

It seems to me that Linux could use a universal (or nearly) –API switch that converts the command line and stdin/stdout/stderr to something like JSON with extensive and aggressive checking for validity in all inputs along with tightly specified outputs.

Most programmatic usage of command line tools that I’ve encountered to date makes broad assumptions about the details of the input and output formats for human usable tools. In most cases I’ve seen the checks for unexpected data are weak and porous. This generally results in tools that are fragile and often either need manual tweaking or are simply tied to a specific version of a particular distro. The alternative (less common but I’ve encountered it as well) is to force tools whose primary interaction is with humans on the command line to lock down the original output formats in ways that don’t necessarily work well for people in order to avoid breaking programs and scripts.

I Still Need to fix my Landing Page Redirect.

Mod_rewrite seems to cause me no end of problems so far. I’ve got two URLs pointed at this hosting (one dormant but I’d like to keep it alive). I want apache to redirect my base url to my landing page while preserving access to the other site.

So far I’ve largely managed to either nuke my sister’s wordpress site while successfully redirecting ninecrows or take out everything with a broken rewrite configuration. I thought I had it working at one point or another but it always seems to come back to a caching issue fooling me into seeing the fix working.

Not sure when I’ll get back to this but it is a bit annoying…

Time to Define Tables

I’ve worked with databases on and off for a long time but in general I’ve been accessing previously defined data tables or had very simple needs (DynamoDB kind of forces that).

I’m at the point in my sandbox work that I’m about to define a substantially more complex schema than I’ve used for anything in the past. Finding that my command of SQL DDL and the various bits involved in creating MySQL users and setting permissions is taking some doing.

I still can’t seem to get a database on a remote system (boojum, myimg_20161229_133853 little test machine). I am not getting a ‘no connection’ response but an authorization failure so I expect that the identit(ies) I created on the NUC aren’t quite right Always details to be dealt with…

I am finding that tables proliferate. Everything needs a unique ID (and auto increment columns help enormously here). Any sort of one to many relationship (keywords, validation) winds up with a new table containing the source object key and the targets. In the past I’ve used the DB as an index for more complex storage (DICOM-3 pretty much forces this with its many 1..n fields, DynamoDB encourages this as well with bulk information in S3).

In the current case I really want to keep everything in the DB rather than spilling items overboard. If I get to thumbnails I’ll see how the BLOB types work. For now I expect that I’ll be ok with the 64K per row limit on MySQL InnoDB tables. I expect that BLOB and TEXT aren’t stored in their respective tables so they should permit ‘stretch’ operations.

Current working notes are a bit chaotic 🙂

DB Initial Sketch
Chaos in the Schema

I am sticking with the MariaDB fork of MySQL to avoid Oracle entanglements. Once the basic database definitions are in place I expect to code the front end in C# as I need to polish up that language and environment a bit at the moment. Not sure whether I’ll go with WPF or some sort of web interface for the UI yet. Got to get the innards a bit better defined first.

Looks like I was just messing up my command line for remote mysql access. Once I got things straightened out, I can talk to the database instance on boojum from chaos. Should make things a bit cleaner as I can keep the data in one spot and access it from any system in the house. Now I just have to finish with the create table statements and see if they build what I need. Short digression into users and permissions first (and probably a quick look at alter table) to see what I should be doing for remote access.

Nice case for my Raspberry Pi-3

Looking very similar (but smaller and much less expensive) to my NUC this case works very well for the R-Pi that I’ll likely img_20161226_140011 use to drive my RepRap if/when I get around to finishing it.

The one issue I have with this case is the limited access to the main board interfaces. It looks as if there is a dedicated ribbon cable slot to allow access to the main external interface.img_20161226_140927 The alternate interfaces are much less accessible as they’re on the top of the board and between the board and the case when fully assembled.

The other issue I have (though for my purposes it isn’t a big deal) is that the micro-SDcard access is limited. img_20161226_141443The card does not extend beyond the case fairing and while it can be extracted with a fingernail between the case edge and the card, I’d be reluctant to use it if i were expecting to change out cards regularly.

 

The bottom of the case is vented and there’s a thermal pad that could be used to sink the CPU head to the case. I have skipped this as I expect to be taking the board out now and again for access to the hardware pins.

img_20161226_140221

Third Edition Effective C# Just Arrived…

The new edition of Effective C# just arrived in the mail. The ‘effective’ series have been consistently helpful with advice beyond the basics of language syntax. As I’m currently spending significant amounts of quality time with C# for work and also for some sandbox coding at home, this is a welcome item.

 

img_20161221_202611Looking forward to seeing what is in this new edition and seeing what it has to say about version six of the language. I’ll try to write up comments on it when I’ve had time to read through this one.

Digressions and returns…Lisp, NUC and SQL.

I’ve mostly got the pieces of SQL DDL together that I need to define the tables for my sandbox project to manage file archiving. Hit this weekend after a tiring week and let myself get distracted.

I had bought an Intel NUC 6i5 to replace my ‘test target’ machine img_20161211_112015that has been randomly hanging and rebooting lately. The NUC setup and OS install went well except for the NIC driver. Wireless worked perfectly but the driver for the gigabit NIC either wouldn’t see the controller (Intel driver install packages) or saw the controller but then timed out before completing. As this was on a clean Windows install with nothing present except for the Intel driver img_20161211_112034packages I’m getting a replacement from Amazon. Should arrive today…hoping all goes smoothly as the NUCs are very nice little machines.

I let myself get distracted by some articles on Clojure and then wandered down into Scheme and Common Lisp. The various lisp dialects have always had a bit of allure to them as hugely expressive languages with very simple syntax. Nothing that I’m likely to every use professionally (though you never know) but cool toys to play with.

Clojure seems to be the closest to mainstream relevance with its JVM hosting and functional programming focus. Not sure I’ll do much more than poke at these but who knows.

Trying to get aimed back at DDL for the tables I need and then start piecing together C# code and native PInvoke stuff to get me where I need to go. Would be nice to be able to thumbnail canon raw files and PDFs (even better to get at metadata) but that will come later. Expecting that to involve serious native code execution as most of the SDKs for such things are in C or C++.

 

Seems that C# Doesn’t Have Static Libraries

The things you run into as you’re getting serious with sandbox coding in a new language… I was setting up some pieces for the toy program I’m building (semi-smart de-dup tool with MySQL back end for archive management). After reinstalling Visual Studio 2015 to clear up an issue with creating native DLLs I’ve started framing out the pieces.

I was intending to build this as a console executable with a managed DLL for the bulk of the operational code and a native DLL for things that need interop (currently mostly VSN access for optical media and external drives). As I was laying out the projects I noticed that there was no option for static library creation in the (long) list of project types.

This surprised me a bit as I’ve found it helpful to be able to package code in static libraries while binding the resultant code as a single unit (dll or exe) for distribution. From what I’ve been able to determine with a little google searching it looks as if the managed world only supports dynamic library binding. Makes a bit of sense as the metadata issues could become complex with the same code bound into multiple assemblies.

It is funny that the common suggested solution for cases where code needed to be bound into multiple dlls or exes was to revert back to the really bad old days and just copy the source (or link to source in other projects which seems problematic in a real environment). Seems as if the managed environment assumes that non-trivial projects will consist of a relatively large number of dlls that all get copied from place to place during installs. I’ll probably poke around to see if there’s a .NET equivalent to jar/war packaging…I’d think there ought to be to simplify deployment.

 

Visual Studio issues and Interop

Slightly frustrating moment…but working through it.

Starting to put together some sandbox code to do file de-duplication scans and some archive management. Found that the visual studio install on my main dev machine here won’t run the wizard that creates native Win32 dll projects. This works as expected on another machine so I’m running a repair to see what happens. Worst case I guess I just reinstall visual studio. Frustrating as this should be one of the simpler things that VS does.

Looking at interop (PInvoke currently) and finding that I have my very old .NET and COM Interoperability book by Nathan and a few notes in more general volumes that are much newer. Particularly disappointing as the APress book on C# 6.0 doesn’t seem to touch interop at all. Not a big deal but a bit disappointing…I’m guessing that interop has evolved somewhat since 2002…

Continue reading Visual Studio issues and Interop