Development Central

Bill Sorensen's software development blog

Disfunctional

A coworker and I spent a total of at least 8 man-hours this week tracing down one threading bug. The original author was locking access to shared state, and got it almost right.

Writing thread-safe code that uses global mutable state is hard. It's much easier to avoid the problem entirely.

Functional programming emphasizes pure functions (the same inputs will always give the same output, with no side effects) and immutable types. If you write your code in that style, thread safety comes naturally.

Regardless of programming language, consider a more functional approach. Your future self will thank me.

For a good book on the subject, try Real-World Functional Programming: With Examples in F# and C#.

In the NOOO

I'm a signatory to the Manifesto for Not Only Object-Oriented Development.

# 11010100. :)

Speaking at CRineta

I'm giving a presentation on FSM.NET at the local users' group on Monday night. @dahlbyk is opening for me, so I've got a tough act to follow.

Meeting info

Important read for C++ programmers

Edward C++Hands

Long but excellent, IMHO.

The author, Bartosz Milewski, has a strong background in C++, but does have a commercial interest in Haskell.

FSM

My first open source project on GitHub is FSM.NET, a simple "stateless" finite-state machine library for .NET. It's also available through NuGet.

The library is written in F#, but is designed to be easily callable from C#. The project includes examples in both languages.

Migrated old blog entries

This was not easy.

Index of older blog entries

 

Welcome

I am in the process of migrating posts over from my old blog (I moved hosting providers, platforms, blog software, etc.). Please be patient.

Thanks,

Bill