blog

“Cannot read property ‘getsockname’ of undefined” in your stack trace?

If you see this in your stack trace while trying to start your node app.. TypeError: Cannot read property 'getsockname' of undefined You might probably want to check if port/s your app is supposed to be usingĀ are being used by something else. For example, your app uses portĀ 80. You can check if that port is being used (via the terminal/command…

Read More

MongoDB “Eager Fetching” Workaround in GeddyJS

As you all know, there's no such thing as a JOIN in MongoDB. The burden of applying logic is on the application side. SQL Adapters (like MySQL and PostgreSQL) have an eager fetching solution from the GeddyJS Model ORM. Eager fetching would look like this (taken from the code sample in the GeddyJS tutorial): this.index = function (req, resp,…

Read More

GeddyJS, MongoDB, and Querying Subdocs? Try Mongoose

For the past few months I've been working on studying NodeJS. Currently, I'm trying to work with the GeddyJS Framework (geddyjs.org). Now they have a database agnostic ORM built into it that can support the likes of MySQL and PostgreSQL but also MongoDB and even flat files. Unfortunately, there are some things that can't work very well with the built…

Read More

Device Memory Running Low on Samsung I9100 Galaxy S2

There was a really big problem plaguing my phone the past weeks. For some reason, even if the apps installed weren't taking up much space (a couple hundred MB at max), my device memory was running low (1.7GB out of 1.97GB). Here's how I instantly cleaned 700MB off of it: (more…)

Read More