jms dnns

a sonic soul

code - essays - ideas - quotes
[ coding soundtrack  | ]

“All truths are easy to understand once they are discovered; the point is to discover them.”

– Galileo Galilei

Twitter as a blank canvas »

if you only follow companies and celebrities that’s easier to replicate elsewhere than if you’ve hunted out interesting and low-profile tech execs or makeup artists or experimental musicians, and of course are followed by the same.

This is an important point, made inside an interesting dissection of Twitter.

Celebrity is fleeting, so, it should be assumed that network effects driven by the presence of celebrities is also fleeting.

The Little Manual of API Design »

My friend Malcolm sent me a link to this paper from 2008. Trolltech, a Nokia company (at the time), is the company that built the QT widget set, popularized by KDE.

QT is a multiplatform gui development kit. These kinds of projects are very difficult due to the nature of supporting so many moving parts underneath, such as windows, mac, and linux, so their opinions on what makes a good API make for a great read.

Here is Malcolm’s summary of the paper:

* Conceptual integrity more important than complete feature set. Completeness can come later, conceptual integrity cannot

* Take some time to consider (and even ask) how your users will user your API

* Most important characteristics of an API:
- Easy to learn and memorize
- Leads to readable code
- Hard to misuse
- Easy to extend
- Complete

* Look for APIs that have solved roughly the same conceptual problem and steal your interface if you can

* Your API will outlast your implementation, that makes the API more important than the implementation

* When in doubt, leave it out

* Names should read like proper english rather than, for example, their mathematical name (an example QPainterPath rather than QVectorPath, even though vector path is the name in the literate)

* Boolean parameters ARE THE DEVIL. DON’T USE THEM

* Consistency, consistency, consistency

* The semantics of your API are really important

* The best API is the one you don’t even notice.

The NSCollectionView in iOS is pretty great. You can use it for basically any kind of collection view, such as how your photos are displayed as multiple rows for 4 photos, or perhaps how the netflix app shows you a horizontal list of movies you might want to watch.

Here is a 10m tutorial that will help you understand what it’s all about.

Green represents Android users and red is iPhone users.

Green represents Android users and red is iPhone users.

Some Thoughts on HFT

I once worked at an investment bank called Bear Stearns and I started studying things like HFT, derivatives, and anything interesting that might help me understand how the capital markets work. HFT in particular struck a chord with me because it’s mostly driven by computers and not humans.

HFT, at its core, is a style of trading where computers look for patterns taking place in a market and act on them automatically. If there is a lot of activity, there is a lot of opportunity for HFT to make money. Basically, if the market price of some thing is moving up, buy while it’s low and sell when the price is high. If a price is dropping, sell while it’s dropping and buy once the price settles. You can do the first trade (buy low / sell high) easily enough, but the second one takes some finesse, since there are rules on whether or not you can sell something you don’t own.

There was a time when people would collect in halls and do this stuff manually. Someone would shout an order they want to fulfill and people shout back prices until an agreement is found. By nature of this being done by people, the scale was held at levels they could support.

And then it went digital.

To recreate some of that negotiation that took place between humans, a type of trade called a Flash Trade was introduced. A flash trade, as defined by wikipedia, is “a marketable order sent to a market center that is not quoting the industry’s best price or that cannot fill that order in its entirety. The order is then flashed to recipients of the venue’s proprietary data feed to see if any of those firms wants to take the other side of the order. This practice enables the market center to try to keep the trade.”.

Flash trading is interesting because it shows the order to whomever is paying the fee before they put the order on the open market. As a result, they have a look at what the market is about to do and can act on it before the market can.

This feels a lot like front-running. It’s also been reduced significantly since back then.

Without the flash trading, it’s less clear whether HFT is bad. So let’s consider other ways that money could be made.

Imagine you’re talking to someone who speaks slowly. If you can figure out what they’re going to say, you could start thinking of how you want to respond before they’re done, and hopefully have a better response by the time it’s your turn to speak.

HFT is currently a lot like that. Imagine an order is coming into the exchange slowly, so the movement can be detected by the privately owned machines, attached directly to the exchange’s network, listening for activity. They notice something and act on the market in its current form to secure a position, which they later unwind at a profit when the later parts of the order come through.

Now consider that HFT has accounted for 60% of all trades in 2012.

This all happens very fast, so the opportunities are slimmer, but still profitable. Imagine they see people are willing to buy, they lock in the current price, and then fulfill the later orders by selling at a higher price.

The label “front running” has been thrown around to describe this model for profits. I believe network proximity like this is only useful for being able to act on market conditions before the rest of the market, but front running is defined as having advanced knowledge of pending orders. It doesn’t seem like anyone has advanced knowledge, it just so happens that HFT folks can act on literally everything before anyone else.