archived stringclasses 2
values | author stringlengths 3 20 | author_fullname stringlengths 4 12 ⌀ | body stringlengths 0 22.5k | comment_type stringclasses 1
value | controversiality stringclasses 2
values | created_utc stringlengths 10 10 | edited stringlengths 4 12 | gilded stringclasses 7
values | id stringlengths 1 7 | link_id stringlengths 7 10 | locked stringclasses 2
values | name stringlengths 4 10 ⌀ | parent_id stringlengths 5 10 | permalink stringlengths 41 91 ⌀ | retrieved_on stringlengths 10 10 ⌀ | score stringlengths 1 4 | subreddit_id stringclasses 1
value | subreddit_name_prefixed stringclasses 1
value | subreddit_type stringclasses 1
value | total_awards_received stringclasses 19
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
True | Vonney | null | Hurray! | null | 0 | 1316635621 | False | 0 | c2lklou | t3_kmmgx | null | t1_c2lklou | t1_c2lk902 | null | 1427629495 | 1 | t5_2fwo | null | null | null |
True | grauenwolf | null | You must be fun at parties.
Q: Do you have any kids?
A: Why don't do people use Google before asking? I have a facebook page.
Q: I'm sorry. So do you still work at BlahCo?
A: I see you have a smart phone. You can look it up on linked in.
| null | 0 | 1316635644 | False | 0 | c2lklt4 | t3_kmshh | null | t1_c2lklt4 | t1_c2lkek7 | null | 1427629497 | -8 | t5_2fwo | null | null | null |
True | ninjaroach | null | Haha! Very good point :) | null | 0 | 1316635873 | False | 0 | c2lkn30 | t3_kmshh | null | t1_c2lkn30 | t1_c2lkdkr | null | 1427629513 | 2 | t5_2fwo | null | null | null |
True | oorza | null | What about JIT compilers? Have they earned your trust? | null | 0 | 1316635918 | False | 0 | c2lkncj | t3_kmp73 | null | t1_c2lkncj | t1_c2lhw7h | null | 1427629516 | 6 | t5_2fwo | null | null | null |
True | kmmeerts | null | I love your work, thank you for making it. Your dEngine has inspired me to make my own engine in C. | null | 0 | 1316636051 | False | 0 | c2lko41 | t3_klrrx | null | t1_c2lko41 | t1_c2lej2j | null | 1427629526 | 2 | t5_2fwo | null | null | null |
True | Dr9 | null | I use '2d' as in DirectDraw which was folded into the directx '3d'.
Direct2D is evolution of GDI, GDI+.
But you are right though I should have referred to it correctly as just 'DirectDraw'.
But I'm sure we can agree they are all god awful names.
| null | 0 | 1316636101 | False | 0 | c2lkoej | t3_kl1qp | null | t1_c2lkoej | t1_c2lkjue | null | 1427629530 | 1 | t5_2fwo | null | null | null |
True | ninjaroach | null | He already provided a link to information before OP came back with more easily-answered-by-Google questions. At some point, you just gotta give up on those types and tell them to figure it out for themselves. | null | 0 | 1316636108 | False | 0 | c2lkofz | t3_kmshh | null | t1_c2lkofz | t1_c2lklt4 | null | 1427629530 | 7 | t5_2fwo | null | null | null |
True | GTChessplayer | null | What the hell are you talking about? You can't dismantle a noun? A noun a lexical category; it's not material. Of course you can't dismantle a lexical category.
You can dismantle physical objects. You can dismantle bureaucracies. You can dismantle government.
>There is no such thing as anarchy in civilization
What about in the commune in Argentina which has existed for ~20 years now? Complete anarchy and they consist of about ~10k people running 200 or so factories.
You, sir, are completely ignorant about history. | null | 0 | 1316636208 | False | 0 | c2lkp0m | t3_klqte | null | t1_c2lkp0m | t1_c2ljv0w | null | 1427629538 | 1 | t5_2fwo | null | null | null |
True | kawsper | null | Where would someone start on a project like this? Relevant books would be appreciated or a description of your project would be cool. | null | 0 | 1316636210 | False | 0 | c2lkp13 | t3_kmshh | null | t1_c2lkp13 | t1_c2lkgd1 | null | 1427629538 | 8 | t5_2fwo | null | null | null |
True | [deleted] | null | The opcodes for both "mov edi,edi" and "jmp [disp8]" are the same whether you're in 32-bit or 64-bit mode. The only change need for it to work in 64-bit mode is the number of padding bytes before the function and the displacement you'd use when hotpatching.
Edit: verified this with gdb
32-bit object file:
0x00000000 <main+0>: 89 ff mov %edi,%edi
0x00000002 <main+2>: eb fe jmp 0x2 <main+2>
64-bit object file:
0x0000000000000000 <main+0>: 89 ff mov %edi,%edi
0x0000000000000002 <main+2>: eb fe jmp 0x2 <main+2>
| null | 0 | 1316636557 | True | 0 | c2lkqw6 | t3_kmshh | null | t1_c2lkqw6 | t1_c2lixbn | null | 1427629562 | 13 | t5_2fwo | null | null | null |
True | cannontrodder | null | It might even be preferential to overwrite rather than use this patching space as there'd be less chance of detection! | null | 0 | 1316636631 | False | 0 | c2lkrae | t3_kmshh | null | t1_c2lkrae | t1_c2lkn30 | null | 1427629567 | 6 | t5_2fwo | null | null | null |
True | aaronla | null | You can modify page protection bits around making the modification. | null | 0 | 1316636648 | False | 0 | c2lkre4 | t3_kmshh | null | t1_c2lkre4 | t1_c2lki7r | null | 1427629568 | 2 | t5_2fwo | null | null | null |
True | rufriedman | null | True, we picked a bad horse and we need to shoot it. I was hoping to convey a little more than that, though. I have been around long enough to have seen a lot of horses. I prefer lean ones to fat ones, and I think a lot of the popular ones are too fat. | null | 0 | 1316636665 | False | 0 | c2lkri2 | t3_kmmu7 | null | t1_c2lkri2 | t1_c2lh4qt | null | 1427629570 | 1 | t5_2fwo | null | null | null |
True | elperroborrachotoo | null | > but this is just silly
Agreed, no question. But also:
> *I negatively commented more or less every non-empty line of code in those three source files, even if it seemed, for a particular line, that the corresponding negative comment was somewhat **trite and obvious***
(emphasis by me)
----
This technique for me is mostly mental conditioning:
Imagine you frequently forget your apartment key on the fridge when you leave for work. Ugly, costly, and makes you feel "unfit for life".
If you *force* yourself to never close the apartment door without shaking your key in the other hand, soon you will start to check for your keys without thinking about it. The requirements will be relaxed, you will merely feel uneasy when you close the door and your hand is not near some key. That is *usually* enough to fix that problem. (Worked for me quite well)
---
I see the blog's suggestion as exactly that for Saint-Exupery's *"nothing left to take away"*:
If you force yourself for a while to *write down* the reason why this code has to exist *for every line*, you can train yourself to always check for this in the back of your mind: you won't need to write it down, and you will probably work in a bit larger chunks, but it will happen automatically, without explicit attention.
---
| null | 0 | 1316636674 | False | 0 | c2lkrjq | t3_kmk56 | null | t1_c2lkrjq | t1_c2ljtr5 | null | 1427629570 | 2 | t5_2fwo | null | null | null |
True | diminish | null | Open ad standards seems to be a good idea. if everyone publishes their ads on their own web site using a robads.json text file similar to robads.txt, it will augment the web experience and will enable people to discover offers and deals better. | null | 0 | 1316636862 | False | 0 | c2lksik | t3_kmyav | null | t1_c2lksik | t3_kmyav | null | 1427629583 | 1 | t5_2fwo | null | null | null |
True | diademoran | null | Did I ever claim I thought it would work well on a desktop environment? It will more than likely be the first thing I turn off. That doesn't mean anyone else who decides they do want to use it is an idiot. I don't even know how the final product will work and neither do you. | null | 0 | 1316636916 | False | 0 | c2lkss4 | t3_kl1qp | null | t1_c2lkss4 | t1_c2ljudk | null | 1427629586 | 0 | t5_2fwo | null | null | null |
True | malm_rd | null | interesting... i've to implement that :) | null | 0 | 1316637045 | False | 0 | c2lktg6 | t3_kn42t | null | t1_c2lktg6 | t3_kn42t | null | 1427629595 | 1 | t5_2fwo | null | null | null |
True | max99x | null | Interesting. It would try to spawn a process, which is obviously not supported in JS, so it should show an error message or at worst crash the interpreter. My guess it's trying to wait for the process in a busy loop, when the process failed to launch in the first place. I'll look into it. | null | 0 | 1316637082 | False | 0 | c2lktmz | t3_klv3o | null | t1_c2lktmz | t1_c2lkjzd | null | 1427629598 | 3 | t5_2fwo | null | null | null |
True | washort | null | yes, and it's a leading reason that people recommend not to use gevent. | null | 0 | 1316637123 | False | 0 | c2lktv7 | t3_kmshh | null | t1_c2lktv7 | t1_c2lki08 | null | 1427629601 | 15 | t5_2fwo | null | null | null |
True | shaurz | null | Eddy loves to move EDI | null | 0 | 1316637134 | False | 0 | c2lktx9 | t3_kmshh | null | t1_c2lktx9 | t1_c2lkgwy | null | 1427629602 | -9 | t5_2fwo | null | null | null |
True | Chandon | null | > Loop unrolling is the compiler's job. Most OpenCL compilers support #pragma unroll for full or partial unrolling, and that includes both AMD's and NVidia's implementations. It works well for me. I don't see any advantage here.
If you're already manually specialising your code for specific N then you're right, Bacon doesn't add anything. Having a compiler do that for you automatically is still useful for people who don't want to always hand optimise. | null | 0 | 1316637263 | False | 0 | c2lkumm | t3_kltgu | null | t1_c2lkumm | t1_c2lj519 | null | 1427629612 | 1 | t5_2fwo | null | null | null |
True | rufriedman | null | Ok, so what assumptions do you have for why people use ORMs then? I think that avoiding SQL is one of the primary reasons people use them, to abstract themselves from the ugliness of SQL even if they DO know it. Why do you use one? | null | 0 | 1316637269 | False | 0 | c2lkuni | t3_kmmu7 | null | t1_c2lkuni | t1_c2lgzcp | null | 1427629622 | 1 | t5_2fwo | null | null | null |
True | nemec | null | I don't have any experience with it, but these resources look like good starting points:
http://en.wikipedia.org/wiki/Hooking#Windows
http://stackoverflow.com/questions/3121556/how-do-i-hook-into-other-programs-in-windows
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990\(v=vs.85\).aspx | null | 0 | 1316637462 | True | 0 | c2lkvnf | t3_kmshh | null | t1_c2lkvnf | t1_c2lkp13 | null | 1427629626 | 6 | t5_2fwo | null | null | null |
True | drguildo | null | Typical Ruby hipster bullshit. | null | 0 | 1316637496 | False | 0 | c2lkvtb | t3_kmk56 | null | t1_c2lkvtb | t3_kmk56 | null | 1427629628 | 10 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316637528 | False | 0 | c2lkvzz | t3_kmshh | null | t1_c2lkvzz | t1_c2lkp13 | null | 1427629633 | 11 | t5_2fwo | null | null | null |
True | shifty3 | null | [MonetDB](http://www.monetdb.org/Documentation/Manuals/SQLreference/Indices) does this. CREATE INDEX statements are merely taken as suggestions. It is more of an academic database, though. | null | 0 | 1316637569 | False | 0 | c2lkw8t | t3_kmp73 | null | t1_c2lkw8t | t1_c2lhr1f | null | 1427629636 | 3 | t5_2fwo | null | null | null |
True | teem | null | From the MS site: This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
Of course it does. I don't browse from a server because I'm not dumb. | null | 0 | 1316637697 | False | 0 | c2lkwxi | t3_kmshh | null | t1_c2lkwxi | t1_c2lkek7 | null | 1427629641 | -4 | t5_2fwo | null | null | null |
True | [deleted] | null | I found the source to [taksi](http://taksi.sourceforge.net/) rather useful as well as properly learning how [SetWindowsHookEx](http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990\(v=vs.85\).aspx) and the [detours](http://research.microsoft.com/en-us/projects/detours/) libraries work. The detours help files are actually pretty in depth. | null | 0 | 1316637736 | False | 0 | c2lkx52 | t3_kmshh | null | t1_c2lkx52 | t1_c2lkp13 | null | 1427629644 | 2 | t5_2fwo | null | null | null |
True | mjg123 | null | Have you guys looked at the headers of THIS VERY PAGE HERE? | null | 0 | 1316637835 | False | 0 | c2lkxnm | t3_kmevq | null | t1_c2lkxnm | t3_kmevq | null | 1427629651 | 2 | t5_2fwo | null | null | null |
True | Liquid_Fire | null | No, you can't monkey-patch built-ins to the same extent in Python as in Ruby (at least not in CPython):
>>> object.a = 1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't set attributes of built-in/extension type 'object'
Contrast that with ruby, where people add methods to `String` or `Object` left and right.
Granted, you can still monkey-patch pure python code in python, but it is rarely done and frowned upon. | null | 0 | 1316637961 | False | 0 | c2lkycw | t3_kmshh | null | t1_c2lkycw | t1_c2lj40p | null | 1427629661 | 10 | t5_2fwo | null | null | null |
True | metamatic | null | Rails developers. Don't tar us all with the same brush. | null | 0 | 1316637965 | False | 0 | c2lkydr | t3_kmshh | null | t1_c2lkydr | t1_c2linob | null | 1427629661 | 14 | t5_2fwo | null | null | null |
True | mitsuhiko | null | Where does it say "Article content may not be relevant to you is disabled"? | null | 0 | 1316637982 | False | 0 | c2lkyh7 | t3_kmshh | null | t1_c2lkyh7 | t1_c2lkwxi | null | 1427629667 | 3 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316638141 | False | 0 | c2lkzcw | t3_kmshh | null | t1_c2lkzcw | t1_c2lklt4 | null | 1427629674 | 14 | t5_2fwo | null | null | null |
True | mitsuhiko | null | Well ... there are ways. | null | 0 | 1316638148 | False | 0 | c2lkzek | t3_kmshh | null | t1_c2lkzek | t1_c2lkycw | null | 1427629674 | 6 | t5_2fwo | null | null | null |
True | max99x | null | The problem with such converters is that they either have to do the conversion in an offline environment (e.g. the various Haskell JS backends) or take precompiled bytecode (Js_of_ocaml, to a lesser extent HotRuby). Neither of these approaches can work completely for a client-side REPL, since that requires both compilation from source, and interpretation/execution to happen in a JS environment. | null | 0 | 1316638218 | False | 0 | c2lkzsd | t3_klv3o | null | t1_c2lkzsd | t1_c2ljjef | null | 1427629679 | 1 | t5_2fwo | null | null | null |
True | NOT_AN_ALIEN | null | Why is it "visual" if you're just moving blocks of text around? Parameters and their output are still as cryptic as in any other written language. This is no max/vvvv/etc. | null | 0 | 1316638294 | False | 0 | c2ll07l | t3_kmp75 | null | t1_c2ll07l | t3_kmp75 | null | 1427629693 | 5 | t5_2fwo | null | null | null |
True | elima | null | You are right, there should be a clear message showing how it works and why is different from other services. That should be fixed ASAP.
Notice though, that FileTea.me is just a reference deployment for FileTea project, and it is work in progress. | null | 0 | 1316638390 | False | 0 | c2ll0q0 | t3_kmmgx | null | t1_c2ll0q0 | t1_c2lkjz6 | null | 1427629692 | 2 | t5_2fwo | null | null | null |
True | mitsuhiko | null | > What about the vast number of ordinary commercial PCs?
[Available since Vista SP1](http://technet.microsoft.com/en-us/library/cc709618%28WS.10%29.aspx) | null | 0 | 1316638490 | False | 0 | c2ll1bl | t3_kmshh | null | t1_c2ll1bl | t1_c2lkfbc | null | 1427629698 | 5 | t5_2fwo | null | null | null |
True | frezik | null | An accounting package sounds about right. | null | 0 | 1316638514 | False | 0 | c2ll1gd | t3_klypn | null | t1_c2ll1gd | t1_c2lf56x | null | 1427629701 | 1 | t5_2fwo | null | null | null |
True | nbarrientos | null | Agreed. The title shouldn't say that. | null | 0 | 1316638524 | False | 0 | c2ll1ir | t3_kmmgx | null | t1_c2ll1ir | t1_c2lk02m | null | 1427629702 | 1 | t5_2fwo | null | null | null |
True | squirrel5978 | null | This can be done on Windows. It's called "DLL injection" and referred to as a security vulnerability. | null | 0 | 1316638657 | False | 0 | c2ll27v | t3_kmshh | null | t1_c2ll27v | t1_c2lkvzz | null | 1427629711 | 9 | t5_2fwo | null | null | null |
True | Azuvector | null | Your point still isn't clear... | null | 0 | 1316638793 | False | 0 | c2ll2zx | t3_klrrx | null | t1_c2ll2zx | t1_c2lh32x | null | 1427629722 | 2 | t5_2fwo | null | null | null |
True | johntb86 | null | However, if you're actually initializing the memory to something other than 0s, you could run into a race condition between allocating it and initializing it. | null | 0 | 1316638893 | False | 0 | c2ll3ke | t3_kmm6g | null | t1_c2ll3ke | t1_c2ljawi | null | 1427629730 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Your impression here isn't quite right. Sane Python programmers don't even think about doing this, and the language doesn't make it especially easy to monkeypatch at this level. Any monkeypatching is usually done at a much higher level (for example, monkeypatching a module to have a different function rather than tinkering with the original function), and is much more discouraged in Python than Ruby. | null | 0 | 1316639012 | False | 0 | c2ll46z | t3_kmshh | null | t1_c2ll46z | t1_c2lk4m3 | null | 1428193545 | 13 | t5_2fwo | null | null | null |
True | metapunditedgy | null | But I thought I read that this particular method had been removed in later versions (which Vista SP1 would certainly be). Maybe I was misinterpreting an earlier comment.
Anyway, it's encouraging to see that they eventually got around to implementing some form of hot-patching (or perhaps it was in earlier versions) by one method or another. Still curious about security implications, though. (Not just blind attacks, but intentionally coopting the OS.) | null | 0 | 1316639033 | False | 0 | c2ll4b7 | t3_kmshh | null | t1_c2ll4b7 | t1_c2ll1bl | null | 1427629742 | -1 | t5_2fwo | null | null | null |
True | frezik | null | When you don't have manual memory management, the language behaves somewhat more like a garbage-collected language, in that there is less frivolous detail work before you can get on with solving the problem at hand. You do have to be careful of overflowing arrays, of course. | null | 0 | 1316639055 | False | 0 | c2ll4fu | t3_klrrx | null | t1_c2ll4fu | t1_c2leg0b | null | 1427629753 | 1 | t5_2fwo | null | null | null |
True | kaaskop42 | null | What kind of ways? Surely, in CPython, you can't just add a method to int or object. | null | 0 | 1316639278 | False | 0 | c2ll5n9 | t3_kmshh | null | t1_c2ll5n9 | t1_c2lkzek | null | 1427629760 | 2 | t5_2fwo | null | null | null |
True | A_for_Anonymous | null | Not really; ThisIsCamelCaseToo ([Wikipedia's article](http://en.wikipedia.org/wiki/CamelCase)). I personally find thisCasing really ugly. | null | 0 | 1316639315 | False | 0 | c2ll5u9 | t3_klhlv | null | t1_c2ll5u9 | t1_c2ljjlr | null | 1427629761 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316639352 | False | 0 | c2ll61g | t3_klqte | null | t1_c2ll61g | t1_c2lkp0m | null | 1427629762 | 1 | t5_2fwo | null | null | null |
True | last_useful_man | null | He made a first crack at it here:
http://vimeo.com/29391633 | null | 0 | 1316639385 | False | 0 | c2ll68b | t3_kmref | null | t1_c2ll68b | t1_c2lidhu | null | 1427629764 | 1 | t5_2fwo | null | null | null |
True | mitsuhiko | null | > But I thought I read that this particular method had been removed in later versions (which Vista SP1 would certainly be). Maybe I was misinterpreting an earlier comment.
64bit versions use a different way to patch functions which I don't know.
> Still curious about security implications, though. (Not just blind attacks, but intentionally coopting the OS.)
This is a noop instruction. You could still hotpatch a function without that noop but you would run at risk of disturbing a running thread. Security implications are with or without that noop the exact same. This method just does not crash. | null | 0 | 1316639456 | False | 0 | c2ll6m6 | t3_kmshh | null | t1_c2ll6m6 | t1_c2ll4b7 | null | 1427629769 | 5 | t5_2fwo | null | null | null |
True | last_useful_man | null | Or, just reduce the bandwidth to a few parameters for your 'pose' and expression, and re-generate your near-actual face from a canonical one sent ahead. | null | 0 | 1316639516 | False | 0 | c2ll6ye | t3_kmref | null | t1_c2ll6ye | t1_c2lihz1 | null | 1427629773 | 3 | t5_2fwo | null | null | null |
True | horsepie | null | I want to thank you for your articles, especially the code samples which helped me out while doing my MSc!
I have a quick question, if you don't mind answering: You recommend "Michael Abrash's Graphics Programming Black Book" at the end of your latest article, but a quick glance at the table of contents suggests that the focus is on writing a software renderer.
Also, since the book was written in 1997, how much of it is still relevant now that we have programmable GPUs instead of rendering on CPU? Thanks! | null | 0 | 1316639536 | False | 0 | c2ll72m | t3_klrrx | null | t1_c2ll72m | t1_c2lej2j | null | 1427629775 | 2 | t5_2fwo | null | null | null |
True | ZorbaTHut | null | Note that NX is completely voluntary. A program that generates executable binary code as part of its runtime will cheerfully flip the NX bit off on all the pages it plans to run. It's there to prevent mistakes, not prevent legitimate uses. | null | 0 | 1316639551 | False | 0 | c2ll75r | t3_kmshh | null | t1_c2ll75r | t1_c2lki7r | null | 1427629776 | 16 | t5_2fwo | null | null | null |
True | muffintop | null | Nice. TIL what "defenestration" means. | null | 0 | 1316639857 | False | 0 | c2ll8t9 | t3_kmevq | null | t1_c2ll8t9 | t1_c2lkxnm | null | 1427629798 | 0 | t5_2fwo | null | null | null |
True | jrochkind | null | << Its main benefit is the separation of “what” and “how”. >>
This is what's called 'declerative' as opposed to 'imperative', right? And further, it also characterizes, in general, functional languages. Although I don't think I'd consider SQL a functional language (it's special purpose, not turing-complete, for one thing).
But for another example, XSLT is also a "what not how"/declerative langauge, and XSLT actually is a functional language. Although not a very useful one. | null | 0 | 1316639878 | False | 0 | c2ll8y6 | t3_kmp73 | null | t1_c2ll8y6 | t3_kmp73 | null | 1427629800 | 2 | t5_2fwo | null | null | null |
True | Jengu | null | Can't you just do the commit and initialize the space within the except handler? You can do that on POSIX systems with segfault signal handlers. | null | 0 | 1316640246 | False | 0 | c2llavd | t3_kmm6g | null | t1_c2llavd | t1_c2ll3ke | null | 1427629825 | 1 | t5_2fwo | null | null | null |
True | houdas | null | /me remembers when Gouraud Shading was the shit | null | 0 | 1316640294 | False | 0 | c2llb4n | t3_kmlu2 | null | t1_c2llb4n | t1_c2li4ql | null | 1427629828 | 2 | t5_2fwo | null | null | null |
True | huyvanbin | null | So what's the "current" technique that would be used? | null | 0 | 1316640308 | False | 0 | c2llb7r | t3_kmlu2 | null | t1_c2llb7r | t1_c2lh143 | null | 1427629829 | 1 | t5_2fwo | null | null | null |
True | cpp_is_king | null | That doesn't mean it doesn't make it easier. In fact it does make it easier. Otherwise you need to implement code caves, which are more difficult to get correct and higher maintenance. Also easier to detect by malware scanners. | null | 0 | 1316640416 | False | 0 | c2llbsf | t3_kmshh | null | t1_c2llbsf | t1_c2lkdkr | null | 1427629843 | 7 | t5_2fwo | null | null | null |
True | jrochkind | null | Yeah, this was the example I was going to use too. I get his goal... but, really? The method body is only one line (good) and initializes @entries -- is ANY value added by explicitly saying "without initialize, @entries won't be initialized." Isn't that clear from reading the body, to even the most novice?
The downside is you know have a bunch more places you have to change every time you change the code -- extreme anti-DRY. Change the name or behavior of the @entries variable, you've got two comments to change too.
"If we don't pre-set @entries to nil, we won't kow that we haven't yet initialized" isn't even TRUE, is it? In ruby, @entries.nil? will be true even if you don't explicitly set @entries to nil. And 'defined? @entries', possibly a better way to check to see if it's initialized, will be false ONLY if you haven't initialized @entries to nil. In fact, it doesn't even make any sense to say "we will only know that @entries hasn't been initialized... if we initialize it... to nil." You initialize it so you'll know it hasn't been initialized, huh?
So in addition to anti-DRY more places to change when you change one thing -- you also have more places to be WRONG by writing all these comments. | null | 0 | 1316640441 | False | 0 | c2llbxl | t3_kmk56 | null | t1_c2llbxl | t1_c2lgper | null | 1427629839 | 6 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316640544 | False | 0 | c2llch1 | t3_klhzl | null | t1_c2llch1 | t3_klhzl | null | 1427629849 | 1 | t5_2fwo | null | null | null |
True | nog_lorp | null | Hackers? Sometimes it is nice to get an advantage in a game, or to use software without paying for it! | null | 0 | 1316640706 | False | 0 | c2lldbc | t3_kmshh | null | t1_c2lldbc | t1_c2linob | null | 1427629856 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316640812 | False | 0 | c2lldz9 | t3_klqte | null | t1_c2lldz9 | t1_c2ljqy5 | null | 1427629866 | 1 | t5_2fwo | null | null | null |
True | s73v3r | null | Wrong. And such a person like you wouldn't recognize most universities anyway, as they are set up BY THE GOVERNMENT. Oh, the horror. | null | 0 | 1316640895 | False | 0 | c2lledo | t3_klqte | null | t1_c2lledo | t1_c2ljie9 | null | 1427629870 | 1 | t5_2fwo | null | null | null |
True | s73v3r | null | No, fuck that. What if they want to work with the technology they patented, and don't want to sell at all? You're saying, "No, you don't own this tech."
Face it, it's an awful fucking idea. | null | 0 | 1316640940 | False | 0 | c2llele | t3_klqte | null | t1_c2llele | t1_c2ljjjd | null | 1427629879 | 1 | t5_2fwo | null | null | null |
True | petrovg | null | Bet you work in some kind of front-line support!... | null | 0 | 1316641219 | False | 0 | c2llfwy | t3_kmk56 | null | t1_c2llfwy | t3_kmk56 | null | 1427629890 | 1 | t5_2fwo | null | null | null |
True | fmihaly | null | I'm still not sure if the author is serious or this post was written as a joke.
The premise of it makes a lot of sense. If I write a line of code and then realize that its purpose may not be obvious from its immediate context, I'll document it. That's why I document most types and functions. When you look at these in isolation, it is not clear what their purpose is.
Still, the scope of properly designed code should be local, meaning it should be possible to understand what a line of code does by only looking at a few lines of code surrounding it. Of course the runtime effects are almost always global. If you remove a line of code, the program either won't work at all or it will do funny things. That's why debugging is so hard.
Now it seems to me that the author confuses the local scope of code understanding with the global effects of code behavior. As other commenters pointed out, the global effect of the behavior (what happens if you remove a line of code) may change independently of the actual purpose of the code. The question is what I am trying to document: my intent when writing that line of code (its intended purpose) or the behavior of the (buggy) program with that line of code removed. I'm not even convinced that I can even document the latter in the case of a reasonably large and complex program.
In conclusion, if you often find that you cannot tell the purpose of a line of code without thinking about some global context, the design is wrong, not the documentation. | null | 0 | 1316641483 | False | 0 | c2llhbf | t3_kmk56 | null | t1_c2llhbf | t3_kmk56 | null | 1427629908 | 4 | t5_2fwo | null | null | null |
True | seydar | null | I agree completely with you. However, you are missing the point of this article, which is to do "negative comments", which describe what would happen if a line of code didn't occur.
I like this style of commenting because it makes sure that every line is imperative to the function of the beast, promoting leaner codebases. | null | 0 | 1316641625 | False | 0 | c2lli3a | t3_kmk56 | null | t1_c2lli3a | t1_c2lgper | null | 1427629919 | 2 | t5_2fwo | null | null | null |
True | TomorrowPlusX | null | Presumably natesm is using SIMBL to load his code, and it's generally considered a (potential, but plausible) security hole in OSX too. | null | 0 | 1316641784 | False | 0 | c2llisu | t3_kmshh | null | t1_c2llisu | t1_c2ll27v | null | 1427629929 | 5 | t5_2fwo | null | null | null |
True | seydar | null | Yes, the author did a shitty job at doing negative commenting. That's not the point, however. What did you think of the general idea of negative commenting? I like it. It certainly shouldn't be the only tool, but it would definitely make some things a lot clearer. | null | 0 | 1316641795 | False | 0 | c2lliur | t3_kmk56 | null | t1_c2lliur | t1_c2lgnex | null | 1427629929 | 2 | t5_2fwo | null | null | null |
True | pedrocr | null | If this is an actual NOP from the CPU perspective wouldn't it be discarded in the decoder and thus not actually occupy any actual execution hardware? Is the mention about "a NOP instruction consumes one clock cycle and one pipe, so two of them would consume two clock cycles and two pipes" about the decoder hardware and not actually the full CPU pipeline? | null | 0 | 1316641894 | False | 0 | c2lljas | t3_kmshh | null | t1_c2lljas | t3_kmshh | null | 1427629934 | 6 | t5_2fwo | null | null | null |
True | magcius | null | Sure you can! Try it at home:
import ctypes
grab_raw = ctypes.pythonapi._PyObject_GetDictPtr
grab_raw.restype = ctypes.POINTER(ctypes.py_object)
grab_raw.argtypes = [ctypes.py_object]
def better_setattr(obj, name, val):
obj_dict = grab_raw(obj).contents.value
obj_dict[name] = val
better_setattr(object, "a", 3)
print object.a
| null | 0 | 1316641945 | False | 0 | c2lljk2 | t3_kmshh | null | t1_c2lljk2 | t1_c2ll5n9 | null | 1427629938 | 37 | t5_2fwo | null | null | null |
True | bobindashadows | null | Copied my post from his blog to here. For background, there are NOP instructions of lengths 1-9 nowadays, going back to (I believe) the Pentium Pro.
> This is why the multi-byte NOP instruction was invented. Unfortunately, new general-purpose instructions like multi-byte NOP are most likely to be desired by those who can't use them for backwards compatibility. A shame!
| null | 0 | 1316642147 | False | 0 | c2llkkv | t3_kmshh | null | t1_c2llkkv | t3_kmshh | null | 1427629951 | 10 | t5_2fwo | null | null | null |
True | bobindashadows | null | Im curious about this too. In pure Python? | null | 0 | 1316642282 | False | 0 | c2lll8s | t3_kmshh | null | t1_c2lll8s | t1_c2lkzek | null | 1427629961 | 2 | t5_2fwo | null | null | null |
True | yellowstuff | null | I've written a brief play illustrating what I think it would be like to maintain code written in this style:
*A MAINTENANCE PROGRAMMER walks into his apartment and sees that his ROOMMATE is performing some kind of bizarre Satanic ritual.*
PROGRAMMER
What the hell is going on here?
ROOMMATE
If we don't dip our hand in the Chalice, we won't be able to smear pigs blood on the goat. | null | 0 | 1316642353 | False | 0 | c2llllg | t3_kmk56 | null | t1_c2llllg | t3_kmk56 | null | 1427629965 | 17 | t5_2fwo | null | null | null |
True | bobindashadows | null | In fact, the next version of Ruby will have a feature (Refinements) to allow the isolation of monkey patching to individual scopes. That way, they don't have to break all kinds of existing monkeypatches (*cough* **Rails** *cough*), and don't even have to remove the feature, but monkeypatches in responsible library code can be made to not interfere with application code who doesn't want any of that bullshit.
Of course, if you import an irresponsible library, then monkeypatches might collide. Luckily, as long as the license permits you to do so, rewriting the library code to use refinements is really, really simple.
See: [Refinements](http://timelessrepo.com/refinements-in-ruby). I was at the presentation in person - other than the issue of interactive debugging, it seems pretty damn solid. | null | 0 | 1316642444 | False | 0 | c2llm2i | t3_kmshh | null | t1_c2llm2i | t1_c2lk4m3 | null | 1427629971 | 14 | t5_2fwo | null | null | null |
True | SeriousWorm | null | Scala:
class CoolInt(int: Int) { def quadruple = int * 4 }
implicit def int2cool(int: Int) = new CoolInt(int)
42.quadruple
It's an implicit conversion defined within the scope of the int2cool method. | null | 0 | 1316642590 | False | 0 | c2llmu7 | t3_kmshh | null | t1_c2llmu7 | t1_c2lljk2 | null | 1427629981 | 5 | t5_2fwo | null | null | null |
True | bitwize | null | This article makes it seem like C++ made some sort of big comeback from obscurity.
Just about every major Windows application was written in C++.
The .NET crap was mainly for bespoke apps, the sort of stuff that used to be written in VB because C++ was too hard to wrangle: too complex for the entry-level joe coders and/or too much hassle for the ROI you got for higher-level coders. (You don't -- and shouldn't -- need to fuss with C++'s memory semantics in order to write CRUD screens that shove data in and out of a database, for instance.)
Oh, sure, we were told that things would be different, that "managed code" would supplant native code and that horrid old Win32 would be paved over completely with nice and fuzzy .NET APIs. But here's the critical part: that never actually happened. | null | 0 | 1316642592 | False | 0 | c2llmup | t3_klgme | null | t1_c2llmup | t3_klgme | null | 1427629981 | 2 | t5_2fwo | null | null | null |
True | tocadorobo | null | Yes | null | 0 | 1316642775 | False | 0 | c2llnrt | t3_kn7ow | null | t1_c2llnrt | t3_kn7ow | null | 1427629994 | 1 | t5_2fwo | null | null | null |
True | jadero | null | Interesting. Firefox 6 and IE 8 on Windows XP SP3 choked on all those glyphs. Maybe I'll try at home with Windows 7 using Chrome and Opera. But maybe not--my attention span isn't what it used to be :) | null | 0 | 1316642813 | False | 0 | c2llnyn | t3_klhlv | null | t1_c2llnyn | t1_c2l9tn3 | null | 1427629995 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316642934 | False | 0 | c2llokc | t3_kmshh | null | t1_c2llokc | t1_c2lkixt | null | 1427630003 | -20 | t5_2fwo | null | null | null |
True | bobindashadows | null | It's the nature of any networked application (accessible by untrusted users) as interesting as modern web applications.
When websites were just a bunch of .html files, choosing your stack was simple:
1. OS: Just use whatever OS you're already running, dummy.
2. Web Server: What web servers exist for your OS? Use that, dummy.
3. Configuration: Point the web server to your directory, dummy.
Those servers probably had tons of security bugs back then, but who cared? It was just .html files with information.
Nowadays a web application has the following properties/responsibilities that websites didn't use to, and which make things harder:
1. Different users are presented different content upon accessing the service
2. The service remembers input stored by users
3. The service handles many concurrent requests
4. The service might need push capabilities/workarounds
5. The service *protects* user data and itself from malicious users
6. The service handles a wide range of clients of varying age with different expectations
7. The service handles users which speak different languages
Not only does that describe a large set of complicated, interrelated requirements, it describes *many* real, networked applications that aren't on the Web! For example, when you develop the server whose clients are ATM machines, you have the **exact same problems** (other than push, of course). And while I've never worked on an ATM server, I bet it sucked balls then, too.
**Edit:** Odd that I'm getting so many downvotes and no reasons. I thought this was a reasonable post. | null | 0 | 1316643057 | True | 0 | c2llp6m | t3_kmpyi | null | t1_c2llp6m | t1_c2ljn0u | null | 1427630011 | 4 | t5_2fwo | null | null | null |
True | yellowstuff | null | RMS has said directly and repeatedly that no one should create proprietary software:
> "The best thing is if you can make some Free Software, the next best thing is if you don't make any software, and the worst thing is if you make some proprietary software."
[source](http://fsfe.org/freesoftware/transcripts/rms-fs-2006-03-09.en.html#comparing-free-and-proprietary-software)
I'm surprised that people who have heard of RMS do not know this. | null | 0 | 1316643079 | False | 0 | c2llpat | t3_kl7h0 | null | t1_c2llpat | t1_c2lcyhk | null | 1427630013 | 4 | t5_2fwo | null | null | null |
True | Pas__ | null | The Pth library does (used to?) this too. And it's a low level C threading library with arbirtrary green-to-kernel threads mapping ratio. Hmm, is that project even around? | null | 0 | 1316643179 | False | 0 | c2llpss | t3_kmshh | null | t1_c2llpss | t1_c2lki08 | null | 1427630020 | 1 | t5_2fwo | null | null | null |
True | rufriedman | null | Thanks for the link, that was another good "ORM sucks" article. | null | 0 | 1316643260 | False | 0 | c2llq5y | t3_kmmu7 | null | t1_c2llq5y | t1_c2lh3r8 | null | 1427630024 | 1 | t5_2fwo | null | null | null |
True | vff | null | From 1995, you say? Seriously, was it really worth all that effort just to get [Microsoft Bob](http://en.wikipedia.org/wiki/Microsoft_Bob) running on Windows 7? ;-) | null | 0 | 1316643332 | False | 0 | c2llqie | t3_kmshh | null | t1_c2llqie | t1_c2lkixt | null | 1427630029 | 54 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316643528 | False | 0 | c2llrf4 | t3_kmshh | null | t1_c2llrf4 | t1_c2llisu | null | 1427630041 | 9 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316643845 | False | 0 | c2llt48 | t3_kmmgx | null | t1_c2llt48 | t1_c2lk7oc | null | 1427630063 | 4 | t5_2fwo | null | null | null |
True | bobindashadows | null | > Strangely, closed source software developers don't like the idea of being forced to opensource their software.
The best part for all of us (that don't care either way) is that those same closed-source developers keep putting out awesome BSD/MIT-licensed open-source code, introducing new, great projects *and* competition for the GPL crowd. | null | 0 | 1316643851 | False | 0 | c2llt58 | t3_klphp | null | t1_c2llt58 | t1_c2lifz7 | null | 1427630064 | 5 | t5_2fwo | null | null | null |
True | mistralol | null |
You probably need to research database index's a little more to find out why this isn't possible. Mostly for the same reason that most automatic dba abstraction lib's like hibernate fail. | null | 0 | 1316643993 | False | 0 | c2lltua | t3_kmp73 | null | t1_c2lltua | t1_c2lhpk4 | null | 1427630073 | 2 | t5_2fwo | null | null | null |
True | hyperforce | null | That particular comment is too mechanical/technical. It should be more semantic like:
int counter = 0; // this counter tracks the number of ducks being shot below | null | 0 | 1316644242 | False | 0 | c2llv4o | t3_kmk56 | null | t1_c2llv4o | t1_c2lhdfe | null | 1427630091 | 1 | t5_2fwo | null | null | null |
True | mistralol | null |
Funny that so did I. Its hard enough to get people to update code with very few comments never mind one on ever line. | null | 0 | 1316644289 | False | 0 | c2llvcx | t3_kmk56 | null | t1_c2llvcx | t1_c2lh3fn | null | 1427630100 | 1 | t5_2fwo | null | null | null |
True | Bamafan | null | >Why is it important that I can randomly read some method to find about the existence of other methods?
If you're trying to breakdown how a program works, you have to know how methods relate to one another. Otherwise, you're just guessing. | null | 0 | 1316644329 | False | 0 | c2llvjt | t3_kmk56 | null | t1_c2llvjt | t1_c2ljvtq | null | 1428193544 | 1 | t5_2fwo | null | null | null |
True | mistralol | null |
This is a waste of space. The problem is in an OO language a single line of code with about 3 functions calls could result in writing a book of comments 100's of pages long :) | null | 0 | 1316644409 | False | 0 | c2llvyf | t3_kmk56 | null | t1_c2llvyf | t3_kmk56 | null | 1427630103 | 2 | t5_2fwo | null | null | null |
True | 0xABADC0DA | null | Angry guy from Quebec:
ᓂ_ᓂ
ᐅᐊ
| null | 0 | 1316644579 | False | 0 | c2llwsw | t3_klhlv | null | t1_c2llwsw | t1_c2l9tn3 | null | 1427630112 | 1 | t5_2fwo | null | null | null |
True | seesharpie | null | ...enhance! | null | 0 | 1316644756 | False | 0 | c2llxno | t3_kmshh | null | t1_c2llxno | t1_c2lkixt | null | 1427630123 | -2 | t5_2fwo | null | null | null |
True | generalT | null | has anyone used any of these graph-stores before? | null | 0 | 1316644884 | False | 0 | c2llyam | t3_kmpyi | null | t1_c2llyam | t3_kmpyi | null | 1427630131 | 2 | t5_2fwo | null | null | null |
True | WrongSubreddit | null | Kinda reminds me of the Server header you get when you query the reddit API.
'; DROP TABLE servertypes; -- | null | 0 | 1316644927 | False | 0 | c2llyi2 | t3_kmevq | null | t1_c2llyi2 | t3_kmevq | null | 1427630134 | 5 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316645028 | False | 0 | c2llyzy | t3_kmshh | null | t1_c2llyzy | t1_c2linob | null | 1427630140 | 3 | t5_2fwo | null | null | null |
Subsets and Splits
Filtered Reddit Uplifting News
The query retrieves specific news articles by their link IDs, providing a basic overview of those particular entries without deeper analysis or insights.
Recent Programming Comments
Returns a limited set of programming records from 2020 to 2023, providing basic filtering with minimal analytical value.