Languages

Definition of Done – Acceptance Tests

December 11th, 2013 / Tales from a Trading Desk

InfoQ has an interesting article on QA in Scrum.  The article offers a very simple Definition of Done (DoD) list, which is a good start – especially as in many organisations “Done” is often unfortunately accepted as a word, with no real evidence.  I’d offer that what is missing from this list one of the constructs of a good story – acceptance tests.  Additionally, I’d say that “acceptance test cases” need to be correlated back to acceptance tests on the story, else you could have somewhat of a delta between that the engineering team is using to test the story, and get to Done, and what QA is using to test the story – one source of truth.  Mike Cohn sums up acceptance testing quite clearly for all involved in “testing” stories that need to be deemed “Done”:

Reactive Programming for Databases

December 9th, 2013 / Tales from a Trading Desk

Slashdot has an interesting article by Val Huber.  Espresso Logic web site provides more detail on Reactive Service for SQL Data, which primarily creates REST API’s over databases, with the REST API injected into the path to the database, and thus offering the reactive layer.  No surprise to find JavaScript as the language of choice for the business logic (reactive layer).  Architecture overview available here.

Expose your enterprise data as RESTful APIs to customers and partners with complete row and field-level security – no programming

Liquidity Management – Execution Venue Pricing

December 3rd, 2013 / Tales from a Trading Desk

During some late night code sessions, I’ve refactored the previous blogged actor liquidity management code, and borrowed a few lines of code from Typesafe’s Reactive Stock sample – specifically the price generator:

  // A random data set which uses stockQuote.newPrice to get each data point
  var stockHistory: Queue[java.lang.Double] = {
    lazy val initialPrices: Stream[java.lang.Double] = (new Random().nextDouble * 800) #:: initialPrices.map(previous => stockQuote.newPrice(previous))
    initialPrices.take(50).to[Queue]
  }

  // Fetch the latest stock value every 75ms
  val stockTick = context.system.scheduler.schedule(Duration.Zero, 75.millis, self, FetchLatest)

I also made a basic start to adding Testkit test coverage:

Liquidity Management Through Actors and Futures

November 28th, 2013 / Tales from a Trading Desk

Based on the coolness of Typesafe’s recent blog postings on akka, and a little time late one day recently – actually I think it was post midnight, but who’s counting.  I decided to take the standard liquidity management high level architecture, and implement the simple/basic flow using akka with futures.  Similar to the view provided by the recent Typesafe survey, I failed to leverage TestKit :(

2013 JVM Language Summit

November 26th, 2013 / Tales from a Trading Desk

Few stand out items from the JVM Language Summit 2013:

Typesafe Activator Coolness

November 26th, 2013 / Tales from a Trading Desk

Many months ago Typesafe open sourced Activator.  Although it may seem like this posting is late to the party, which it is :) , the posting was written some months back, I just kept forgetting to push the publish button.  Hence, although late, its worth mentioning that Activator is cool.  Templates cover the usual basic intro, coupled with an appropriate finance template, Akka, WebSocket and Angular.JS.  Excellent stuff if your into Akka ;)

Google Dart Spark

November 26th, 2013 / Tales from a Trading Desk

Google is using Dart to built an Chrome app-based Integrated Development Environment (IDE).  Source code for spark is on GitHub, with widget library available here.  The Spark name reminded me of the Microsoft Expression Blend code-name, Sparkle – suspect there is no correlation :)

Wolfram Language & System

November 22nd, 2013 / Tales from a Trading Desk

Documentation available here.  Financial data available here.  Parallel Computing and more.

The Wolfram Language is a highly developed symbolic language, which unifies a broad range of programming paradigms and uses its unique concept of symbolic programming to add a new level of flexibility to the very concept of programming.

Wolfram Language

November 18th, 2013 / Tales from a Trading Desk

Appears Wolfram could about to release some interesting stuff – Wolfram Language, Wolfram Cloud and Data Science Platform

Annotation Fun – AST (Abstract Syntax Tree) Transformations

November 15th, 2013 / Tales from a Trading Desk

Another airport, another day. Kicking around some ideas with reactive, Java, data tables and protocols.  Whilst trying to achieve a more reactive solution that reduced a few coding problems, I considered leveraging annotations, but after kicking around a few coding ideas, I believe I might be better off with custom AST (Abstract Syntax Tree) transformations, via Lombok.  Lets hope AST’s achieve the elegant code solution I’m looking for.

Dependency and Forward-Propagating Graphs

November 11th, 2013 / Tales from a Trading Desk

Although I’ve blogged about Athena before, its worth a re-read of Athena from the JPM careers data.

Dependency graph – developers define specially decorated Python classes to represent markets, financial instruments and deals. A runtime parser inspects the classes to build an in-memory dependency graph representing the relationships between them. This provides a natural and powerful way to explore ‘what-if’ scenarios by moving market rates and examining the impact on prices derived from them.
At the core of the (athena reactive) framework is a forward-propagating graph, where nodes contain units of work scheduled forexecution based on their ranking (topologically sorted order) in the graph.

Pre-Flight Java Coding – Clone()

November 10th, 2013 / Tales from a Trading Desk

So after a very minor break, its back to the airport cycle of work life, which in itself bring a degree of fun and games ;)   Before flights, I like to ensure I’ve got enough reading and coding material.  Hence today, its a bit of pre-coding to ensure I’m ready for tonight’s flight, and a re-cap to the coding challenge I was working on a few weeks ago.  Very quickly this morning I ran into the classic clone() method madness of Java.

2014 SEF Big Data Machinary

October 31st, 2013 / Tales from a Trading Desk

Wall Street & Technology has an interesting article on SEF’s. offering a 2014 view of more market data coupled with magic machines.  More data can only be good for the Big Data pushes that are occurring in many organisations.  Also in Wall Street & Technology, an article offering a 2014 view of Big Data 2.0.  The Big Data article cites Open Source as the preferred Big Data route for technology, which should play nicely for the Spring XD initiative.

Reactor – Asynchronous World of Application Building

October 31st, 2013 / Tales from a Trading Desk

It’s nice to see Reactor hitting the second M1 milestone.  Having coded Rx on .NET, coupled with a lot of work recently with RxJava, it appears time to have a detailed look at Reactor.  It’s always nice to see a trading bias to the samples of reactive frameworks :)

Shared Nothing Architecture

October 28th, 2013 / Tales from a Trading Desk

Dark Pools (see provide blog posting) captures Josh Levine comments, which I can only agree with, that not enough people understand and thus architect shared-nothing solutions.  Island was ahead of the competitions in its day in terms of architecture, and thus latency.  Even today, there are still limited shared nothing architectures in many of the financial silo’s :(

Finally, check out the source code that Josh release some time ago, specifically around the matching engine

Reactive Synchronization

October 13th, 2013 / Tales from a Trading Desk

Having been involved in numerous distributed system over n years, it interesting to read Rylan’s article on “Synchronization in a Distributed System” followed by a re-reading of the Reactive Manifesto.  Lamport timestamps and vector clocks – all clever stuff.  Symmetricom offers a read on Lamport and NTP.  Food for thought for globally distributed reactive event architectures

Glitch: Live Programming

October 1st, 2013 / Tales from a Trading Desk

Interesting read from Microsoft Research on Live Programming,  As referenced by the paper, Bret Victor’s work has thankfully been considered.  Now all we have to do is wait n years, and maybe Glitch will see the light of day in Visual Studio.

Executable Specification

September 30th, 2013 / Tales from a Trading Desk

Read the book, live the dream – Stories with AC’s that lead to Scenarios

The communication across all of those stakeholders ( testers, analysts, project and program managers, multiple SMEs covering multiple interrelated domains) to create a single coherent vision

Although old, this study investigates if a non-technical individual can write executable specifications based on domain specific languages.

Mixed mode HTTP / HTTPS

September 30th, 2013 / Tales from a Trading Desk

If you don’t have time to read troyhunt’s full article on “The beginners guide to breaking website security with nothing more than a Pineapple”, then at least try and read the conclusion sections, and follow the link to “why it’s not ok to load login forms over HTTP even if they post to HTTPS”.

Finally, have a read of “5 ways to implement HTTPS in an insufficient manner (and leak sensitive data)”

Airplane Madness Coding – Financial Market Simulation Part 2

September 27th, 2013 / Tales from a Trading Desk

Vanilla Java’s “Writing and Testing High Frequency Trading Engines talk at JavaOne” may offer at some point in the future for my mad simulator to leverage some of the OpenHFT code.  TransFIX, once the github repo started to get populated is of particular interest.  I’ve partially cheated on the messaging I’m using in the simulator today, but chronicle will probably be useful later as well.

Peter’s JavaOne presentation is available here.