Re:Show HN: Readsql – convert SQL to most human readable format
by tuwtuwtuwtuw on Sunday December 27, 2020 @11:05AM
(#25551911)
I don't really get it. Is upper case more human readable than lower case?
[ Parent
| on HN ]
Re:Show HN: Readsql – convert SQL to most human readable format
by cipher_system on Sunday December 27, 2020 @08:01PM
(#25555729)
Me neither, when copying uppercase sql i always lowercase everything. But I can understand that some people are more used to that format even though I find it obsolete.
In any case, it is objectively not more human writeable.
Re:Show HN: Readsql – convert SQL to most human readable format
by azisk1 on Sunday December 27, 2020 @11:13AM
(#25551965)
Not for everybody probably but I find it more readable, especially when the queries get big. Some people rely on code highlighting but this usually gets messed up when writing SQL code inside Python strings
Re:Show HN: Readsql – convert SQL to most human readable format
by solidsnack9000 on Sunday December 27, 2020 @12:56PM
(#25552806)
By distinguishing key words from table names and column names, uppercasing can improve readability, since SQL has such a flexible/variable grammar.
If we wrote:
select(col1, col2, col3, ..., from=table_name, limit=5)
or something like that, it's obvious what are the intrinsics and what are the variable parts without knowing anything about select but for SQL you need to know all the "sentence patterns".
Re:Show HN: Readsql – convert SQL to most human readable format
by ComputerGuru on Sunday December 27, 2020 @11:12AM
(#25551955)
It’s actually been proved to be the opposite... which is probably why a lot of legalese you aren’t meant to read but they’re required to provide is written in small print upper case.
This has to do with the outline of letters in uppercase being indistinct (if you trace an outline - especially with serif fonts - you’ll largely just get a block) so you need to spend more time per-letter to distinguish the characters whereas with lowercase, the “fitted box” shape is shared between fewer letters: https://www.sciencedirect.com/science/article/pii/S004269890...
Re:Show HN: Readsql – convert SQL to most human readable format
by azisk1 on Sunday December 27, 2020 @11:54AM
(#25552296)
I am not claiming that upper-case is more readable in general. I know the practice to write SQL keywords in upper-case and I find it more readable. From https://stackoverflow.com/a/608201/7714279 "You can easily separate the keywords from table and column names, etc." However, it's a choice. Some people rely for code highlighting but this gets messy if we write SQL code inside Python code. This is especially where this library comes to lend a hand
Re:Show HN: Readsql – convert SQL to most human readable format
by kirubakaran on Sunday December 27, 2020 @11:15AM
(#25551975)
While I agree that uppercase is hard to read, turns out there is a good reason for caps in legal docs:
"Under US law, disclaimers must be 'conspicuous'" https://law.stackexchange.com/a/18210
Re:Show HN: Readsql – convert SQL to most human readable format
by ComputerGuru on Sunday December 27, 2020 @11:20AM
(#25552014)
I don’t think size 8 in light grey in the footer is conspicuous, uppercase or otherwise.