TL;DR

I wrote a simple node.js app that reads the bamboo RSS feed and posts builds in campfire. You can get the complete app here. https://github.com/detroitpro/node-bamboo-campfire, change the values around and you are good to go.

Back Story

Daily I am in windows, at work we use bamboo for CI, there is no community support for bamboo but we want our build status posted into our campfire room. While Bamboo4 comes with the AMAZING!!! ability to write plugins no one anyway, even, wants to write plugins for a commercial system. Blah. We had some preliminary discussions that devolved into the idea of considered parsing the build status email and then reposting them into campfire. Yuck.

JavaScript Saves the Day, again!

Here is how I got a node.js app posting our build status into campfire…in 35 LOC….on windows..

Install Node

Use chocolatey to install Node JS (CommandLine)

image

Make sure nodejs is in your path

  • The path to node, C:\Program Files (x86)\nodejs, should be in the system and user path.

image

  • open powershell and check the node version.

 

 

image

Write Code

  • Use npm to install the dependencies.

image

image

Run the app

From the command prompt, and this – besides npm – is the reason you need nodejs in your path, run

node.exe yourfile.js

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

Unit tests should be used to support the final product, edge cases, additional negative and fuzzy tests.

Unit tests with mocks should be created when the layers are well defined

TDD should be done always.

Context specs should Be created post dev to create documentation and regression tests.

Specs can be based on known behavior.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

One of the AWESOME perks about working at @grasshopper is a company provided Kindle. So far this year I’ve read:

51vN15YCJyL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg (300×300)5117hR3sYcL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg (300×300)41znMZniZ1L._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA300_SH20_OU01_.jpg (300×300)

 

I recently reached out the the team @grasshopper for other book recommendations. These books are next up on my reading list.

On Lean:

http://www.amazon.com/Leading-Lean-Software-Development-Results/dp/0321620704/ref=sr_1_1?s=books&ie=UTF8&qid=1330103475&sr=1-1

On Craftsmanship:

http://www.amazon.com/Agile-Principles-Patterns-Practices-C/dp/0131857258/ref=ntt_at_ep_dpt_4

http://pragprog.com/book/tpp/the-pragmatic-programmer

http://www.amazon.com/Rework-Jason-Fried/dp/0307463745

http://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959

http://www.amazon.com/Passionate-Programmer-Remarkable-Development-Pragmatic/dp/1934356344

Of the recommendations I got I am going to skip, for now, THE DDD book. If it comes back with a good recommendation I might pick it up but it feels too much like a textbook. With applied DDD and all the other DDD stuff I’ve done/read in the past I feel confident speaking about the topic w/o the root book. However; I’m sure I’ll read it soon….

http://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215/

Side note:

If you are a .NET developer and you have not read read Foundations of Programming by Karl Seguin do yourself, and me, a favor and please go read it. It’s a free PDF.

http://openmymind.net/FoundationsOfProgramming.pdf

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 
IMPORTANT NEWS:

I need to use clever names for my open source projects. Or maybe just shorter names.

BORNING NEWS:

I updated ProMongoRepository to use the official gen10 MongoDB C# driver. I did the update because NoRM does not support Skip() but I hear the new driver is insanely fast too. This class really supports only very little of what the driver can do. You should check it all out http://www.mongodb.org/display/DOCS/CSharp+Driver+Tutorial

BREAKING NEWS:

The Collection<T> is exposed via IRepository<T> so you can get down to the driver if you need MAOR POWER!

….intermission break while I go code that…..

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

There once was a project called the ASP.NET Web API but that is dead and gone. It’s features all merged into ASP.NET MVC4. For us that means that out of the box, building REST web services, just got a shit ton easier.

When creating RESTish services with MVC there are some things we need to handle and some places we don’t exactly have the right size legos to make it all look nice.

  • Routing
  • Content Negotiation
  • Verbs – attributes all over the damn place [HttpGet], etc

 

Content Negotiation!

If you ask for JSONyou get JSON, if you ask for xml you get xml! if you don’t specify you get XML…just kidding, you get JSON! The best part: You have a way to extend it build in! with the DelegatingHandler class.

Pedro Reys has an article that, while he does not like that it defaults to JSON, is a good overview of the feature.

http://pedroreys.com/2012/02/17/extending-asp-net-web-api-content-negotiation/#

Release Notes

http://www.asp.net/whitepapers/mvc4-release-notes#_Toc317096197

ASP.NET Web API

ASP.NET MVC 4 now includes ASP.NET Web API, a new framework for creating HTTP services that can reach a broad range of clients including browsers and mobile devices. ASP.NET Web API is also an ideal platform for building RESTful services.

ASP.NET Web API includes support for the following features:

  • Modern HTTP programming model: Directly access and manipulate HTTP requests and responses in your Web APIs using a new, strongly typed HTTP object model. The same programming model and HTTP pipeline is symmetrically available on the client through the new HttpClient type.
  • Full support for routes: Web APIs now support the full set of route capabilities that have always been a part of the Web stack, including route parameters and constraints. Additionally, mapping to actions has full support for conventions, so you no longer need to apply attributes such as [HttpPost] to your classes and methods.
  • Content negotiation: The client and server can work together to determine the right format for data being returned from an API. We provide default support for XML, JSON, and Form URL-encoded formats, and you can extend this support by adding your own formatters, or even replace the default content negotiation strategy.
  • Model binding and validation: Model binders provide an easy way to extract data from various parts of an HTTP request and convert those message parts into .NET objects which can be used by the Web API actions.
  • Filters: Web APIs now supports filters, including well-known filters such as the [Authorize] attribute. You can author and plug in your own filters for actions, authorization and exception handling.
  • Query composition: By simply returning IQueryable<T>, your Web API will support querying via the OData URL conventions.
  • Improved testability of HTTP details: Rather than setting HTTP details in static context objects, Web API actions can now work with instances of HttpRequestMessage and HttpResponseMessage. Generic versions of these objects also exist to let you work with your custom types in addition to the HTTP types.
  • Improved Inversion of Control (IoC) via DependencyResolver: Web API now uses the service locator pattern implemented by MVC’s dependency resolver to obtain instances for many different facilities.
  • Code-based configuration: Web API configuration is accomplished solely through code, leaving your config files clean.
  • Self-host: Web APIs can be hosted in your own process in addition to IIS while still using the full power of routes and other features of Web API.
Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

Over the past few weeks I’ve been thinking and talking a lot about developers. The word that keeps coming up in conversation with many non-developers is “passion”. I am not sure “passion” is the word to describe those who eat-drink-sleep development.

As I sat in the back of a car, on the way to the airport, reading twitter – my stream full of nothing but other developers. I started to think about the time I spent working the past week, the meetings, the excitement and the future tasks. I was done working but my brain kept on.

Then, on the plain, I fired up my podcasts at 2x speed so I could get more in. I listened to HERDING CODE 132: PHIL HAACK, KEITH DAHLBY AND PAUL BETTS ON GIT FOR WINDOWS DEVELOPERS and .NET Rocks 722: Development Practices. I am not sure “passion” is the best word to describe how much I enjoy what I do for a living.

Today, Saturday night as I write this, I am reading about Open Source at Stack Exchange and come across this video that drives home that my enjoyment is hardwired obsession.

From Penny Arcade:

image

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

Keynote: Ted Neward – Rethinking the enterprise

  • the brain is hardwired to use what you know. creatures of habbit.
  • All software sucks. It just sucks in different ways.
  • See Tweets

Hanselman – Web of love

  • WebAPI is some good. GetP
  • Mobile theme support using xxxxxx.mobile.cshtml
  • IsMobile, _LayoutSwitcher.cshtml for switching between mobile/desktop

 

What’s new in ASP.NET MVC4

  • demos of jquery mobile theme support – all css that comes with jquery mobile. modify theme is the easiest way to change them.
  • support for anything.mobile.cshtml works at the partial level.
  • knockoutjs included by default. designed for single page apps (gmail, todolists)
  • jquery mobile included by default.
  • Install-Package MvcJQueryMobile
  • Recipes:
    • Install via nuget
    • Mvc.Haack.ViewMobilizer – sample
  • async and await
    • .net 4.5 (download CTP)
    • inherit from asyncController
    • public async Task<ViewResult> Index
    • Uses same thread if possbile
  • Guess: another preview release of MVC4 (soon)
  • stevesmithblog.com

 

Wicked Domain Models

  • Anemic Domain Models.
  • Managers->Serivces->PageLoad->Back to Services->Utility->Helper->etc.
  • services should be used to merge data access and domain logic.
  • don’t expose things that are not supported ex: raw collection w/ add/remove/clear list.
  • when a collection is just queryable expost it as ienumberable. not icollection or ilist.
  • is object has required fields make constructor that requires information (paramaters) . If a object does not have required information do not use a constructor with params.
  • The object model should only expose as much functionallity as is required.
  • If values can’t change after assignment put assignment as part of the ctor.
  • DDD – Double Dispatch (taking a service using it by passing myself (this) in)
  • slutty code – one thing cares too much about another and keeps poking it.
  • Talking to yourself is good
  • Methods should be in your domain model. Methods are good for your domain model.
  • DDD = name of the game is make it private.
  • Stratagy Pattern = removing switch statems for actual logic.
  • Services are part of DDD, they coordinate and delegate to model.
  • by pushing functionality down to the model you remove the requirement for intrinsic knowledge in someones head of a systems architecture.
  • Object model should be behavioral, DTO = null.

 

Massive Scailability thru ruthless caching

  • AppFabric Demo
    • authoritative information is expensive.
    • the network is a huge cost.
    • Added a micro-cache (5sec) commonly eliminates 95% of database calls.
    • AppFabric cache is a “aside” cache. You check the cache for the data first, if not exist get from source (db, web service, etc)
    • AppFabric is a service, runs on a port, you connect to it.
    • Unique named caches
    • Connect to the cache much like a database.
    • Connect localhost?

Collections DeepDive

  • Adding an element to an array using .Add() does Array.Copy(). O(n). Array.Copy() is slow. Use AddRange(). No loops.
  • Using Array.Add() on less then 10K objects is fine…if you will never scale.
  • Get a copy of ILSpy to understand what is happening at a lower level.
  • LinkedList<T> is fast, you have to tell it where to put an item but slow on look ups. (after for add/remove)
  • Dictionary gives fast lookup. Performances depends on GetHashCode
    • Use int/string for key. It’s the fastest and already optimized.
  • For multi-value per key use .ToLookup – this is cool.
  • Sorted Collections
    • SortedList<T> uses less memory than SortedDictionary<T>
    • SortedDictionary<T> has fast add/remove and is sorted.
    • Adding lots of data at once use Sorted<T> (via AddRange())
  • Concurrent Collections
    • ConcurrentBag,Dictionary,Queue,Stack,Partitioner,BlockingCollection
      • TryAdd() – returns bol
      • TryTake() – returns bool
      • Always check value before moving on.
    • BlockingCollection<T>
      • Blocks and waits until TryXXXX is done.
      • TryXXXX can specify a timeout.

Unit of work!!!!! – Business logic should not have to care about saving information.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

Joel Spolsky wrote a guest post on AVC, Fred Wilson’s blog, about management. It’s a pretty nice article about how founders struggle through creating management structures. However; the TL;DR version speaks to something that is too often overlooked. Too many times I’ve seen deadline-based hiring, cronyism or – and most often this is the case – not having the people who will work with and for as part of the interview.

TL;DR

image

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

InfoQ has a great interview with Jesper Boeg about teams getting started with Kanban.

http://www.infoq.com/interviews/jesper-boeg-priming-kanban

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
 

sending board/card updates to your favorite business class social network since 02/07/2012.

https://github.com/detroitpro/Trello.Router

The goal here is to be a mini hubot and keep everyone, that is anyone, in the know about the the cool sh!t that we are working on.

or…a way to give managers visibility into a card wall since they might not be actually look at it and this feels more like email or sharepoint.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
© 2012 eric.polerecky.com Suffusion theme by Sayontan Sinha