What if “trending news” would be made to drift in into a certain direction? Well, it seems that Facebook used their ability to manipulate curate trending topics to block out certain topics and set some of their own. ? Some should have warned us.
Category: English
AR create_with
find_or_create_by
method but I didn’t know it had a very useful companion
create_with
.
@something ||= SomeModel.create_with(some: "stuff").find_or_create_by(foo: "bar")
This will either find a record
SomeModel.where(foo: "bar")
or create it with
SomeModel.create(foo: "bar", some: "stuff")
. Very useful.
AR Find Trickery
found = ModelA.find_by(id: id) || ModelB.find(id)
I stumbled over this during a code review. It was supposed to look for a record in two distinct tables.
find_by
will return
nil
if nothing was found while
find
will
raise
. Hence either you get something (from any model) or you
raise
.
Classic Programmer Paintings
This is a great idea. ?
WhatsApp End-to-end Encryption
WhatsApp just announced they enabled end-to-end encryption for all their users … this is huge news. They have put a white paper up describing their implementation. Good news: it’s based on the Signal protocol and first tests seem to suggest they did it properly. ?
TSA’s Random Lane Picker
This is so moronic I almost fell off my chair laughing: it seems like the TSA spent $47,000 on a “random lane picker.” Please, you be the judge whether it was worth it:
It needs to be operated manually … with hygienic gloves! ?
Ubuntu on Windows
I didn’t see that coming … I still remember a time where this was UNTHINKABLE!!! ?
Snowden, Chomsky and Greenwald Discuss Privacy
Social Media ? Depression
Surprise: heavy use of social media is highly correlated with depression (actual study). o.O But they’re not yet sure which is the cause and which is the effect. They provide arguments for both.
Allwissender Beobachter
Ein allwissender Beobachter, der in unser Gehirn blicken und alle relevanten Faktoren erfassen könnte, wäre in der Lage, unsere Entscheidung vorherzusehen.
Diese Aussage ist so dumm und offensichtlich bekannt, dass es jeder Beschreibung spottet. Er steht auch noch unter dem Titel „Neurowissenschaften: Gedankenlesen noch in weiter Ferne.“ … m(