Software, Success and Ranting

I’ve been extra active reading blog entries lately and have come upon a few that have really got me kind of wired.

Software Development Dogmata – Good Practices Gone Bad

The first one is this article by Daniel Pietraru (who I do not know) over on little tutorials “Software development dogmata – good practices gone bad“.  There are few major issues I have with this slight skewing of facts.  Overall, excellent article, but there are some issues.

First is the “Agile != Flexible”.  Read the manifesto, there is no such thing as Agile that isn’t flexible.  The birth of agile that is mentioned is rather skewed too.  If you truly want to learn about Agile, and you have a motivation to have good, happy, satisfied employees that are highly productive, look up the motivations behind Agile.  Otherwise, don’t.

Daniel then goes on to negate the benefits of a short development cycle.  Iteration based development has proven so effective almost every major process out there these days takes some form of this.  As for the statement he makes “you cannot demo a car engine until it is fully built” is patently wrong.  You CAN demo a car engine and that is the entire point behind computer models used solely to design engines, and cars in general, in a very LEAN or AGILE manner.  So you can deny it, but I believe these methodologies, the focus on individuals, individual motivation, individual enablement, and other such characteristics of lean, agile, and others is exactly why Toyota has stomped the competition is is basically the world leader in automotive manufacturing and quality.

One really can’t deny Toyota’s success, and it is the prime cut of what agile is.

Pair programming, he has a slightly decent point on this topic.  I too find myself torn about the usefulness of pair programming.  It does, however have positive effects, but I don’t buy into the eXtreme Agile approach to the whole pairing with one keyboard and one mouse.  Working together, communicating, and effectively integrating code into the main continuous integration serves just fine.  But, I can’t really knock it either as I haven’t truly tried hard core pair programming.

He goes on to slander design patterns, TDD, UML, and a few other things that most developers are fully aware is very helpful in software development.  Not sure why he hates so much of successful software.  I ponder, what does he like about successful software?

In Daniel’s defense, he does have some valid topics, just the article is angry and seems to be centered incorrectly and lash out in ways that don’t do the points he makes justice.  He does point to a very effective proven use of Agile methodologies, on a massive scale, for a company that turns a little it of profit now.  Google – so read the WHOLE ARTICLE of Stevey’s (this guy works for Google and I’ve read his material several times) and don’t be so frustrated with Agile, there ARE good and bad versions.  But I digress, on to the next.

Naming Conventions:  Are They Really That Important?

I stumbled on this entry, I don’t know when, but somehow it reflected several conversations I’ve had recently.  I like naming conventions, when enforced by ReSharper, Intellisense, or something of that sort.  But to remember all, and then have new developers go about learning them all in today’s development environment is…

…well…

…an utter waste of time.  Naming conventions are in no way important like they used to be.

Source Control is not a feature you can postpone to vNext

I just thought as I have many times, Microsoft doesn’t seem to get source control.  Ayende @ Rahien (the awesome software simian) goes on a slight rant about the absurdity of their solutions so far.

Why are the Microsoft Office file formats so complicated? (And some workarounds)

It also seems that with my new effort to build awesome Office interfaces, tools, and solid back end architecture for these systems I’ve found the insanity of Microsoft’s Office file formats.  I never realized, but Joel Spolsky, who I’ve read a lot of lately, worked on the Excel team at one point.  He points out that there a more than a few pages (349 in one PDF) of documentation solely about the file formats of Office.

A Field Guide to Developers

Joel also did a great write up in the year 2006 about how to get a keep top developers happy and productive.  Things like private offices, cool toys, a good physical work space, and one of the most important topics being the social existence of programmers.  It points out the importance of having great colleagues, independence and autonomy, how they’re treated, and that there are no politics of the feeling type.  As he states in the entry, “And this is the kind of environment you have to create to attract programmers. When a programmer complains about “politics,” they mean—very precisely—any situation in which personal considerations outweigh technical considerations. Nothing is more infuriating than when a developer is told to use a certain programming language, not the best one for the task at hand, because the boss likes it. Nothing is more maddening than when people are promoted because of their ability to network rather than being promoted strictly on merit. Nothing is more aggravating to a developer than being forced to do something that is technically inferior because someone higher than them in the organization, or someone better-connected, insists on it.“.  This, no politics philosophy, is absolutely 100% true!

Of only it was more common!

Top Five (Wrong) Reasons you Don’t Have Testers

…and an article on why a company, that intends to build good and reliable software should always have software testers.  Again, by Joel Spolsky.

I also dug up another very interesting experiment that the company 37signals undertook.  4 day work weeks.

Workplace Experiments

Amazingly, they got the same out of a 4 day work week as a 5 day work week.  Oddly enough people work much more diligently and effectively when they’re able to get a solid weekend of separation from work.  This obviously wouldn’t work with every occupation, like for instance McDonalds would probably get minimal amount of use out of 4 day work weeks, but software developers are not McDonalds employees.

Another great article in a similar vein is Increasing sustainable pace.  One of the comments is a classic combination of my railroading interests and software development, “Working more hours may not be the best solution. In the long run, working smarter always wins over working for longer periods. John Henry was the best rail spike driver in his day, and he died proving it. Power tools today let anyone work faster than John ever did.“.  I firmly believe that smart workers will produce far more than a bunch of overworked code monkeys.  In my experience this has a lso been proven time and time again.  This blog entry led me to a few searches, which then led me to some other articles.

That has been my reading for the day.  It’s been a ton but I just got on a blog reading kick and figured I’d write up what I’ve read as of late.

Technorati Tags: Software,Development,Developer,Programmer,Microsoft,Office,Workplace,Hours,Overtime,Work week,Agile,Lean,Six Sigma,Process Improvement,37signals

del.icio.us Tags: Software,Development,Developer,Programmer,Microsoft,Office,Workplace,Hours,Overtime,Work week,Agile,Lean,Six Sigma,Process Improvement,37signals

The Switching, BlogEngine.NET

Community Server is costly, elaborate, kind of cool, has a few skins, and blagh blagh blagh.  Out of all these things costly is a big problem.  Of course there is the free version etc., etc, but changing and modularity, ease of code readability, and other related items have caused me to limit what I do or do not build for my web site.  One of the biggest limitations has been the frustrating skins available for Community Server, at least the version I have.

All that said, Community Server is a 6 or 7 out of 10.  I looked at DasBlog and it is pretty decent too, probably a 7, maybe 8 out of 10.  But the one that is uber easy to setup, by far easier than those other two is BlogEngine.NET started by the cool man madskristensen.  This software, even though it doesn’t follow all of the particular standards and such that I might have used, is still a top notch and ridiculously easy package to setup.  Especially if one actually uses or develops with VS.NET.  It took me about 5  minutes total, including download time, to get the whole thing setup.

So over the next few weeks things might take a bit of a back burner while I build the ETL solution for getting the comments, posts, and other such infoz from the current site to the future soon to be site.

…so stay tuned.

Joel Spolsky, A Hero of Sorts

Ok, I don’t really know the guy, except that we both are rather hard core proponents of treating programmers, at least the really good ones the way they deserve – LIKE ROCK STARS!!

But Joel writes up some articles here and there and I find I agree with him on these points too, especially his article on inc.com (and on his blog here).  I’m all for a company being as productive and profitable as possible, as long as they don’t lose focus on why they exist (besides to make money and stay in business).  Starbucks is one of those companies.  I love the company, but over the last 2-3 years, with the help of Portland’s choices, I’ve all but cut out Starbucks from my expenditures.

On that topic Joel diverges from software topics and hits up some Starbucks topics over on inc.com.  So check out the article her wrote, and hopefully Starbucks will be checking it out too.  They really NEED to.

Sure sure, sometimes I still get a Starbucks, but most of my coffee money goes to companies that still get it about product.  The product is king (right after profits to stay in business, if you aren’t in business you don’t make the product anymore – it is NOT a chicken or the egg scenario) – companies can NOT forget this.

For real service and good coffee, from a place that doesn’t need to make up new names for what they do, check out Stumptown.  Truly pwning Starbucks in the coffee arena.

…and btw Joel, they’re (Stumptown) coming to New York, and I promise if you like coffee they are worth the trip (via Subway, probably the easiest way to get there).

Technorati Tags: Coffee,Stumptown,Joel Spolsky,Starbucks,Bad Systems,Good Systems,Expediter

del.icio.us Tags: Coffee,Stumptown,Joel Spolsky,Starbucks,Bad Systems,Good Systems,Expediter

ReSharper Loves VAR too Much :: Tip o' The Day

So fix it.  Of course, one can have it set however they want, but I know many developers that hate being warned/told/suggested that all their explicit/implicit type declarations should be with var or vice versa.

So here is what you do, hit up the ReSharper menu and click on Options.  Then go find this set of options.  (Click for original image)

1 Find this option…

2 Set these settings…

3 They’re about this far down…

Technorati Tags: VAR,Resharper

del.icio.us Tags: VAR,Resharper

Setting Sail with the Smuggling Pattern :: Part 1

Maybe because I’m often entertained by the geekiest of things, I’ve started usage of the Smuggling Pattern named after a fellow software architect Matt Davis’s terminology of smuggling data into and out of Excel.  It is something that I’ve lately needed to do on a regular basis, get data into and out of Excel without Excel, or at least the evil COM Interop Model, really knowing what is going on.  In other words, I want total programmatic control over data so I can trust it versus Excel mangling my poor data up.  This is what the Smuggling Pattern is going to do for me, and it is doing it well.

Now you might think, “WTF!”  But just to clarify, the Smuggling Pattern is really the Builder Pattern that we architects know and love with a cooler more fun more pirate like name!  So with that, here’s some of that code, and the TDD process I undertook to get this sucker built to set sail.

First I created a C# Class Project and created the following file folder structure and files.

Once I completed that I jumped right into testing.  Of course with ReSharper it makes life so much friggin simpler, in addition to TDD making life simpler.  I do still admit, that if you’re not practiced at TDD, then doing tests in whatever order you are comfortable with still keeps you at peak performance.  But eventually you should work toward TDD and toss in a great tool like ReSharper.  The difference in speed and quality is almost like getting 2 of the 3 engineering axioms instead of just 1 (i.e. speed, quality, & cost).

The first tests I started on where the individual builder tests, or in my case the Smuggler Object.  I always create a check for null just to make sure that I named the file correctly, kind of a double check, and it gives me the attribute, category, and other parts that I can copy to the other tests easily.

using Production.Smugglers.Builders;
using NUnit.Framework;

namespace Production.Tests
{
    [TestFixture]
    public class SmugglerTests
    {
        [Test, Category("Builder Tests")]
        public void TestsSmugglerIsNotNull()
        {
            var smuggler = new Smuggler();
            Assert.IsNotNull(smuggler);
        }
    }
}

This test I ran and it proved that the smuggler does instantiate appropriately, albeit not doing a single useful thing yet.  Next test…

[Test, Category("Builder Tests")]
public void TestsSmugglerOrderCompletionResult()
{
    var smuggler = new Smuggler();
    smuggler.CompleteOrder();
    SmuggledClassForTest smuggled = smuggler.GetSmuggledSwag();
    Assert.AreEqual(smuggled.StuffTestValue, Resources.ValueForTestingSmugglerSmuggled);
}

Now this test, if you view the picture, didn’t color code so well.  ReSharper points out that the instantiated class smuggler doesn’t have a CompleteOrder or GetSmuggledSwag method.

image 2

Move the curser (and new character marker over the red method) and hit Alt+Enter (IntelliJ Keymapping) and select the Create method ‘Smuggler.CompleteOrder’.

Now we have no more red, and the class Smuggler now has the method CompleteOrder.  The same code that is displayed in the image is directly below it so it can be copied and pasted easily.  Also note, I went ahead and added the IBuilder interface to the class since it will need to meet the contractual obligations of the builder interface.

namespace Production.Smugglers.Builders
{
    public class Smuggler : IBuilder
    {
        public void CompleteOrder()
        {
            throw new NotImplementedException();
        }
    }
}

I then wrote the following additional test, below is the additional test and the ones I already completed in total.

[TestFixture]
public class SmugglerTests
{
    [Test, Category("Builder Tests")]
    public void TestsSmugglerIsNotNull()
    {
        var smuggler = new Smuggler();
        Assert.IsNotNull(smuggler);
    }

    [Test, Category("Builder Tests")]
    public void TestsSmugglerSmuggledIsNotNull()
    {
        Smuggler smuggler = new Smuggler();
        smuggler.CompleteOrder();
        SmuggledClassForTest smuggled = smuggler.GetSmuggledSwag();
        Assert.IsNotNull(smuggled);
    }

    [Test, Category("Builder Tests")]
    public void TestsSmugglerOrderCompletionResult()
    {
        Smuggler smuggler = new Smuggler();
        smuggler.CompleteOrder();
        SmuggledClassForTest smuggled = smuggler.GetSmuggledSwag();
        Assert.AreEqual(smuggled.StuffTestValue, Properties.Resources.ValueForTestingSmugglerSmuggled);
    }
}

After that I went ahead and fleshed out the following classes to get the smuggler tests to green light.  First I stuck a resource variable in for my “test variable value”.  One could do this another million ways but I figured this quick n’ easy.

This resource file is located in the Properties of the project.

   
  Find the resources by clicking the tab…

Then finished the interface (for now of course).

namespace Production.Smugglers.Builders
{
    public interface IBuilder
    {
        void CompleteOrder();
        SmuggledClassForTest GetSmuggledSwag();
    }
}

Then finished the Smuggler Class (i.e. Builder).

namespace Production.Smugglers.Builders
{
    public class Smuggler : IBuilder
    {
        private readonly SmuggledClassForTest smuggledClassForTest = new SmuggledClassForTest();

        public void CompleteOrder()
        {
            smuggledClassForTest.StuffTestValue = Resources.ValueForTestingSmugglerSmuggled;
        }

        public SmuggledClassForTest GetSmuggledSwag()
        {
            return smuggledClassForTest;
        }
    }
}

Then the little SmuggledClassForTests class, which is basically the product of the builder.

namespace Production.Smugglers.Smuggled
{
    public class SmuggledClassForTest
    {
        public string StuffTestValue { get; set; }
    }
}

Note the namespaces, I make a point to follow the standard of maintaining folder and namespace integrity.  I promise keeping the integrity makes getting to and finding code way faster than getting those things out of sync.

I then ran the tests again…

…green lights!

kick it on DotNetKicks.com

Technorati Tags: Builder,Pattern,Design,Architecture,Resharper,Visual Studio,.NET,dotnet,unit Tests,testing,TDD

del.icio.us Tags: Builder,Pattern,Design,Architecture,Resharper,Visual Studio,.NET,dotnet,unit Tests,testing,TDD