July 27th, 2010
PHP is full of shenanigans. If you know them you can code more efficiently. If you don’t it can make for a mess. One of the lesser used, but useful tricks is casting as array.
If you’re not familiar with casting, check the docs: http://php.net/manual/en/language.types.type-juggling.php
Here’s a quick breakdown of what happens when you cast to array:
php [...]
Posted in PHP | Tags: casting, PHP, shenanigans | No Comments »
June 26th, 2010
I’ve been fascinated with Conway’s Game of Life for years now. I love how there is an apparent order to things that is reproducible as well as simple in it’s requirements. Recently there was a discovery that made the tech news about a new pattern that replicated itself. I’ll be honest, the demo of the replicating code wasn’t as sexy as I had hoped. But it did remind me how much I want to make this game.
Posted in jQuery | Tags: game of life, javascript, jQuery | No Comments »
April 16th, 2010
So I need to remote load the jQuery library if it doesn’t already exist in this current page. I looked around and found a few solutions, but I wanted a simple function that I could pass a callback to that ensured my code would execute or fail silently. So I put together this function…
Posted in jQuery | Tags: javascript, jQuery | No Comments »
April 13th, 2010
Hey so I just wanted to post a quick bit of code that I put together for the character counter we’re using at gravity.com. It’s pretty simple but it does the trick. I’m binding to two key events here to ensure that we get a counter update when you hold the key down as well [...]
Posted in jQuery | Tags: character counter, jQuery, plugin | No Comments »
April 13th, 2010
It has been quite a while since I visited this place. I’m working with the guys over at gravity.com building some awesome into the world and it’s been a bit consuming. So I’m going to post some of the great work we’re doing as I am able and we’ll just go from [...]
Posted in Me | No Comments »
August 23rd, 2009
Ok welcome to the second part of this matchup between MongoDB and MySQL 5.4 via Doctrine ORM on Symfony. In our previous test MongoDB blew away MySQL’s MyISAM and InnoDB engines on raw insert speed. We were unable to use Doctrine for the inserts test as 2.5 million records quickly runs out of memory in Doctrine. So we opted for straight sql through PHP 5.3 commands with the MySQL native drivers. It wasn’t even close.
So now let’s see how MongoDB holds up against MySQL in the simple query arena.
Posted in db stuff | Tags: doctrine orm, mongodb, mysql 5.4, php 5.3, symfony | 7 Comments »
August 23rd, 2009
MongoDB caught my eye recently as a potential solution to managing large data sets with dynamically generated relations. But I didn’t know what to expect since I had not played around with any of the other DODBs. So I started setting up test cases and decided to share them with you.
Posted in db stuff | Tags: doctrine orm, mongodb, mysql 5.4, php 5.3, symfony | 4 Comments »