323
Sauruz
4y

Enough with the tabs vs spaces wars... Who the fuck places commas at the beginning of strings!??!! *grabs popcorn

Comments
  • 55
    #lighttheme
  • 7
    That's calling for trouble, whoever wrote this is bound to forget a comma somewhere and I hope he uses a linter...
  • 12
    DBAs do this... It's heart breaking.
  • 43
    I sometimes do this when testing SQL commands... much easier to put a couple of '-' whenever I need to comment out an argument. xP
  • 2
    @ingenioushax I was a dba. I never did this. This makes me sad.
  • 0
    @jmhg92 Thanks for the pro tips :D
  • 13
    @jmhg92 that's actually a very valid reason
  • 12
    @antoni4040 actually you won't forget a coma that way because it's always the first thing you write

    if a coma is missing you'd immediately spot it because one line wouldn't start like any of the others
  • 15
    I can see few reasons why this is more useful/readable than comma at the end. We just got used to commas at the end. That's why it just feels wrong, not necessarily being wrong.
  • 1
    @kargaroth it's syntax man, it's only about feelings
  • 2
    MSSQL does...
  • 0
    @ElectricCoffee but i think this way you can have another problem, put a coma where you don't need it
  • 0
    Mainframe developers put commas in front all the time! I'm guilty of this 😁
  • 0
    So for @ingenioushax and @puppetmupp,
    Which came first MSSql management studio adding the commas at the beginning or the DBA doing it that way and MS conforming?

    I started out as a DBA using MSSql 2005 and it was like that way then, so I don't know.
  • 0
    @manFrame: I couldn't tell you. I just know all the database scripts I receive from DBAs are formatted in this way. SSMS 2010+ doesn't do it this way though. Visual Studio doesn't export SQL in that format either. So, I really don't know where that syntax originated.
  • 3
    that's actually a good practice....
    I don't like it though :)
  • 1
    @DevotedSniper some people like to watch the world burn
  • 1
  • 0
  • 0
    @h3ll unintentional autocorrect saves the day?
  • 2
    Commas BEFORE: extra effort to comment out FIRST item, looks ridiculous.

    Commas AFTER: extra effort to comment out LAST item, looks normal.

    And yet, everyone I know uses the ridiculous standard...
  • 1
    @mswindle comma first notation is the norm in Haskell and NPM, it's just a matter of getting used to it
  • 0
    @ElectricCoffee I would argue that for SQL, it's not so much a standard as a preference, one I choose not to adopt.
  • 0
    @mswindle never seen it done in sql though
  • 1
    People with no soul.
  • 0
    @projektaquarius: And I appreciate you for it. 🤗
  • 0
    this is seriously ill 🤒
  • 0
    That's complete FUBAR
  • 1
    @Stan same kind of people that take screenshot on Facebook and upload, instead of simply click share :)
  • 1
    @Stan The devrant app is on my phone. The code was on my mac. Way to much effort.
  • 2
    If I have to comment lines for testing very often, I put commas in front. I do it for everything from SQL, to Javascript, PHP, etc.
    I only leave the commas in front for short lists or lists that won't need commenting.
  • 0
    Blasphemy!
  • 1
    I think this post has convinced me of the benefits of putting the comma in front. I'll probably do that from now on...
  • 0
    I've seen some days ago a NodeJS or Python module (can't remember now) to convert JSON to this syntax... it feels horrible to me
  • 0
    My OCD is tingling.
  • 0
    Also I threw up a bit in my mouth.
  • 0
    Kind of related, comma first is a common standard for constructor initialization lists (C++)
  • 0
    Also means that when you add something only that line appears in the diff. Not enough to override how weird it looks though
  • 1
    @jmhg92 exactly this. It makes debugging and temporary changes WAY easier in SQL. But I've never done it anywhere else.
  • 0
    Great... I can't imagine the amount of sleep I'm going to lose over this tonight.
  • 0
    this is the standard in elm.... I actually like it... you never forget to put a comma at the end of something because you have to put it first...
  • 1
  • 1
    @lunarkittie lol so is the common enemy not ecological disaster but instead people would put commas before strings? The spacers and the tabbers unite!
Add Comment