-
Always develop with full error messages display
Turn on extended error reporting like this:
error_reporting(E_ALL);
Also make sure display_errors is on in php.ini, otherwise:
ini_set('display_errors', 1);
-
Optimise for people not bots
Don't bother with SEO (search engine optimisation) Instead give EUO (End user optimisation) a go (Yes I just made that up).
You could try to second guess what search bots are looking for. Trying to understand these little critters and advising on how to best adapt a site to please them is a good living for many. But the way I see it, these constantly evolving, top secret search algorithms are designed to be like humans, so build for people not bots.
And by making sure your content is accessible to as many humans as possible you'll be on to a winner with both species.
-
Shorter SQL statements by abbreviating table prefixes
Instead of writing:
SELECT books.title, books.short, books.releasedate, authors.firstname, authors.lastname
FROM books, authors
WHERE books.author_id = authors.id AND authors.id = 21You can write:
SELECT b.title, b.short, b.releasedate, a.firstname, a.lastname
FROM books b, authors a
WHERE b.author_id = a.id AND a.id = 21 -
Show posts from a specific tag
Here's how to show posts from just a specific tag:
<?php query_posts(‘tag=featured’); ?>
(via Magnus Jepson: http://www.jepson.no/how-to-exclude-specific-tag-from-query_posts/)
-
Sharp Shape Layers
In Photoshop, zoom to 3200% (mandatory!) to make sure every single pixel is perfectly crisp, aligned, and even. This meticulous detail takes forever, but really shines through in the final piece. Compare the difference. It's staggering. True designers care about pixel perfection.
-
Design Inside Out
Try to take elements from your logo over to the site design to create consistent message and stronger branding. For example, is the logo square, rounded, both? You can use that to create the shape of buttons, boxes or site layout.
-
Mac OS X - Quickly view images
It might be widely know, but once I found this little trick it made my life very happy.
Choose any image file, PSD, TIFF, JPG, GIF, PNG... and click on the Spacebar. Just like the "Lightbox" effect, a large view able screen will open displaying the image you clicked on.
You can than use your arrow keys to to back and forth through your folder. Also, you can full screen the image or add it directly to iPhoto.
Enjoy!
-
Resetting.
Always use a reset style-sheet when beginning to style a site. This will help the code become more easily cross-browser compatible and makes development much more agile.
-
Share code against multiple controllers
If the shared code need access to controllers state and could be use in every controller of your applications, then you can put in the ApplicationController.
-
Correct tea making procedure
The Correct Order for tea making is:
1. Brew tea in 'just boiled' fresh water
2. Add milk
Never add milk before water. Never add suger!
