DEV Community

Discussion on: Do you recognize your code 6 months later?

Collapse
 
databasesponge profile image
MetaDave 🇪🇺

My SQL was always very distinctive, because it did not look like the shoutings of a mad man.

select
  id,
  title
from
  books

etc, instead of

SELECT ID, TITLE FROM BOOKS

It used to irritate people that I wrote function names as DBMS_Lock.Allocate_Unique, which is not to everyone's taste but in the world of Oracle everyone is still writing their code in unreadable uppercase for some reason.

Collapse
 
elmuerte profile image
Michiel Hendriks

For some reason I often capitalize the primary structural keywords like select, from, where, and, or, ...
It is probably to make clear distinction between the various parts of the query.
I also dislike the all-caps queries. It makes stuff so much harder to read.

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

They still haven't upgraded to text editors that do syntax highlighting.

Collapse
 
databasesponge profile image
MetaDave 🇪🇺

Well tbh there are some really good SQL IDEs that will do all that, and enforce coding styles, but they seem to often be used to just make everything uppercase.

It's like they're monsters or something.

Thread Thread
 
mortoray profile image
edA‑qa mort‑ora‑y

I've seen this before...

  • Why do we code this way?
  • Because our IDEs do it that way.
  • Why do the IDEs do it that way?
  • Because we use to code that way.

The cycle of IDE monsters continues to consume us. 👹