So… what’s a filesystem?

According to wikipedia:

In computing, a file system (or filesystem) is used to control how data is stored and retrieved. Without a file system, information placed in a storage area would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into individual pieces, and giving each piece a name, the information is easily separated and identified. Taking its name from the way paper-based information systems are named, each piece of data is called a “file”. The structure and logic rules used to manage the groups of information and their names is called a “file system”.

While all that is true, it’s not quite what I’m looking for, nor particularly useful as a lemma in the grand unified theory of computer science we’re reluctantly building in the Node.js community.

I thought about this a bit and came up with some ideas. Here’s my take.


OMG UPDAET! 2011-06-19

Some of this is no longer 100% accurate, which shouldn’t be very surprising, since it was written 7 months ago, and npm had a major version update since then.

Check out the node blog for some of the 1.0 changes.

npm is the node package manager. Once upon a time, I…




Benchmark Report ::

require(“sails”) :: 143.35ms

sails.load [first time, no hooks] :: 298.35ms

sails.load [again, no hooks] :: 4.77ms (expected 25ms —faster b/c of require cache)

sails.load [with moduleloader hook] :: 16.29ms (expected 25ms —faster b/c of require cache)

sails.load [all core hooks] :: 355.61ms (expected 3000ms)

sails.load [again, all core hooks] :: 39.18ms (expected 3000ms)

sails.lift [w/ a hot require cache] :: 58.93ms (expected 3000ms)

sails.lift [again, w/ a hot require cache] :: 143.88ms (expected 3000ms)



Benchmark Report ::

require(“sails”) :: 132.11ms

sails.load [first time, no hooks] :: 306.77ms

sails.load [again, no hooks] :: 4.25ms (expected 25ms —faster b/c of require cache)

sails.load [with moduleloader hook] :: 14.66ms (expected 25ms —faster b/c of require cache)

sails.load [all core hooks] :: 326.12ms (expected 3000ms)

sails.load [again, all core hooks] :: 42.81ms (expected 3000ms)

sails.lift [w/ a hot require cache] :: 61.64ms (expected 3000ms)

sails.lift [again, w/ a hot require cache] :: 231.04ms (expected 3000ms)

Psychology will inevitably instruct the future of software design, in the same way neurobiology is beginning to impact the hardware engineering industry.

Pull Requests and Issues : The v0.10 branch of Sails

As of this moment, the latest version of the Sails core is here, on the v0.10 branch on Github.

There’s been a lot of much-needed refactoring and cleanup, removing duplicative code and providing better error messages. Unfortunately, it’s come at a cost: I’m probably going to have to force a git push over the master branch. Lesson learned. Sorry about that, y’all.

I hate to ask this, but would those of you who have submitted pull requests to development or master rebase them to v0.10?

@all, for the next few weeks, would you please send any new pull requests to the v0.10 branch as well?

This will make the code easier to merge, and make sure I have time to get to as many issues (and especially PRs) as possible.

Thanks everyone for your help— I appreciate you.


PS- if you had a PR merged to master/development since the 0.9.7 release, don’t worry— @sgress454 and I are rebasing the stuff that’s already there.

Using a PostgreSQL database on Heroku with Sails.js

The trick to setting up a Sails.js app with a remote Postgres database hosted on Heroku is all about SSL. Here’s how you do it:

In your adapters.js file

Note: This is for Sails v0.9.x, the stable release at the time of this writing.

In Sails v0.10.x, the config/adapters.js file has been replaced with config/connections.js You’ll also want to replace the module key with adapter.

It should work anyways, since backwards compatibility for the old config is built-in, but that compatibility will be dropped prior to v1.0, so you might as well set it up to use the latest and greatest.

// ....
'db-core': {
    module: 'sails-postgresql',
    host: process.env.PG_HOSTNAME' || localhost',
    user: process.env.PG_USER || 'root',
    password: process.env.PG_PASSWORD || '',
    database: process.env.PG_DATABASE || 'name_of_your_db',
    port: process.env.PG_PORT || 5432,
    ssl: {
        rejectUnauthorized: false
// ....

Is there an “uncanny valley” to social ads?

I actually read a Facebook ad today:

"What a cute little owl," I thought. But I started to worry. What was happening to me? I don’t normally read ads. In fact, I take a number of measures to ensure that I rarely see them at all. But I definitely noticed this one— and read it too.

This is bad news. I had work to do. Lots of work. A little voice in my head said, “Oh c’mon, indulge yourself— it’ll only take a second..” This was a dirty, dirty lie, and I knew it.

So I compromised, and instead of sending a long email of scribblings to my poor, embattled teammates, the results of my metacognitive investigation (cough, procrastination) ended up here in this blog post.

OK, let’s pause for a second. There are a lot of balls in play here:

Soliciting feedback

See that little “How commercial does this feel?” thing? We know that soliciting feedback from ad consumers leads to a higher chance of engagement. This, in turn, can oftentimes lead to a justification of the time spent, and a higher opinion of the advertisement. This is known as the Ben Franklin effect (Jecker & Landry, 1969), or Foot-in-the-door technique (Schwarzwald, Bizman, & Raz, 1983) )

Large # of likes and shares

Hundreds of people liked this ad. This cognitive bias is pretty well-known so I won’t waste your time with it.

"Price" discrimination: Choose-your-own-call-to-action

There are several ways I could have chosen to engage with this particular ad. Below, I estimated my likeliness to perform each action in parentheses:

  • Like the HootSuite page (unlikely)
  • Like the ad itself (I clicked this— it would have disingenuous not to, since I wrote this post and all)
  • Comment on the ad (I thought about pasting a link to this blog post in the comments, but thought that might be in poor taste)
  • Vote how “commercial” the ad was (possible)
  • Click the photo or link to sign up (maybe) for the free trial of HootSuite Pro (in your dreams)
  • Share the ad with my friends (Never. I don’t know what it is… maybe this is one of those things you only understand if you’re a social media manager— then maybe you share it with your friends on Facebook because you want to make sure they know about the free trial. Or maybe you invite them all to come over and you have dinner and laugh and talk about how much of a “social media manager who needs to try HootSuite" you all are)

This is brilliant— there are so many ways to interact, I can involve myself as little or much as I like. And while some of the asks are a bit outrageous, it makes the other engagement opportunities seem tame by comparison.

Mentions my friends Chris and Tim

Now this one sounds promising. Tim and Chris are some pretty cool dudes. They founded one of my favorite companies on the Austin startup scene, and they’re the most practical, genuine, and down-to-earth entrepreneurs I know.

So of course their names catch my interest.

That said, there’s a lot of stuff out there on Facebook, and Tim and Chris are involved in the event promotion/advertising/marketing industry, so I’ve gotten pretty used to seeing their names pop up. Quirky updates, links to press releases, modest announcements— that sort of thing.

But, a confession: I don’t always read the stuff in my news feed. I am a bad friend. It’s not that I don’t care about what’s going on in my friends’ lives, it’s just that they have a lot going on in their lives. So it couldn’t have been just the names that caught my eye.

BTW- if you’re interested in what GetPromotd is up to, here’s a link. Basically, they figured out how to make tons of people show up for an event, and then crystalized that know-how into the best automated event marketing product in existence.

Candid photography

By process of elimination, we’ve arrived at the ad’s photo.

It doesn’t feature bikini-clad babes, sports cars, guns, diamonds, drugs, or even miscellaneous nudity. No, my interest was piqued by an unremarkable snapshot of two smug men in jackets. And one of them looks like a European version of Bif from Back to the Future.

Photo credit:

You might be thinking “oh it’s because those bejacketed men look like Chris and Tim. Maybe they are Chris and Tim!”

Good thinking there. Except they look nothing alike.

Chris has a picture of himself on Facebook as the Fresh Prince of Bel-Air and Tim might be the love-child of Johnny Depp and Weird Al Yankovich:

Photo credit: Chris’s Facebook

Photo credit: Tim’s Facebook

"Wait, who is that?"

For what seems like forever, people who are actually experts on this stuff have been talking about the value of blending advertisements into the social medium (so-called native ads). We’ve gotten used to seeing our friends’ names show up all over the web as marketing fodder— most recently via Google Plus.

Consumers are also pretty used to seeing candid imagery of people on TV and in magazines. We get that those people are beautiful strangers summoned to the set like djinn, their smiles artfully painted with makeup and promises of super-stardom or teeth whitening treatments.

But when I see a candid photo of a human being on Facebook, I assume it’s someone I know. And when it isn’t, it’s…. well… weird. It sticks out. Which, for advertisers, is a good thing.

OK so what?

I did not click on the ad, and I did not buy a pro subscription to HootSuite. As you might recall if you know me, I am not in fact a social media manager, and frankly I’m not exactly sure wtf HootSuite does (although I’m sure I’ve heard it mentioned a few times— probably from Tim or Chris).

Also why did HootSuite target me? I manage a few different Twitter accounts, but I use all them pretty much exclusively to post cat pictures. Presumably they do not know this.

But I’m interested to see where this is headed— is this a nascent advertising trend for 2014? Or maybe it’s here to stay, and advertisers will eventually use advanced facial recognition technology like Make a Baby! Free to construct photos of pseudo-friends who look juuuuuust a little bit like Sally?

Only time will tell.

P.S. if you’re curious exactly “wtf HootSuite does”, have a look. Their Facebook ad is a lot better than their website, but I guess that makes sense based on what they do.

P.S.S It would seem I’m not the first person to notice this. There’s even a startup that connects candid photographers with social media advertisers.

balderdashdesigner: balderdashdesigner: balderdashdesigner: balderdashdesigner: balderdashdesigner: balderdashdesigner: balderdashdesigner: