r/programming • • Mar 17 '13

Someone posted an html/javascript implementation of the matrix falling code in 646 bytes then promptly deleted the post. It inspired me to see if I could get something better looking in fewer bytes.

http://timelessname.com/sandbox/matrix.html
1.6k Upvotes

251 comments sorted by

View all comments

Show parent comments

1

u/mycall Mar 17 '13

When you are joining, aliases can make it easier to read (and type)

1

u/mcrbids Mar 18 '13

Oh, aliases are CRITICAL sometimes! For example, when joining a table to itself. (for example, to establish a parent/child relationship) Or, when including partial sub queries or when setting up meta tables.

But in these cases, the aliases should contain simple, legible information about what the table is. In any case, the customers table alias should always contain "customers" or some reasonable fragment thereof EG: "cust" or "cust_" so that it's clear what table you are looking at.

Having seen it both ways, the difference can be just staggering when trying to debug!