tag Programming : TimToon

Spotlight sucks

/Blog

Let me start by saying that I hate OS X’s Spotlight. It willingly turns a blind eye to system files, which (like so much else for the Mac) is a solution that satisfies 90% of users, but does nothing for the other 10%: people like me, who need to edit httpd.conf, php.ini, and other files the OS prefers you ignore.

So in lieu of Spotlight, I have been trying to use find, albeit with mixed results. That changed when I found the terminal command mdfind — it’s Spotlight that actually searches your whole computer. What a relief! And it’s simple to use:

> mdfind php.ini

was all it took to find /private/etc/php.ini. Find without arbitrary limitations. Amazing!

“A wakeup call for the Drupal community”

/Blog

Freeman recently wrote A wakeup call for the Drupal community and I wish I could have put the failings of the Drupal CMS as well as he has:

This is a common theme in the community. You can kludge your way to victory with just about any feature set you can think of if (and only if) you write enough hook_$n_alter() code, can find some contrib modules to pick up the slack, and have a designer who can code php tucked in your back pocket

Freeman’s states that the reason Drupal failed to win CMS of the year over WordPress is because WordPress is simply easier to use.

Read more

Decisions, decisions

/Blog

I have been talking about redesigning my blog for at least a year now. I am torn between continuing with WordPress or ditching it for Drupal. I do like that Drupal can do a lot more than WordPress, but if you look at the two, WP has a great deal more polish to it than Drupal. And I don’t know how many of Drupal’s features I’ll use that WP doesn’t have.

Plus, why do I want to start from scratch when there are themes like Tubular that do mostly what I want?

There lies the rub: mostly.

FIVE SCROLLBARS?!???

/Work

Seriously IPB, what the fuck is wrong with you? And three of the scrollbars are nested around that tiny sliver of editable text, otherwise known as the thing I’m actually trying to use.

Seriously, FIVE fucking scrollbars?

And this doesn’t even address the ridiculousness of keeping your PHP/HTML templates in a database. Shit, if only there were a way to save PHP or HTML in a file somehow!

There’s no tilde on the iPhone keyboard

/

Open Mobile Safari on your iPhone and try to type in this address: 192.168.1.1/~user. I’ll wait.

Did you get stuck somewhere after /? I looked in disbelief at both the alphabetical and numeric keyboard layouts to make sure I didn’t miss it, but sure enough, there’s no ~. While this isn’t a huge oversight, it may just be a problem for, say, a CS major who would like to access his account on a university web server. But they probably aren’t big iPhone users.

CMS Madness

/Work

Unix gets a bad rap for having an abundance of many needless flavors when — since they all use the same OS — most of the time you’re getting a choice of vanilla, french vanilla, and fat-free vanilla.

But worse than that is the proliferation of more varieties of content management systems then there has any reason to be. Why should I feel limited to just Drupal or Joomla, when there’s tons of suck to go around? If you’re building a new website and would much rather learn some other programmer’s (or worse, a committee of programmers) byzantine system of content management, visit http://www.cmsmatrix.org to view this utterly baffling plethora.

node_teaser is bass_ackwards

/Work

After getting all apoplectic at one commenter foolish enough to support Joomla, I hasten to add that Drupal is no walk in the park either. I’m having a little issue with node_teaser in particular. Rather than use strrpos to search for the last occurrence of a character in a string, Drupal instead reverses the entire string and searches for a backwards string using strpos.


foreach ($points as $point => $offset) {
// The teaser is already reversed, but the break point isn't.
$rpos = strpos($reversed, strrev($point));
if ($rpos !== FALSE) {
$min_rpos = min($rpos + $offset, $min_rpos);
}

I am dumbfounded. I’m also writing my own node_teaser now, one that ignores HTML tags when determining teaser length, so your teaser isn’t comprised mostly of invisible <a href=”http://www.mylongurl.com/this/is/a/really/really/long/path#indeed”> code that does nothing for the reader.

UPDATE: A better programmer than myself informed me that — counter-intuitive though it may be — it’s actually faster in PHP to reverse a string and search a reversed piece of text through it than to use strrpos to search from back to front. Personally, I don’t see how it’s more efficient to use two functions to search for a string instead of one, and to keep two blocks of text in memory instead of one, but I’m going to take his word for it.

Joomla vs. Drupal

/Work

It’s been my experience that content management systems are each their own special flavor of bad, in particular because they all seem to do a lot of things except the one thing you absolutely need them to do.

As a programmer, I find it a little backwards that I learned PHP and MySQL so I can create my own applications, but with a CMS I am not using those skills — instead I spend most of my time figuring out someone else’s idea of how to build applications and trying to see if what they wrote will work for me.

Awhile ago, CMS Report did a comparison of Joomla vs. Drupal, and as a survivor of building websites with Joomla, I was interested to hear whether there was anything good to say about it.

Drupal fails on such elements as Shopping Carts, Event Calendars, Document Management, and Themes. The majority of these items are functions or features which are considered lacking in the Drupal CMS. Regarding the other CMS, Joomla fails to deliver in such elements as user permission, content management, multi-site management, and standard’s compliance. Joomla fails in elements that are more architecture centric.

Let me go over that again: Joomla fails at content management. For a content management system, that’s pretty bad.

Banned from the iTunes store

/

It has come to light that two applications written for the iPhone have been denied a place on the iTunes store, not because of some malicious intent, or because they enable users to violate the law, but because they duplicate features already offered on Apple software. Which Apple doesn’t like.

Daring Fireball has already commented on how the Podcaster app has been rejected though it doesn’t actually break the iTunes SDK agreement (apart from a nebulous part about Apple excluding apps it doesn’t like).

MailWrangler has also been snubbed for “duplicating functionality”.

What I don’t get is if these apps cost extra, and do the same thing as apps Apple includes on the iPhone for free, and people need to buy an iPhone in order to use these apps in the first place… what is Apple afraid of?

Finally, if you’re still confused how apps get approved for the iPhone, The Joy of Tech will spell it all out for ya.

When is a zero not a zero?

/

I recently reformatted a hard drive and these were some of the options OS X’s Disk Utility gave me.

Format?

Why not a 100-Pass erase of data? You would think that writing zeroes over your entire fucking HD would be enough to erase any data on it. Apparently not, which kind of undermines the whole binary data system if writing 0′s over your whole HD doesn’t actually delete the 1′s and 0′s already there.

Next Page »