Avoiding circular references with FOSRest and Symfony 2.8
I got stuck for quite a while thinking I had already installed JMSSerializer and had therefore been perplexed by the result of circular references breaking the output of an API I was building for (yet another) technical test.
Twitter bot in Empathy
By using an empty Empathy application as the glue (and using some of the wrapper code around Pheantalk for queues), we can easily create a twitter bot that favourites tweets for a given stream and thusly attacting attention to our own profile. The composer.json looks like this:
{
name: "newblog",
description: "A new blog",
require: {
mikejw/elib-base: "dev-develop",
pda/pheanstalk: "dev-master",
fennb/phirehose: "dev-master",
abraham/twitteroauth: "dev-master",
monolog/monolog: "1.13.1"
},
minimum-stability: "dev",
autoload: {
psr-0: {
HFSBot: "src/"
}
}
}
When a closure is not necessary
For a while, after being exposed to a lot of javascript during a project for a social gaming company it's been confused in my mind that closures in programming are useful for retaining data statically. This now makes sense because javascript isn't like other languages and it lacks the static keyword so there is no alternative.