scala

Streams and Temp File Cleanup: Fixing a Real Production Issue thumbnail

Mismanaging resources is one of the easiest ways to bring down a production system. In a development environment, it’s easy to ignore open streams and temporary files, but at production scale, they can have a hugely negative impact. Unfortunately, it’s far too easy to overlook these issues while developing, even…

4 Problems with Java's Exceptions and How Scala Can Help thumbnail

Error handling is important for many common operations—from dealing with user input to making network requests. An application shouldn’t crash just because a user enters invalid data or a web service returns a 500. Users expect software to gracefully handle errors, either in the background or with a user-friendly and…

I recently finished a project which required me to modify an annotation macro for Scala using the Scala Macros Paradise project. Because I was extensively modifying a macro that we were already using, I wanted to write tests to prevent breaking our current workflow and to check that the new…

Functional Programming Principles Every Imperative Programmer Should Use thumbnail

Sometimes it seems like functional programmers are a totally different breed. Even by programmer standards, they seem more nerdy than the rest. They use weird terms, such as "monad," "for-comprehension," and "lambda." They use languages that don’t end every line with a semicolon. And, no matter how uneasy Java programmers…

Why I Don't Regret Moving Our Android App to Scala thumbnail

At this year’s Google I/O, it was announced that Kotlin would be a first-class language in the Android ecosystem. By the time of the announcement, I had already transitioned roughly 75% of Lucid’s Android app from Kotlin to Scala (and have since moved to 100% Scala). While I’ve been very…

Upgrading From Play Framework 2.3 to Play 2.5 thumbnail

Recently I had the opportunity to upgrade the Play Framework from 2.3 to 2.5 on all of Lucid’s JVM-based services. A lot of the upgrade involved pretty routine things like changing implicit parameters from Lang to Messages or updating uses of play-json to match the new API. However, over the…

Introducing Xtract, a new XML deserialization library for Scala thumbnail

Last summer, our team added support for importing Adobe InDesign files into Lucidpress, a cloud-based publishing app. Specifically, the app now supports IDML files, which consist of XML files packaged up in a .zip file. The process of conversion involves: Parsing the XML from the IDML file into a model…

My thanks go out to Grant Klopper from The Guardian. Last week, he validated a change I made to the Play! Framework back in December. After upgrading from Play! 2.2 to 2.3, Grant noticed dramatic changes in response times and memory – both for the better. The changes were so awesome that Grant…

Abstract Lucidchart is a collaborative diagramming SaaS application. This session’s speakers have been transitioning from a monolithic CakePHP application to a services-oriented RESTful system based solely on Scala. They discuss their decision to ditch PHP and how they ended up with a working set of services. First, they explain their…

As a follow-up to our previous Scala post about migrating to Scala from a CakePHP setup, Typesafe reached out to us to put together a case study. We are releasing a portion of the interview transcript below to give more specifics about why we decided to make the switch. What…