Reverse Engineering OKCupid

If you’ve ever seen bots on reddit like qkme_transcriber, you may wonder how they’re able to make posts without human intervention. Well wonder no longer! By examining how OKCupid handles HTTP requests, I’ll show you how to first deconstruct the undocumented APIs of other sites, then manipulate them with nary a mouse click.

Continue reading

Blackjack in jQuery

Just a quick post, here’s a version of Blackjack I made using jQuery, HTML, and JavaScript. Codecademy helped me a lot when I started learning JavaScript and jQuery. In the later lessons when the programming challenges get more complicated, their solution verifier gets a bit finicky. But, if you’re just starting from the beginning it’s a great resource. Now . . .
Play Blackjack!

Conway’s Game of Life in Processing.js

I first learned about Processing at Maker Faire in 2011. I don’t consider myself a visual artist, but Processing made it straightforward to create beautiful graphics using code. However, I didn’t want to go through the hassle of working with the Processing IDE, so I set it aside for a couple years.

Recently, I came across Processing.js and decided to give it another shot. By porting it to JavaScript, the developers have made it easier to get started and publish to the web (though I would guess that the JavaScript version runs slower than native Processing). All I needed was a project.

Continue reading

Approximating Pi in Python, Part 1

Consider a square with an inscribed circle of radius r which itself has an inscribed square rotated 45 degrees. square inside circle inside squareIf we look at just the first quadrant, then the area of the outermost square Aouter is r2. The area of the circle Acircle is πr2/4, and the area of the inner triangle Atriangle is r2/2. Therefore, we can make two equations for π based on the ratios of these areas: π = 4Acircle/Aouter and π = 2Acircle/Atriangle. Notice how neither equation depends on the radius; so, if we can figure out an alternate way to calculate these areas, we can determine the value of π. Python to the rescue!
Continue reading

Building my first computer

Motivation

One of my New Year’s resolutions was to build my own desktop computer. I’d been getting frustrated with the performance of my laptop, but more importantly I had to do it for the nerd cred.

I mainly use my PC for software development, music production, and some gaming. Unfortunately, my laptop couldn’t run Diablo III at a decent resolution (forget 1920×1080) with minimal settings at even 25 frames per second. Cranking up the GPU clock speed helped a little, but laptops have enough heating issues without throwing overclocking into the mix. Additionally, when working on a musical composition, I couldn’t have very many synths, effects, or track automations running in real-time without getting choppy playback. Freezing tracks solved that issue to some extent, but it slowed down my workflow. Continue reading