Better Know a Library: Faker

When you’re developing websites it’s very easy to create a small subset of data so you can test but there are some performance issues and bugs that will only rear their ugly head when you have a large amount of data. It’s very difficult to create this test data and have unique values set. You could just fill your database with random letters and numbers (substr(sha1(gmdate('U'))), 0, 10) but it’s better to have nice looking data if you need to demo changes.

The Faker library provides a way to generate fake but real looking data for your test environment.

Continue reading

Link Post: Introducing the Symfony Demo application

I’ve been working with Symfony for a couple projects and I’ve been super happy with the documentation. It seems like every time I do a search for something that I’m stuck on the project has already had a piece of documentation. It’s nice to see they have this cool demo application that’s using their best practices. It’s super basic but it’s a nice reference.

http://symfony.com/blog/introducing-the-symfony-demo-application

Creating a Custom Fork of a Composer Library

Composer is great because you can easily add libraries to your projects and have it automatically pull down the same versions for every deploy of your site. The downside to composer libraries (and open source in general), is that sometimes it’s hard to get your pull requests for bug fixes merged into the master so you can use it on your project or add your own customizations. You can fork the repository in order to gain more control over the source.

Continue reading

GitHub QuickTip: Adding a Folder From the Web Interface

I needed to add a file to a directory that didn’t exist using the GitHub web interface (I didn’t want to clone the repo [lazy I know]). If you add a new file and then type the name of the directory and then the forward slash (/) it will automatically create the folder:
Screen Shot 2015-04-24 at 11.21.55 AM

Screen Shot 2015-04-24 at 11.21.59 AM

Cool trick for the two times a year I need to make changes directly on the GitHub site. ;-)