Skip to content

Archives

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)

1 Comment