Links for 2013-04-25

  • Functional Reactive Programming in the Netflix API with RxJava

    Hmm, this seems nifty as a compositional building block for Java code to enable concurrency without thread-safety and sync problems.

    Functional reactive programming offers efficient execution and composition by providing a collection of operators capable of filtering, selecting, transforming, combining and composing Observable’s. The Observable data type can be thought of as a “push” equivalent to Iterable which is “pull”. With an Iterable, the consumer pulls values from the producer and the thread blocks until those values arrive. By contrast with the Observable type, the producer pushes values to the consumer whenever values are available. This approach is more flexible, because values can arrive synchronously or asynchronously.

    (tags: concurrency java jvm threads thread-safety coding rx frp fp functional-programming reactive functional async observable)

  • You probably shouldn’t use a spreadsheet for important work

    Daniel Lemire comments on the recent cases of bugs in spreadsheets causing major impact:

    There are several critical problems with a tool like Excel that need to be widely known: * Spreadsheets do not support testing. For anything that matters, you should validate and test your code automatically and systematically; * Spreadsheets make code reviews impractical. To visually inspect the code, you need to click and each and every cell. In practice, this means that you cannot reasonably ask someone to read over your formulas to make sure that there is no mistake; * Spreadsheets encourage redundancies. Spreadsheets encourage copy-and-paste. Though copying and pasting is sometimes the right tool, it also creates redundancies. These redundancies make it very difficult to update a spreadsheet: are you absolutely sure that you have changed the formula throughout?
    Agreed on all three, particularly on the impossibility of testing. IMO, everyone who may be in a job where automation via spreadsheet is likely, needs training in SDE fundamentals: unit testing, the important of open source and open data for reproducibility, version control, and code review. We are all computer scientists now.

    (tags: spreadsheets excel coding errors bugs testability unit-testing testing quality sde sde-fundamentals dry)

  • Log4j2 Asynchronous Loggers for Low-Latency Logging – Apache Log4j 2

    implemented using the LMAX Disruptor library — very impressive performance figures. I presume in real-world usage, these latencies are dwarfed by hardware costs, though

    (tags: disruptor coding java log4j logging async performance)

This entry was posted in Uncategorized. Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment

  1. Posted April 26, 2013 at 10:07 | Permalink

    Death to spreadsheets! At work, I’m a capacity planner and I’ve been fortunate enough to have worked with program managers who share my hatred of spreadsheets when we can create tools and APIs to do everything for us.

    And no, the irony that an Irishman who is both good at and enjoys capacity planning isn’t lost on me :)