Developing on Staxmanade

NuGet Project Uncovered: AboditNLP

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

AboditNLP is a Natural Language Processor library. This kind of stuff in interesting, but not something I have chosen to spend my time on.

It has a demo http://nlp.abodit.com/home/demo which gives you sample things to type to the library. I noticed it was a bit case sensitive, but still, project is one to look into if you were to say build a home automation system.

NuGet Project Uncovered: Northwind.Db

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

Northwind.Db is a version of the infamous Northwind database packaged in an awesomely easy install/setup NuGet package. I’ll outline the experience of installing the Northwind.Db into a sample project.

After executing the below command in my Package Manager Console

Install-Package Northwind.Db

I was presented with a wizard where I could choose what type of database model I wanted to use.

image_thumb61_thumb

How did I want to generate my model?

image_thumb7_thumb

Where should it connect to (Notice the Northwind database was already setup for me).

image_thumb8_thumb1

And now I had the Northwind database all setup and ready to go.

image_thumb9_thumb

I’m not quite sure why it installed twice. (once in the root of my test project, and the other in the App_Data folder)

I also couldn’t use the Uninstall-Package command to remove the project

The process cannot access the file '…App_Data\Northwind.MDF' 
because it is being used by another process.



Regardless of some of the issues, if I had to quickly get a sample sql database up and running this would be nice and easy.

NuGet Project Uncovered: Deleporter

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

Deleporter is a project I used over a year ago. It allows you to setup a delegate and execute it in a different process.

For Example: You spin up a unit/integration test project. Over in IIS you have a web site running. Now how do you do things like mock out crazy dependencies, adjust the time in your favorite SystemTime implementation or just tweak the configuration on the fly?

You can leverage Deleporter to execute code over on the web server controlled by your test project.

I’d recommend your go read the introductory blog post

Deleporter: Cross-Process Code Injection for ASP.NET

NuGet Project Uncovered: DynamicXaml

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

DynamicXaml takes a fluent approach to building up xaml in code. Following the pattern laid down by the HtmlTags project, this project provides a very clean way to write out your xaml code in C#.

I’ve copied a sample from the github readme below.

var _builder = new XamBuilder();
var button =
_builder.Start<Button>()
.Margin("5,0")
.WidthAndHeight(200d,30d)
.Create();



One of the things I like about these projects is if you can’t use markup and are pushed to write your xaml in C#, you can apply some great tricks to reduce duplication with your code. (Not sure how this library works out, but I would suspect that if you created a default Button object, it would allow you to override specific properties one at a time or extend with new properties. This way you can create your base controls and only tweak as necessary.

NuGet Project Uncovered: IntX

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

Have you ever wanted to generate a number that could potentially have millions of digits and do arbitrary mathematical operations against it? Ya, me neither. But if I did, I would take a look at this project.

IntX is

an arbitrary precision integers class written in pure C# with fast - about O(N * log N) - multiplication/division algorithms implementation. Runs on .NET 2.0+.

The intx.codeplex site has quite a bit of info about the project (TL;DR). If you’d like to learn more I’d suggest checking it out.

NuGet Project Uncovered: Burro

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

Burro is a project that I only quickly looked at. I don’t know all that it does, or how to get it up and running. In the project’s readme it says

I'll put some examples up as things progress, for now you'll just have to work it out yourself.

What I do know is that it is supposed to parse build output from a build server in a consistent way. How do I know that? (The github project says).

What is it?

Burro is a tool for parsing output from build servers in a consistent way.

I only put this in here as a project to look at. I think that parsing build output sounds very challenging and props to this project for giving it a go…

NuGet Project Uncovered: Chronic

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

Chronic is a port of Ruby’s Chronic providing some natural language parsing for dates.

This is a pretty cool little utility as it lets you take some input like "tomorrow” or “two weeks ago” and turn that into a DateTime object.

Take a look at some tests I pulled from https://github.com/robertwilczynski/nChronic/blob/master/src/Chronic.Tests/CustomParsingTest.cs.

[Fact]
public void seven_days_from_now_at_midnight()
{
Parse(" seven days from now at midnight")
.AssertEquals(Time.New(2006, 8, 24));
}

[Fact]
public void _2_weeks_ago()
{
Parse("2 weeks ago")
.AssertEquals(Time.New(2006, 8, 02, 14));
}

[Fact]
public void two_weeks_ago()
{
Parse("two weeks ago")
.AssertEquals(Time.New(2006, 8, 02, 14));

I tried playing with it a bit. There seem to be some cases sensitivity issues with the codebase now as “tomorrow” works but “Tomorrow” doesn’t. But I think that’s a great reason to be on GitHub. Fork, fix, and send a pull request. All better…

NuGet Project Uncovered: Enum Metadata Library

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

EnumMetadata.Core provides some clean extensions over enums that give you access to metadata you place on enum values. This project’s approach is to use attributes on an Enum and some fancy extension methods to get at the data stored in attributes in a strongly typed way.

I couldn’t quickly get this project up and running on my x64 machine. I received the good ol BadImageFormat exception. I didn’t take enough interest to get it working at the time, and was able to get a pretty good picture of how to use it from the tests (if I had to). Just knowing this project is here is good enough for me at the moment.

Side Note: It’s a different approach to the problem. Another strongly typed approach I tend to prefer can be found at the following Gist here. Not exactly an “enum” but gives a similar feel with access to more metadata and gives the possibility of adding behavior to each item.

NuGet Project Uncovered: VerifyArgs

If you are coming to this series of posts for the first time you might check out my introductory post for a little context.

VerifyArgs is another approach to a guard helper that takes an interesting approach.

Verify.NotNullOrEmpty(new { first, second });
Verify.Positive(new { secondCount });



Many of you might look at the above and think “But what about performance?” If that’s you, I’d have to say go test it out for yourself. But for nearly all cases out there I don’t think this level of performance is anything to be concerned with. The project’s home site has a little blip that tries to address the performance concern.



image_thumb11_thumb



image_thumb13_thumb



This project is great because of the fluent nature of each Verify.***