Outshine logo
Nintendo Wii forums Forum for writers phpBB mods Essays on copyright Dating advice Narnia forums

April 2008 Archives

April 29, 2008

Greasemonkey: PHP multi-byte string warnings

Just a quick note to say that I released a new Greasemonkey script.  It adds a warning box of text to any php.net manual page that features a function that is dangerous to multi-byte strings.  I'm sorry, you want that in English?  OK.  Have you ever posted something to a Web site and found that characters were missing or truncated or there were lots of question marks or boxes where letters should have been?  Usually that's because the person running the site doesn't understand how letters work at a programming-language level.  They think everyone on Earth is using an English keyboard with the letters A-Z.  When they get data that isn't A-Z, their Web site programs don't know what to do with the data, and they mangle it.

It turns out most people don't use just the A-Z characters, even people who write in English.  Lots of people want to use the Euro symbol, for example.  That isn't a "normal" letter, and so lots of Web sites just mangle it.  Part of the problem is the programming language used on these Web sites.  In particular, the PHP language has two main "modes" for handling characters.  The first, and the default, is basically to treat everything like ASCII.  ASCII is the A-Z standard.  Unfortunately, that severely damages the text that people type nowadays.  So PHP has a second major mode of operation, and that is to set itself to UTF-8.  UTF-8 includes lots and lots of characters, and it's backwards compatible with ASCII.  So pretty much every Web geek should use it. 

The problem?  The online PHP manual doesn't offer much of a warning any time you look up one of the old, bad ASCII functions.  I personally replaced some old, bad code with... you guessed it... more old bad code.  Why?  Because I looked up replacement functions and found what I thought would work, only to realize that the replacement functions were also bad and came with NO disclaimer!  And that leads us to my Greasemonkey script.  This script will add disclaimers to php.net, on any page containing a bad old function.  If possible it will also tell you a better way to do what you want to do.  It's basically code help for PHP developers.

You can get the script on userscripts.org.  Please install it and then view some of these pages to see the disclaimers it adds:


April 18, 2008

Barack Obama, Jeremiah Wright

April 13, 2008

Greasemonkey script: Digg Done That

In the blog comments for my other Greasemonkey script, Alex requested that I create a script that would allow him to mark Digg stores as "read."  Doing this would make the story disappear, so that the only stories showing on the page would be the ones still unread.  It took months for me to find some free time, but I finally made the script.  Here's a screenshot of what it adds to digg.com stories:

screenshot of Digg Done That in action


April 4, 2008

The National Debt for the USA, by year

I don't remember where I found this – maybe on Digg? In any case, it's a very interesting image that shows how much debt was incurred by the USA, every year. The image is a link that leads to a larger, more readable version.

small image of national debt, by president

That certainly puts things in a different light for me.

April 3, 2008

Updated The Blog Mod for phpBB 2.x

Since the people who maintain The Blog Mod dropped off the face of the Earth, I've found all the stuff I could from my backups, and I've put it online for whoever needs it.  This includes:

The Blog Mod itself (my .24b version, which was the latest) The patches The templates

Interested?  Link in the sidebar, under the software section.  Or just jump there directly.

April 2, 2008

The horrors of tanning spray!

Ha ha ha ha ha ha!

photo of kids with hilariously bad tans

Check out more of these uh... (cough cough) very cool guys!

Is love a feeling or a commitment?

Imagine my surprise a while ago when I was reading a discussion about the Lord of the Rings books, and suddenly the topic veered into the nature of love and marital fidelity (give it a minute to load before you start scrolling around that page, because it should jump to about halfway down automatically).  I think it's quite awesome to read that post and the two replies underneath it, because in my opinion it illuminates the stark contrast in thinking between people who will succeed at marriage, and those who will fail.


April 1, 2008

Who's the comedian?

I like this photo a lot.  I hope the kid didn't get into too much trouble.

photo of a wise ass

The photo links to the site where I originally found the image.  The site has some other good photos, plus this photo at a larger size.

This page contains all entries posted to Outshine in April 2008. They are listed from oldest to newest.

March 2008 is the previous archive.

May 2008 is the next archive.

Many more can be found on the main index page.

You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser