omgpotato.com

Categories

Recent Posts

Transparent, effective form-bot stopping.

July 12th, 2007

As a user, I absolutely hate captcha images. As a matter of fact, I have actually stopped an online transaction in its place because of a captcha. I just won’t fill one out unless its mission-critical. It’s not that I don’t agree that form-bots are a pain in the ass, I just don’t think that captchas are friendly or well thought out.

Aside from the obvious accessibility issues, they are just a pain to deal with.

Here’s a simple solution. I came up with this after saying to myself “ok, captchas suck, what can you do instead…” and in 5 minutes, i had it.

<div style="display: none;">
	<label for="email">Leave this field blank:</label>
	<input type="text" name="email">
</div>

That simple. Now, just check that its blank on the back-end, and you will be good to go. I used “email” because 1) I try to avoid using such obvious names for form fields…it helps some of the spam right there… and 2) it makes it irresistible to bots. Obviously, don’t name it “email” if you have one named email, but make it something that sounds obvious. A lot of bots wont fill out all of the fields, just ones they “think” are important.

Is it bulletproof? No. Some bots might still get through. But I think its a great compromise between stopping bots, and keeping a friendly experience for your users.

PHP Classes as namespaces?

May 9th, 2007

I’ve only recently, in the last 6 months or so, began to take an object oriented approach to php development. In that time, I’ve all but fallen in love with it. Sure, php4 is limited in its OOP model, but the simplicity of it makes it strong. In the real world, multi-level inheritance isn’t that important, at least not to me. I would like to have the __get and __set functions available to me, but we can’t have everything, can we?

The problem is, though the core of most of my sites are OOP oriented, most of the functionality is procedural still. All of the supporting functions, for example, are just functions, and really have no place, or rather, would gain very little by making objects from them.

But I was thinking the other day, as I was going through the entire codebase of a site to find/replace a function name, about how nice it was to have namespaces in other languages. The problem in this instance was our redirect() function. We tied the whole site and punBB together, but punBB has a function called redirect() as well, and though similar in function, it did a little more than just redirection, so we didn’t want to just use it.

(more…)

punBB Fork in the works: potatoBB (not any more!)

May 8th, 2007

Basically, the punBB codebase is pretty ugly, and they are working on a newer version with some of the features I was hoping to add in.  Easy decision to hold off there.

*name is in flux, of course.

Basically, this will be not much more than punBB (the reason I love punBB in the first place is its simplicity). What it will do though, is make the process of installing and creating mods much easier. This will be done primarily through the ability to attach functions to the core functions.

It should basically meet these qualities: (in this order)

  • Remain Lightweight
  • Become much easier for end-users to install mods
  • Become easier for developers to develop mods
  • Retain Mod/Plugin Compatibility with current punBB

I’ll be kicking this off sometime this week, and will have an actual page up soon with more information.

PHP IDEs, etc.

May 8th, 2007

Ok, I’ve been on a hunt for a while. So long, in fact, I think it actually qualifies as a quest.

The prey? A good PHP IDE to work in. Not just an editor, not just a project manager, but the whole deal. I need everything with the exception of local debugging. I’ve come very close a couple of times, but never can seem to get everything in one package.

Here’s my wishlist:

  • Good Syntax Highlighting, customizable with regex available
  • Function hinting that contains all of php’s core functions, and adds functions from the project as well
  • Built-in ftp with local sync, dreamweaver style
  • Project management at a simple level, not too much, just let me setup a dir as a project
  • Recognition of multiple languages in one file

(more…)