last day (15 days later) » 

21:14
1
Q: string join to build ldap string

Frank Y.I have stored my LDAP OUs in sql table and I need to retreive these values to build my LDAP string. let say my list has values like US, NY, RICHMOND, COM How can I do that using string.join so my string will be like OU=US,OU=NY,OU=RICHMOND,OU=COM. With my code below OU=US comes out like US=OU ...

@dckuehn Strings should not be formatted as code.
@AndrewMorton is that officially written anywhere? I've always found it easier to read strings if they stand out, but I am open to not doing it anymore.
@dckuehn Code formatting should be used for code, which includes variable names referred to in the rest of the text. Double-quotes are good for surrounding strings. E.g., in method DoSomething you should set s to "pickles". I think it's one of the assumed styles for SO that you pick up along the way.
@AndrewMorton Aside from the markdown being labeled code I've found nothing that limits it's use to code. Everything I've read implies "Make the question easier to understand", which in my opinion applies to expected vs. actual output.
@dckuehn "Make the question easier to understand" implies for everyone, and I simply stated the convention. Please feel free to bring the matter up in Meta if you think I am being unreasonable :)
21:14
@AndrewMorton I wasn't trying to start a fight, and I agree with for everyone. I'm simply projecting my opinion onto everyone, which I realize is unrealistic, but finding the true opinion of everyone is also unreasonable. The big reason I use code blocks for output strings is so when I'm trying to answer a question, I can scroll back up and down and my eyes are drawn to those blocks more easily.
Hi, I didn't take your comments as trying to start a fight. There are some conventions on SO that one only gets to find out about after a while.
I might throw up a META post just to see if there is a consensus on convention, but the last time I made a META question the spread was +2/-12 so we'll see how my opinion holds up this time.
I think that most people see something in "quotes" as standing out as a string, as that's how we see them in code. I had a quick search in meta, but I couldn't find a post explicitly about it - although there probably is one.
Don't worry about downvotes in meta - I had one meta post that was even deleted, but it was silently implemented.
I understand that, and it makes sense. I guess my point is that the grey background of the code block helps certain things stand out, and I tend to think that expected output/input warrants that distinct, kind of like stacktraces, but on a smaller scale.
Ah, for expected input/ouput, a blockquote is often useful, although a code block is also eminently acceptable. But inline strings, well, double-quotes are the convention here. Again, I wish I could point to some "official" directive on that, but alas, my search-fu is weak this evening.
21:29
I couldn't find anything definitive either. For what it's worth, it took me about 3 revisions of my own edit to work up to wanting to make those strings into code-blocks, so I'm not super on my own side, just a little bit.
Especially the little strings on the end, but I guess them being smaller is what made me want them to stand out more.
Yeah, the "has values like US, NY, RICHMOND, COM" should be formatted more like "US", "NY", "RICHMOND", "COM". Editing some things can be tedious to the point where it isn't really worth it. I did, however, agree with your tidying of the code section, but I messed up my improvement edit, and now I can't do a different edit. Oh well, the question now has an accepted answer. It has been a pleasure chatting with you :)
It has been, enjoy your day :)
Ooh, one last thing - I'll delete my comments that led to this chat, just to keep things tidy.

  last day (15 days later) »