Category Archives: Sandbox

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.

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

Created a ninecrows Github account…

as a place to make sandbox projects broadly available.

GIT is my preferred sandbox source code control system these days. Github provides wide visibility and the potential for collaboration should anything grow beyond the sandbox.

In the past I’ve just kept them local with no sharing. As I’m trying to make more of who I am and what I can do visible on the web, adding any interesting sandbox code I create to <a href=”https://github.com/”>Github </a> is the most effective way I have of getting this done.

So far there isn’t anything stored up there, but over the next few weeks I’m expecting to get some things rolling.

Continue reading Created a ninecrows Github account…

A quick hop into OpenSSL…

Fun with cryptography…

Got to look into some hashing for work stuff and I really do want to get rolling on some file management tools for home (too many photos and other bits lying around and not sure which are archived) and OpenSSL meets both needs.

Going to pull it to windows and play a bit. I’ve messed with it a bit in the past, but that was aimed at implementing TLS on an HTTP connection and several years back. Handy library and worth keeping handy on the shelf.

Finally located my OpenSSL book on the shelf so that helps 🙂

Some interesting OpenSSL information at feisty duck (thought they have one feisty duck while I have nine crows 🙂 ).

Continue reading A quick hop into OpenSSL…