Live data from Hacker News

Show HN: Readsql – convert SQL to most human readable format

github.com

1–10 of 32 posts

Re: Show HN: Readsql – convert SQL to most human readable format

#3

Does it do anything but uppercase keywords? Is it going to add line breaks or indentation at some point?

For now it only upper-cases but I would like it to "prettify" the code as well. So it is an upcoming feature. Hopefully it will even suggest SQL code improvements in the future. Contributions are welcome

Re: Show HN: Readsql – convert SQL to most human readable format

#4
post #3

Does it do anything but uppercase keywords? Is it going to add line breaks or indentation at some point?

For now it only upper-cases but I would like it to "prettify" the code as well. So it is an upcoming feature. Hopefully it will even suggest SQL code improvements in the future. Contributions are welcome

I don't really get it. Is upper case more human readable than lower case?

Re: Show HN: Readsql – convert SQL to most human readable format

#6
post #3

Earlier quoted context omitted.

For now it only upper-cases but I would like it to "prettify" the code as well. So it is an upcoming feature. Hopefully it will even suggest SQL code improvements in the future. Contributions are welcome

I don't really get it. Is upper case more human readable than lower case?

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

#7
post #3

Earlier quoted context omitted.

For now it only upper-cases but I would like it to "prettify" the code as well. So it is an upcoming feature. Hopefully it will even suggest SQL code improvements in the future. Contributions are welcome

I don't really get it. Is upper case more human readable than lower case?

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

#8

Earlier quoted context omitted.

I don't really get it. Is upper case more human readable than lower case?

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 wh…

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

#9
Not sure I get the point of this? Perhaps I’m being dense? The hard part about SQL isn’t picking out the keywords in the select/insert statement, it’s understanding the DB relations, its structure and constraints.

If you want to make SQL easier to understand then take a look at a 15 year old stored procedure that’s been hacked at by a dozen devs is over 1,000 lines long, has sketchy rollback error protection, uses two CTEs, a pivot, no temp tables and does some xml shenanigans in the middle (I’m being hyperbolic obviously)

This feels like trying to loose weight by trimming your toe nails, you’re technically lighter but not so as it matters.

Re: Show HN: Readsql – convert SQL to most human readable format

#10

Earlier quoted context omitted.

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 wh…

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

I don’t think size 8 in light grey in the footer is conspicuous, uppercase or otherwise.
Post reply on HN