ThinFolio “Stuffed Wallet” Giveaway!

12345Got it? No?

Okay, let’s try this… Our friend Mark (who you may know from running the BizSparkSF and  SF .NET Meetup Groups) is starting a new company ThinFolio.  ”Go west young man!” I remember saying to him, nearly twenty years ago when we first met at a Boston startup.  With a tear in my eye I’m here to tell you that ThinFolio just launched their Kickstarter Campaign yesterday.  By the looks of it, (134 backers already) they’re going to be funded and Mark’s going to be the next wallet tycoon!  Huzzah! You can Back This Project $1 minimum pledge

So, as a thanks for being such an all around nice guy, devoting countless hours to the .NET community in his “spare time”, I offered to try to promote his Kickstarter with a giveaway:

We are giving away four ThinFolio Wallets, each “stuffed” with a free book from the InformIT site (a quick search of their site for “Fowler” tells you how good their selection is),  a copy of Ants Performance Profiler Pro  and a copy of R# or WebStorm - great tools which could theoretically help you “stuff” that new wallet with real $$.

Pretty good giveaway, I thought, but it needed something more. I tried to think of a good tagline – “Win a Stuffed Wallet, Stuffed with Stuff to help you Stuff … ” that was obviously going nowhere.  I went to my good friend Jacob Llaneras for help and and, um, well, that cartoon happened. Jacob thought this TLDR version would say it better:

6

I think he’s right. I should probably leave the marketing to the professionals.  So without further ado, enter below for your chance to win and good luck!

a Rafflecopter giveaway

Posted in Uncategorized | 3 Comments

Python Fabric Script for Setting up TeamCity on Ubuntu

I’m currently working on a project requiring a TeamCity setup on a Rackspace cloud account.   I’m a huge fan of Python Fabric for automating deployments, and have put together a recipe for installing TeamCity:

Fabric is a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

It provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input, or aborting execution.

It’s pretty simple, but there’s some good stuff in there, like how to install the JRE via a non-interactive install.   If you are looking to install MySql, I’ve put a gist for that as well. 

One word of warning. I’m NOT a ‘nix expert, so you may want to double check anything I’ve done here against your own best practices.

-Brendan

Posted in Python, TeamCity, Ubuntu, Uncategorized | 2 Comments

Welcome Marcus Hammarberg

I’d like to welcome Marcus to the CodeBetter.Com group.  I’ve been learning lots about Nancy Testing from his awesome series over on his personal blog.   By my understanding of Vertical Slice Testing, Marcus’ “Hatless, Shoeless” testing is a great example of  VEST a la Nancy.

One look at his tag cloud and it was obvious that he’s going to be a great fit around here:

.NET (180) Agile (147)ASP.NET MVC (41) BDD (47)BrassBand (86) C# (25)ContinuousDelivery (5) CQRS (1) DDD(13) Euphonium (14) Fun (66)Kanban (27) KanbanBoards (6) Lean(18) Life of a consultant(245) LINQ (6) Marcus private (217) MSBuild (24)Nancy (3) NHibernate (14) Salvation Army (50) Scrum (35) SOA (12)SpecFlow (30)SpecificationByExample (12) Sprint Planner Helper (32) TDD (46)Test (2) TFS (42) Tools (144)VB.NET (39) Visual Studio (46)WCF (24) Web Design (4) ÖreDev (15)

He’s a Lean and Agile coach, and currently co-authoring Kanban In Action.  Welcome Marcus!

Posted in .NET | Tagged | Leave a comment

TDD I Learned… Code Katas

Continuing to make my way through Roy Osherove’s TDD course.  There’s an interesting exercise that he introduces to help practice and gain the muscle memory required to do TDD well – the Code Kata.  Wikipedia attributes the code kata to Dave Thomas:

Code Kata is a term coined by Dave Thomas, co-author of the book The Pragmatic Programmer, in a bow to the Japanese concept of kata in the martial arts. A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.

There’s a nice project over here on Github containing descriptions and code for a bunch of Katas, including the string calculator  that Roy introduces. Roy’s site has the string calculator kata executed in a bunch of different languages, including AutoHotkey!

Posted in TDD, Uncategorized | Tagged | Leave a comment

TDD I Learned…

A few weeks ago, Roy Osherove released his full TDD master class in .NET available a video series of over nine hours, recorded live in class.

I’m a TDD wannabe.  I’ve done small tasks using TDD, and I’ve written plenty of tests, but most just get shuffled around, never included in my CI builds, and basically the entire thing is a mess…  Perhaps it’s because I’ve been writing code for startups, but most likely it’s because I’ve just not taken the time to learn the right way.  I’ve never truly seen the benefits that it can bring.  So I saw this class as a great chance to learn from the master.

I’m going to blog about my experiences going through this course.  I’ve been through the first two hours, and so far I really like the pace and Roy’s teaching style.  Roy is snarky-funny, and so the content is entertaining to boot.

So here are some of the more interesting things that I’ve learned from the course so far…

Difference between Integration Tests and Unit Tests

Although the generally accepted definition of the difference may be up to some debate, Roy’s definition is simple, I like it, and it’s useful for me.  Roy says that a unit test is all in memory.  It should pass on any new developer’s machine, and is not tied to disk, databases or anything outside of the memory scope of the test.  This is important because confidence in your unit tests is paramount.  If you cannot trust that a failing test is due to a bug, i.e. if it’s due to some setup on disk, etc. it diminishes the usefulness of your test suite and developers cannot quickly setup to work on a codebase.

Arrange, Act, Assert

The three A’s of unit testing was new to me, and  is a pattern for writing tests that Roy introduces:

Each method should group these functional sections, separated by blank lines:

  1. Arrange all necessary preconditions and inputs.
  2. Act on the object or method under test.
  3. Assert that the expected results have occurred.

This approach, by eliminating assert code intermixed with code that sets up or acts upon your objects, reduces smelly tests by separating what is being tested from all the other stuff.  See, I need stuff like this to help me fall into a pit of success of testing.  

There’s a lot of good stuff in there about creating readable and maintainable tests.  Roy also delves into best practices for naming tests, offers some good hints on how to setup Resharper live templates, a good deal of information on why he prefers TestDriven.Net as a test runner (and how to use it to debug methods directly!) including an interesting history lesson on MSFT vs  TestDriven.Net’s Jamie Cansdale.

With over nine hours of course total, I’m expecting to learn a lot.  Oh, and apparently serial killers practice TDD.  :)

-Brendan

Posted in .NET, TDD | 8 Comments