Mar 8 2005

Perl and PHP Scrape PHP Globals

I posted earlier today about a Perl script I wrote called Scrape PHP Globals. It occurred to me later that since PHP implements Perl compatible regular expressions, I could rewrite the script in PHP and use the functionality more directly. So, that’s what I did! :)

In the process, I also noticed a few tiny things I could improve in both versions, so I went ahead and did that as well.

Thus, there are now two versions of Scrape PHP Globals — Perl Scrape PHP Globals (currently at version 0.2) and PHP Scrape PHP Globals (currently at version 0.1).


Mar 8 2005

Scrape PHP Globals 0.1

I needed to extract all the explicitly declared global variables in a PHP script so I wrote a Perl script to do it for me. It then occured to me that maybe other people might find it useful, so I tidied it up a bit and released it on my site as Scrape PHP Globals.

It extracts all variable names occurring between “global” and a semicolon, then prints them out nicely as a new global statement.


Mar 5 2005

Search Pages 0.1

I recently came across Rob Schlüter’s hack that makes search queries look at pages as well as posts.

I wanted to add the functionality, but as I don’t like doing hacks (since I usually forget about them when doing an upgrade) I decided to create a plugin named Search Pages for it.


Mar 2 2005

Qdig-WP 0.2

I’m finally ready to release something I’ve been working on for the last several weeks: my first WordPress Plugin!

Qdig-WP is a plugin that allows a user to embed a Qdig gallery into a post or page. Take a look at my Qdig-WP page to learn about the plugin, or visit the Qdig website to learn more about Qdig.

At the moment, the plugin should be considered “beta” software, as I mention on the Qdig-WP page. If anyone tries it out, though, I’d love to hear your feedback! Please leave comments, bug reports, or problems with the software or with the Qdig-WP page as comments on this post.


Dec 28 2004

Dedicated Programmer

The Graphing Calculator Story [coverage at Wired, Slashdot]

This has to be one of the most astonishing programming stories I’ve ever heard. A contractor at Apple finds his project terminated, so what does he do? He continues working on the project, unofficially, behind Apple’s back until it’s completed. Along the way, he gains the support of tons of Apple’s employees and, eventually, even wins over Apple itself. This is after he’s worked 16 hour days for free for months; not to mention that he’s recruited hours and hours of free work from many others. Simply astonishing.

Oh, and his project ended up being included as a standard part of the Mac system, shipped with every computer they sold.


Dec 20 2004

Open in New Window

Pet Peeve #1: Open in New Window

I’m getting very sick of webpages that code all their links to open in a new window. If I want a webpage to open in a new window, I am quite capable of right-clicking (or command-clicking) and selecting “Open in New Window”. I don’t need some crackpot web designer telling me where to open my links. You want to open your links in a new window? Good for you! Don’t push your preference on everyone else.

When I browse a site, sometimes I like the link I click to replace the current page. Sometimes I open in a new tab. I almost never open in a new window, and I certainly never want the link to pounce a new window on me if I’m normally clicking on it.

As far as I am concerned, the overwhelming majority of “open in new window” links are outright rude. Web designers need to stop forcing this choice on us and let us open links where we choose to open them.

By the way: If you’re reading this and have a webpage with links of that variety, please change them. Thank you.


Dec 14 2004

Cool Homemade iPod Commercial

Home-Brew IPod Ad Opens Eyes

On the right, part way down, there’s a “Video” link that says “Watch George Masters’ homeage iPod ad.” I recommend doing so, as it’s pretty nifty. The article is interesting, too.


Nov 24 2004

Undefined Problems

An undefined problem has an infinite number of solutions.

– Robert A. Humphrey

[Quote found at ...in other words...]

This makes me think of some of the stuff I’ve learned in computer science/programming: One of the first things you’re supposed to do when writing a program is define the problem you’re solving. That way you know exactly what the program is expected to do and you can approach those goals directly. Without a clearly defined problem, you end up having a poor sense of direction when coding. You often end up trying to code things that aren’t as important as the objectives you should be hitting, or worse, you completely miss required objectives.

When I read the quote, I don’t understand it to mean that an undefined problem can be solved in innumerable ways. I read it to be saying the exact opposite of what it’s saying on the surface–that an undefined problem has no solution. How can an undefined problem have a solution, anyway? Tons of things can be put forth as solutions to an undefined (or even poorly defined) problem.

Moral of the quote: Figure out what you’re trying to do before you do it.


Nov 18 2004

Embrace at Dusk

The sun slowly fades beneath the far horizon
As dusk sees life along the water’s edge.
The crisp air gently cools the moment,
Encouraging embrace.


Nov 12 2004

Flower

Stirringly gently in the soft breeze,
The bud begins her slow awakening.
Petal by petal, stretching out,
She’s ready to greet the world.