Category Archives: techb

Accessing Module Configuration from Partials

I am using symfony and in need of having some module-level configuration set that can be used in both actions and partials. There doesn’t seem to be a mechanism to do this. The module.yml file is not included by partials. Likely for optimization reasons.

There is a bug report (#2878) that relates to this, but it appears to have been rejected and without explanation.

I could full-on add an additional configuration handler, but that seems overblown. Seems like there could minimally be a configuration setting to allow partials to access configuration from module.yml files.

SQLitePersistentObjects

I was on another iPhone project that had several thousand simple data objects that I would need to keep and search through. SQLite again. I’ve seen Jeff Lamarche mention his open source project, SQLitePersistenObjects a few times, so I decided to give it a whirl.

You can get the code at it’s google source site. There’s not too much documentation available, but it seems simple enough (as any SQLite wrapper should aim to be). There is a ReadMe.txt with a brief introduction, and some sample code (which I haven’t yet looked at).

I went about including it a different way than the “drop the zip file in” method it suggests. My project is in SVN and I’m using Versions, so I just added an svn:extern statement and now have a subdirectory with the source in it.

In Xcode I created a new group, then edited it’s information to point to the subdirectory naturally, then added all the files in there to the group. Then right-click on frameworks, add existing framework, and dig through the /Developer/Platforms et al. until you get to the sqlite dynamic library to link against.

It built and compiled fine for me. Now off to put it through its paces.

Excluding Category from Main Page in WordPress

I’ve added the following custom code that I found on Zeo’s blog.  It gets added to the functions.php section of the theme being used (Theme Functions) for the blog.  Which obviously will require it to be updated each time I change the appearance of the blog.  But it’s simple.  I found a relatively complicated plugin which didn’t work and still required manual editing of the file.  If you’re aware of a functional plugin to do the same thing (preferably with a list of check boxes) I’d appreciate the pointer.

My goal here is to be able to maintain all my blog entries in one place, but allow me to write some technical entries that would otherwise bore my lay person reader (all three of them).

I also want to find a way to make a custom page to show all of the tech entries.  Off to search for that.


function exclude_category($query) {
  if ( $query->is_home || $query->is_feed ) {
    $query->set('cat', '-54');
  }
return $query;
}
add_filter('pre_get_posts', 'exclude_category');

Bad Analysts at Ars Technica

Ars Technica has an Apple-specific blog. Recently one of the authors provided some analysis of iPhones and netbook rumors. But it’s weak. I don’t really expect more from Ars Technica; I think they promote themselves as more professional than their actual comportment reveals.

The article’s lede includes self promotion, and questionable attribution.

Last month, I posted regarding netbook rumors that were swirling in anticipation of the Macworld Expo. In my write-up, I suggested that in many ways, the iPhone and iPod touch already were Apple’s netbooks. –Ars Technica

The concept of the iPhone being a netbook offering from apple was first suggested half-jokingly on an Apple financial teleconference last fall. For Erica to suggest she has come up with some new analysis of the market by suggesting exactly what someone else has already said is either humorous or sad, I’m not sure which.