News for hackers. Stuff that matters.
Re:A recruiter sent me a message in code. I fixed it by tyingq on Friday December 30, 2016 @12:48PM (#13285773)
Tried fixing it so it would run, and the hardest bit was recognizing that the double-quotes weren't actually double-quotes, but rather these two characters: “ ”
Re:A recruiter sent me a message in code. I fixed it by shortstuffsushi on Friday December 30, 2016 @12:53PM (#13285809)
I may have asked this here before, or perhaps elsewhere... but why do these characters exist? "Smart" quotes end up breaking things for me so frequently, I've never actually wanted them in any case I can think of. Same goes for en/em dashes. I literally spent a day and a half trying to track down an issue less than a month ago, only to realize as I got to the point of inspecting bytes that I wasn't looking at a regular dash (and incidentally that the SDK I was interacting with doesn't support extended characters).
Re:A recruiter sent me a message in code. I fixed it by robin_reala on Friday December 30, 2016 @01:04PM (#13285908)
Non-‘smart’ quotes (aka typewriter quotes) exist only because space on typewriter keyboards was limited. If we should get rid of any double-quotes then it would be " which has no semantic meaning (unlike “ and ” which open and close a quotation, and ″ which among other things is the unit mark for inches).
Re:A recruiter sent me a message in code. I fixed it by AnimalMuppet on Friday December 30, 2016 @01:16PM (#13286005)
" has semantic meaning in code, whereas “ and ” have semantic meaning in text. If you're a coder, you want " and only ". You especially don't want "helpful" software that thinks you should want text quotes, and tries to fix them for you.
Re:A recruiter sent me a message in code. I fixed it by tyingq on Friday December 30, 2016 @01:01PM (#13285880)
I don't agree with the premise, but here it is: http://smartquotesjs.com/
Re:A recruiter sent me a message in code. I fixed it by shortstuffsushi on Saturday December 31, 2016 @02:42PM (#13292757)
shudder
Re:A recruiter sent me a message in code. I fixed it by 50CNT on Friday December 30, 2016 @01:23PM (#13286059)
Example in a similar vein, was trying to split Chinese characters by ',', but they were separated by ','.
Re:A recruiter sent me a message in code. I fixed it by greydius on Friday December 30, 2016 @03:42PM (#13287262)
They exist to mess with people that copy/paste code from the internet.
Re:A recruiter sent me a message in code. I fixed it by shortstuffsushi on Saturday December 31, 2016 @02:42PM (#13292749)
Or from any "smart" editor like Outlook.
Re:A recruiter sent me a message in code. I fixed it by Tempest1981 on Friday December 30, 2016 @12:52PM (#13285794)
Smartquotes... some word processors do that automatically.

http://smartquotesjs.com

Re:A recruiter sent me a message in code. I fixed it by throwaway2016a on Friday December 30, 2016 @12:54PM (#13285817)
More annoyingly, Skype does it. Nothing is worse than when I just want to send a small snippet of code to a colleague and Skype changes all my quotes.
Re:A recruiter sent me a message in code. I fixed it by gizmodo59 on Friday December 30, 2016 @04:23PM (#13287585)
Do something like this in skype: {code} printf("Hello World!"); {code}