Comments on: About Code Snippets http://www.terminally-incoherent.com/blog/2013/11/25/about-code-snippets/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Luke Maciak http://www.terminally-incoherent.com/blog/2013/11/25/about-code-snippets/#comment-57913 Mon, 25 Nov 2013 23:14:11 +0000 http://www.terminally-incoherent.com/blog/?p=15930#comment-57913

@ Chris Wellons:

Thanks for the heads-up about the site crash btw. :)

Did do that thing with GUID’s at some point, but I got lazy. Plus I’m not actually sure if this actually does anything. It definitely helps to find out the proliferation of your snippet in open-source code online, but it does not help to solve the above problem. People who copy-paste code snippets from a website into production verbatim are unlikely to ever update them.

A URL on top of the snippet would technically serve the same purpose (also globally unique) but of course websites go down, and copy-pasters are likely to strip “incriminating evidence” such as source URL’s.

@ Philipp:

TIL about German politics. Did not intend it to be a political statement – it just came up in Google image search and seemed funny. :P I also forgot all the German I have ever learned (except Die Puppe because it sounds like “ass” in Polish) so I didn’t grok the label below.

Reply  |  Quote
]]>
By: Philipp http://www.terminally-incoherent.com/blog/2013/11/25/about-code-snippets/#comment-57910 Mon, 25 Nov 2013 21:29:46 +0000 http://www.terminally-incoherent.com/blog/?p=15930#comment-57910

About “Dr. Guttenbergs Copy-Paste”: This is most certainly not a real thing but to mock the former german minister of defence Karl Theodor zu Guttenberg who plagiarised most of his doctorate and had to resign because of it.

Also: You are making a solid point, I will remember this and just post good code online.

Reply  |  Quote
]]>
By: Chris Wellons http://www.terminally-incoherent.com/blog/2013/11/25/about-code-snippets/#comment-57909 Mon, 25 Nov 2013 21:29:06 +0000 http://www.terminally-incoherent.com/blog/?p=15930#comment-57909

(Reposting my comment since it was lost in your database disaster today. This worked out well because I mistyped my blog URL anyway!)

Three years ago you were marking your snippets with a GUID. Do you still try to do this today?

You’re right about php.net being filled with horrible examples, though they seemed to have fixed a lot of them very recently. A lot of them have been posted to /r/lolphp.

Reply  |  Quote
]]>