Fix For Phoogle

Posted by justinjohnson on Nov 11th, 2008

This is for the error: Fatal error: Cannot use string offset as an array in /includes/phoogle.php on line 137 , which just started popping up today.

I haven't had time to update the source files yet, but Michael Clark sent along the following fix that seems to work. I'll post an updated php file ASAP

PHP:
  1. it's a minor  patch -
  2. add:
  3. if(!trim($data)) return;
  4. as the new first line of the  characterData function

Web Design 101: Start on Paper

Posted by justinjohnson on Jul 7th, 2008

A post over at Deeplinking: The Paper Version of the Web, got me thinking about just how important it is to actually start on paper with your designs. I've done this for years as it was drilled into me in college. I even keep all my old designs as I think it's important to review those every now and then. (By the way, my sketchbook of choice would be a Moleskine).

Remember: Time is your most valuable asset (especially if it's billable). You can sketch out rough layouts in 5 minutes on a piece of paper, and pick a design direction to spend a few hours in Photoshop polishing up. OR you could spend 3 hours in Photoshop only to determine that what you've been working on for the past 3 hours is terrible.

Internet Marketing and Design Advice for Your Business

Posted by justinjohnson on Apr 17th, 2008

Sponsored Post:

The guys over at UK2.net have recently taken the time to do an interview with some designers and developers in the web community including:

Nathan Beck - of http://sansdesign.co.uk/
Mathew Browne - of http://www.mbwebdesign.co.uk/
Chris Spooner - of http://www.spoongraphics.co.uk/
Richard Stelmach - of http://www.creativebinge.co.uk/
James Crooke - of http://cj-design.com/

The guys (and gals) and UK2.net specialize in helping small businesses get an online marketing and web presence for their business. The interviews above can be found at UK2's Blog Post about Internet Marketing and Design Advice for your Business

The interviews are pretty well done and cover a wide variety of topics, I like the fact that they are trying to help business owners who need help understanding this whole fancy 'internet thing', below is just a brief overview of whats discussed:

- Important factors of business web design.
- Usability and why its important.
- Functionality versus asthetics
- Role of a blog in a business web site.
- Social media and how it can help your business.
- SEO case studies and SEO during design process.
- Branding and what a designer can do with this.
- Online store design and how to do it.

Also be sure to check out some of the other posts on their blog at UK2.net's Official Blog

I also took a look at their hosting packages located here: PHP / Rails Web Hosting at UK2 the packages look really good for what you pay and they include PHP and Ruby on Rails. I also checked out the prices for their dedicated servers and even those look pretty reasonable, I'm seriously considering purchasing the Silver Dedicated Server plan.

Adobe MAX 2007 Recap

Posted by justinjohnson on Oct 11th, 2007

Sure a-lot has already been posted on this and I'm not going to beat a dead horse, but I will say that Adobe knows how to throw a party. From the individual classes to the general session to the after hours guitar hero, poker tables, Segueway race course and just providing a place to plug in your laptop and hang with other developers, they did it right.

thermo Once of the most exciting things that I saw was a project code-named "Thermo" which is sort of like a WYSIWYG on steroids for Flex applications.

Let's say you have a team of developers and a designer. The designer can take his/her Photoshop or Illustrator file and import it into Thermo, from there they can turn there designed elements into actual functioning application elements.

On the backend this is writing mxml that can be handed off to a developer in order to connect it to a database or do some more advanced coding with it.

Simply an awesome technology, but it begs the question, should designers be given that much power?

I know a few designers who could handle that, but there are some that I've worked with in the past that whom I wouldn't even tell this application exists.

For more about Thermo check out it's entry on the Adobe Labs Wiki

Email Templates with CodeIgniter

Posted by justinjohnson on Sep 12th, 2007

The more I use it, the more and more I love CodeIgniter as a framework; in fact I believe I cherish it more than CakePHP due to it's simplicity. One thing that I do like about CakePHP is that by mixing in PHPMailer you get the ability to specify views for your html email and views for your text emails. So you could have multipart emails being sent based off the data in these views.

Sadly, this is one thing that CodeIgniter is lacking. But if you look around the docs long enough (which are absolutely fantastic by the way) you'll see that you can use CodeIgniter's built in template parsing class to do the same thing.

Let's assume that we are building a site that allows users to create an account. When they create an account, they need to get a welcome email from the application. I'm going to assume you know how to build the form and process the data so here's the controller action that handles the mail part of things.

PHP:
  1. function signup(){
  2.  
  3. #stripped out the validation code
  4.  
  5. #stripped out the db insert code
  6.  
  7. $data = array(
  8. 'some_var_for_view'=>'Some Value for View'
  9. );
  10.  
  11. $htmlMessage$this->parser->parse('user/email/signup_html', $data, true);
  12. $txtMessage = $this->parser->parse('user/email/signup_txt'$data, true);
  13.  
  14. #send the message
  15. $this->email->from('test@webdevkungfu.com', 'CSSNinja');
  16. $this->email->to($this->input->post('email_address'));
  17. $this->email->subject('Account Registration Confirmation');
  18. $this->email->message($htmlMessage);
  19. $this->email->alt_message($txtMessage);
  20. $this->email->send();
  21.  
  22. }

Nothing really ground breaking going on here, but notice the two lines that declare the variables $htmlMessage and $txtMessage, these two lines are what's going to allow us to use these views as email templates.

The template parsing class will parse out a template using the following syntax:

PHP:
  1. $this->parser->parse('path/to/view',$data_array);

However, if you pass a true value as an optional third parameter (default is false) CodeIgniter does not render the view, it returns its fully parsed text as a string. So the $htmlMessage variables and $txtMessage variables now hold appropriately formatted code for either a text message or an html message which is exactly what CodeIgniter's email function needs for its message() and alt_message() methods.

Hope this was helpful, post any questions, concerns or moral outrages in the comments.

Phoogle 2.02a Release

Posted by justinjohnson on Jun 16th, 2007

Nothing major here, just fixing the hard coded API Key bug that was causing maps not to display due to the API Key being over it's limit.

Download it at: Phoogle's Homepage

Ruby On Rails: acts_as_emailable

Posted by justinjohnson on Jun 8th, 2007

Matt Beedle has written a solid little plugin called acts_as_emailable that let's site users send each other messages through the site.

A couple of cool things that stood out to me:

1. It doesn't need to send emails it can store the messages on the site (in a db table) but can send emails if it has to using ActionMailer

2. You can make a little message form that sends a message to another user that references user id's instead of actual email addresses

3. It has a couple cool methods like:
user.users_whom_i_have_emailed
user.users_who_have_emailed_me

Full details can be found on Matt's site:

http://matt-beedle.com/2007/06/05/acts_as_emailable/

Improve Your Productivity In 4 Hours

Posted by justinjohnson on Jun 5th, 2007

On June 1, 2007 my wife and I had our first child, named Luke. He came home from the hospital with us on June 4th. Of all the adjustments people have to make to a new baby one of the biggest is the sleep schedule.

We are lucky that he sleeps in roughly 3.5 to 4 hour shifts, where most newborns sleep in 2 to 3 hour shifts. My time that is baby free and distraction free gets cut down to 4 hour increments and based upon what I've found out so far: It is possible to get more done in less time.

One of the biggest keys I think in getting more done in this four hour time block is the concept of sprinting which is introduced in the agile development methodology of Scrum. While I've not embraced this methodology 100%, I've found the concept of sprinting to be quite intriguing.

Sprinting revolves around user stories which are requirements in end users language. For example take this user story from a project I'm working on now (names have been changed for illustration purposes)

Joe of AcmeWidgets needs the currently existing search function on his website to have an option to filter by size, color, and weight.

Now that we've got our user story let's look at what we need to do by creating a quick task list:

  1. Size should be a select box containing: S, M, XL, LG
  2. Color should be a select box containing all available widget colors
  3. Weight should be 2 radio buttons, weight ascending, weight descending

The next part of our sprint involves hardcore coding as hard as we can for a set period of time (In my case roughly 4 hours) to get as much done as we can. What I've been finding is that the less time I have the harder I code and get alot more "in the zone" time.

Yes, you could have a task list that simply says: Add new search fields, but the thing I like about keeping multiple shorter lists is that it breaks them in to more sustainable chunks and lets me check off multiple items which gives me a sense of accomplishment instead of dread about the current workload.

This methodology doesn't only apply to programming, suppose I turn my household chores into a sprint, or creating a new site design section by section.

5 Web Development Podcasts You Should Be Listening To

Posted by justinjohnson on Apr 11th, 2007

Podcasts are great. I currently keep about 5-8 subscriptions at any given time on my iPod. I'm a big fan of web development podcasts as I love to hear how others are doing day to day tasks like I do.

In no particular order here are some of my favorite web development podcasts:

Railscasts | http://www.railscasts.com
This is a video podcast, if you don't have a video ipod you can watch it online at http://www.railscasts.com/ (or in iTunes itself)
Coolness factor: I'd easily give this one a 10/10. It's updated 2-3 times a week with short (10 min or less) video lessons that cover various aspects of Rails development

Tech Note: iTunes occasionally tells me that it can't copy some of the earlier episodes to my iPod, i think this is an encoding issue.

The Official Ruby on Rails Podcast | http://podcast.rubyonrails.org/

The official Ruby on Rails podcast from Geoffrey Grosenbach of the Topfunky Corporation. Audio Podcast

Coolness factor: 8/10. Updated fairly often, the topics cover more theory and industry related Rails themes, but still great nonetheless. Interviews with top Rails developers often inspire some inspiration in my personal work (+2 to the rating for Geoff's super smooth DJ voice)

sd.rb Podcast | http://podcast.sdruby.com/

The San Diego Ruby Users Group puts out this podcast of their groups presenters. Wide variety of topics. The presenters typically walk you through their code and how/why they are doing things. Some are more theory/methodology based, some are more technical solutions based

Coolness factor: 6/10 Updated often, range of topics, sometimes the audio levels are fairly low and you really have to crank the volume to hear it.

TweakCast! | http://www.tweakcast.com/

Josh Iwata's TweakCast is for the Creative Entrepreneur. He focuses on how to run your own full time/freelance business. Good ideas and insights from someone actually doing this full time. Not a huge emphasis on development, focuses more on process.

Coolness factor: 7/10 Josh is a perfect podcaster, he's always prepared, very meticulous and is never flying blind. He has some great information and is always willing to take comments and suggestions from the user base.

That was only 4, but we're going to count the next one even though it isn't a podcast and it's not free...


Honorable Mention:

Peepcode | http://www.peepcode.com

Also run by Geoffrey Grosenbach of the Topfunky Corporation. Peepcode episodes are screencasts that are $9.00 each. Trust me, they are worth about $200.00 each from the knowledge that is shared. This is very similar to the railscasts.com podcast, but Geoff goes in to alot more detail with most episodes running around an hour.

Well that's my list, what's yours? Feel free to suggest in the comments.

Thanks!

Phoogle 2.02 w/ Google Geocoding (and International Support)

Posted by justinjohnson on Apr 4th, 2007

One of the biggest complaints I've received in the past few weeks has been lack of international support which I thought I had fixed in 2.01. Also alot of people have asked why I used Yahoo's geocoding API instead of Google's. When Phoogle Maps was first released about a year or so ago Google did not offer a geocoding API. In fact the first version used geocoder.us to get the points, then Yahoo's and now Google's.

The change to Google's Geocoding API should allow greater international support. If it doesn't let me know. Please note that I do read all emails, it's just that due to sheer volume it's hard to respond to all of them.

Thanks to Mike Wilt and several others who have submitted code to this iteration of Phoogle.

Download the file here: http://www.systemsevendesigns.com/phoogle

- Next »

Advertisements

Recent Posts

Categories

Archives

Meta: