Eric Barnes

Eric Barnes

CodeIgniter, Development, Life, and Whatever else

New Laravel Bundle App

New Laravel Bundle App

Jan 23

Since starting at UserScape I have been tasked with building a new bundle application for the Laravel framework. So far all the work has been done “behind the scenes” but I wanted to share a few screenshots of what I have completed so far.

Home Page

This is a temporary home page which showcases the latest and the most popular. Currently the most popular will be determined by number of installs but I have some ideas for better stats and filtering that will come later.

Bundle Grid

This is the grid list. I tried keeping it simple so you can quickly scan the titles and also show each users gravatar for branding.

I am really happy with what I have completed so far and it should be a simple and effective way for users of the framework to find pre-built code to put in their applications.

If you are interested in seeing how to create a bundle check out Taylor’s Videos

Kudos. Markdown based personal publishing.

Kudos. Markdown based personal publishing.

Jan 22

A nice and simple flat file markdown based blog application built by Ian Landsman for use on his site. The description says:

I built this to run ianlandsman.com over a weekend :) It may not work for you. I’m posting it up in case anyone else may find it useful. It might also be useful to those interested in working with the PHP Laravel framework.

Although he states it isn’t complete yet from my tests it works like it supposed to but still missing a few small features. I like the setup and the use of the command line to publish the posts and clear the cache.

CodeIgniter Output Caching

CodeIgniter Output Caching

Jan 07

This week I had the privilege of doing load testing on an aws setup. The goal of the test was to support 25k concurrent users and was designed to ramp up over a period of a few minutes. The first round of testing failed pretty quick and I only had a select number of large queries cached. So the db spiked and was the bottle neck. During that test we was only able to reach 10k concurrents.

For the second round of testing I decided to just setup output caching before I even loaded the db in a MY_Controller. I set the number of minutes to something relatively high and was ready to commence the load test. Unfortunately this test maxed out the db again and I was honestly scratching my head on just why that would be the case.

Since this didn’t make any sense to me I decided I better figure just what is going on. I got my local system setup the exact same way, enabled mysql query log, and then proceded to test and see what was going on. Queries was being ran even after the cache file was written. At this point it was way late so I decided I better sleep on it and try and think about what I was missing.

The next morning I got to work ran the same tests and got the same results. Starting researching and then realized it was just my ajax calls that was generating the queries. This had me puzzled because the ajax controller extended the MY_Controller so it should be cached as well. Turns out I was wrong and missed the most important note in the user guide:

Warning: Because of the way CodeIgniter stores content for output, caching will only work if you are generating display for your controller with a view.

The more I thought about it the more sense that makes since the Loader ties into the output library but I wasn’t thinking clearly at 3am. Looked at my ajax controller and sure enough I was just returning a json string.

return json_encode($vars);

The quick fix was to change the return to the following:

return $this->output->set_output(json_encode($vars));

My hope is this will help others if they ever run into the same situation. Unfortunately the load testing was only scheduled for two rounds but I feel confident by fixing that it would have passed with flying colors.

So the moral of the story. READ THE MANUAL :-)

Eric Barnes Jan 07
The API and plug-in architectures are the highest priority. Another way of putting that is: never build anything in-house if you can expose a basic API and get those high-value users (the ones who are getting the most value out of the platform) to build it for you. On the Trello team, any feature that can be provided by a plug-in must be provided by a plug-in.
Joel Spolsky

(Source: joelonsoftware.com)

micro PHP manifesto

micro PHP manifesto

Jan 03

I am a PHP developer

  • I am not a Zend Framework or Symfony or CakePHP developer
  • I think PHP is complicated enough

I like building small things

  • I like building small things with simple purposes
  • I like to make things that solve problems
  • I like building small things that work together to solve larger problems

I want less code, not more

  • I want to write less code, not more
  • I want to manage less code, not more
  • I want to support less code, not more
  • I need to justify every piece of code I add to a project

I like simple, readable code

  • I want to write code that is easily understood
  • I want code that is easily verifiable

I think Ed Finkler hit the nail on the head with this. This is exactly why I like frameworks that are simple enough that I can understand all aspects. Not some monstrosity that it takes someone more than a few hours to understand how the application is built.

Why Best Buy is Going out of Business...Gradually

Why Best Buy is Going out of Business...Gradually

Jan 03

I agree with pretty much this entire article. I had the privilege of getting a BestBuy gift card for Christmas and decided to buy my daughter a movie with it. As soon as I got in I visited the computer department. Seen nothing that interested me so went to the almost non existant movie section. Couldn’t find the movie we wanted and couldn’t get any help. So I bought an iTunes gift card from the BestBuy one then went home and ordered online.

I guess what really drives me nuts is these box stores do not have enough employees to help customers that actually need it. Or expect you to be able to find what you want in their confusing layouts. That is why places like Amazon are awesome. I can find what I want in 5 seconds and then read real reviews and finally purchase if I want too.

New Year, New Job, New Framework

New Year, New Job, New Framework

Jan 01

I am happy to announce that starting January 9th I will be working full time for Userscape. If you are not familiar with them they are the company behind the awesome HelpSpot help desk software.

Laravel

Not only will I be a part of a great company but they have also hired the creator of the Laravel framework, Taylor Otwell. I have been watching that framework closely the past few months and I am very impressed with what he has done with it. Laravel’s motto is:

Laravel is a clean and classy framework for PHP web development. Freeing you from spaghetti code, Laravel helps you create wonderful applications using simple, expressive syntax. Development should be a creative experience that you enjoy, not something that is painful. Enjoy the fresh air.

The simplicity of framework is what drew me in originally. But now it will just keep getting better and better because it will be the framework of choice for Userscape. The reason I feel this way is that HelpSpot can be purchased as either a downloaded application or hosted with their partner Engine Hosting, so Laravel will be tested in a wide range of different hosting environments.

CodeIgniter

Even though my day job will be with Laravel I still love CodeIgniter and I am still on the CodeIgniter Reactor team. CodeIgniter is and has always been near and dear to me and I really enjoy using it. Plus I will be doing contract and freelance work for companies that are heavily invested into it. I am very excited with where CodeIgniter v3 is heading and I think it is a big step in the right direction that we have all been wanting.

Taking On A Failed Project

Taking On A Failed Project

Jan 01

Very good post by Boyink talking about issues dealing with taking on a failed project.

ericbarnes Dec 30
Less Colors For Man Pages

Some nice bashrc coloring for viewing man pages.

Less Colors For Man Pages

Some nice bashrc coloring for viewing man pages.

My Top Mac Apps of 2011

My Top Mac Apps of 2011

Dec 28

I always like reading lists of apps that developers use on a daily basis and I love finding ones that I have never heard of or never gave a chance. As 2011 comes to a close I wanted to share my favorite apps that I use on an almost daily basis.

CodeIgniter

Not a mac app but still the framework I use every single day and write posts about all the time. :)

Alfred App

This is a must for every computer that I own. I love the quick application launching, calculator, and custom commands you can use.

Sparrow

Previously I was using just the standard mail app but when 10.7 came out I really disliked it. So I found Sparrow and have been happy ever since. It is nice and light and does just enough for what I do.

Git-Tower

I don’t always use a git gui, but when I do I choose Tower. I like the quick visual diffs and the clean layout. Another great git gui is gitbox which I use as well.

Mamp Pro

I use Mamp Pro just because it is easy. I like the fact that I can setup vhosts through a gui and not have to worry about installing apache, php, and mysql. Another benefit is that I work with a bunch of designers and with us all using Mamp I know what I build will run on their systems with out me having to do anything.

Sublime Text 2

This is my code editor of choice right now. It is awesome and you should try it if you haven’t. More Sublime Text Posts

Fake App

I found this a few months ago and it is really great for browser testing and inspired by Automator. So it is really simple to setup and use.

nvalt

I use this every day to create notes, ideas, and write out features before starting coding. I have this setup to sync with dropbox so my notes are always available. More Tips

Sequel Pro

I have to connect to several dbs throughout my day and this app makes managing mysql a breeze.

CoRD

CoRD is a Mac OS X remote desktop client for Microsoft Windows computers using the RDP protocol. At work we have a lot of old legacy sites that are running on windows hosting and I really like this app because of its speed compared to others I have tried.

Common Ones

For other common day to day applications I use Chrome as my browser, iChat, Textual IRC, dropbox, and Feedly for my rss feeds.

Page 1 of 11 1 2 3 4 5