Realization

No Comments

It will pass away
The feeling of uselessness
My reality.

Facade

No Comments

A fortress inside
Hiding my thoughts and desires
Self-imposed prison

Law of diminishing distance

No Comments

Its the implicit law of natute that increases the intensity of the urgency to take a crap as the distance decreases between your vehicle/position and your home or the nearest toilet.

Ever heard of the male trick of thinking about other things to delay “satisfaction”?  It doesn’t work.

MongoDB find vs findOne

No Comments

I got hit by this newbie bug. The exercise entails getting a specific record from the database, storing it in a variable, updating it a few times and saving it in the database after each update. Sounds simple, until I am perplexed that I cannot view the variable more than once. The second invocation is just showing or returning an empty string.


> var myobject = db.products.find({_id : ObjectId("507d95d5719dbef170f15c00")})
> myobject
{ "_id" : ObjectId("507d95d5719dbef170f15c00"), "name" : "Phone Service Family Plan", "type" : "service", "monthly_price" : 90, "limits" : { "voice" : { "units" : "minutes", "n" : 1200, "over_rate" : 0.05 }, "data" : { "n" : "unlimited", "over_rate" : 0 }, "sms" : { "n" : "unlimited", "over_rate" : 0 } }, "sales_tax" : true, "term_years" : 2 }
> myobject
>
> //why cant i display the object contents again?
>

It turned out that I should have used db.products.findOne instead. The findOne function returns an actual document record while the find function returns a cursor. Yes, the cursor moved the pointer on the next record after each read request which means that subsequent read calls to it are getting nothing since the cursor was already pointing to the “end of cursor” location after the first read, if I correlate that correctly with how cursors in relational databases work.

Great to know. I want my 15 minutes back. :)

ciao!

Shopping and Shipping from the US

No Comments

Online shopping and buying credits presents one of the most alluring temptation combo known to the modern man. There are a few local online shops that have established their own brand but nothing beats the variety of what is available in the US market. Unfortunately not all of the US shops deliver directly to the Philippines, and some who do are expected to either leave a scorching mark on one’s wallet or are in danger of not arriving in your doorstep if its valuable enough to catch the fancy of those in the courier/custom/postal service.

Here comes to the rescue a variety of maildrop services in the US. Their services basically provides you with a US address or PO box, and then handle shipping it to the Philippines at a nominal cost. Searching for them is easy enough but I will detail something that I have used in the past, mostly because of their affordable price and convenient arrangement for somebody who doesn’t always have somebody left in the house to receive packages: Johnny Air Cargo.

More

Older Entries