Code Reference

This is my collection of links to useful information for developers.  Unfortunately, most of this information was collected between 2009 to 2012, and technology has moved on and many of the links are now broken.  Some links will even take you to an ancient version of phpfunk.com.  Ah, those were the days!

CSS filters by browser

How about a nice chart that shows you which css rule is understood by each browser so you can work around all those non-standard compliant browser “quirks”.

CSS variable column layout

The ruthsarian skidoo_too layout is so awesome, I can’t say enough about it. One, two or three columns of cross-browser compatible css bliss. You might want to check out the menus too.

Unit Testing

When I started simpletest was the unit testing framework for php that I adopted and continue to use. I’m getting more into JavaScript so of course I’ve got jsunit installed on the development server. Cutest is a nice simple C unit testing framework and it has the best name! And it all started, for me, with junit for java because I learned java first (actually I learned BASIC first, but thats a long story). I actually like the old junit website better. Oh well. And when I had to dig into OO perl I found Test::Simple to be exactly the perl unit testing framework I needed.

AJAX library

I wouldn’t touch ajax without a library. I’m not that crazy about wading thru the DOM with javascript or dealing with browser-specific javascript issues. Someone else who really is crazy about that, fortunately, has already done the hard work. So far I’ve been using prototype and its awesome. Here are some sublimely simple ajax examples with the associated source code for the php server pages.

JavaScript Context Menus

Ever want to make your web app more like a desktop app? What if mouse clicks on various widgets caused context menus to popup, like say to edit a record in a table for example. Proto.Menu is a nice clean javascript context menu library that uses Prototype.

JavaScript Character Counting

This javascript all you to track how many characters user has typed in a field.

PHP Sessions and URLs

Purpose: remove trans SID from URL for XHTML compliance.

Example php code shown here, from mtdev.com article on removing trans sid from URL. Verify that you can actually set these values on the server where you host the php code; to date we found one instance where this was not possible.

 

ini_set(‘session.use_trans_sid’, FALSE);

ini_set(“url_rewriter.tags”,””);

 

Of course you call them before calling session_start().

C Programming

I do not do much C coding, but when I do I go visit this guide at UIUC for a quick reference. If you’re a complete noob to c you could start here.

Source Code Control

I still use cvs.   Nope, I love git now.

There are some best practices for source code version control.

Unicode

Joelonsoftware.com has lots of good info and this post about unicode tells you in a straight-forward manner how it works.

CSV File Format

The csv file format (comma-separate values) is not a “standard” but it should be. Its the time honored way of organizing data. Fortunately someone has put together a nice reference about the non-standard csv “standard”.

Perl How-to

When you cannot remember how to do something in perl, simply search for the how-to. For example, if you cannot remember how hashes work you would search for the perl hash how-to.