Skip to main content

Posts

Showing posts from December, 2008

Paste Ninja Goes Multilingual

Chris Cornutt was nice enough to give Paste Ninja (the premier PHP-powered pastebin app) some exposure by highlighting it on PHPDeveloper.org a week or so ago. Thanks, Chris! As a result of the extra publicity, the site saw an increase in traffic as people came to check it out. I hope they liked what they saw... but stay tuned, because there's more features to come! It was interesting to look through the access logs afterward. There are a lot of pastebins available on the Internet, but the feature set and usability of the application is what will help differentiate it from the rest. The list of countries from which various people visited and the values of their browser's Language-Accept headers peeked my interest, and I realized that I needed to offer Paste Ninja's interface in multiple languages so people could use my service in whichever language they may find the most comfortable. So, Paste Ninja is now multilingual! The goal is to translate PasteNinja's i

PHP != Perl

People irk me when they expect PHP to behave like <insert your favorite language here>. Most recently, I ran across this blog entry Perl vs PHP: Variable Scoping via the help of PHPDeveloper.org . I'm sure Leonid is a great fellow and really smart... but he just happened to trip my irk-wire. The post is an innocent enough "here's a problem that I ran into, so I'll blog it in case someone else has the same issue." Reading between the lines though, I get the feeling his underlying belief is that because PHP and Perl are similar that they should have the same variable scoping rules, and that since PHP's doesn't correspond to Perl's that PHP is wrong and this should be documented as such. Each language is different. If PHP were so similar to Perl, it wouldn't be called PHP... it'd be called Perl. Or maybe a dialect, like PHPerl. I really wish people would stop comparing the two. Quite frankly, I don't see much similarity betwe

JavaScript Keyboard Widget

Have you ever done something stupid just so you don't have to do whatever it is you're supposed to be doing because you feel like procrastinating?  I found myself doing that this evening by programming a keyboard widget in JavaScript. Right now it's just sloppy code without any real functionality, but feel free to take a look at it at   http://www.saltcitytech.com/projects/keyboard . Theoretically, one could add a couple of state variables to monitor the ctrl, shift, alt and caps lock keys, check those variables in the keys' onclick callback, and have a fully functional keyboard widget.  Since the key characters are defined in a mapping object, it should be relatively easy to internationalize it just by changing the mapping definitions. I may clean up the code in the future depending if someone actually sees a viable use for it or if I find myself needing to procrastinate again.

Dialog and Paste Ninja

I'd like to share with everyone two projects that I've been working on in what little spare time I've had lately-- Dialog and Paste Ninja. Dialog Dialog is a lightweight JavaScript-based dialog window. Why does the world need another dialog widget, you ask? It probably doesn't, but I couldn't find a freely available one that was as flexible as I wanted so I wrote my own. Flexibility and portability were key design features, so Dialog is written completely in JavaScript and CSS, and its appearance is fully CSS driven. Dialog supports multiple dialog types by default, such as confirmation, information, warning, and error, and can further be customized with a custom dialog type. It can even display modal dialogs and block input to the page until the prompt is dismissed! You can learn more about it and get the code at its project page, http://www.saltcitytech.com/projects/dialog from my JavaScript Experiments repository at GitHub. Paste Ninja Paste Ninja i