Blog

Spotlight sucks

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!

Blog

Decisions, decisions

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.

Work

FIVE SCROLLBARS?!???

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!

Uncategorized

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.

Work

CMS Madness

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.

Work

node_teaser is bass_ackwards

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.

Work

Joomla vs. Drupal

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.

Uncategorized

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.

Uncategorized

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.

Work

I don’t care, I like PHP

I’m a PHP developer, and I am going to out myself as a naïve n00b by saying I’ve never had a problem with writing applications for it. Yes, I may even enjoy programming in PHP. This is why I’m linking to an article Jeff at Coding Horror wrote on why PHP Sucks, But It Doesn’t Matter.

The TIOBE community index I linked above? It’s written in PHP. Wikipedia, which is likely to be on the first page of anything you search for these days? Written in PHP. Digg, the social bookmarking service so wildly popular that a front page link can crush the beefiest of webservers? Written in PHP. WordPress, arguably the most popular blogging solution available at the moment? Written in PHP. YouTube, the most widely known video sharing site on the internet? Written in PHP. Facebook, the current billion-dollar zombie-poking social networking darling of venture capitalists everywhere? Written in PHP.

Notice a pattern here?

Architecture astronauts may have a problem with the language, but the fact is PHP is getting the job done. Now Javascript on the other hand — scattered documentation, poor debugging support, the OO-over designing pitfalls. I don’t see how anyone can get anything done with it. Some people can, but not me.

I, um, blame the tools.

Next Page »