CSVs are an ubiquitous format for all sorts of tabular data. I assume that every major programming language ecosystem has a handful of libraries handling both parsing and writing them. In Scala you can quickly turn to StackOverflow to find a 30 lines long CSV parser based on the Scala Parser Combinators library. In this short blog post I will show a Parboiled2-based a version of this parser and compare the performance of the two.
While working on our projects at SoftwareMill we have recently started depending on a few services that require explicit closing. Until now they were closed in a shutdown hook we manually registered. That has started to become error-prone, so I have decided to introduce a simple mechanism for registering those services during their initialization in MacWire-based modules and having a single centralized shutdown handler closing them. In this post I briefly go through the experimental shutdownables API.
A few of my friends, all in their late 20-ties with careers in diverse, but mostly nontechnical fields, recently asked how they could start learning programming on their own. They have different motivations: some want to use it at work, others feel they want to understand what the whole programming thing is about.
Python has always been a language I wanted to improve in. Mostly because of its data tools. Also being an active bicycle commuter I to grab data from a crowd-sourced Warsaw’s bicycle parking location aggregator. Once scrapped the dataset is straightforward: lat-lng coordinates, number of racks at a given location, its address and some additional data.
One of the requirements of a Rails-based project I’m currently involved with is to deliver a JVM WAR (Web ARchive) and deploy it on Apache Tomcat. For various reasons the WAR file is built locally and the configuration needs to be externalised and stored in Tomcat’s directory structure (its ‘conf/’ directory). In this blog post I’ll use the example of database.yml and show you how to use a quick hack to use the file from Tomcat’s ‘conf/’ directory. Continue reading Externalizing configuration for Tomcat deployments of Rails apps
If you’re working with Amazon Web Services and their Simple Queueing Services (SQS) in particular you might want to consider using ElasticMQ for your tests. ElasticMQ is a standalone message system written in Scala with an SQS-compatible REST interface.
Some time ago Rails 2.2 was released. Since than the framework requires rubygems 1.3.1 to run. Unfortunately Ubuntu 8.10 only has rubygems 1.2.0 in its repositories. A quick google search didn’t yield a good solution for this. Everyone is suggesting to install the vanilla rubygems-1.3.1.tgz, but I feel more comfortable having rubygems managed by Ubuntu’s package manager. So I created the package myself.