Portrait_large

Andrew Conner

Essential Slick review

Updated for Slick 3

Essential Slick by Jonathan Ferguson and Richard Dallaway was recently updated to include Slick 3, which was a big update from Slick 2. Slick is a “functional relational mapping” library for Scala. Instead of focusing on Table Object relations, Slick uses functional programming concepts to build queries, bind data, and stream results. In . . .

Read More

January 24, 2016

Slack Hide Typing

Chrome Extension to prevent typing status being shared

I've written a very simple Chrome extension that prevents the Slack site from sending typing indications while you’re typing. My primary use case is so that I can type longer messages and use the text as a scratch pad without making others think that a message is incoming immediately.

Install in the Chrome web store. The source is on . . .

Read More

January 22, 2016

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

Archive