• Shallow Copy vs. Deep Copy in Ruby

    Recently I have started a new part-time thing, mentoring students who are attending code camps on various major universities. This has caused me to delve into subjects and areas of programming that I had not visited for some time. The fundamentals mostly, and areas which are important to programmers in training. This is what the students need and honestly I am enjoying it also.

    Read on →

  • Settings for a Git-Bash Tab in ConsoleZ

    This article describes how to setup Git-Bash as its own tab inside of ConsoleZ, the command prompt replacement application. So here I go again. In using Chocolatey, the package manager for Windows, to install Console2 on my work machine I somehow ended up with what I guess is the latest iteration. I make this assumption because the menus are very similar, particularly the settings dialogs, etc. I really like the look and feel changes in ConsoleZ, and there are some new tab related features as well. It looks like Console2 is no longer maintained and so this fork is now the go to console replacement. No problem except this means I needed to get Git Bash working again in its own tab, within ConsoleZ.

    I tried my existing settings but they did not work, which means that my previous article on the subject, which is by far the most viewed item on my quiet little blog, is no longer good. Well, at least it doesn't work for ConsoleZ, only the older Console2 (which by the way, is still available if you want it, though no longer maintained). So, I needed to perform some trial and error to get it working again.

    Properties dialog for Git-Bash shortcut.

    Figure 1: Properties for Git-Bash shortcut in Start Menu

    I began with the Properties dialog for the Git-Bash Start Menu shortcut, which led me to its program folder. For the record I did try simply copying and pasting the Target value into the new Tab’s “Shell” setting, but that didn’t work. It opened Git-Bash in its normal window after an error dialog informed me that it was not a console application.

    Once the easy guess failed, I tried a few more guesses until I got it right. I ended up looking in the /bin directory inside the Git program folder, which seemed a likely spot for what I wanted. In there were only three choices, so finding the right one wasn’t that hard. It was much easier than figuring this out the first time for Console2.

    The Solution…

    Settings dialog for Git-bash in ConsoleZ tab.

    Figure 2: Tab Settings for Git-Bash

    So, without further malarkey, here is the correct settings for a Git-Bash tab in ConsoleZ. Essentially just the Shell value this time. The extras required in previous version are not needed here, this works fine. You can see me at work in the background in a repository. The first tab is a regular PS prompt but the foreground one is our Git-Bash prompt, alive and well in the latest ConsoleZ!

    Much thanks to the maintainers of ConsoleZ:

    1. cbucher
    2. chrisz

    Look at their profiles and click on the ConsoleZ wiki for the project’s home!

    Read on →

  • Some articles are just so long they deserve a really long title to see if things will break well

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.

    Read on →

  • Simplified MEF Export Provider using MEF Property Exports

    674ladderAll of my projects recently use MEF to handle all dependency injection in both the service layer and in the view models (PRISM).  I recently needed to be able to inject a different implementation of a particular interface to all of the imports that called for that interface.  All based on a setting or a flag. 

    The Problem…

    Our current project communicates with a pump module that is the main hardware unit for the application, and that uses a serial port to connect with the pc and our software. I have already written a system layer service library for talking to the pump. The main application also has a pump service that is in the application layer and that is the communication point for the system service. All of the services have an interface defined in Core.Interfaces and this is where the user interface modules can reference the application services, such as in the view models. The interfaces are implemented by classes in the Application Services library including the Pump Service interface, aptly named IPumpService.

    Read on →

  • Test Driven Development in Python

    TDD is a mindset

    Test driven development is a way of designing as much as it is a way of developing.  I have been trying to use it on and off for a several years now without much success.  I think I understand the process, but not necessarily the mindset.  So, I am taking on a challenge in hopes of learning the mindset as well as the process.  The transition to TDD is going to take practice and I intend to get that practice using the Project Euler problems that I started on a couple of years ago.  One of the added benefits of using the Euler problems is that they are simple enough usually (or I should say, “So far”) that they can be solved using a single class or even a single method.  This makes writing tests for the design a little more direct and therefore simpler.

    Read on →