17.4.17

The Java Native Interface; JNI Part 1

That which does not kill us makes us stronger.
    - Friedrich Nietzsche
Disclaimer: I have very minimal experience with Java. There is a good chance that information relating to Java, the JVM, and/or best-practices are incorrect or dated. To borrow from DHS: if you see something, say something! Unlike DHS, I'm not just being paranoid. Any input is greatly appreciated!

Everyone I've talked to who has used the Java Native Interface (JNI) with C++ almost immediately recoils when you ask about it. This is usually followed by a rant and recommendations for SWIG or JNA. Both of these tools can help with integrating native code into the Java language run-time. Considering their utility, I'll give you a quick rundown of what each does before diving into the JNI.

Bash Code Completion

Work expands so as to fill the time available for its completion.
    - C. Northcote Parkinson
I usually have several projects going on at the same time.  There are a dozen or so reasons why I might pick something up, be it for experimentation, learning, work, fun, ???, or profit.  Over the years I've developed an ad hoc directory structure that all my code ends up in.  Everything is nested under $HOME/projects/.  From there I have directories of groups, topical or other, that help me keep things categorized.  Because I'm lazy, I created a quick script that let me jump to the correct directory by running the command:
goto group/topic_directory
goto takes the form of a function in my .bashrc:
function goto {
  cd $HOME/projects/$1
  clear
}
The method is simple enough, but because it's scoped to $HOME/projects, bash completion doesn't work, and as a result using it can be a complete PITA because I don't always recall the names of my groups or topics. So, I decided to write a quick bash completion handler for my goto tool.

14.4.17

Surround SCM 2015.02 on macOS 10.12

Life is not easy for any of us. But what of that? We must have perseverance and above all confidence in ourselves. We must believe that we are gifted for something and that this thing must be attained.
    - Marie Curie
Surround SCM is an enterprise level configuration management tool.  I'm not a huge fan, but we use it at work and my new machine is a 2016 MBP.  After properly configuring our VPN (another blog post, perhaps), I needed to get access to SCM. We don't have a current license, so we are stuck with using 2015.02.  Seapine's instruction aren't really that helpful because they tell you to disable SIP. In this post, I've outlined exactly what you need to do to get it installed and running without disabling SIP.

1.3.17

C++ - Introduction To Move Semantics

90% of how well the talk will go is determined before the speaker steps on the platform
    - Somers White
A few weeks ago, I gave an ill-prepared presentation on modern C++ R-Value Reference and Move Semantics at the nascent Huntsville C++ Users Group hosted at CoWorking Night in Huntsville, Alabama. This was the first meeting of the CxxUG at CWN, and we hope to get more people interested in participating within the Huntsville area. We have a private google users group you can request to join, linked above. You can find out more information on our slack channel (register here).

The presentation I gave was riddled with errors and inconsistencies. I had extracted the CxxUG presentation from a larger presentation I had given at a brown-bag lunch meeting for work. I realized while fixing up the errors that I had used the brown-bag draft as the CxxUG presentation (two revisions behind - draft -> presentation -> corrected final post-brown-bag for email distribution). Because of this flub, and in order to torture myself, I decided to try and polish the CxxUG presentation into something that is actually worthy of presenting.

9.2.17

Get your gun and bring the cat.

I'm not sure what form this blog will actually end up taking. There is a good chance that it will quickly fall by the wayside. Ideally, it will force me to flesh out concepts more completely before moving on to new ideas. Having limited time to pursue projects (ah, the great parenting experiment) makes curating and completing them significantly more difficult.

For anyone interested, I do have a github and bitbucket accounts. I try to publish anything I write that I find interesting or unique. Hopefully those things will start ending up here!

Coming soon: JNI (Java Native Interface) - C++ TMP  (Template Meta Programming) FUN!