Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a special place in hell for anyone doing this. I'm going to watch this repo and blacklist pull requests from anyone who forks it :-)


They share the place with coding blogs that use   instead of spaces for code snippets.


Or “real” quotes in code examples..


Or en-dashes instead of double hypens for command line flags... I can feel my blood pressure rising just thinking about it.


Hah, I was giving a presentation where I was running little queries as part of a demo. I had copied the queries into the presenter notes in PowerPoint, then pasted them one at a time into a web app to run them.

Couldn't figure out why one of them wasn't working, and it was actually an audience member who figured out PowerPoint had turned a quote character into a "smart quote".


I don't think people do this intentionally. Either the code snippet has passed through MS Word (why?) or their blog tool is being "helpful".


I once had to do a team project with another student who did all his coding in Wordpad, god knows why. His indentation was more or less random. I wanted to murder him.


It happens if you paste the code into an Outlook email (which used Word as the rendering engine IIRC)


Emailed code snippets have this problem when emailed using some email clients (Outlook, looking at you)


Damn you Google docs! they also do this :(


I've had to use &nbsp; a couple of times in order to get a proper indentation. I know there's <PRE> and <CODE>, but they aren't allowed on every blog, so I had to improvise.


Then for $DEITY's sake, put the code snippets on pastebin or similar. Nothing's more infuriating than having to hex edit a file just to get all the \u00A0 out.


Wouldn't a regular text replace work, switching one character for another?


> blacklist pull requests from anyone who forks it

Why, if I may ask? If they introduce compile errors in your project, those should be caught by the CI build and test run, shouldn't they? In any case, accepting a code change just by looking at the diff and without even trying it out sounds like not the best course of action to me anyway.


Yes. A good CI will blow up any malicious pull requests provided you are using a compiled language. Or if interpreted, you need sufficient code coverage that your tests will blow up




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: