Folders versus namespaces

What if you allow folder and namespace structure to diverge? I'm currently writing C# code with some first-year computer-science students. Since most things are new to them, they sometimes do things in a way that are 'not the way we usually do things'. As an example, tea … | Continue reading


@blog.ploeh.dk | 11 months ago

Is cyclomatic complexity really related to branch coverage?

A genuine case of doubt and bewilderment. Regular readers of this blog may be used to its confident and opinionated tone. I write that way, not because I'm always convinced that I'm right, but because prose with too many caveats and qualifications tends to bury the messa … | Continue reading


@blog.ploeh.dk | 11 months ago

Refactoring pure function composition without breaking existing tests

An example modifying a Haskell Gossiping Bus Drivers implementation. This is an article in an series of articles about the epistemology of interaction testing. In short, this collection of articles discusses how to test the composition of pure functions. While a pure fun … | Continue reading


@blog.ploeh.dk | 12 months ago

Are pull requests bad because they originate from open-source development?

I don't think so, and at least find the argument flawed. Increasingly I come across a quote that goes like this: Pull requests were invented for open source projects where you want to gatekeep changes from people you don't know and don't trust to change th … | Continue reading


@blog.ploeh.dk | 1 year ago

A restaurant example of refactoring from example-based to property-based testing

A C# example with xUnit.net and FsCheck. This is the second comprehensive example that accompanies the article Epistemology of interaction testing. In that article, I argue that in a code base that leans toward functional programming (FP), property-based testing is a bette … | Continue reading


@blog.ploeh.dk | 1 year ago

Anagrams kata as a one-liner

A futile exercise in code compaction. Recently I was doing the Anagrams kata in F# with Grzegorz Dziadkiewicz, and along the way realised that the implementation is essentially a one-liner. I thought it would be fun to redo the exercise in Haskell and see how compact cod … | Continue reading


@blog.ploeh.dk | 1 year ago

An abstract example of refactoring from interaction-based to property-based testing

A C# example with xUnit.net and CsCheck This is the first comprehensive example that accompanies the article Epistemology of interaction testing. In that article, I argue that in a code base that leans toward functional programming (FP), property-based testing is a better … | Continue reading


@blog.ploeh.dk | 1 year ago

More functional pits of success

FAQ: What are the other pits of successes of functional programming? People who have seen my presentation Functional architecture: the pits of success occasionally write to ask: What are the other pits? The talk is about some of the design goals that we often struggle with in … | Continue reading


@blog.ploeh.dk | 1 year ago

On trust in software development

Can you trust your colleagues to write good code? Can you trust yourself? I've recently noticed a trend among some agile thought leaders. They talk about trust and gatekeeping. It goes something like this: Why put up barriers to prevent people from committ … | Continue reading


@blog.ploeh.dk | 1 year ago

Confidence from Facade Tests

Recycling an old neologism of mine, I try to illustrate a point about the epistemology of testing function composition. This article continues the introduction of a series on the epistemology of interaction testing. In the first article, I attempted to explain how to tes … | Continue reading


@blog.ploeh.dk | 1 year ago

Warnings-as-errors friction

TDD friction. Surely that's a bad thing(?) Paul Wilson recently wrote on Mastodon: Software development opinion (warnings as errors) Just seen this via Elixir Radar, https://curiosum.com/til/warnings-as-errors-elixir-mix-compile on on treating warnings as errors, and yeah … | Continue reading


@blog.ploeh.dk | 1 year ago

Test Data Generator monad

With examples in C# and F#. This article is an instalment in an article series about monads. In other related series previous articles described Test Data Generator as a functor, as well as Test Data Generator as an applicative functor. As is the case with many (but not … | Continue reading


@blog.ploeh.dk | 1 year ago

A thought on workplace flexibility and asynchrony

Is an inclusive workplace one that enables people to work at different hours? In the early noughties I worked for Microsoft Consulting Service in Denmark. In some sense it was quite the competitive working environment with an unhealthy focus on billable hours, customer sat … | Continue reading


@blog.ploeh.dk | 1 year ago

Epistemology of interaction testing

How do we know that components interact correctly? Most software systems are composed as a graph of components. To be clear, I use the word component loosely to mean a collection of functionality - it may be an object, a module, a function, a data type, or perhaps something els … | Continue reading


@blog.ploeh.dk | 1 year ago

Contravariant functors as invariant functors

Another most likely useless set of invariant functors that nonetheless exist. This article is part of a series of articles about invariant functors. An invariant functor is a functor that is neither covariant nor contravariant. See the series introduction for more details. It … | Continue reading


@blog.ploeh.dk | 1 year ago

Built-in alternatives to applicative assertions

Why make things so complicated? Several readers reacted to my small article series on applicative assertions, pointing out that error-collecting assertions are already supported in more than one unit-testing framework. "In the Java world this seems similar to the result gain … | Continue reading


@blog.ploeh.dk | 1 year ago

Agilean

There are other agile methodologies than scrum. More than twenty years after the Agile Manifesto it looks as though there's only one kind of agile process left: Scrum. I recently held a workshop and as a side remark I mentioned that I don't consider scrum the best development … | Continue reading


@blog.ploeh.dk | 1 year ago

In the long run

Software design decisions should be time-aware. A common criticism of modern capitalism is that maximising shareholder value leads to various detrimental outcomes, both societal, but possibly also for the maximising organisation itself. One major problem is when company leaders … | Continue reading


@blog.ploeh.dk | 1 year ago

The IO monad

The IO container forms a monad. An article for object-oriented programmers. This article is an instalment in an article series about monads. A previous article described the IO functor. As is the case with many (but not all) functors, this one also forms a monad. SelectMany # … | Continue reading


@blog.ploeh.dk | 1 year ago

Adding NuGet packages when offline

A fairly trivial technical detective story. I was recently in an air plane, writing code, when I realised that I needed to add a couple of NuGet packages to my code base. I was on one of those less-travelled flights in Europe, on board an Embraer E190, and as is usually the cas … | Continue reading


@blog.ploeh.dk | 1 year ago

Functors as invariant functors

A most likely useless set of invariant functors that nonetheless exist. This article is part of a series of articles about invariant functors. An invariant functor is a functor that is neither covariant nor contravariant. See the series introduction for more details. It turns … | Continue reading


@blog.ploeh.dk | 1 year ago

Encapsulation in Functional Programming

Continue reading


@blog.ploeh.dk | 1 year ago

Some Thoughts on Naming Tests

Continue reading


@blog.ploeh.dk | 1 year ago

The Lazy Monad

Continue reading


@blog.ploeh.dk | 1 year ago

At the boundaries, applications aren't functional

Continue reading


@blog.ploeh.dk | 1 year ago

At the Boundaries, Applications Are Not Object-Oriented

Continue reading


@blog.ploeh.dk | 1 year ago

Monads

Continue reading


@blog.ploeh.dk | 2 years ago

Contravariant Dependency Injection

Continue reading


@blog.ploeh.dk | 2 years ago

Tips for better Pull Requests (2015)

Continue reading


@blog.ploeh.dk | 2 years ago

Translating F# discriminated unions to C# Visitor pattern

Continue reading


@blog.ploeh.dk | 2 years ago

Am I stuck in a local maximum?

Continue reading


@blog.ploeh.dk | 2 years ago

Property-based testing is not the same as partition testing

Continue reading


@blog.ploeh.dk | 2 years ago

Referential transparency fits in your head

Continue reading


@blog.ploeh.dk | 2 years ago

Structural Equality for Better Tests

Continue reading


@blog.ploeh.dk | 2 years ago

The Dispassionate Developer

Continue reading


@blog.ploeh.dk | 3 years ago

Pendulum Swings

Continue reading


@blog.ploeh.dk | 3 years ago

Dependency Rejection

Continue reading


@blog.ploeh.dk | 3 years ago

How to Design a DI-Friendly Framework

Continue reading


@blog.ploeh.dk | 3 years ago

Fit URLs

Continue reading


@blog.ploeh.dk | 3 years ago

Fortunately, I don't squash my commits

Continue reading


@blog.ploeh.dk | 3 years ago

We need young programmers; We need old programmers

Continue reading


@blog.ploeh.dk | 3 years ago

Where is the Science (behind software)?

Continue reading


@blog.ploeh.dk | 3 years ago

Curb Code Rot with Thresholds

Continue reading


@blog.ploeh.dk | 4 years ago

Visitor as a Sum Type (2018)

Continue reading


@blog.ploeh.dk | 4 years ago

Discerning and Maintaining Purity

Continue reading


@blog.ploeh.dk | 4 years ago

On Doing Katas

Continue reading


@blog.ploeh.dk | 4 years ago

Semigroup Resonance FizzBuzz

Continue reading


@blog.ploeh.dk | 4 years ago

Zone of Ceremony

Continue reading


@blog.ploeh.dk | 4 years ago