scratch that niche!

CodeIgniter Article Published over at IBM DeveloperWorks

My new (brief!) intro to CodeIgniter is now available over at IBM DeveloperWorks. The article walks you through a very fast setup (less than one hour) of a one- or two-page web site (or landing page). It shows you how to set up a model, a controller, and various views, and how to store information from a form into a database.

Read it here

Another errata for Professional CodeIgniter

(I’m on a roll here, folks. Sorry for all the notices. We had a number of last-minute changes in the code, and the chapter examples didn’t get updated….and when you look at it 300 times, you just start missing stuff.)

On page 102 the search() function contains this group of code:

if ($this->input->post('term')){
$search['results'] = $this->MProducts->search($this->input->post(’term’);
}else{

The use of $search['results'] is incorrect, as it should be $data['results'] instead, like this:

if ($this->input->post('term')){
$data['results'] = $this->MProducts->search($this->input->post(’term’);
}else{

The code is correct in the downloadable zip archive.

Second Errata Notice on Professional CodeIgniter

On page 110, there is this code in the function updateCart:


if (count($fullproduct)){
if (isset($cart[$productid])){
$prevct = $cart[$productid]['count'];
$prevname = $cart[$productid]['name'];
$prevname = $cart[$productid]['price'];

The second $prevname should be $prevprice, like this:


if (count($fullproduct)){
if (isset($cart[$productid])){
$prevct = $cart[$productid]['count'];
$prevname = $cart[$productid]['name'];
$prevprice = $cart[$productid]['price'];

Errata Notice for Professional CodeIgniter

On page 87 (chapter 4) we have the following example code:

$home['mainf'] = $this->MProducts->getMainFeature();
$skip = $home['mainf']['id'];
$home['sidef'] = $this->MProducts->getRandomProducts(3,$skip);
$data['main'] = $this->load->view(’home’,$home,true);

The code should instead be the following:

$data['mainf'] = $this->MProducts->getMainFeature();
$skip = $data['mainf']['id'];
$data['sidef'] = $this->MProducts->getRandomProducts(3,$skip);
$data['main'] = ‘home’;
$this->load->vars($data);
$this->load->view(’template’);

Inbox Zero: Achieved (for now)

Many of you who know me know that I’ve been trying to follow the precepts of GTD (getting things done) and in particular, this idea that you can get to Inbox Zero. Inbox Zero is Merlin Mann’s approach to email management that involves a certain action-based zeal–get that sucker down to ZERO items.

Now, this doesn’t mean that you have to wade through every single piece of email, but it does mean that every single email gets the quick and dirty GTD algorithm applied to it. Does it take less than two minutes to do it? Then do it. Can I delegate it instead? Can I delete it? Can I postpone it? Can I stick it away in some kind of reference folder for future use?

Following these little rules, you can pound through a lot of data pretty quickly, because like most of you, 80% of what’s in my inbox tends to be (a) trivial notes back and forth with people, (b) spam, and (c) status updates on projects or other project-related requests.

When I get a project request, I stick it in a Stickies note file that I keep open on my spare monitor, assigning it a priority (HIGH, MEDIUM, LOW). If it’s a request to do something on a specific day, I put it in iCal and tag it with the right category (personal errand, send an email, teleconference, go to a meeting, etc). If its just a piece of information for my amusement, edification, or what have you, I send a quick response (if needed) and file it away somewhere (if needed). You get the idea.

Inbox Zero doesn’t mean that I’m suddenly taskless, sitting here like some dot-com rat awaiting more little email pellets. It just means that I’ve processed everything in my little universe into the right places–my calendar, my task list, or into some reference folder.

Since switching to the Mac a year ago, I’ve found that all things GTD have been easier to implement. Not only is there the Apple zen aesthetic in effect, but the tools are just so much more powerful. For example, the simple little search application on Mail.app makes it really easy to find emails wherever they may be tucked. I’ve started adding little tags to my outbound emails to make my sent emails a little less messy too.

Anyway, tonight at 9:03 pm central, after a year of steady work, I achieved Inbox Zero. In other words, every single email had been processed in one way or another, leaving a blank inbox.It probably won’t last. Here’s a picture that will last, though.

Take that, Demons of Email Inbox Disarray!

Next Page »