Manager: Build me a New York Stock Exchange.
Programmer: I don’t know how to do that.
M: Build me a continuous rule-based order matching system that generates trades using bids and asks ranked by price-time priority.
P: Could you be more specific?
M: Write me a function that receives two arrays of objects. The objects are sorted by price, one ascending and one descending. Each object is associated with a quantity field. Iterate through both arrays in parallel, returning a list of matches where the object in the ascending array has a price that is greater than or equal to the price of the object in the descending array. As matches are found, decrease the quantity fields accordingly and remove objects when the quantity reaches zero.
P: Yes boss.
Manager: Write me a function…
Developer: Piss off, I’m not your bitch.
(Developers often have entitlement issues, particularly in Silicon Valley.)
M: This company would be much obliged if you could apply a modicum of your immense talent to building a matching engine for a stock exchange. At your leisure, of course. I understand that the office ping pong tournament takes priority over this task.
D: Sure, I’ll whip something up after my afternoon nap.
Manager: Build me a continuous rule-based order matching system for a sequence of bids and asks.
Computer Scientist: I don’t actually know how to code, but I propose you use a deferred-acceptance algorithm, which would perform the matching function in O(n2) time.
M: Thanks, that was incredibly useless.
I supposedly have a degree in Computer Science, but I’m still not sure what it is these people do for, like, work.
Manager: Build me a matching engine.
Software Engineer: Sure. Let’s target an internal order-processing latency of 500 nanoseconds with a throughput of two million messages per second.
A software engineer will ostensibly accomplish the same goals as a software developer, but a system built by an engineer is less likely to be improperly configured after an update and cause a stock exchange to shut down for three and a half hours.
Disclosure: My current job title is Senior Software Engineer. My code is so sloppy that I should probably be called a Developer. Oh wait, no, I should be called, um, Java Jujitsu Master. Something like that.