Generating Realistic (Two Dimensional) Caverns With Cellular Automata

I have been building a roguelike game in python for a while now. For those not familiar with this particular type of game, I will point you here. Basically, its, as my girlfriend put it, “About the nerdiest thing you can possibly do with a computer”. Opinions aside, roguelikes are very enjoyable to write, as I’ve found, as you can focus solely on gameplay, and not worry about fancy rendering engines and lots of 3D math.

Read on →

Polybius Square Encoding in Python

I was recently trying to figure out an efficient way to programatically encode or decode a string into an ADFGX cipher, a (by todays standards) simple cipher that involves fractionating the string through use of a Polybius square (using a mixed alphabet), and then performing a columnar transposition on the result. If you want to read more about the cipher itself, Wikipedia has a good write up of it here.

I don’t want to go too far into the specifics of the cipher itself, as this post is meant to focus on the first part, encoding a string using a Ploybius square, and, what I feel at least, is a rather clever way of doing it. i Read on →

Comments

ROOT_URL When Deploying Meteor to Heroku

I guess you could call this a followup to my last post about deploying Meteor applications to Heroku (found here). I ran into this little error today while trying to get a new Meteor application up and running via Heroku. Basically, my app was crashing, and running:

1
heroku logs

yielded the following:

1
2
3
4
5
6
7
8
9
10
11
12
app/packages/meteor/url_common.js:14
2012-10-26T22:08:39+00:00 app[web.1]:       throw new Error("Must pass options.rootUrl or set ROOT_URL in the server
2012-10-26T22:08:39+00:00 app[web.1]:             ^
2012-10-26T22:08:39+00:00 app[web.1]: Error: Must pass options.rootUrl or set ROOT_URL in the server environment
2012-10-26T22:08:39+00:00 app[web.1]:     at Object.Meteor.absoluteUrl (app/packages/meteor/url_common.js:14:13)
2012-10-26T22:08:39+00:00 app[web.1]:     at app/packages/accounts-password/email_templates.js:3:20
2012-10-26T22:08:39+00:00 app[web.1]:     at /app/.meteor/local/build/server/server.js:107:21
2012-10-26T22:08:39+00:00 app[web.1]:     at Array.forEach (native)
2012-10-26T22:08:39+00:00 app[web.1]:     at run (/app/.meteor/local/build/server/server.js:93:7)
2012-10-26T22:08:39+00:00 app[web.1]:     at Function._.each._.forEach (/app/.meteor/local/build/server/underscore.js:76:11)
2012-10-26T22:08:40+00:00 heroku[web.1]: Process exited with status 1
2012-10-26T22:08:40+00:00 heroku[web.1]: State changed from starting to crashed

Not overly helpful, as it didn’t seem to be a Meteor specific error. And it turns out it wasn’t, at least not wholly. I found that Heroku has a config command where you can set things like the ROOT_URL, and for some reason, in this case it needed it set manually (I’ve never had to use this before, so maybe I’m just doing something wrong). Anyways, I ran:

1
heroku config:add ROOT_URL=[Heroku instance URL]

And, lo and behold, my app stopped crashing and started working.

I would like to know why I had to manually set this in this case, so if anyone knows, give a shout in the comments. I’ll try and figure it out on my own in the meantime.

Comments

Deploying Meteor to Heroku

Recently, while looking into and learning about Node.js, I ran across a new framework utilizing Node called Meteor. Since I just started playing with it yesterday, I’ll not go too deeply into the specifics of it, because I have yet to figure them out. One thing I did figure out though, and which I feel is not immediately obvious (thus why I’m writing about it), is how to deploy a Meteor app to Heroku.

Read on →

Node.js Project Setup Gotcha (for a Beginner)

I’ve been exploring Node.js recently, mainly because I’ve been hearing so much about it from all corners of the web development world. I plan to write a more in depth series of posts about my experiences with it at some point in the future, but for now, I’d like to point out a quick little gotcha (and its solution) that I ran across.

Read on →
Comments

Moving Away From Wordpress

Recently, my old hosting contract ran out. This did two things:

  1. Lock down all my old blog content so I couldn’t access it unless I renewed
  2. Make me re-asses my hosting plan, domain name, and general blog philosophies

The former bummed me out quite a bit, as I had some decent (and decently well travelled) blog posts about various aspects of Android development. It kind of stings to lose those, but, oh well. This led me to the latter: it was probably time to move on anyways. My old blog at advancingbackwards (which now redirects here) was being neglected, and it wasn’t much fun to write on it anymore. Why was that?

Read on →
Comments