best practice

Nuts and Bolts - part 3

INSERT The INSERT statement is composed by two elements, the attribute list and the values list. The lists are positional. The formatting should mark clearly the various elements of the query in order to make it simpler to spot the correspondence between the attribute and the value. After the words INSERT INTO there is one space followed by the table’s name After the table’s name there is one carriage return The attributes if present are enclosed between round brackets indented one tab from the word INSERT The attribute’s list indents one tab from the round brackets The attributes indent one tab fro the round brackets and are separated by a carriage return The word VALUES indents at the same level of INSERT and is followed by a carriage return The value’s list is surrounded by round brackets indented one tab from the word VALUE The values indent one tab fro the round brackets and are separated by a carriage return UPDATE The WHERE condition on the update is the same of the SELECT.

Nuts and Bolts - part 2

WITH statements Because the WITH statement works like having a temporary table, the formatting will follow rules similar to the CREATE TABLE statement. • Between the WITH and the alias there is a tab followed by the word AS and a carriage return • The round brackets surrounding the inner query indent one tab from the alias • The inner query indents one tab from the round brackets Conclusions This coding style is at first sight complex and with some drawback as it can slow down the coding process because of more keystrokes required for the uppercase and the carriage return.

RTFM

The acronym RTFM stands for Read The Fucking Manual. It’s quite obvious that reading the manual is the perfect approach for finding the correct information or at least a hint for finding the solution. The false confidence or a lack of humbleness make people to forget how important is to read the documents. Understanding the documents is the next step, and is not simple indeed. In particular if the background is poor or the reader have preconceptions which alter the word meanings.