4 ms·
When a Junior developer doesn't capitalize their SQL it makes my eye twitch, and it's not that I personally care, it's just that I'm so used to seeing it as a s
by giancarlostoro 4y ago
When a Junior developer doesn't capitalize their SQL it makes my eye twitch, and it's not that I personally care, it's just that I'm so used to seeing it as a standard, and my brain wants to go with standards always.
- zach_garwood 4y agoI'm kinda the opposite. I always saw the older developers writing SQL in lowercase, so now when I see someone using caps, I think they must have just read a SQL book or something.
- EddySchauHai 4y agoCaps with nice tabular lining so everything is neat. Handwritten SQL can feel a little like art, I really enjoy making mine look as uniform as possible
- maleldil 4y agoI don't understand what you mean. Can you provide an example?
- EddySchauHai 4y agoThings like 'rivers down the middle' [0] [1] Because SQL has so many opinionated style guides rather than the One True Way I really enjoy spending time, if I have it, on making my SQL as Uniform and legible as I can. Sadly this is all closed source code nowadays. But my SQL files look almost like a table with clear 'rivers' along keywords. It makes my OCD brain go a little fuzzy inside when I finish :) Also having worked on a MONSTER of a financial system powered by stored procs and autogenerated SQL, I'm talking million line SQL files you can't load in a GUI, I am very fond of legible small SQL scripts nowadays. [0] https://gist.github.com/mattmc3/38a85e6a4ca1093816c08d4815fbebfb https://gist.github.com/mattmc3/38a85e6a4ca1093816c08d4815fb... [1] https://www.sqlstyle.guide/#white-space https://www.sqlstyle.guide/#white-space
- rprospero 4y agoI rarely touch SQL, so I don't really have much of an opinion on these matters. However, the last time I did have to touch it, the senior developer on the project used this as his personal shibboleth for differentiating junior and senior developers. By his reckoning, junior developers put SQL statements in caps because they were used to seeing that in textbooks. Senior developers would realise the importance of maintainability and use lower case out of respect for the next person to read the code.
- 1MachineElf 4y agoSurely there must be code formatters for SQL that alleviate this issue for large teams.
- cestith 4y agoAll-capital writing is far harder to read for extended periods of time. If you're looking a a few short SQL statements embedded in other code or something, that's not a big issue. If you're editing screen-filling report queries or editing a long data structure full of various SQL statements, it's a bigger deal.