5 things I wish someone had told me

Root-relative navigation is the way to go.
There are several different ways to organize your navigation system. Some people use relative URL’s (../index.php), others use absolute URLS (http://www.onlineaspect.com/index.php). I’ve found that using root-relative navigation (/index.php) works best for me. It makes it easy to maintain multiple development environments without having to store a path variable and you don’t get into messy situations when you try to include templates from within nested folders.

User generated content should always be stored in your database as UTF-8.
Otherwise you’ll wake up one day and you’ll have people from 92 different countries using your application and you’ll have funky characters all over the place.

One day memcached is going to be your best friend. Start preparing now.
You probably don’t need to implement memcached for your early prototype, but that doesn’t mean you shouldn’t be already thinking about it. Understanding how memcached works now will help you design an architecture that will maximize the benefits of it later.

Don’t ever send an email right now if you can delay it an hour.

The biggest 2 mistakes you could make as web startup are 1) deleting data that shouldn’t be deleted and 2) sending an email that shouldn’t be sent. You can protect your company and your reputation by backing up your data and buffering every email that you’re likely to mess up. Does that newsletter email really need to be sent right now? What if you made a mistake? Remember, there’s no undo button on email. Why accelerate the “oh crap!” moment? Sure, you will make mistakes, but sometimes a simple delay can prevent the whole world from knowing about it.

What you learned in database class isn’t necessarily best for your application.
Relational databases are great, especially in theory. Just be prepared to trade in your favorite normal form when you need to achieve speed and scalability. In particular, avoid joins and cache any counts that you find yourself using on a frequent basis.

  • Pingback: Jon Fox » Blog Archive » What I wish I’d known()

  • Nice, I was just talking with a senior developer the other day about database normalization. He told me about the "4th degree Normalization" in which; after the database is completely normalize, de-normalize it for performance.

  • Hi Josh, i have a question about root relative urls. In my account if i want to use them, i have to specify them like that:
    /home/account_name/public_html/forum/folder1/folder2/file.php
    Is it possible to specify without the '/home/account_name/public_html' part? Is there a configuration i can do so that the root is consider the public_html? .htaccess probably?

    • The only time you need to use the /home/account_name/… part is if you are accessing a file on the server side. The way to set that path depends on the server-side language you are using. You wouldn't use that for front-facing code.

  • I really enjoyed your posting.