Merging modern software development with electrons and metal
Random header image... Refresh for more!

Reactive Reading

I’ve managed to do a bit of professional reading in the recent past, from process to PLC to mind-blowingly functional.

Business Process Books

I read one business book, Profit Beyond Measure by Johnson and Broms.  They use the Toyota Production System and Scania’s modular design process to examine how to manage by means (MBM), instead of manage by results (MBR).

In MBR, management sets financial targets such as profit margins, sales level, or market share.  In the MBM approach, management focuses on the process (how) the company achieves its result, for example, how work flows through from customer order to customer delivery (and payment!).

Three Fun, Mind Blowing MEAPs

I skimmed three MEAPs.  A MEAP means you get to download and read the book while it is being written.  Since I still like dead tree books, I paid a little bit extra so when the books are finished, I will get real books hot off the presses.  I thought all three books were good, maybe excellent.  My selections were:

  • Grokking Functional Programming (Grokking FP) by Aslam Kahn is an introductory book on functional programming.  The goal is to introduce the fundamentals of functional programming in an easy manner, without any scary mathematics, and then to get you to truly understand (“grok”) how to approach programming challenges in the functional way.  The book is filled with examples and exercises, since you don’t really understand a method until you do it yourself.
  • Functional Reactive Programming (FRP) by Blackheath and Jones.  FRP uses cells (representing values over time) and streams (actions/events over time) to handle dependencies.  Since you declare what depends on what, when something happens (such as a new event), the FRP system knows how to update everything that depends on that change in the proper order.  Think of how a spreadsheet updates itself when you change a value.  FRP is a good match for event-based systems such as GUIs, but not so good when you need actions to happen in a predictable sequence (especially hard real time systems).
  • Reactive Extensions In Action by Tamir Dresher.  Reaction Extensions (Rx) is described as “observables + LINQ + schedulers” and has many (but not all) of the features of a Functional Reactive Programming library.  Originally written in .NET by Microsoft, Rx has been ported to at least 13 languages (including JavaScript, C++, Ruby, and Python) and is used extensively outside of Microsoft.

I found FRP to be very interesting, but I don’t see an immediate need for it right now.

I do plan on going back through Grokking FP and doing all examples because although I am somewhat familiar with a lot of functional ideas, I do not yet think in functional way — I haven’t grokked it yet.

I am also planning on going through Rx In Action in depth, because I think it may be a good way to re-factor one of my programs at work that has significant event handling.  I’m interested in Rx because I like its:

  1. Support for handling events as streams (like FRP)
  2. Support for event timeouts
  3. Support for propagating errors that occur in event handlers
  4. .NET support (I like to program in C#)
  5. Better support for sequences (which I need)
  6. Concurrency control with schedulers
  7. The ReactiveUI GUI library

Functional programming is hot right now because some of its features (such as immutable types) can make parallel programming significantly easier.  I do think automation programmers should learn it (I can wholeheartedly recommend Grokking FP) because it will truly expand your mind, and FP is becoming more popular.

Programmable Logic Controller (PLC) News

On the PLC side, I have decided to skim through Programmable Logic Controllers: An Emphasis On Design And Application by Kelvin Erickson.  I started trying to read it thoroughly, but haven’t made much progress so I am changing my approach to skimming.

Based on a reader recommendation, I just bought Progammable Logic Controllers: A Practical Approach to IEC 61131-3 Using CoDeSys by Dag Hanssen.  I plan on skimming it next, and then will share my findings.

Both appear to be well written, both are a bit pricey, both were written by professors, and both are introductory books.

The contrast with mainstream programming books is fun:

  • My three Manning books (print and ebook) cost the same as PLCs by Hanssen.  I paid $70 to Manning with a 50% discount (you can get that by signing up with Manning and being patient).  I paid $70 for PLCs by Hanssen (new, with $9 Alibris discount; list price is $120), and $50 for PLCs by Erickson (first edition, used; list price for current version (Third Edition) is $85).
  • The MEAPs are well written, advanced books covering cutting edge topics.  The PLC books are good, too, but they are introductory textbooks.
  • The MEAPs were written by developers who use these tools in their day to day jobs.  The PLC books were written by professors.

So I haven’t found an advanced PLC programming book yet, however, there is good news: Frank Lamb, proprietor of the Automation Primer blog and author of Industrial Automation: Hands On, has announced that he has started writing one.

0 comments

There are no comments yet...

Kick things off by filling out the form below.

Leave a Comment