The book

Are French farmers a bunch of mean-spirited creeps? Are all nerds courageous, and laziness a virtue? Why did Stephen King leave a horror story unfinished? What business models survived the Internet bubble? Among the many entertaining and thought-provoking ideas presented in Open Life, ants screw up, and Harry Potter even casts his spell in German.

The hot topics in information technology (IT) right now are Linux and Open Source. But what does Open Source offer those, who may not see their computer as a matter of life and death? Open Life: The Philosophy of Open Source spotlights the people, businesses, values and practices of the Open Source world. In assessing its development Open Life recounts over 60 case-study-like stories that illuminate exactly what is so miraculous and wonderful in this new paradigm for producing software.

hingo's picture

A MEAN Hackathon

I'm preparing to do some simple MongoDB hackathons in Scandinavia, and because I don't want to forget how to do all the steps, I actually wrote down an example exercise.

This is a simple and fun exercise just to get some data into MongoDB and then get it out again. We're going to use some awesome JavaScript tools for the out part: Node.js and Crest for a simple HTTP API, and Angular.js to draw the pretty pictures. So this is not just a MongoDB hackathon but more like a fullstack JavaScript or MEAN hackathon. (Strictly speaking there's no Express.js, so maybe this is a NMCA hackathon?)

Install MongoDB

The usual apt, yum and brew methods will work for this tutorial.

hingo's picture

5 MongoDB features that are NOT reasons to choose MongoDB

On May 5th I will be speaking at the ICT Expo in Helsinki. On home field, so to speak! This is the major Finnish ICT event and MongoDB will be exhibiting together with our Nordics partner Altotech.

The title for my talk is "5 Reasons that made MongoDB the Leading NoSQL Database". In preparing the talk I came to think of several MongoDB features that are great, but in consideration are clearly NOT reasons that make MongoDB stand out against other NoSQL databases.

Why? Because these are typical traits of any NoSQL database. Here's my Top 5 list of non-reasons:

hingo's picture

Translated: Tumannaya Feya blogs from Maidan to her mother in law in Moscow

As someone who worked for 2 decades with Internet technologies, and as an active blogger and microblogger myself, one of the most inspiring and powerful experiences have been to observe how blogs and tweets have the power of transforming dictatorships into democracies.

In that spirit, I'm publishing below a translation of a blog post (original title: В ПОИСКАХ ПРИКЛЮЧЕНИЙ - Фашисты на Майдане) by the user tummanaya_feya (which may or may not be her real name, as I don't know her) of LiveJournal. It appears she is a young Russian living in Kiev, writing to her mother in law, who lives in Moscow.

hingo's picture

MongoDB Aggregation Framework fun: the answer

Last week I posted a challenge about ordering fabric for a bunch of different flags, which can be conveniently solved with the MongoDB aggregation framework. Did you figure out the answer?

So we have a bunch of these flag orders for different countries:

	"_id" : ObjectId("52a71923cd4dd732cd060204"),
	"country" : "Norway",
	"colors" : [
			"color" : "red",
			"fabric_units" : 3
			"color" : "blue",
			"fabric_units" : 2
			"color" : "white",
			"fabric_units" : 1
	"num_flags" : 2

And to calculate how much fabric we need of each color:

> db.flags.aggregate( [ 
    { $unwind : "$colors" },
hingo's picture

MongoDB Aggregation Framework fun: ordering fabric for flags

One of the really cool, well designed features in MongoDB is the aggregation framework. Basically it is the feature that brings MongoDB query language on par with SQL in feature richness. Most importantly, it fully supports sharding for scale-out and parallel processing. I've had a lot of fun with it.

Last night I accidentally came up with a fun exercise that you can solve with a nice aggregation framework pipeline. I'll present it as a challenge, feel free to suggest answers in comments. I'll share my answer next week.

Suppose you work in a flag factory, and you have received the following orders:

> db.flags.find().pretty()
	"_id" : ObjectId("52a7189ecd4dd732cd060201"),
	"country" : "Finland",
hingo's picture

Translating reliably between XML and JSON (xml2json)

Last week I was assigned to work on a simple yet interesting problem. MongoDB stores data as JSON. But it turns out we often have customers - especially in the important financial services market segment - where data is in XML. (Yes, SOAP still exists too!) To store that data into MongoDB, we need to transform it into JSON.

(For the impatient reader: here's the Github link!)

Storing XML as a text field

There are various ways one could do this. For example one could simply store the XML document as a whole in a single field, and then extract just a few parts of the XML that are stored as individual JSON keys. One reason to do this is that they can then be indexed and used in queries.

For example:

hingo's picture

MongoDB & Node.js events in Stockholm, Aug 26

Monday, Aug 26 will be an exciting day if you live around Stockholm and are interested in MongoDB, Node.js or just open source and web programming or anything in this direction.

In the morning, from 9:00 to 12:00 I will be doing MongoDB office hours. This is an "ask the expert(s)" type of free community consulting thing we do regularly at 10gen. You can come and discuss your MongoDB application, architecture or just basic questions. First come, first served. Please RSVP at

Syndicate content