Tips for the Object Oriented Programming novice

The following is written for programmers who don't really understand object oriented programming yet. They probably understand the language semantics, but don't really understand how to use them correctly.

If you find yourself misusing object oriented semantics that probably means you don't have the skills to develop good software. This is a problem because bad software is much harder to develop and even harder to maintain.

Scaling web sites: a brief overview of tools and strategies

Monolithic server architecture

The easiest way to support additional capacity is to simply use a bigger server (big iron approach), but the disadvantage is you need to pay for that capacity even when you're not using it, and you can't change the amount of capacity for a single server without suffering some downtime (in the traditional monolithic server architecture).

load any external javascript file asynchronously

Sticking <script></script> tags referring an external resource in the middle of your HTML code will hang the loading of your page while your browser gets the missing script.

On the TurnKey website, this was a problem with the loading of the AddToAny sharing script, and the quantcast tag which I have since removed. There were also a couple of custom scripts that slowed down the site.

The solution is generic and simple. Use this code to load your Javascript asynchronously:

Unix buffering delays output to stdout, ruins your day

Let's say you have the following program:

import time
while True:
    print 'hello world'

chmod +x ./

If you run this program from a terminal, it will print hello world every second.

But redirect the output to a file and something different happens:

./ > output &
tail -f output

You won't see any output! (At least not for a long while)

The same is true if you redirect's through a unix pipe which you can do on the shell: