Category: Programming

  • Passing in “this” in StructureMap

    I’ve been working with StructureMap lately, and struggled when I need to pass this in. The following code is an example of resolving that issue… namespace StateMachine { public class StateRegistry : StructureMap.Configuration.DSL.Registry { public StateRegistry () { For<IState>.Use<StateA>.Named(“FirstState”); For<IState>.Use<StateB>.Named(“SecondState”); } } public interface IStateMachine { void ChangeState(IState state); } public interface IState { void […]

  • Namespace, Encapsulation in JavaScript

    I’ve had several discussion recently some of the more advanced features of JavaScript, such as functions as return values, namespaces, encapsulation, etc. In order to demonstrate some of these things, I contrived a simple example of a dependency injection tool. Never mind that dependency injection is not really a relevant pattern in JavaScript or other […]

  • MSpec “Hello World” Sample

    I’ve been working with MSpec lately. It’s a BDD framework for .Net. Here’s a hello world type example that uses Trace Writing to show a little bit about what it does. using System; using Machine.Specifications; using System.Diagnostics; namespace UnitedIndustrial.DataImportConcerns { [Subject(“Sample”)] public class SampleConcerns { static string _myString; Establish _context = () => { _myString […]

  • Community and Interviewing

    I’ve been sitting in on more interviews at work with my new role. I’m surprised by the lack of answers when I ask how developers keep up to date with technology, and where they seek answers. “Google”, many reply. “Books”. Maybe I’m asking too much, but here are some creative answers that would imply a […]

  • New Role

    I’ve been promoted at work to what is currently being called “Manager of Development Methodology and Process”. It’s a great feeling, because I had been doing a lot of extra work in the department and this makes it more official. Also, rather than trying to push new technologies and initiatives, I have an easier time […]