4 ms·
The sensibilities for everything you just said are entirely subjective, and change as you are exposed to them. If you spend all day every day writing SQL, it i
by unoti 14y ago
The sensibilities for everything you just said are entirely subjective, and change as you are exposed to them. If you spend all day every day writing SQL, it is different than if you do it a little here and there. The entire codebase of Oracle Apps looks like this, so I found I grew accustomed to it over time and saw the benefits. Editing commas actually can be significant in terms of time and drag (this is even more apparent when edit Erlang).
Being very dogmatic, and in a discussion of ideas saying "that's the worst thing in the world" is easily worse than comma placement. So surely commas as indentation isn't the worst thing in the world.
- ebbv 14y agoIt's not the worst thing in the world. It's the worst thing in the history of the world. Get it right, gosh. Seriously, though, hideous syntax is bad. It makes life miserable for everyone who has to work on your code after you. Don't do it, no matter what good reasons you think you have.
- rosser 14y ago"Ugly" is a subjective judgement. "Worst thing in the history of the world" is a subjective judgement, and egregious hyperbole, to boot. Saying that mitigates pretty much all the credibility of any rational, non-hyperbolic argument you might also have offered in support of your point. I find having to re-run my query because I forgot to delete the comma following the penultimate item in the SELECT list when I commented the ultimate one out "ugly". Additionally, everyone I have ever explained this concept to has said some variation of, "Wow, that's a great idea. Thanks!" No one has ever said, "That's the worst thing in the history of the world" ... until you. I've been doing database work professionally for a decade now. I've explained this concept to a lot of people.
- ebbv 14y agoChances are if you're explaining this to someone they have less experience than you so they wouldn't be in a position to tell you that this is a bad practice. Like I said, objectively, you're just moving the extra work from moving around the last element to moving around the first element. You're not really saving any time. Plus even if you accept the argument that you are saving time (pretend you live in a world where you never move the first element) the time you save is negligible. If you hadn't resorted to this ugly syntax, you should have developed habits that lead you to fix your commas whenever you move the last element around. Obviously you can do what you want, but if you were on my team, I would not allow this syntax.
- btilly 14y agoLike I said, objectively, you're just moving the extra work from moving around the last element to moving around the first element. Except that moving the last element (more specifically appending after it) is by far the more common operation. And when you mess up on the first element, it is visually obvious that you have done so. If you hadn't resorted to this ugly syntax, you should have developed habits that lead you to fix your commas whenever you move the last element around. I worked with SQL for years, and never developed the habit reliably enough. Once I was introduced to the idea of the leading comma, I noticed the difference. Obviously you can do what you want, but if you were on my team, I would not allow this syntax. Then let's both be glad that I'm not on your team, because there are some co-workers that I don't want to have to put up with.
- rosser 14y agoTo speak frankly, you seem pretty belligerent in your crusade against the comma-firsters. For whatever reason, this is apparently holy war territory for you, and you're willing to make assumptions about me as a person, and my abilities as a technologist, based on where I put a goddamned comma. Thanks for that.
- genwin 14y agoI do SQL most days. Commas at the end of the line is more advantageous than not, in my book. I find this best: select Field1, Field2, AnotherField from Table1 So clean, so consistent! No all-uppercase that adds almost no benefit at significant cost. Fields lined up for easy reading and editing. The comma controversy could be eliminated if the SQL standard was like Go's, where even the last line would have a comma.