Andrew Conner

Moving fast and staying secure

Having a security culture in a startup world

Startups often “move fast and break things” to get to market faster and test assumptions. However, they also often do not take security seriously enough. I've responsibly disclosed web vulnerabilities in sites such as Pinterest, Amazon, IMDB, and many more smaller startups. Typically, the issues were very simple and avoidable by having a . . .

Read More

October 11, 2015

Gambler's Verity?

How in small sets, randomness can be quite surprising

Flip a fair coin four times. Consider the cases, if any, after a heads. Since you're flipping a fair coin—you reason—you should notice no significant patterns in the flips after a heads, because flips are independent. However, you have heard of “hot streaks” or how random events become “due”, so you record your results.

You flip H T H H, . . .

Read More

October 06, 2015

Using Java Futures in Scala

Occasionally, you may need to interface with Java Futures in Scala. Unfortunately, it is “an abomination”. Several older Java libraries, like Amazon's SDK, provides asynchronous interfaces using Java's Futures. java.util.concurrent.Future only provides a .get, and no mechanism to react to completion. The best solution to avoid . . .

Read More

October 01, 2015

Scalaz Task ↔ Scala Future

Since many asynchronous APIs in Scala use Futures, if you prefer using Task, you'll need to convert between the two. Here are two simple classes that enhance scalaz.concurrent.Task and scala.concurrent.Future:

import scalaz.concurrent.Task import scala.concurrent.{ Promise, Future } final class FutureExtensionOps[A](x: => Future[A]) { . . .

Read More

September 25, 2015

Caution when using Play! TemporaryFile

The case of the random File deletion

Play! Framework provides several BodyParsers out of the box to parse common HTTP request bodies. One of them is for file uploads. Since Play can't reasonably know what you're doing with the body, they can't aggressively delete the file after the result is returned. Their solution is to clean up the file when the variable is . . .

Read More

September 07, 2015

Scala Days 2015 Talks

Scala Days 2015 talks have posted. My favorites:

Read More

April 11, 2015

Useful Scala snippets

There's a few classes and functions I've collected over the past few years that I find incredibly useful with day-to-day Scala development.

Get the calling stack

Often, during development, it's useful to find out “who is calling this?” If this happens to be called many times or concurrently, it's difficult to use a debugger. . . .

Read More

April 09, 2015