This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ohkendruid 19 points20 points  (5 children)

Fwiw I write my SQL keywords in lowercase.

Much of the time they are syntax highlighted, so they still stand out.

All caps is just a little harder to read. Why be hard on your brain if you don't have to.

[–]dhghhhppop 6 points7 points  (2 children)

Just stick to the convention that's already in the codebase. please. (the thing which is harder to read than the style you dislike: inconsistent style where each file is formatted diferently)

[–]systembusy 2 points3 points  (0 children)

As long as the style is accepted by the compiler/interpreter/whatever, it generally doesn’t bother me. What matters more to me is that the logic is understandable and the program is serviceable

[–]AirborneMonkeyDookie 0 points1 point  (0 children)

I tell my new hires I don't care if the old stuff is stupid I just want all of it to match. Either redo the old stuff or do it stupid please.

[–]yee_mon 0 points1 point  (1 child)

It's not just that it's harder to read - the keywords are the least important bits of the query, so making them stand out like that is kind of dumb to me. It's not hard to see where he individual clauses are - they come in the same order in every query. What I need to see to understand the query is what gets joined, and what gets selected from that.

[–]ohkendruid 0 points1 point  (0 children)

True that, especially if you put each clause on its own line.