Archive for June, 2010

Wizards of Smart #10 – Glenn Block part 1

Ryan and I had a awesome opportunity of having Glenn Block join us on a Skype call a couple of weeks ago. We wanted to have him on and talk about what he is currently doing and try to avoid the whole MEF topic (we did dive a bit into it, but not too deep).

So part 1, Glenn introduces himself and gives a history of his current move from MEF to WCF and his vision on what he hopes to do by joining the team.

Glenn blogs at codebetter.com : http://codebetter.com/blogs/glenn.block/

Wizards of Smart #9 – 25 Zeros + IDEs + SOLID

 

This conversation centers around Robert Martin’s Rails presentation titled “25 Zeros”.

http://en.oreilly.com/rails2010/public/schedule/detail/14134

Part of the conversation dived into IDEs and Ryan sent me a link to Code Bubbles.

http://www.cs.brown.edu/people/acb/codebubbles_site.htm

Ryan later references the SOLID article in CODE Magazine by Derick Bailey.

http://www.code-magazine.com/Article.aspx?quickid=1001061

 

Wizards of Smart – Heroku, Cloud, and Iron Ruby

Sorry for the long delay guys. Ryan and I are both in the middle of deploying applications so other things are on our minds.

While we wait for me to edit the recording we did last night and we await Glenn Block’s approval on the fantastic 2 shows we did with him, we can enjoy a smaller conversation Ryan and I had on Heroku, Azure, and a bit about Iron Ruby.

Wizards of Smart – Episode 7 Performance

Ryan starts with describing his love affair with F#, which leads to a discussion of FubuMVC, which leads to a discussion of Performance Problems (not related to Fubu MVC)… etc. So a standard Wizards of Smart conversation.  :)

I titled this Performance since most of the conversation centered around our experiences with targeting and improving performance.

Linq – Sum

Last week I started an ongoing section during the Virtual Brown Bag where I go over a Linq function (or two). The general idea is that although most people ‘use’ Linq, there are lots of functions that are overlooked.

In this blog post I will demonstrate basic usage cases for the Linq Sum function.

Numbers

If you have a collection of numbers and you want the sum of their values, then  simply call Sum. It can’t get any easier.

[Test]
public void should_sum_values()
{
    var nums = new List<int>
                   {
                       5,
                       9,
                       1,
                       10
                   };
    int sum = nums.Sum();

    sum.ShouldBe(25);
}

Non-Numbers

If you want to sum a collection that isn’t made up of numbers, then you will be forced to specify which number property you would like to sum.

[Test]
public void summing_non_number_collection()
{
    var jedi = new List<Jedi>
                   {
                       new Jedi("Yoda").MidichlorianCountIs(1000),
                       new Jedi("Anakin Skywalker").MidichlorianCountIs(3000),
                       new Jedi("Luke Skywalker").MidichlorianCountIs(1500),
                       new Jedi("Obi-wan Kenobi").MidichlorianCountIs(500),
                   };
    // can't compile
    //var sum = jedi.Sum();
}

 

[Test]
public void should_be_able_to_specify_property_to_sum()
{
    var jedi = new List<Jedi>
                   {
                       new Jedi("Yoda").MidichlorianCountIs(1000),
                       new Jedi("Anakin Skywalker").MidichlorianCountIs(3000),
                       new Jedi("Luke Skywalker").MidichlorianCountIs(1500),
                       new Jedi("Obi-wan Kenobi").MidichlorianCountIs(500),
                   };

    int sum = jedi.Sum(j => j.MidichlorianCount);

    sum.ShouldBe(6000);
}

These tests can be found in my Learning Solution on GitHub and found in the Learning CSharp project : http://github.com/RookieOne/Learning

Wizards of Smart – Episode 6

The general theme for this podcast is handling Complexity through Composition. But we end up talking about Entity Framework, Fubu MVC, ISP, Rails, and reach new levels of nerdness with sentence composition.

Virtual Brown Bag – 6/3/2010

A rather link filled, topic filled VBB. Not many direct coding examples but lots of great information.

LINQ Examples

I did share how to use Sum, Select Many, and Aggregate. The code was put into my learning csharp project in my learning solution on GitHub.

I plan on writing a couple of blog posts on these LINQ items so stay tuned if you want more LINQ goodness.

http://github.com/RookieOne/Learning

Wizards of Smart Podcast – Episode 5

More rails talk on this episode. But I did share the link with the VBB. http://www.theabsentmindedcoder.com/2010/06/wizards-of-smart-episode-5_01.html

Absent Minded Coder Posts

I shared my 2 posts from the last brown bag…

Structure Map 2.6 constructing the concrete type

http://www.theabsentmindedcoder.com/2010/05/structure-map-26-constructing-concrete.html

Interface Segregation Principle

http://www.theabsentmindedcoder.com/2010/05/interface-segregation-principle-in.html

I also shared George’s comment on the Udi InfoQ article : http://www.infoq.com/presentations/Making-Roles-Explicit-Udi-Dahan

Unlocker

Claudio shared a helpful tool to get rid of an annoying Windows error. http://ccollomb.free.fr/unlocker/

VS 2010 Step into .Net Framework

Claudio also shared a blog post showing how to setup Visual Studio 2010 to allow stepping into .Net Framework code. http://weblogs.asp.net/rajbk/archive/2010/04/21/setting-up-visual-studio-2010-to-step-into-microsoft-net-source-code.aspx

Why Your Code Sucks

This might be my favorite link Claudio shared. The blog post talks about why your code sucks… yes he is talking to you. (and me…) :D

http://www.artima.com/weblogs/viewpost.jsp?thread=71730

Resharper and Regions

Find out how to configure Resharper to remove regions http://bit.ly/wtjK3

You can also prevent Resharper from adding regions http://bit.ly/9QgLYe

Monads

Uncle Bob uploaded a WTF is a Monad presentation : http://bit.ly/aBMIaL <- I plan to look at this tonight ;D

Revamp Your Code Review

Ryan wanted me to share a blog post by Kyle Baley discussing the code review process : http://codebetter.com/blogs/kyle.baley/archive/2010/06/01/rietveld-or-how-to-revamp-your-code-review-process.aspx

Nine Things ie9 is doing Right

Ryan also wanted me to share : http://sixrevisions.com/web-development/five-things-ie9-is-actually-doing-right/

RSA Animate – Drive: The surprising truth about what motivates us

I think @TheCodeFoundary tweet’d this link earlier this week. It is an interesting video discussing how we are actually motivated by more than money. :D

http://www.youtube.com/watch?v=u6XAPnuFjJc

Git + GitHub

Claudio was asking about Git so I shared some links and walked through a simple workflow into how I commit locally and then push to my GitHub repository.

Git Extensions can be found here : http://sourceforge.net/projects/gitextensions/

We also discovered this : http://learn.github.com/

Architecting TekPub

Great article on InfoQ. In the article they itnerview James Avery and Rob Conery about their experience with TekPub going from MVC to Ruby on Rails and the reasoning why.

http://www.infoq.com/articles/architecting-tekpub

Future Rails Hands-On Demo?

I tossed out the idea of having a rails hands on talk where as Claudio talks, I code the application in rails. The purpose is to showcase how rapidly we can build an application and deploy the application using rails.

Wizards of Smart – Episode 5

I recently was doing some volunteer work using Rails and started a conversation about my experience. This went on to general discussions on Ruby, Rails, and benefits of Dynamic Languages.