I like to keep my Ruby on Rails projects' development databases in sync with their production counterparts. Firstly, this allows me to reproduce almost all production-bugs locally. Secondly, having the complete production database available locally is very helpful for testing new migrations.
MRI Ruby 2.2.0 was released a couple of days ago. I want to use this
opportunity to talk about one of the new features shipping with
explain why it matters: Garbage collectable
Array#flatten is on occasion a very handy method. It reduces
n-dimensional arrays to
1-dimensional arrays, containing all the elements
of the top-level-array and its sub-arrays. Therefore, it is said to be
I recently discovered one of the most elegant Haskell functions I’ve ever encountered on StackOverflow. So, I decided to write about it – just for fun. Also, I’m trying to convince my boss, who is a Ruby guy, to give Haskell a shot :)
QuickCheck is one of the libraries, that makes Haskell awesome. Conventionally, testing boils down to writing a number of separate test-cases to express different assertions about a particular piece of code. Testing like that is possible in Haskell (with HUnit), but QuickCheck’s approach is much more subtle…
Multithreading in Ruby is still not widespread within the community, even though concurrency yields huge benefits for certain kinds of programs. This is especially true in server environments. For instance, using multithreaded HTTP servers increases a server’s throughput and reduces its memory footprint.
Haskell’s standard module ships with two functions, called
fmap. The first one,
map, is the typical function we are all used to
in functional programming. Looking at its definition, reveals that it’s
recursive implementation is exactly what one would expect:
There’s no consent among experts on what “the Cloud” actually is.
As Rails developers, we are constantly switching between writing application code & tests and running our tests. While this is a great workflow, it sometimes leads to problems. Namely, if we change our database schema, but forget to migrate the DB before re-running the test suite.
PostgreSQL 9.3 introduced a new feature referred to as materialized views. This article attempts to explain when to use it (based on a contrived example).
Suffering from long Sass compilation times? Avoiding
@extend may solve the problem.
I think it is. And I’m not the only one. Not by a long shot.
When working with statistics, generating pseudo-random samples that are distributed according to a given probability distribution is a frequent requirement. For me, being able to generate these numbers directly with SQL would be very convenient (and might also improve performance). In this post, I’m taking a look at some of the most important continuous probability distributions…
I’ve known about compound indexes for many years but never really thought about them in detail. That doesn’t mean, I’ve never used them – quite on the contrary. At some point in the past I’ve made up some assumptions about when to use them and when to avoid them. However, until now I’ve never taken the time to put my assumptions to the test.
I’m currently working on a command-line utility written in Java to encapsulate a WSDL web service. As you might expect, the web service is exposing a variety of operations with pre-defined parameters to be called. My tool should make these operations accessible to the user, through an easy-to-use command-line interface. Since the web service I’m working with is composed of dozens of operations, I started looking for a design pattern to help me organize my code and discovered the Command Pattern.
Everybody is talking about simplicity and its promise of leading us to create great products. The underlying assumption here is, that simpler products are more accessible to everyone: the customers, the users, and last but not least the developers themselves. Therefore, simple products are supposed to be easier to sell, a lot easier to use, and easier to maintain.
Software start-ups are everywhere. Every single day, you can read about dozens of new and ambitious start-ups in the news. There are many special websites to report about start-ups and other topics that entrepreneurs and developers might be interested in – yes, I’m looking at you HackerNews.
A few weeks ago, I discovered a fatal flaw in my thinking about customers, users and consequently about business in general. To fix that flaw, I had to re-evaluate the feature set of my products as well as my entire approach to communicating with (potential) customers.