Lazycoder

29Oct/090

Agile practices do not address technical complexity

So, first go read Ted Neward “Agile is treating the symptoms, not the disease.” and Phill Haack “Software Externalities” then read the Agile Manifesto

At some point that very simple manifesto turned into a set of “must have” tools, technologies, methodologies, and processes. Which I think defeats the purpose. You have to look at each tool and methodology and think “how does this help me build better software for my user?”

There is a very important paragraph at the bottom.

That is, while there is value in the items on the right, we value the items on the left more.

 

So let’s go through each line.

 

Individuals and interactions over processes and tools

These “story cards” are one way to increase the communication between individuals during their interactions. Gigantic requirement specifications don’t do anyone except other software engineers any good. The daily standup meeting that a lot of agile practioners adopt is one way to keep the team up to date and find out about possible problems as soon as possible.

 

Working software over comprehensive documentation

No matter what, you’d rather have an application that meets the users needs and helps them get stuff done easier than they could before you wrote their application. Chances are, if you need to write a lot of documentation, you’ll have to maintain it also. Most of the time documentation is only for other developers that will have to come along behind you and change the software to meet new user needs. What better way to communicate what the software is supposed to do than a bunch of executable code, e.g. unit/scenario/integration tests, that ensures the application does what it says it can do?

Customer collaboration over contract negotiation

By adopting techniques and tools that allow you to change direction quickly and confidently, you don’t need to “lock down requirements” before you start developing. If the requirements change, you’re code base and tools are flexible enough to handle the change. That’s where principles like S.O.L.I.D. come into play, they make your code base more flexible and responsive to change.

Responding to change over following a plan

How can you ensure that, as you change your software to respond to changes in the business or requirements, your software doesn’t break? Automated testing is one method. Continuous integration builds are another. These tools aren’t used by agile practitioners  because they want to feel cool, they are used to help them better respond to change. The story cards and backlog also help. You can re-prioritize your backlog to meet the businesses current needs. Since your iterations are short, and your stories are small, the overall impact to changing direction is minimized.

 

The fact that software development is complex, and that there is a lot of new things to learn. That there is ALWAYS something new to learn about software development, has NOTHING to do with agile practices. You’d have exactly the same problem keeping up if you practice agile or not. You might have an internal process where you work that allows you to respond to change quickly, it may even involve Microsoft Access!

There was a great post that Miguel De Icaza linked to on Twitter. “Every Ideology is Right

What I mean by "right" is that is each one is responding to a genuine problem within human existence. And their prescriptions for how to deal with that problem "work," at least in the short term in limited circumstances.

Obviously, there are unforeseen consequences because each ideology looks at a limited aspect of reality, and then tries to apply its solution for that part of reality to ALL of reality. The important thing is to try to have your ideology "look" at as much of reality as possible.

Tagged as: No Comments
28Oct/094

A theory about the iPhone app store

My theory is that in 2 years there will be so many applications in the iPhone app store that it will be impossible to achieve success. That only the early developers will find any measure of success.

 

I say this because it seems to be the way the Apple software ecosystem works. There are a few applications, written by developers who have been working on the Apple platform for a great number of years, that are constantly recommended and very successful.

Tagged as: , 4 Comments
26Oct/091

Great Presentaton about software development

Hopefully someone will post video of the presenter giving the presentation to fill in the gaps.

Filed under: General 1 Comment
24Oct/09Off

Herding Code 63: Victory in Software Development with K Scott Allen

On the heels of his recent Concept Camp 2009 fireside keynote, K Scott brings his opinion about victory in software development to the podcast. Listen in as the guys consider how to define and measure success, how to solve business problems despite our customers and ourselves, and how to focus less on risk and more [...]

23Oct/096

How far behind are Microsoft developer frameworks in terms of design?

From the article “Design Patterns 15 Years Later: An Interview with Erich Gamma, Richard Helm, and Ralph Johnson

 

Erich Gamma: Yes, and it is funny that you mention the iPhone. The iPhone SDK is based on the NeXTStep object-oriented frameworks like the AppKit. It already existed when we wrote Design Patterns 15 years ago and was one source of inspiration. We actually refer to this framework in several of our patterns: Adapter, Bridge, Proxy, and Chain of Responsibility.

Richard: Which is a great example of the enduring nature of good design, and how it survives different technical manifestations.

 

Emphasis mine.

In the Microsoft developer community, we are just now getting around to implementing patterns like MVC, Adapter, and Observer. People still argue over whether or not the MVC pattern is “necessary” to build a “working application”.

 

I guess it depends on whether or not you like good design?

Tagged as: , , 6 Comments
12Oct/099

Mocks versus stubs and fakes

I dislike using mocks I dislike using dynamic mocking/stubbing frameworks. because it means my tests have an extra dependency beyond just the SUT (System Under Test). I often find myself spending more time getting the mock to work correctly rather than my app code. The lambada + generics based Mock suites (Moq, RhinoMocks, etc), IMO, complicate the test and make them unreadable in some situations.

 

Compare the two examples in this post. One uses RhinoMocks to create a stub of IDataReader and the other uses the DataTableReader to create a stub for the test. Which example is simpler and has less chance to fail due to the stub?

 

 http://www.lazycoder.com/weblog/2008/12/12/mocking-idatareader-using-rhinomocks-35/

Using RhinoMocks

C#:
  1. IDataReader reader = MockRepository.GenerateStub<IDataReader>();
  2.             reader.Stub(x => x.Read()).Return(true).Repeat.Times(1);
  3.             reader.Stub(x => x.Read()).Return(false);
  4.             reader.Stub(x => x["ID"]).Return(Guid.Empty);
  5.             reader.Stub(x => x["FullName"]).Return("Test User");

Using DataTableReader

C#:
  1. DataTable table = new DataTable();
  2.             DataRow row = table.NewRow();
  3.             table.Columns.Add(new DataColumn("ID"));
  4.             table.Columns.Add(new DataColumn("FullName"));
  5.             row["DirectoryUserID"] = Guid.Empty;
  6.             row["FullName"] = "Test User";
  7.             table.Rows.Add(row);
  8.             DataTableReader reader = new DataTableReader(table);

Stubs/Fakes allow me more control over HOW the test fails and results in a test/fixture that is easier to read. I'm not saying that mocks aren't useful in certain situations, but I would favor a stub over a mock IMO, your test should only fail because of the code it is testing, not because of a mock.

 

Although it is fun to say "Mock ME? No mock YOU!".

update: I forgot to link to Rob's post that inspired this post. "Using Dependency Injection and Mocking For Testability"

update to the update: Jeremy Miller and Nikola Malovic both pointed out that I'm using the terminology incorrectly. It turns out I don't specifically hate mocks themselves, I dislike use dynamic mocking/stubbing frameworks due to the extra dependency they introduce into my tests. Thanks for the corrections. Back to reading Fowler for me!