Exploring ACM

Almost a year ago, a friend of mine and I made an experiment, a visualization of the references between papers published in the ACM (Association of Computer Machinery) article library. Each paper is cited by other papers and so on, we represented those relationships in a directed graph: each node is a document and...

Read more

Uploading wordpress

This is a very specific yet common case: for some reason, you have to use Wordpress for something that is not a blog (of course it was not on you), so you start making custom plugins,  shaping up a theme with custom functions and filters, and after a few tests and proper...

Read more

Randomness

Take a look at the following puzzle: “Given a function which produces a random integer from 1 to 5, write one that produces a random integer from 1 to 7″ I immediately thought of this: ... function naiveRand(){ return (given() + given()) % 7 + 1; } ... It is...

Read more

The Zoo problem

I just discovered TopCoder, and I got hooked. I’m going to post here some of of the easiest archived problems and their solutions (I’ll start with the hard ones later). This one is called simply “Zoo” and it is about a fox that wants to know if zoo’s rabbits are taller...

Read more

Hello Internet!

I finally got convinced of writing a blog, I’ve been solving some puzzles and small programming challenges, so I thought it would be better to write the answers and notes in a blog instead of keeping them under a dusty folder somewhere on my hard drive. Please feel free...

Read more