May 2013
2 posts
3 tags
“We are happy to confirm that Android Studio, the new IDE for Android development...”
– IntelliJ IDEA is the base for Android Studio, the new IDE for Android developers | JetBrains Company Blog JetBrains is one of the best developer tools companies out there IMO. I have happily paid for PHPStorm and RubyMine out of my own pocket as the apps are just worth it. Congrats to the...
May 16th
4 tags
“The problem comes from the fact that the new Ruby 1.9 installation doesn’t find...”
– Ruby 1.9 and the SSL error « Martin Ottenwaelter If using Homebrew instead of port: brew install curl-ca-bundle
May 16th
April 2013
3 posts
PHP is meant to die, continued
software-gunslinger: TL;DR: PHP is still a poor choice for continually-running processes. See this post for context. Read on for more proof. There’s been some reaction to the previous entry. Some people agreed, mostly seasoned PHP folks, some others just didn’t. Yeah, apparently it pleased or infuriated more than two folks in the entire Internet. First and foremost, a correction to previous...
Apr 26th
5 notes
4 tags
Apr 20th
3 notes
8 tags
Deployment projects
Recently, I’ve been looking at various deployment strategies. I’ve spent a lot of my career doing some configuration management, mostly out of necessity where I’ve been the lead developer on a small team. Over the years, I’ve written several deployment scripts. For employers, they’ve always been built on top of SVN and Fabric. Since I didn’t want to use SVN for...
Apr 15th
October 2012
1 post
4 tags
Setting up correct permissions for VirtualBox...
With the launch of Mountain Lion and after suffering a hard drive failure, I decided to investigate other options for my local development environment than using MAMP. MAMP has served me well over the years, but considering the number of visitors to my MAMP + Lion tutorials, it’s obviously not as easy to use as a LAMP server. Virtual machines are great. I know many people that use...
Oct 12th
2 notes
September 2012
1 post
3 tags
Sep 7th
6 notes
April 2012
2 posts
3 tags
Packages: The Way Forward for PHP →
» Great article articulating what I’ve experienced recently. Having played around with Composer lately, I’ve gone from a meh to a This is frickin’ awesome mentality. For my new projects, I’m building them around Composer for managing my dependencies and autoloading.
Apr 20th
5 tags
“Modern MVC web frameworks often involve a lot of boilerplate code just to...”
– The MVC Paradox – Bradley Holt » This article is a great read and something I’ve been pondering myself recently. The author references the Slim micro framework which, at least from a cursory glance, is very similar to Silex. I love Silex for the same reasons he mentions Slim: There is very...
Apr 5th
1 note
March 2012
3 posts
3 tags
“Today I ran into a problem where my PHP Application would throw this fatal...”
– PHP, Sessions, __sleep, and Exceptions | Justin Carmony I had a similar problem not too long ago. My solution was to call: register_shutdown_function('session_write_close'); at the beginning of the bootstrap process.
Mar 23rd
2 tags
“Google warned several developers in recent months that if they continued to use...”
– Exclusive: Google leans on developers to use payment service | Reuters » I’ve got conflicting feelings on this one. As a developer, I’ve encountered severe limitations dealing with Apple’s in-app offerings, especially as it relates to our subscription services. It’s been...
Mar 9th
3 tags
Depending on packages without composer.json in... →
» Great information for using Composer with repos that aren’t on Packagist. I look forward to when the composer is more stable and usable.
Mar 9th
January 2012
3 posts
6 tags
Using Dropbox as a VCS and in deployment
I was working on some personal projects the other day, and I wanted to add my code to version control. I’ve gotten so used to ensuring that my code is backed up (primarily using SVN) that it makes me nervous to only rely on Time Machine for my backups. While I was investigating free/cheap svn and git solutions (github was not an option because I don’t want a public repo for this...
Jan 12th
25 notes
3 tags
MAMP + Intl + Lion
Since I have started using Symfony2 on some projects I have been meaning to install the intl extension that Symfony recommends you install. I have tried several different methods, but believe that the one I listed below is easier and makes less of a mess than others. First, get the ICU libraries. Then expand them and build the library: tar xzvf icu4c-4_8_1_1-src.tgz cd...
Jan 6th
18 notes
2 tags
Upgrading MAMP 2.0.x to MAMP 2.0.5
In previous articles, I upgraded my computer to Lion and took the time to install MAMP 2. I discovered while using some Zend Framework components that prior to MAMP 2.0.2, there was a bug with the iconv functions. This bug basically caused several pieces of the framework to timeout. I had unfortunately installed MAMP 2.0.1, so I needed to update to the newest version so that I could again develop...
Jan 5th
2 notes
December 2011
1 post
2 tags
‘fuser’ Using 100% CPU in Ubuntu 11.10 | Flynsarmy →
» I have several servers running on Ubuntu 11.10 and yet I only see this bug on one of the servers; on that server, I get the AWS CloudWatch messages at least once a day! Since the site was just a small one, I figured it’d be ok to go with the latest and greatest Ubuntu image. I’m really beginning to regret that decision! Combine this with an EC2 micro instance and you can easily...
Dec 22nd
October 2011
3 posts
3 tags
Hello world Facebook App Using Silex on Heroku →
This is a slick and simple Hello World app built on the Facebook platform. Facebook is really lowering the bar to entry on building apps.
Oct 11th
19 notes
2 tags
Using MySQL Workbench with MAMP « Internet... →
» I’ve been meaning to write a similar article. Now I won’t have to!
Oct 7th
1 note
2 tags
ps_files_cleanup_dir: opendir(/var/lib/php5)... →
» I’ve seen this error occasionally, but recently it has caused me some grief, so I finally decided to look it up. In Debian and Ubuntu, /var/lib/php5, where the session data is stored, has permissions of drwx-wx-wt and should only be cleaned by a cron script. So, the package maintainers disable automatic session garbage collection. The article linked gives some great background, and the...
Oct 6th
3 notes
August 2011
12 posts
3 tags
“To remove the exif data you need to call Imagick::stripImage() on the populated...”
– How to strip exif data using Imagick - James Morris - JMOZ » If you need to resize an image, you can also use Imagick::resizeThumbnail to strip the exif data in one call!
Aug 25th
2 tags
“PHP 5.4 includes a new feature called traits which allow us to do something that...”
– Zutto development - Horizontal reusability with traits Great explanation and example of traits. PHP 5.4 is looking to be a nice release.
Aug 25th
2 notes
1 tag
rentzsch.tumblr.com: HOWTO Use UTF-8 Throughout... →
rentzsch: Good is the enemy of Great Latin-1 is the enemy of UTF-8 You write web apps. You understand the web is global, and want to support internationalization. You want UTF-8. UTF-8 is extremely sane. Well, as sane as an encoding can be that features backwards-compatibility with ASCII. Everything…
Aug 20th
217 notes
3 tags
Implementing Twitter sign-in with Silex and PHP |... →
» Silex is awesome and it’s great to see an example using the OAuth library. We recently had a third party spend over a week trying to connect with our web service using OAuth. I couldn’t believe the struggles that they had. Then today I see an article that shows just how simple it really is :).
Aug 17th
6 notes
4 tags
Scripting Languages: PHP, Perl, Python, Ruby -... →
» Looking at these comparisons, it makes me wonder why I chose Python instead of Ruby as an additional scripting language. Python has some weird naming conventions (and I’ve grown a fond hatred for the indentation-based syntax).
Aug 16th
24 notes
4 tags
MAMP + Xdebug + Lion
In Part 1 of my MAMP + Lion series, I set up my MAMP installation so that I could use the included PECL installer. Then we installed OAuth. In Part 2, we installed MacPorts, then used PECL to install the ImageMagick “Imagick” extension. I decided to give you a breather and make this piece much simpler, so we’re going to install Xdebug. Originally this post was much longer since...
Aug 15th
5 tags
MAMP + ImageMagick + Lion
In Part 1 of my MAMP + Lion series, I set up my MAMP installation so that I could use the included PECL installer. In this piece, I am going to explain how to install the php imagick extension. It’s going to be a little more work, but it builds on the foundation established in part one. Install MacPorts To begin, I followed the advice given by Mike Leo @ Unreal Expectations on installing...
Aug 12th
4 notes
4 tags
MAMP + OAuth + Lion
I recently updated my MBP to Lion and decided that while I was upgrading applications, I might as well upgrade my MAMP to version 2.0.1. When installing MAMP 2, make sure to choose the appropriate install. Since this article focuses on Lion, you should just choose the 64 bit version. I had hesitated doing this in the past since there are some unusual steps I had to take in the past to set it up. ...
Aug 12th
9 notes
4 tags
“[Using annotations] is a very nice and clean way of handling validation, it...”
– Filtering objects using annotations « Rafael Dohms » Doctrine and Symfony has opened my eyes to the power of annotations. Check out Rafael’s example of his filter class. I love how easy it is to understand how each element of the user object should be filtered. <?php namespace...
Aug 11th
8 notes
2 tags
Not able to login to sftp server using key pair :... →
» Found this nugget after updating my EC2 instance and still being unable to log in via SFTP with phpStorm.
Aug 10th
13 notes
4 tags
“Amazon recently launched the ability to upload your own ssh public key to EC2 so...”
– Uploading Personal ssh Keys to Amazon EC2 - Alestic.com Ok, so it’s not recent any more, but it still seems pretty unknown. I use PHPStorm for my IDE and needed to have a private/public key in order to connect via SFTP. With this change I should be able to connect now!
Aug 10th
9 notes
2 tags
Aug 2nd
2 notes
July 2011
4 posts
2 tags
“The engineering challenges in providing read-after-write consistency in a...”
– Read-After-Write Consistency in Amazon S3 » It’s amazing that we have technologies that are limited by the speed of light. Who’d have thunk?
Jul 28th
1 note
1 tag
Jul 26th
2 tags
Deleting object properties in Javascript →
» I was looking for the proper way to delete an object property in Javascript and came upon this nice example. I figured it was worth sharing. I’ve also included a similar way of handling it in PHP. var obj = {asdf:'foo',bar:'baz'}; obj.asdf = undefined; for ( var i in obj ) { console.log(i,obj[i]); } // outputs: // asdf undefined // bar baz var obj = {asdf:'foo',bar:'baz'}; delete...
Jul 22nd
2 notes
2 tags
“You think you’re going well with your web development until you go and try...”
– Fix for IE using an AJAX/DHTML driven upload progress monitor » After spending the last several months working mostly on backend code (MySQL, PHP, etc), I’ve started doing more JS work, mostly cross-domain XHR. I found this quote in my research and it has never been more apt. The way...
Jul 15th
June 2011
4 posts
2 tags
Aleksandar Savic - Nginx redirect www.example.com... →
server { server_name example.com; rewrite ^(.*) http://www .example.com$1 permanent; } server { server_name www .example.com; #Put here your domain hosting configuration. } » Just switched to using Nginx instead of Apache for my personal hosting. I’m surprised by how much quicker it responds and how much nicer the syntax is. I’ll probably log a few more of these...
Jun 30th
11 notes
1 tag
Capifony: Deploy Your Symfony Application... →
I’m currently using Symfony2 for a side project and was thinking about using Phing for deployment… However, now I’m considering Capifony. I’m surprised by the quality of support software available for Symfony. It may become my go to PHP framework in the future…
Jun 22nd
1 note
1 tag
symfony2 Blog Application Tutorial →
» There needs to to be more tutorials on symfony2. From what I’ve played with so far, I’m loving it. The only problem is the lack of documentation and tutorials beyond basic, cookie-cutter functionality. In fact, I found this blog trying to figure out how to get my security-model tied to a doctrine2 entity. 
Jun 22nd
1 note
Use Phing to update your SVN-version-controlled...
I use Python’s Fabric at work, but for my next project, Phing looks interesting. phpandme: If you’re working on a PHP project, like with any other project, probably comes a time when you need to “build a new release,” e.g. update the production web site with the latest version of the code. And doing the whole thing manually isn’t the most efficient way to get things done, especially if...
Jun 20th
11 notes
October 2010
1 post
3 tags
Converting PHP Date string to UTC
We store all of our dates in the database in UTC. This makes it easy for us to pass dates around to our various applications (web, iPhone, iPad) and all pieces know how to convert to their respective local time. I came across an issue this afternoon that I had not encountered previously, since most of the dates that we store are generated on the server side either using gmdate() in PHP or...
Oct 19th
9 notes
September 2010
1 post
1 tag
Overloading arrays in PHP 5.3
I recently built a simple PHP 5.3 framework to use on a new project. I know, I know, I built a framework again, even though I wrote off building frameworks earlier this year. Well, now that I am able to solely focus my efforts on PHP 5.3 development (all environments at my new job are in PHP 5.3), I decided that it would be fun to build a simple MVC framework using namespaces. Needless to say, I...
Sep 18th
2 notes
August 2010
1 post
3 tags
Using the Bit.ly v.3 API with Zend Framework
I recently looked at providing a URL-shortening service for our new sharing module. Right now, my needs are very minimal, so I decided to write a class (currently using static methods) that utilizes Zend_Http_Client to communicate with Bit.ly API service. Here’s my code: class My_UrlShorten { const bitlyLogin = 'LOGIN'; //Your Bit.ly login here const bitlyApiKey = 'API_KEY'; //Your api...
Aug 3rd
1 note
June 2010
1 post
3 tags
Objective-C for PHP developers: Checking for a...
I created a REST-based service the other day that uses method_exists to verify that the requested action exists in the processing class. This allows my service bootstrap to be more dynamic, as I can load various classes (for example, an image processing class) and verify that the action is valid. If not, I can pass an appropriate error back to the client. Here’s a snippet of the code that I...
Jun 22nd
May 2010
1 post
4 tags
Objective-C for PHP Developers: Strings as...
After the long introductory post, I decided that it would be more beneficial to look at individual aspects of Objective-C instead of having long posts. Using strings as variable names: One of the features that I love about PHP and is lacking in many languages is the ability to use a string to represent a variable name. In PHP, the code looks something like this: <?php $a = 'hello world!'; $b =...
May 13th
6 notes
April 2010
3 posts
2 tags
Working with Zend_Db_Table
Ever since we standardized our development platform on the Zend Framework, I’ve been investigating how to utilize its DB classes in our model classes. I have read many articles and opinions on using ActiveRecord and integrating with frameworks like Doctrine. However, I decided that I needed a compelling reason to add another framework to our codebase that I would need to maintain and train...
Apr 16th
3 tags
Find an iPhone’s current orientation
While working on some code that changes a subview’s height/width based on the iPhone orientation, I discovered that if the user rotates the phone while on the navigation controller, the image view controller that gets pushed onto the navigation stack does not change its orientation to match. I assumed incorrectly that whenever a...
Apr 5th
Objective-C for PHP Developers, Introduction
It is easiest to learn a new language by comparing it to a language you already know. When I learned Laotian, I was taught its alphabet in a similar way you are taught English: A is for Apple. In Lao, ກ is for ໄກ່. Just by learning the alphabet, I could pair words to their English equivalent. I learned that ໄກ່ = chicken, ຂ້ອຍ = I, me, mine, my (depending on context). The same is true with...
Apr 1st