While this whole preset “Advanced Computer Programming #
Anyway, check it out at https://github.com/lkolbly/conquest-cli.
Other than that, I haven’t done much this week. The Workflow project is slogging along as I try to figure out how to merge what I want to do with Sencha with what the Sencha tutorials say. I might take a week to run through the tutorials just to figure out how they’ve implemented their MVC system.
Or, I might stay the course, and slowly force Sencha to bend around what I need my application to do. Whichever works, I guess.
No story today. Sorry, guys.
Next week I’ll write something about either stage checks or the simulator. As some of you know I learned to fly on the simulator, under the wing (pun intended) of my Grandfather. I’ve even written published articles about that - I’d send you a link, but the magazine has changed publisher and doesn’t have digital copies. So it goes.
But I suppose I could write a little something about the Facebook scraper.
So, we all know that Facebook is a giant creepy machine tracking out every movement, right? Despite all of my comments to the contrary, I actually do have a Facebook page.
I also have one friend. My Dad. This is on purpose - I have 37 friend requests, if I felt like being social. But here’s the cool bit: Facebook has a list of “people you may know and might even like.”
This list is not randomly generated, and is not just a list of mutual friends. They have some other algorithm. Every time someone else wants me to friend them, the list radically changes. Between these events, it stays *roughly* the same. But once in a while it’ll randomly change by vast proportions.
In general, the list of people is made up of
- People I don’t know and have never met (~30%)
- People with whom I worked closely, but haven’t spoken to in several years (~30%)
- People I had a class with once, and sort of knew them, but not anymore (~30%)
- People whom are good friends, but I have no other connection to them (the rest)
Obviously, the last set of people are scary. It means that Facebook is listening to everything I think.
I will figure out what Facebook is doing. Using my Facebook screen scraper.
It all starts with the actual screen scraping. This part is not hard - I run Firefox, pointed to the Facebook Friend Browser, in an Xvfb instance and take a picture of it with Xwd.
Then comes the somewhat harder part.
I then process the image generated by Firefox with a short (400 line) C program using OpenCV. It’s a really cool and freakishly powerful library, believe it or not. The first step is to run it through a template matcher, which literally compares a “template” image against a “master” image, and outputs a result (grayscale) image which is brighter where the template is closer to that area of the master.
Then I wrote a little function to find the 8 closest matches. I chose 8 because that’s the number of possible friend entries that Facebook provides on my Xvfb window.
The next step is OCR. I haven’t quite done this part yet, but my plan isn’t too hard. I intend to run a series of template matches matching each character in the alphabet against the text portion of each friend. Then I will find the closest match for each character, defined by a roughly 5×5 square. The closest match for each 5×5 square must be the character in that square.
Then each friend is put into a database. In twenty years, I will have aggregated enough data from millions of people across the globe to prove that Facebook has planted spies all around us.
Even the cockroach on the ceiling.
You laugh, but it’s true. The future is here. And we don’t even know it.
I’ll let you make your own conclusions.
Cheers, Anonymous Kolbly