A Basic Lesson in Password Hashing

Posted by Sean on Jul 01, 2009 under PHP

In the world of the web, lots of sites are popping up requiring users to login. When you need to do so, there's a bit more security than you might realize. You might be making a simple To-Do list, and might think:

Security? Pfft, I'm not too worried about people's to-do lists being stolen.

But what you didn't account for, is that all those username/password combinations a hacker just made off with? Yea, those are the same login's to important stuff, like e-mail , or bank accounts . Yikes!

Automagic Prefixes for Model Fields

Posted by Sean on Jun 23, 2009 under PHP

Say we have a player model, and every field in playerstable is prepended with player_. For example, player_username, player_email, etc.

I'm personally not used to this database design, but I know plenty of people use it. When I work on projects that have this, I'm not particularly found of having to write:


$p = new Player;
echo $p->player_username;

I'd rather ditch the prepended part in all my PHP code.

echo $p->username;

Copy Objects and Arrays with $unlink

Posted by Sean on Jun 17, 2009 under Javascript

Basically, if you don't know what happens when you have multiple variables pointing to the same Object or Array, then check out this quick and dirty article and read the first half or so. Or if you don't want to bother, I'll give you a snippet to paste into Firebug.


var a = ['one','b',3,false];
var b = a;
a[1] = 'BEEEE';
console.log(b[1]);

With web standards being all the rage, and accessibility being a major driving factor in people adopting standards, you might be surprised to actually check out the accessibility of web-sites.  After watching a video of a blind user using Jaws , I figured to give using a screen reader a try just to see if I could understand it any better.  I ran into a couple problematic areas; what caught my attention first was the use of forms .

As many have noted, there's many opinions on how to handle the Internet Explorer 6 monster.  For a beautiful web just suggested his solution: one stylesheet to rule them all . It's completely ridiculous, and I'm suprised to see other professionals agreeing.

Get Class of an Instance

Posted by Sean on May 08, 2009 under Javascript

Have you ever wanted to get the class name of an object, maybe to check what instance it is of, or maybe to use the name for something? I was in need of exactly that, so I set out to do so last night. I started by asking Stack Overflow , and no one gave me an answer, so I pondered about it a bit. I started paying attention to the Hash object.

I knew that inside a class function, this.constructor would reveal the function that makes new intances of that class. But that function is anonymous, so I couldn't ask for the Function.name property. But! But, if I have a value, I can check an object for the key of that value.

Use CSS Borders for 3D Effects

Posted by Sean on Apr 29, 2009 under CSS

Buttons with 3D Bevel Effect

Recently, I've been more in favor of using the browsers rendering instead of background images to achieve looks, since that reduces bandwidth and loading times , and also increases maintainability . I used to slice images that would give something a shadow or button type of a look, but have moved more towards just making the browser do it. I wanted to share some examples of effects and how easy it is to do so.

New Class Initialize in Mootools 1.2.2

Posted by Sean on Apr 24, 2009 under Javascript

Just a quickie: I was browsing the new Class script of Mootools 1.2.2 , to learn about all the changes (which are quite awesome), and I hope to rework my Privates Mutator real soon to work with the new way of things. I noticed this immediately:

if (params instanceof Function) params = {initialize: params};

Search

Treats

  • David DeSandro

    Design blog where the articles have different designs, similar to Jason Santa Maria. Talks a bit about Canvas, and uses some Javascript animations for the navigation.
  • policy for polling rss

    Some good policies if you plan on building an RSS reader, how often to poll, check for last modified, and so forth.
  • MooTools Singletons Using Events Mixin

    Aaron shows how he makes a Singleton using 'new Events()', which allows other classes to tell the Singleton to fireEvents, keeping other classes ignorant of each other.
See all »