Robot Sculptures
May 31st, 2007
Now these guys understand killer robots…

May 27th, 2007
Every now and then, the question comes up of if its a good idea to learn PHP before one learns CodeIgniter, or after one learns CodeIgniter.
I teach technical training for 2 universities, a college, and do a lot of corporate training, so I often find people who are just starting out and wanting to pursue a tool. For a long time my knee-jerk advice was “learn the skill first, then come back to the tool.” That said… the longer I think about it, the more I can see how learning PHP through a framework like CodeIgniter could be really useful. So here is my current position on the topic.
If you don’t know PHP and want to learn, then learn it at the same time as you learn CodeIgniter
May 23rd, 2007
I might be stuck using one of the crappy ones right now for a project I’m working on. Seems that they run only IIS (I mean honestly… a professional host without a single *nix box?) and it was just explained to me by their “sales guy” that I should be grateful that they’ll even let me run PHP on one of their boxes “because they usually don’t” but “the tech guy said (I) knew a lot”, and they were an “important client”.
Uh huh.
I should add that I won a bid wherein I explicitly laid out that I would be using a PHP framework (CI of course) and would require either a MySQL or Postgres database. It was revealed to me after I won the bid that the fact that I planned to use open source technologies was a major strength of my bid.
The rub? They’ll provide me with a MySQL database for the low, low price of $100 per month.
“Indeed” was all I could bring myself to say as I politely hung up the phone and told the client to switch hosts, pay these blackmailers, or find an ASP.NET programmer for their pro-opensource project.
sidebar: PHP 4 turned 7 years old recently, and PHP 5 is about to turn 3. I hope more hosts start adopting more quickly.
sidesidebar: You’ll be shocked to read that this host is giving me PHP 4 ;)
May 22nd, 2007
On the ExpressionEngine forums the staff have a secret “staff only” forum that we use to ensure we’re all on the same page, and all giving the proper advice. Sometimes though, things just devolve into nonsense, Simpsons jokes and one liners. Most of this hijinx never sees the light of day, but Les blogged about one particularly amusing thread today, and I had to share.
Go enjoy, and astound yourself at the high level of intellectualism and 80s rap references… how I didn’t find a way to work “2 legit 2 quit” into there I’ll never know…
Oh yeah, and 2 posts in one day (even if this one is a bit… um… off-topic) officially counts as me breaking out of the blogging slump.
Word
May 22nd, 2007
I've been asked how I acheive the alternating comment styles in my blog. When this blog was custom built on CodeIgniter, I used alternator() in the string helper. It looked like this:
<?php foreach ($post_comments->result() as $comment): ?>
<div class="comment<?= alternator(' even', ' odd');?>
<p><?php
if ($comment->comment_author_website) {
echo anchor ($comment->comment_author_website, $comment->comment_author_name);
} else {
echo $comment->comment_author_name;
}
?> wrote on <?= date ('F jS, Y @ G:i', $comment->comment_date);?></p>
<?= $comment->comment_body;?>
</div>
<?php endforeach; ?>
When I switched my blog over to ExpressionEngine a few months ago, I decided to change my strategy a bit, and use the tools EE makes available for me. Specificly, the {switch} tag for comments.
{exp:comment:entries sort="asc"}
<div class="{switch="even|odd"}">
<p>{url_as_author} wrote on {comment_date format="%F
%d<sup>%S</sup>, %Y @ %G:%i"}</p>
{comment}
</div>
{/exp:comment:entries}
I find it ever bit as intuitive as pure PHP, and I love the convenience shortcuts like {url_as_author} (Hyperlink pointing to the URL (if it exists) with the author name as the link title. If the URL does not exist simply the name is returned).
I still have all the legacy code (of course) from the custom written blog app, and while I don't want to release it wholesale, I'd be happy to field any specific questions about any part of it.
May 10th, 2007
I’m not dead, but it’s been a bit since I wrote anything (13 days… yikes). So to that end I promise a few more interesting CodeIgniter things that I’ve been working on will emerge shortly on this blog.