Archive for the ‘Agile’ Category
Posted by jpluimers on 2015/06/03
Like regular life, a programmer’s life is constant learning. And sometimes you’d wish you had known things earlier.
A few quotes from the article:
Test constantly while coding. Personally, I think the single most important contribution of the Agile movement to programming is communicating the value of developer testing (generally, unit testing). I am not an advocate of TDD and feel that many of the critiques directed at it are valid. But I am a passionate believer in unit testing. Of all the practices here, this is the one that would have served me best in my salad days. The ability to check in code knowing that it’s unlikely to contain silly errors and overlooked conditions allows me to have a much clearer idea of what progress I’ve made. I don’t have to worry nearly as much that there is still an extended debugging cycle of unknown length ahead of me. I now compile with the expectation the code will work the first time, rather than entertaining the fond hope that it might.
Fully automate the pipeline. This seems like unremarkable advice. But it got me to continuous delivery before that concept had a name. I automated build, test, deploy. I also automated updates to the website, to the Javadocs, to just about everything I could possibly update as part of the regular build. While this took a lot of time to write out (using Ant), the payoffs are continual. By having automated everything (well, except for some manual tests) I can build with high confidence in the generated software, even if a given feature is incomplete. I don’t worry at all about fragility. In the future, I expect to automate things even more: I want to write more scripts that simulate all the possible installation options and make sure they all work correctly or provide accurate error messages. Right now, I’m pretty sure they do, but I don’t know for certain because of the absence of this step from the automated pipeline.
–jeroen
via: Things I Wish I’d Known Earlier | Dr Dobb’s.
Posted in Agile, Continua CI, Continuous Integration, CruiseControl.net, Development, msbuild, Software Development, Testing, Unit Testing | 2 Comments »
Posted by jpluimers on 2015/01/29
Unit testing has been here for a long time, and so has Unit Testing in Delphi. Below a summary of historic links together with some notes on how the state of affairs changed over the years.
Charlie Calvert
I’ll start with one of the first large Delphi Unit Testing articles was a paper by Charlie Calvert summarizing the state of the art on Delphi Unit Testing in 2004. It is present in the wayback machine as DUnit Talk and on his elvenware.com site.
Note that the elvenwere.com site is sometimes slow or hard to reach. Since his evangelist days at Borland/CodeGear, Charlie has moved through a few evangelist jobs at Falafel and Microsoft and finally went back to his old profession: being a great teacher – this time at Bellevue College – often using script based languages and cloud computing, with less focus on his web-presence.
Many of his IT books (during his writing period, he wrote both as Charles Calvert and Charlie Calvert) are still relevant though.
Posted in Agile, Conference Topics, Conferences, Delphi, Dependency Injection, Design Patterns, Development, Event, FreePascal, History, Inversion of Control / IoC, Pascal, Software Development | 3 Comments »
Posted by jpluimers on 2015/01/06
Thanks GDG Düsseldorf for pointing me to The Truth about BDD – Clean Coder by Uncle Bob.
The clue is below. Read the whole article for the context.
TDD was adopted as a way to help us phrase low level requirements and drive the development of software based on those requirements. BDD, a variation of TDD, was created to help us think better about higher level requirements, and drive the development of systems using a language better than unit tests. But BDD is really a variation of Finite State Machine specifications, and FSMs can be shown, mathematically, to be complete. Therefore, we may have a way to conclusively demonstrate that our requirements are complete and consistent. (Apologies to Godel).
–jeroen
via: The Truth about BDD – Clean Coder.
Posted in Agile, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2014/09/25
If you are going to do test driven development and unit testing, you should watch these videos and slide decks, most of them by Miško Hevery:
- Not a video, but a good starter: Guide: Writing Testable Code (or read the PDF version).
- 0:32:07 ▶ “The Clean Code Talks — Unit Testing” – YouTube.
- 0:37:56 ▶ The Clean Code Talks – Don’t Look For Things! – YouTube. Read the rest of this entry »
Posted in .NET, Agile, C#, Delphi, Development, Java, Java Platform, JavaScript/ECMAScript, Pascal, Scripting, Software Development, Unit Testing, VB.NET | 2 Comments »
Posted by jpluimers on 2014/08/21
Recently, I bumbped into the The Little Mocker | 8th Light by uncle Bob C. Martin.
It’s a nice conversation of a mocker, that explains about Test Doubles (with examples).
Mocks are a bit to Test Doubles like Stunt Doubles are to Body Doubles: a specific kind of Test Doubles.
The conversation step by step explains these Test Doubles probably based on Martin Fowler‘s list of Test Doubles or Mocks, Fakes, Stubs and Dummies at XUnitPatterns.com:
- Test Dummy: returns nulls (or equivalents null) to consumers as they should not have used: the dummy is a filler in the parameter list to setup the System under Test.
- Test Double: the generic term (sometimes informally called mocks, but they are not; see Test Mock below).
- Test Stub: like a Test Dummy, but returns a specific value for a specific test (or group of tests). For instance return true for a LoginStub.
- Test Spy: like a Test Dummy (or evenTest Stub) but also makes a note (or log) of each call (so you can spy on the calls). It can lead to coupling, so might make your tests fragile.
- Test Mock: like a Test Spy, but allows verification of certain existence of absence notes or log entries (called Expectations). Like ensuring a certain call to theTest Mock was made with certain parameters.
- Test Fake: unlike a Test Stub, as fakes have business-like behaviour (so it simulates business behaviour to a certain extent, for instance by having certain data-sets in memory, or responding with certain business logic for instance returning true for certain Login conditions). It also means thatTest Fakes need unit tests of their own.
The links in the above list all contain a small diagram showing the dataflow between the Test Double, System under Test, stc. Jeff Atwood has some nice graphics to go with them at Test Doubles: A Taxonomy of Pretend Objects.
In practice, Stubs and Spies are probably used most, followed by Mocks (either in code or with a Mocking tool).
Notes:
- The above order is how the story explains them, not the list by Martin Fowler or the list on WikiPedia.
- Want to know more on how to use Test Doubles? Read Test Double at XUnitPatterns.com and Mocks Aren’t Stubs or buy xUnit Test Patterns: Refactoring Test Code: Gerard Meszaros: 9780131495050: Amazon.com: Books.
–jeroen
Posted in Agile, Development, Software Development, Unit Testing | Leave a Comment »
Posted by jpluimers on 2014/03/03
When writing the Spring4D unit tests for GetTypeSize to include as many TTypeKind values, I came across a few types that either did not compile, or were not supported by TypeInfo. I listed them below as I could not find them in the documentation.
I included a test named Test_EnsureAllTTypeKindsCoveredByCallsTo_Test_GetTypeSize_ that verifies that all TTypeKind values except tkUnknown are covered. So future extensions of TTypeKind will make the tests fail.
As a side issue, I really wanted to know if tkUnknown could be emitted by the compiler. It can sort of, for instance by defining discontiguous enumerations, but are incompatible with TypeInfo as well.
Types that do not compile at all: Read the rest of this entry »
Posted in Agile, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, DUnit, Software Development, Unit Testing | 2 Comments »
Posted by jpluimers on 2014/02/09
Yesterday there was this interesting post from Jonas Bandi – Google+ – Blogged: Not happy with Agile, but why?.
The content of his post is the opposite the title suggests: most developers love Agile, but it often is highly incompatible of management in bigger companies.
Well balanced post, much worth reading it.
–jeroen
Posted in Agile, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/12/29
Thanks Uncle Bob Martin for posting this.
I’ve been trying (with increasing success: it takes time to get this all right) to practice XP (through various name changes) as much and wide as possible since almost 14 years, and only the last few years it is starting to be common practice for many more people.
take a moment to reflect back on 1999. A time when Kent Beck wrote a ground-breaking book. A book that changed everything. Look back and remember: Extreme Programming; and recognize it as the core of what we, today, simply think of as:
Good Software Practice.
–jeroen
via: Extreme Programming, a Reflection | 8th Light.
Posted in .NET, Agile, Continuous Integration, Delphi, Design Patterns, Development, Software Development, Source Code Management, Technical Debt, Testing, Unit Testing | Leave a Comment »