Monday, March 17, 2014

Highway.Data Drivers Ed Video is up

After many requests and some great help from the Highway Framework contributors, we finally got rolling on the web tutorial series for Highway.Data. Below is a getting started video that should cover most of the "New to Highway" questions. Please let us know what you think.

Here is the Table of Contents:

Patterns: 0:00
Getting Started: 3:16
Queries: 7:01
Scalars: 10:21
Commands: 14:22
Advanced Queries ( SQL based, and Projections): 16:58
Eager Loading: 20:56
What is IDomain?:22:22

Testing with Highway: 27:17

Curtis Schlak also put together a great C# and Lambdas primer found below.

C# lambdas and LINQ Methods from Curtis Schlak on Vimeo.

Tuesday, March 4, 2014

Tools of the trade

I have spent the last 48 hours awaiting the arrival of a new keyboard. I had beyond the socially acceptable amount of excitement allowable for a keyboard apparently. This led me to think about how many other gadgets I have gotten over the moon excited for in the past couple of years. Here is my list.

1. DasKeyboard - ( Because it is the newest and the one that I am typing on right now )

This is the keyboard, and I am the code generation tool.

2. LeapMotion – Because it is awesome and “magic”, and I got in on the beta ( my kids said the magic part )

This thing is awesome, and let my kids, yeah my kids, become Harry Potter!!!

3. Monitors – Monitors, and more Monitors

I got this setup working and was over the moon about it. They still rock it out now. I am thinking about adding more to the 3L panel.



Thursday, February 13, 2014

Coding Faster, Easier, Cleaner

Tonight we had a great evening at the Houston .NET User Group, and I promised that I would post the tools details.



Below are the images of all my installed extensions.

Resharper Extensions




VS Extensions



Sunday, February 2, 2014

Productivity Tips–Write it once

I have over the years built up a very large list of templates, snippets, and extensions for the sole purpose of quickly building out code in a quality way. I find that targeted usage of code genreation makes me far more productive because I am able to express the intended code very quickly and with less typographical errors. All of this relies on learning patterns and then leveraging them. Much like CodeRush Templates or ReSharper Mnemonics.

Try this. Create a person class with an integer Id, first name, last name, and a method that returns the full name by combining the first and last with a space. Simple right? How long would it take?


public class Person
        public int Id { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }

        public string FullName()
            return string.Format("{0} {1}", FirstName, LastName);


For me generating this code took 19 seconds, and the following commands. This includes every keystroke and I didn’t touch the mouse.

  1. c<tab> – This generated the class
  2. Person<enter> – Named the class
  3. pi<tab>Id<enter>  - Create and name the Id property
  4. ps<tab>FirstName<enter> – Create and name the First Name property
  5. ps<tab>LastName<enter> – Create and name the Last Name property
  6. ms<tab>FullName<enter> – Create and name the Full Name method
  7. return string.Format(“{0} {1}”, FirstName, LastName); – Fill in the body of the method.

Now I am a big TDD guy so I also did the test for this, by using the same style templates.

  1. ts<tab>FullNameShouldReturnFirstSpaceLast<enter> – Generates the test body d names the test method
  2. Person<enter> – Gives the type for the target of the test
  3. FullName<enter> – Gives the method we are testing.
  4. Is.EqualTo(“Devlin Liles”) – Gives the assert for NUnit
  5. <up*5>target.FirstName = “Devlin”<enter>target.LastName = “Liles”<enter>

That gives us this code

        public void FullNameShouldReturnFirstSpaceLast()
            // Arrange
            var target = new Person();
            target.FirstName = "Devlin";
            target.LastName = "Liles";

            // Act
            var result = target.FullName();

            // Assert
            Assert.That(result, Is.EqualTo("Devlin Liles"));

The larger picture for this is to make sure you are leveraging every ounce of productivity you can out of your tools so that slinging lots of high quality code just comes second nature.

Tuesday, January 21, 2014

Designing for Testing

I have had many discussions over the past several years about code and testing. These have ranged from deep debates on the merits of TDD or BDD to discussions around manual test case management. I have learned from all of these, and today had a discussion that made me want to articulate those views in a concise list. Here they are.

1. Everyone owns the UI automation. - Software is a team sport, and your tests are the practice squad. If those are not strong enough to challenge you to do things correctly then you will make mistakes come game time ( Production ).

2. Shared test code is just like other code - If we are designing code for the purpose of making tests easier, then it should adhere to our normal standards. Test data factories, simulators, or other common code that we use in our testing toolkit should be the same level of code as our production code for one unavoidable reason. A craftsman should take pride in his tools, because without them we are just some dude standing in a workshop.

3. Developers should know how to test and how to code - This means all Developers ( Testers, Coders, etc. - The "Developer" ) should be able to read, write, and RUN our tests. Out of sight means it doesn't matter

4. Make it stupid easy - Building, Deploying, and Testing should be stupid easy. It should just be part of the workflow, because that is the only way it will happen consistently. Psake is a great tool for doing this in a windows environment. Something like:

Pull Code, psake, make changes, psake, pull code and merge, psake, push code - Rinse repeat

Those all will lead down a path to more supportable code, and probably make you learn along the way.

Tuesday, January 14, 2014

Starting out in Ruby

I started my apprenticeship for Ruby tonight. It is mind bending to think about some of these paradigms. For instance:

1. Extending a class to have a new class scoped method. Aka, appending a static method to Guid. This is crazy to me, but I can see some usages.

2. Overriding constructors to return things other than the class being constructed. This makes factories, and abstract factories a language supported construct. It also made my statically typed brain hurt.

All in all I got a great tour of the “Out of the Box” ruby stuff tonight and then set forth a schedule for some work to come.

This week is going to be running through the RubyKoans and then starting a console game (think zork) to learn how to right Ruby correctly. ( Not just C# in Ruby ). Feel free to follow me progress and comment on github.

Many thanks to Amir Rajan for taking the time to teach a friend some new skills.

Wednesday, January 8, 2014

Archives and Blog Move

This weekend my blog hosting engine failed me horribly, so I decided it was time to stop managing it myself ( BlogEngine.NET ) and move to a hosted platform. So I moved it here Smile.


All posts before this were moving over highlights from my old blog. They were not moved in order, so read it all Doctor Who Timey-Wimey style and you will be good. From here forward it will be new content and hopefully renewed blogging vigor. Catch you on the next post.