Skip to main content



Functional Programming Slips into Facebook

In the article, a software engineer from Facebook reveals that Facebook’s newest anti-spam filter was coded in Haskell.  Haskell, cited as the 23rd most popular coding language in the article, is what many consider to be a pure functional programming language.  Functional programming is often ignored by software developers for being too complex to code in efficiently or too slow to scale with large systems.  However, Haskell is somehow still efficient enough to handle Facebook’s entire anti-spam filter for over a billion users.  And more importantly, it managed to slip its way into Facebook’s codebase.  How did Haskell end up being used?

The use of Haskell in Facebook’s anti-spam filter can be seen as an example of structural balance in Networks.  In order for a team to effectively work on a project of such a scale, it needs to be able to agree on a programming language (or at least communicate effectively through abstractions).  We could represent software engineers as nodes on a graph in which engineers working on the same project have ties.  Their ties are positive if they use the same programming language and negative if they do not.  In a small team working on an anti-spam filter, all of the workers would have strong ties, and in order for this network to be balanced, there would have to be positive ties between these workers. A negative tie between engineers would cause stress in the team’s relationship and force a worker to switch to Haskell or leave the network.  Thus, after being decided on by lead software developers, Haskell could have spread within the anti-spam team as a result of the need for balance in the network.

On a larger scale, the use of Haskell relates to one of the major themes of Networks as a whole which is finding ways/algorithms to analyze large networks in a meaningful way. In the article, Simon Marlow says, “Even though concurrency is needed to get efficiency, we didn’t want our spam-fighting engineers to have to worry about it. Haskell is really good at abstracting things.” Thus Haskell enables engineers to analyze large amounts of information in meaningful ways without being bogged down by certain overheads that other languages might create.  In a similar way, we have seen that we can use abstractions such as categorizing tie strength into strong and weak to obtain measures of networks without being distracted by miscellaneous details.

Source

Comments

Leave a Reply

Blogging Calendar

September 2015
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
282930  

Archives