Vacation, Staycation and Coding

by Codewiz51 2. July 2014 08:13

I'm taking vacation this week, and honestly intended to do more coding.  However, I find myself doing a lot more around the house than I envisioned.  The weather has been unseasonably cool in Oklahoma and I find myself on my mountain bike a lot more than I anticipated.  I like to ride for distance at Lake Hefner, and I ride for excitement on the Bluff Creek trail.  I am in sore need of decompression time.  Sometimes, you get wound up in your job so tightly, you forget to balance your work and personal time.  Perhaps, this afternoon when it's supposed to get hot, I will retreat indoors and do more than vegetate on the couch.  (Or maybe, I will just read some science fiction.) Cool

Update: I made 2.5 laps today on the bike trail at Bluff Creek.  Not a stellar time, but at least I made it.  Not hot, but very humid.

Tags: , , ,

Life | Programming

I've drunk the Enterprise Library 6 Kool Aid.

by Codewiz51 29. June 2014 18:42

I've never really been a fan of Enterprise Library, until I had to assist with a coworker's project.  He had used Entity Framework and Enterprise Library in his MSMQ project.  I was really impressed with the logging in the project and the flexibility.  So I decided to bite the bullet and start anew with Enterprise Library 6.

So, here I am with a shiny new library downloaded from here: Enterprise Library 6 April 2013

I downloaded the eBook documentation here.

And the example applications are at this link.

So far, this is good stuff.  Not great, but solid and useful.  It applies some order to what can be a disorderly process.  I am deeply into studying Unity at this point, as I just completed some work in Java, using CDI and Weld on Jboss, complete with dependency injection.  The comparisons are favorable, although I like the annotation approach used by Java a little bit better at this point.  But this is just an opinion on semantics.

Update: Be sure to execute the logging example with Administrative privileges.  The program needs to add an event source, and you need to be an administrator to perform this task.

This blog entry for the Ent Lib 6 team is a bit dated, but still very useful. Just released - Microsoft Enterprise Library 6

I was not able to get the EntLibConfig.exe program working correctly. I came across this web article and found I needed to execute install-packages.ps1 by right clicking and choosing Run with Powershell.



PostgreSQL, Entity Framework and Node.js

by Codewiz51 29. June 2014 08:28

The company I work for has embarked on the great open source experiment.  Java, JavaScript, Single Page Apps, AngularJS, JBoss, PostgreSQL, PostGIS, MongoDB(maybe) and Hadoop (like everyone else, big data is a big experiment unto itself.)  While I believe this experiment shows promise, we've become mired in lack of experience, lack of training and the occasional change in direction that doesn't seem to be communicated clearly to all developers.  Mostly, we suffer from lack of proper transitional training and the deep experience that comes with working with a particular stack for the last one or two decades.

I've never been a Java programmer.  I don't particularly like Eclipse and the 50 million plug-ins that I am not familiar enough to know why I need them.  I've come to respect Maven, but that's led me to a much deeper understanding of Nuget and how to use it in a similar fashion with my .Net projects.  My learning progress with JBoss has led me to a deeper understanding of some of the decisions Microsoft has made regarding .Net and how to implement the technologies using more reliable techniques.  I was recently introduced to IntelliJ, and I feel it shows a lot more promise for implementing the types of back end services projects that we implement.

So, while my day time job is definitely spent coding Java and JavaScript, my night time hobby is now spent on .Net, and occasionally attempting to interface reliably with open source components like PostgreSQL and MongoDB.  As a contrarian, I like to investigate JavaScript frameworks other than Angular.  I currently spend a great deal of time on Knockout.js and Backbone.js coupled with marionette.js.  I'm also back to spending a lot more time on C++ as a hobby.  All of this means I am not getting as much sleep as I probably need.

Which brings me to the point of this blog post (thankfully):

Rob Conery has published a simple, but very useful introduction to using Entity Framework with PostgreSQL.  Along the way, he also manages to drag in some useful node.js utilities for creating tables in PostgreSQL and the amazing thing is that the tutorial actually works as advertised, is easy to modify and actually teaches the uninitiated a few useful nuggets of wisdom along the way.

If you are a .Net programmer and you are intrigued by this title, by all means go read it and implement it.  You'll be glad you did, and I bet you'll save a bookmark to the page.

Using Entity Framework 6 with PostgreSQL

I do have to add one tip to this post: My company maps the "My Documents" directory to a network drive, which means under the hood, everything is addressed as a network path.  The section in Rob's blog regarding node.js will not work correctly with this setup.  Node.js does not support network paths, e.g. \\someMachine\someShar\temp\blah\bleh.  Simply copy the program to a location on your local hard driver and rerun the node.js commands, such as db-migrate.  Everything should function correctly at this point.




Installing MS Sql Server JDBC 4.0 Driver

by Codewiz51 23. February 2014 07:02

My company has a major new initiative to utilize open source software.  While I'm primarily a Microsoftie, my C++ skills have not been in great demand, so I've volunteered to go over to the dark-ish side.  At work, we are utilizing PostgreSQL and PostGIS heavily for our mapping and search applications.  However, at home, I'm still a big fan of MS SQL Server, particularly SQL Server 2012.  I'm in the process of learning JBoss at work, and I work with it at home "A LOT!" However, I prefer to step through the examples with SQL Server 2012.

Which brings me to the point of this post: How the heck do I point my Java stuff to use SQL Server 2012 from Eclipse, Maven, JBoss, TomCat, etc.?

I found this thread on which really helped me get up and running on my home system: Setting up maven dependency for SQL Server

  1. I thought I would summarize all the inputs into a few steps that are easier to follow:
  2. Download and Install SQL Server JDBC driver from Microsoft: Microsoft JDBC Driver for SQL Server
    (I suggest installing to a much shorter directory name than the default.  The default directory is a pain to use and involves the use of quotes to get around spaces in the FQ path.)
  3. Optional: Install to a network location that is available to your whole team.  You'll see why this is useful in a following step.
  4. Install Maven on your PC so you can run it from the command line: How to install Maven on Windows
  5. Install the SQL Server JDBC driver in your local Maven Repository with this command:
    mvn install:install-file -Dfile="C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\sqljdbc4.jar" -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar
    You may need to adjust the file path, version and/or file name. Don't just copy this command line blindly!
  6. If you installed to a network location instead of a local directory, you can add the following to your pom.xml, and all your team can gain access to the driver without having to perform a bunch of setup steps:

I hope this helps someone.  If you have questions, please search Google using the following terms: "Maven SQL Server JDBC."


Eclipse | Java | JBoss | Maven

Switching to Git from TFS

by Codewiz51 25. December 2013 09:44

I've been involved with Git at work since late May of 2013.  Transitioning to Eclipse, Java and Git was a bit intimidating in the beginning.  However, after some bumps in the road learning how to utilize Git, I became a convert to this version control system.  It's light weight, fast and runs well on Windows Server 2012.  I'm slowly migrating my projects off of TFS 2010 to a local Git repository.  What really sold me on Git is the ease of branching and merging operations.  Then, I discovered the add-in component for VS 2013 works as well or better than Eclipse's integration of Git.  About the only thing I am losing when I leave TFS is work item tracking.  However, that function will be filled by a $10 copy of Jira for my personal use.

I don't own powerful server hardware.  So Git is a Godsend compared to how TFS 2010 and Sharepoint 2010 drag on my outdated servers.

This series of blog posts will cover my experiences installing and configuring's version of Git for Windows:

  1. Stuff to download: (Prerequisites)
    • First, check out this post on MSDN to make sure your VS 2013 git client is operational. I strongly suggest you make sure you can connect VS 2013 to a github or bitbucket project and clone successfully before you even begin downloading anything else.  (I started out using github, but switched to bitbucket.  Bitbucket allows me access to Jira functionality (issue tracking) and code reviews (limited.)  It's free and allows private projects.
    • I like to install a command line git tool.  I use Chocolatey to install git command line tools.  I've run into some issues getting this to work over SSL, but I've solved all the problems and documented them in this series of articles.
    • If you are going to use Git over SSL, you'll may need OpenSSL for Windows.  GitStack needs an RSA key file, and OpenSSL is the only way I know to generate this file and create a certificate request tied to the key file.
    • You'll need the git installer.
    • I generally like to have a copy of Cygwin available.  This is completely optional, not required and not really used for this install (unless something goes incredibly wrong.)
    • There's probably some other stuff I've forgotten.  I'll add downloads here as time and memory permits. Cool
  2. Install
  3. Configure ports
  4. Firewall Changes
  5. Users and Groups
  6. LDAP/Active Directory
  7. OpenSSH/CertSrv/SSL
  8. Testing
  9. VS 2013 and Git
  10. Git-tfs

Since it's Christmas morning and the family is waking up, I'll fill in the details later today and tomorrow.  I need to go prepare Christmas breakfast for the World of Ware Crack crowd.


Design | Infrastructure | Programming


This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cat or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.  So, take most of what I say with a grain of salt.

© Copyright 2008-2014