Navigate / search

  • Netmarks

    Netmarks is the fastest way to share the interesting stuff you find online. All your favorite services are supported, and if they're not, well...there's an API for that. See for Yourself

  • Projects

    I'm always hacking away on a project or two. Usually born out of necessity, interest, or boredom. Check out my GitHub to see what I've been working on recently. Check it out!

It Keeps On Giving

We’re approaching the one year anniversary of the Chick Approved acquisition. There’s no new money coming in, no new press releases with my name in them, and nothing being done with the site. Yet the experience keeps on giving. I just got a huge dose of joy and nostalgia from a memory I forgot I ever made.

I was sitting at Hop Monk a few nights ago with my oldest California friend, Silke. We were just grabbing dinner and catching up when she randomly said, “Do you remember that one time when you were sketching Chick Approved ideas on a napkin at the bar when I met up with you?” Whoah! Whirlwind of emotion. Over 2.5 years ago I was sitting at the bar a few feet away waiting for Silke to finish work and meet me for dinner. Chick Approved was still just an idea. No users. No website. It wasn’t even the same concept it eventually became. It was all I could think about. I was so excited. Every free minute was spent fleshing out the idea. I grabbed a beer and a napkin and started sketching ideas (I always have a pen on me so napkins are often my mind’s canvas). That napkin, which I desperately wish I’d kept now, had the general layout for the site’s first models.

It’s kinda hard to describe the emotion. It’s amazing though. Even as I’m writing this my chest gets tight, tears swell behind my eyes, and I feel it. Nostalgia? Probably, but what does that even mean? It aches like remembering lost love, but it’s not sad. It’s definitely elation, but not just happiness. A little bit of pride. Whatever it is, it’s powerful and feels really good. It makes me want to work harder. I can’t wait to feel it again.

I’m convinced I wouldn’t feel this way about anyone else’s idea. I’m fairly certain you won’t either. So start something. Even when the project is long gone…it keeps on giving.

For MySQL: Goodbye NodeJS, Welcome Back PHP

Talk about words you never thought you’d hear yourself saying!

If you’ve ever worked with me (or probably even spoken with me) you know I love Node.js. I love everything about it…Javascript, the frameworks, the community, everything. I’m especially fond of the trend toward NoSQL data stores in combination with Node.

Having used one or more NoSQL databases in my last few projects, I know they’re fast, usually Javascript based, and the absolute wrong choice for a project I just started. The right choice: a relational database. MySQL being my choice.

I’m not going to go into why that’s the right choice, or MySQL over PostgreSQL, or InnoDB over MyISAM. There are a number of reasons, but it mostly comes down to the project requirements and personal preference.

FTW!
FTW!

What does it matter? Isn’t the database independent of the scripting language?

Yes and no. They’re independent systems, but we still need drivers to interface between them. That’s where the problem lies.

With the focus on NoSQL data stores, I don’t think anyone has taken the time to write a performant MySQL driver. The situation gets even worse with ORMs and worse still with newer versions of Node. Most of the solutions I found don’t support Node 0.7.x.

Wanting desperately to “make it work,” I spent some time this weekend comparing different combinations of Node drivers and frameworks/ORMs with those available in PHP.  PHP is the clear winner.

[bash]
+———————-+——–+——-+——-+——-+——-+
| Driver/ORM | Type | Run 1 | Run 2 | Run 3 |Average|
+———————-+——–+——-+——-+——-+——-+
| NodeJS_mysql | driver | 4.53 | 4.58 | 4.65 | 4.58 |
| NodeJS_sequelize | orm | 11.64 | 11.70 | 11.74 | 11.69 |
| PHP_PDO | driver | 2.14 | 2.21 | 2.21 | 2.18 |
| PHP_laravel_raw | driver | 3.33 | 3.37 | 3.38 | 3.36 |
| PHP_laravel_eloquent | orm | 4.52 | 4.38 | 4.37 | 4.42 |
| PHP_doctrine | orm | 2.43 | 2.44 | 2.54 | 2.47 |
| PHP_zenddb | driver | 2.39 | 2.48 | 2.48 | 2.45 |
+———————-+——–+——-+——-+——-+——-+
[/bash]

If you’re wondering how I arrived at those results, the repo is on GitHub. Feel free to fork it f you have another driver or ORM you think should be included.

The Point

Pick the right tool for the right job. Look at the results above. The right tool for MySQL is not Node. Not yet anyway.