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 | cdsmith | null | So the author has a point that there are significant differences in architecture between different web applications that all claim to be doing MVC. But I don't think fishing out terminology from narrow-sighted old arguments about Java web frameworks and revive them with new out-of-context meaning is the answer.
IMO the answer is to just describe the distinction you're making. Like, instead of saying "This is an MVC model", you might say "We use an event system. Changes to the model fire events, and views can listen for those events and update themselves." Yeah, that seems to handle it, and doesn't rely on trying to change the rest of the world's use of what has by now become a very vague concept. | null | 0 | 1316968677 | False | 0 | c2mgue1 | t3_kquum | null | t1_c2mgue1 | t3_kquum | null | 1427645046 | 1 | t5_2fwo | null | null | null |
True | duckfighter | null | The ultimate answer to those types of questions: Why not? | null | 0 | 1316968744 | False | 0 | c2mgunp | t3_kq27q | null | t1_c2mgunp | t1_c2mgry5 | null | 1427645054 | -2 | t5_2fwo | null | null | null |
True | _asterisk | null | Wouldn't you need to re-render the substrate for every page? | null | 0 | 1316968895 | False | 0 | c2mgv9f | t3_kqixo | null | t1_c2mgv9f | t1_c2mesun | null | 1427645063 | 3 | t5_2fwo | null | null | null |
True | immerc | null | I'm ok with reformatting period, but I think the editor should do it, you shouldn't need to manually reformat each line on your own.
| null | 0 | 1316969051 | False | 0 | c2mgvuy | t3_kooiy | null | t1_c2mgvuy | t1_c2mgs6r | null | 1427645067 | 1 | t5_2fwo | null | null | null |
True | Strangering | null | If you work from mockups, you are doing TDD. It's just that your test cases are visual instead of automated. | null | 0 | 1316969157 | False | 0 | c2mgwa6 | t3_kq001 | null | t1_c2mgwa6 | t3_kq001 | null | 1427645071 | 2 | t5_2fwo | null | null | null |
True | frontseatdog | null | actually quite far from perfect. harvesting the raw materials for the substrate is responsible for reducing the production of oxidizing agents into the atmosphere. | null | 0 | 1316969427 | False | 0 | c2mgxdc | t3_kqixo | null | t1_c2mgxdc | t1_c2mf0si | null | 1427645082 | 4 | t5_2fwo | null | null | null |
True | imaginaryredditor | null | You don't have to be in the top 1% to use an object pool. Yes, you can pool in Java too. But in Java every object will be bloated 2 words for the object header. | null | 0 | 1316969522 | False | 0 | c2mgxrl | t3_kq27q | null | t1_c2mgxrl | t1_c2mckye | null | 1427645087 | 1 | t5_2fwo | null | null | null |
True | nightwood | null | thanks! just what I needed! | null | 0 | 1316969543 | False | 0 | c2mgxuh | t3_kqqd5 | null | t1_c2mgxuh | t3_kqqd5 | null | 1427645086 | 1 | t5_2fwo | null | null | null |
True | LoganCale | null | No, you have to convert it to mobi. Amazon offers a conversion service, but it doesn't work for something like this which is split into dozens of separate HTML files. | null | 0 | 1316969706 | False | 0 | c2mgyiq | t3_kqixo | null | t1_c2mgyiq | t1_c2mgqdm | null | 1427645097 | 1 | t5_2fwo | null | null | null |
True | MarshallBanana | null | I noticed some similar hits, and they seem very confused, partly because apparently the Source engine seems to use the name "phong" for things which are most definitely not Phong lighting. | null | 0 | 1316969995 | False | 0 | c2mgzom | t3_kqqd5 | null | t1_c2mgzom | t1_c2mgqs8 | null | 1427645111 | 0 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316970072 | False | 0 | c2mgzzg | t3_kocub | null | t1_c2mgzzg | t1_c2ly070 | null | 1427645114 | 0 | t5_2fwo | null | null | null |
True | MarshallBanana | null | Point out an example? | null | 0 | 1316970162 | False | 0 | c2mh0do | t3_kqqd5 | null | t1_c2mh0do | t1_c2mgkxh | null | 1427645118 | -4 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316970213 | False | 0 | c2mh0l6 | t3_kqybe | null | t1_c2mh0l6 | t3_kqybe | null | 1427645128 | 1 | t5_2fwo | null | null | null |
True | bluGill | null | As a general rule a class should **do something**, not store something. getters and setters are a code smell: they imply that you don't have a class you have a data store. Writing class instead of strut (or whatever syntax your language has), and even adding a few functions to it does not make your code object oriented. (not that I'm saying objected oriented is right for all problems, but if you have a problem where objects are not the right solution you shouldn't try to shoe-horn objects in anyway)
| null | 0 | 1316970311 | False | 0 | c2mh0yt | t3_kq001 | null | t1_c2mh0yt | t1_c2mcgfz | null | 1427645124 | 3 | t5_2fwo | null | null | null |
True | Fifth_Business | null | It's not the sole component of their lighting model, but it's an important part. They use a custom lighting model that includes Phong highlights, as described in [their 2007 paper](http://www.valvesoftware.com/publications/2007/NPAR07_IllustrativeRenderingInTeamFortress2.pdf) (pdf link from Valve's website). The description of their inclusion of Phong terms is on pages 4 and 5. Quote:
**"This combination of Phong highlights that match the material properties of a given object with broad rim highlights helps to give Team Fortress 2 its signature illustrative look."**
Edit: [Here's the relevant section of the paper's video](http://www.youtube.com/watch?v=sIikwDbZTCI&t=2m7s), where they break down the lighting terms. | null | 0 | 1316970322 | True | 0 | c2mh10m | t3_kqqd5 | null | t1_c2mh10m | t1_c2mgiys | null | 1427645124 | 6 | t5_2fwo | null | null | null |
True | bobappleyard | null | Javascript doesn't have classes. | null | 0 | 1316970356 | False | 0 | c2mh14z | t3_kpqzv | null | t1_c2mh14z | t1_c2m732h | null | 1428192901 | 1 | t5_2fwo | null | null | null |
True | shub | null | Also Official Redhat Binaries. | null | 0 | 1316970452 | False | 0 | c2mh1hv | t3_kpecl | null | t1_c2mh1hv | t1_c2m95v0 | null | 1427645130 | 2 | t5_2fwo | null | null | null |
True | bluGill | null | Not exactly. Bad coders do write rubbish code - even their test code. However if you force them to do TDD, the tests at least cover all the functionality. It may be rubbish, but you know that it won't crash on the inputs they think are valid, and that is something. | null | 0 | 1316970531 | False | 0 | c2mh1te | t3_kq001 | null | t1_c2mh1te | t1_c2mf0w3 | null | 1427645146 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316970538 | False | 0 | c2mh1uj | t3_kq27q | null | t1_c2mh1uj | t1_c2mgunp | null | 1427645136 | 1 | t5_2fwo | null | null | null |
True | TinyEarl | null | Damn, you really hate Phong. | null | 0 | 1316970543 | False | 0 | c2mh1v6 | t3_kqqd5 | null | t1_c2mh1v6 | t1_c2mgkg6 | null | 1427645136 | 12 | t5_2fwo | null | null | null |
True | toaster13 | null | Because there are [right](http://i.imgur.com/6OtBh.jpg) and [wrong](http://i.imgur.com/7rZqC.gif) tools for any job.
| null | 0 | 1316970781 | False | 0 | c2mh2pz | t3_kq27q | null | t1_c2mh2pz | t1_c2mgunp | null | 1427645148 | 10 | t5_2fwo | null | null | null |
True | bluGill | null | I consider the tests my plan.
I write the tests first so I can say
I don't know how my implementation does, but I know to use it I want to call A, then B and C happens. All that is written in a test, then I go back to the code.
Of course when doing code I generally discover that A needs options that I didn't think of, which means I have to adjust the tests. | null | 0 | 1316970884 | False | 0 | c2mh33s | t3_kq001 | null | t1_c2mh33s | t1_c2mcaap | null | 1428192900 | 1 | t5_2fwo | null | null | null |
True | toaster13 | null | Truth. | null | 0 | 1316970950 | False | 0 | c2mh3d3 | t3_kq27q | null | t1_c2mh3d3 | t1_c2mgay9 | null | 1427645164 | 1 | t5_2fwo | null | null | null |
True | MarshallBanana | null | And as they show, the Phong part only adds a few tiny details. I'm sure those help, but most of the model is not really Phong lighted, just a few tiny parts they want to gleam a bit extra. | null | 0 | 1316971140 | False | 0 | c2mh46a | t3_kqqd5 | null | t1_c2mh46a | t1_c2mh10m | null | 1427645182 | -6 | t5_2fwo | null | null | null |
True | flexd | null | I wouldn't touch javascript with the longest of sticks. I write stuff in CoffeeScript (which compiles to Javascript) when I play with node.. :-)
On the other hand, what would you like to have written it in? I don't see the problem. node.js is designed especially for loads and loads of concurrent connections like this. It's goal is to provide an easy way to build scalable network programs and it's doing a good job of it.
You would spend a lot more time developing whatever you are doing in C++ than you would with node without gaining that much of a benefit. | null | 0 | 1316971264 | False | 0 | c2mh4p8 | t3_kq27q | null | t1_c2mh4p8 | t1_c2mgry5 | null | 1427645186 | 1 | t5_2fwo | null | null | null |
True | 8-bit_d-boy | null | http://www.valvesoftware.com/publications/2007/NPAR07_IllustrativeRenderingInTeamFortress2_Slides.pdf
and here's the video of it: http://www.youtube.com/watch?v=sIikwDbZTCI&feature=player_detailpage#t=127s | null | 0 | 1316971282 | False | 0 | c2mh4rx | t3_kqqd5 | null | t1_c2mh4rx | t1_c2mh0do | null | 1427645195 | 5 | t5_2fwo | null | null | null |
True | ioquatix | null | I guess I was using a canonical term to refer to JavaScript's prototype-based object hierarchies which perform essentially the same way as classes in most other similar dynamic languages. | null | 0 | 1316971307 | False | 0 | c2mh4vm | t3_kpqzv | null | t1_c2mh4vm | t1_c2mh14z | null | 1427645189 | 1 | t5_2fwo | null | null | null |
True | AeroNotix | null | I cannot see them on my screen at all. And I remember an epic thread on here a while back complaining of them. It's a personal preference I guess after all but I just wish they didn't exist in the context of programming because in-between the craziness of a program, the eye can lose them and in some fonts they look like specs of dirt on the screen! | null | 0 | 1316971532 | False | 0 | c2mh5uw | t3_kpqzv | null | t1_c2mh5uw | t1_c2m8gq6 | null | 1428192894 | 1 | t5_2fwo | null | null | null |
True | toaster13 | null | That is not true at all. If you're talking real code, you're talking real servers (in a datacenter with finite resources) and real (ECC) memory. 32G carries a considerable cost.
* [cash](http://www.newegg.com/Product/Product.aspx?Item=N82E16820161458)
* More cash if virtualizing, depending on hypervisor and price model (See EC2/vSphere 5)
* Power capacity
* Cooling capacity
* Physical memory slot capacity (which leads to rack capacity and chassis count increase)
Even if we look at just cash for the dimms, your *programmer* would have to be making at least $200,000 a year to justify your statement. Much more if you factor in everything else that using that memory costs you. Then think about redundancy (again, if you're talking real code) - there will be at *least* two of these things, right? So now its double. One could probably argue that 32G could be worth up to a week of a typical programmer's time. Hardware is not always cheaper than dev time, believe it or not. | null | 0 | 1316971650 | False | 0 | c2mh6d9 | t3_kq27q | null | t1_c2mh6d9 | t1_c2md80j | null | 1427645214 | 4 | t5_2fwo | null | null | null |
True | MarshallBanana | null | http://www.reddit.com/r/programming/comments/kqqd5/glsl_programming_wikibook_for_modern_3d_graphics/c2mh46a?context=1 | null | 0 | 1316971798 | False | 0 | c2mh6z7 | t3_kqqd5 | null | t1_c2mh6z7 | t1_c2mh4rx | null | 1428192892 | -5 | t5_2fwo | null | null | null |
True | Fifth_Business | null | I don't think anyone here is saying that TF2 does, or that anyone should, use **only** Phong. For TF2, indeed, it's not the entirety of their model, but they consider it an important part, as evidenced by the quote. | null | 0 | 1316971849 | False | 0 | c2mh76g | t3_kqqd5 | null | t1_c2mh76g | t1_c2mh46a | null | 1428192891 | 3 | t5_2fwo | null | null | null |
True | 8-bit_d-boy | null | Yes, we unanimously agree that you're wrong. I'll take this as your forfeit. | null | 0 | 1316971917 | False | 0 | c2mh7gk | t3_kqqd5 | null | t1_c2mh7gk | t1_c2mh6z7 | null | 1427645232 | 4 | t5_2fwo | null | null | null |
True | bobappleyard | null | The can be made to behave in a similar way, or at least appear to, but they can do loads of other fun stuff besides. | null | 0 | 1316971924 | False | 0 | c2mh7hm | t3_kpqzv | null | t1_c2mh7hm | t1_c2mh4vm | null | 1427645232 | 1 | t5_2fwo | null | null | null |
True | Fifth_Business | null | Exactly. It's worth understanding. | null | 0 | 1316971924 | False | 0 | c2mh7hv | t3_kqqd5 | null | t1_c2mh7hv | t1_c2mg1vs | null | 1427645232 | 3 | t5_2fwo | null | null | null |
True | toaster13 | null | Offhand? I would immediately reach for java. Maybe Erlang if I had the skillset. | null | 0 | 1316971980 | False | 0 | c2mh7qd | t3_kq27q | null | t1_c2mh7qd | t1_c2mh4p8 | null | 1427645235 | 1 | t5_2fwo | null | null | null |
True | WotIsAUserName | null | You would think so - but not in my experience unless you have someone validating their tests. They have a habit of generating huge mass of spaghetti which is touch and go whether easier to throw away and start again | null | 0 | 1316971988 | False | 0 | c2mh7rp | t3_kq001 | null | t1_c2mh7rp | t1_c2mh1te | null | 1427645236 | 1 | t5_2fwo | null | null | null |
True | wreckerone | null | The triviality is not the question, it's the importance and the fact that arguing this problem exposes a level of dilettantism. The point is that it's been studied over and over, and, just like P=NP or Fermat's last theorem, it's one of those things that amateurs grasp onto. In the end does it really have anything to do with current mathematical research and theory? Are there people at the forefront of their field out there studying this exact problem? If you read someone's bio and it said they were at <elite university> researching 'the 2+2=4 problem', what would you think about that person?
| null | 0 | 1316972144 | False | 0 | c2mh8ea | t3_korcu | null | t1_c2mh8ea | t1_c2mfzje | null | 1427645241 | 3 | t5_2fwo | null | null | null |
True | MarshallBanana | null | Well, my argument here is of course partly hyperbole. Phong has been so painfully overused in bad 3D rendering for so long, I just feel like lashing out at it.
Yes, you can make it look decent, if you use it very restrictively, like Valve is doing here. On the other hand, I think in those cases you could get even better results with other tricks.
Basically, I just want to get rid of the idea that Phong is some kind of good default pick for lighting. | null | 0 | 1316972390 | False | 0 | c2mh9dz | t3_kqqd5 | null | t1_c2mh9dz | t1_c2mh76g | null | 1427645250 | -2 | t5_2fwo | null | null | null |
True | poo_22 | null | [Check out this book guys](http://www.arcsynthesis.org/gltut/) | null | 0 | 1316972643 | False | 0 | c2mhahm | t3_kqqd5 | null | t1_c2mhahm | t3_kqqd5 | null | 1427645265 | 9 | t5_2fwo | null | null | null |
True | wikigear | null | incidentally, I made an iPad/iPhone app for reading wikibooks (and wikipedia, wikinews, wikisource, etc):
http://itunes.apple.com/us/app/wikigear-free/id419252690?mt=8
(if you need a code send me a pm. And if you could give me feedback of any kind, that would be greatly appreciated. I think there are still some rough edges but I'm still working on it through updates) | null | 0 | 1316972726 | False | 0 | c2mhats | t3_kqqd5 | null | t1_c2mhats | t3_kqqd5 | null | 1427645271 | 2 | t5_2fwo | null | null | null |
True | webauteur | null | We've already been introduced. | null | 0 | 1316972786 | False | 0 | c2mhb2l | t3_kqucu | null | t1_c2mhb2l | t3_kqucu | null | 1427645274 | -10 | t5_2fwo | null | null | null |
True | echeese | null | Your hatred for Phong shading really shows that you have no idea of what it is. | null | 0 | 1316972936 | False | 0 | c2mhbp6 | t3_kqqd5 | null | t1_c2mhbp6 | t1_c2mfo8f | null | 1427645279 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | I don't know what their plans are, but as someone who's writing a JIT, I can tell you that supporting both x86 and x86-64 is quite trivial, the differences aren't very big. I'd be surprised if their backend wasn't designed to support both from the start, in this day and age. | null | 0 | 1316973002 | False | 0 | c2mhbz9 | t3_kos4z | null | t1_c2mhbz9 | t1_c2m8h6d | null | 1427645285 | 1 | t5_2fwo | null | null | null |
True | bobindashadows | null | If you're interested in reflection in C++, you might find the open-source Protocol Buffers library interesting. It uses generated code though, so they get to cut a lot of the boring corners. However, that buys them a "lite" compilation strategy that leaves out the (quite heavyweight) reflection capabilities. I worked on adding a feature to protobuf once, and once I got to updating the reflection capabilities, I was in *way* over my head.
[Google code page](http://code.google.com/p/protobuf/) | null | 0 | 1316973027 | False | 0 | c2mhc2c | t3_kqtat | null | t1_c2mhc2c | t3_kqtat | null | 1427645294 | 4 | t5_2fwo | null | null | null |
True | 00kyle00 | null | If i was to venture a guess about D popularity out there in 'real development' id say that its probably about twice as popular as Haskell.
That said, does anyone know when/whether (or perhaps does) D compiler will target architectures other then x86/x64? | null | 0 | 1316973066 | False | 0 | c2mhc7y | t3_kqoz2 | null | t1_c2mhc7y | t1_c2mezoe | null | 1427645297 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | > Monads are something that lets you iterate over the elements of a list without inadvertently changing their structure?
Kind of. They let you to apply a function to the elements of a "container" to produce a new container. And yes, all this stuff allows you to express various kinds of nondestructive transformations -- which produce new structures instead of changing old structures in place. Surprisingly, in this day and age using this kind of transformations often produces more efficient code, not to mention one that is easier to reason about.
One point that is important that monads are a refinement on the concept of a functor, which is somewhat easier to understand and which is something that you should understand first. Monads come into play when you want to compose transformations in nontrivial ways.
If you are familiar with C++, then the first overload of [`std::transform`](http://www.cplusplus.com/reference/algorithm/transform/) implements a `fmap` (or `Select` in C# parlance). I'll return to the second overload in just a moment.
Another point is that the notion of a "container" is much wider than you might expect. That's why I mentioned a `Future<T>`: I hope you can easily imagine how it should work, suppose you do:
Future<int>(10).Select(x => do_some_lengthy_calculation(x).ToString())
It creates a thread where it performs the lengthy calculation (including the `ToString()` call) and gives you a `Future<string>`, which has a `string get_value()` method (which is not included in the IFunctor interface itself!) that allows you to wait until the result is produced. But you can also queue another function, and another, (getting new `Future<sometype>` objects) and only wait on the final result.
What's the point of it all, you might ask? Functors and functor-like things (like monads) are design patterns. You have something that looks kind of like a container -- you say, all right, I know, if I implement `MyContaner<R> MyContainer<T>::Select(Func<T, R> f)` then it would be useful for me and other people, who then would instantly know what I had in mind. Also, I probably should additionally implement a monadic `MyContaner<R> MyContainer<T>::SelectMany(Func<T, MyContainer<R>> f)` to allow using functions that use several such containers at once.
If your language supports higher-order generics, you can also implement useful generic functions like
Func<Functor<T>, Functor<R>> lift(Func<T, R> f)
(you can't do that in C# because you can't parametrize a generic with an arbitrary generic, that is, you can parametrize with a `List<int>`, but not with a `Something<Someotherthing>` where both are generic parameters)
Now back to the second overload of `std::transform`, there's a little shameful thing you'll rarely see in Monad tutorials: when I say that you must implement a monadic interface on your functors if you want to allow using functions of several arguments, I lie =) There's another generic type called "applicative functor" that lies between functors and monads and is sufficient for that. Read [this post](http://tomasp.net/blog/formlets-in-linq.aspx) about implementing applicative functors in LINQ, it would also add some meat to your understanding by showing a practical example of all that stuff.
So the second overload of `std::transform` actually implements an applicative functor, not a monad. In more abstract terms, you can get rid of that pesky problem with nested functors (which return a `Functor<Functor<T>>`) when you use a binary function by adding another function that transforms a `pair<Applicative<T1>, Applicative<T2>>` into an `Applicative<pair<T1, T2>>`.
Monads give much more guaranties and are therefore much more limited. When you write `MonadX.SelectMany(x => MonadY.Select(y => f(x, y)))`, you are guaranteed that MonadX has actually computed whatever it wanted to compute before binding the result to `x`. This was immensely useful for Haskell, because it allowed to express explicit order of evaluation despite the language not having one, `IO.readline(s => IO.writeline("Hello, " + s))` guarantees that `readline` happens before `writeline`, because `s` must have its value assigned. Then they got a bit too eager (pun intended) and implemented as Monads a lot of things that should have been implemented as Applicatives. Again, read that post about applicative functors to see how exactly it works (or not works) out. | null | 0 | 1316973103 | False | 0 | c2mhcdm | t3_kogj4 | null | t1_c2mhcdm | t1_c2mggea | null | 1427645295 | 2 | t5_2fwo | null | null | null |
True | MarshallBanana | null | It is a lighting model based on a mostly physically unlikely statistical microfacet model, representing an approximation of light reflection from a kind of surface that really doesn't exist in reality for the most part.
No? | null | 0 | 1316973111 | False | 0 | c2mhces | t3_kqqd5 | null | t1_c2mhces | t1_c2mhbp6 | null | 1427645298 | -1 | t5_2fwo | null | null | null |
True | flexd | null | Yeah maybe, I'm ~~learning~~ watching the others learn Java in school now (first year comp.eng). I've always felt more comfortable coding in languages I like (primarily Ruby) so reaching for something like node.js is a bit new. I admit I have a strong dislike for JavaScript in general mostly because of the things you have said in addition to it's horrible syntax (with me coming from liking Ruby and all).
CoffeeScript makes it much nicer though (and much more like Ruby).
I'm not sure I would go with node.js for such a big project myself but I can definitely see why someone would. It's exactly the kind of things it's intended for, even if JavaScript has it's limitations.
I would not use Java for this but that might just be my general dislike for the language talking, it's easy to understand (as it's so similar to C++) but I prefer ruby-like solutions. | null | 0 | 1316973268 | False | 0 | c2mhd0z | t3_kq27q | null | t1_c2mhd0z | t1_c2mh7qd | null | 1427645302 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | And the extra 32GB will cost even less tomorrow. | null | 0 | 1316973312 | False | 0 | c2mhd7v | t3_kq27q | null | t1_c2mhd7v | t1_c2mgay9 | null | 1427645303 | 1 | t5_2fwo | null | null | null |
True | RageX | null | Is half a year really that enormous of a deal? Are all OpenGL books outdated within a year of purchase? | null | 0 | 1316973419 | False | 0 | c2mhdno | t3_kqqd5 | null | t1_c2mhdno | t1_c2mghll | null | 1427645307 | 3 | t5_2fwo | null | null | null |
True | mwilliams | null | This is cool! But I prefer the [Textinfo](http://www.neilvandyke.org/sicp-texi/) version so I can have it open inside of Emacs in one buffer while I have another buffer open for me to hack on examples and then a third buffer below with a Scheme REPL. Such an awesome way to go through the book...
But with that said - I'll be loading this up on my Kindle. | null | 0 | 1316973518 | False | 0 | c2mhe2d | t3_kqixo | null | t1_c2mhe2d | t3_kqixo | null | 1427645310 | 1 | t5_2fwo | null | null | null |
True | Fifth_Business | null | > Basically, I just want to get rid of the idea that Phong is some kind of good default pick for lighting.
I do think there's value in learning and understanding it, but I agree, one can definitely do much better these days than vanilla Phong. | null | 0 | 1316973535 | False | 0 | c2mhe54 | t3_kqqd5 | null | t1_c2mhe54 | t1_c2mh9dz | null | 1427645319 | 2 | t5_2fwo | null | null | null |
True | 00kyle00 | null | While i dont care for runtime reflexion in C++ (in fact i rather not have it) i think C++ would greatly benefit from some compile time reflexion akin to D's features like obtaining tuple of all members of a class (probably could be extended to handle functions too), triats it does provide in its library/core lang and other mechanisms that would allow for greater flexibility of operations on the code before runtime. | null | 0 | 1316973605 | False | 0 | c2mheeu | t3_kqtat | null | t1_c2mheeu | t3_kqtat | null | 1427645315 | 3 | t5_2fwo | null | null | null |
True | [deleted] | null | The book was designed to support the class. At the end of the day it doesn't make any sense to *read the full book*. You use the book when you don't understand something from a lecture. | null | 0 | 1316973826 | False | 0 | c2mhfb3 | t3_kqixo | null | t1_c2mhfb3 | t1_c2mdwxs | null | 1427645324 | -1 | t5_2fwo | null | null | null |
True | echeese | null | Can you give any examples? | null | 0 | 1316973930 | False | 0 | c2mhfr2 | t3_kqqd5 | null | t1_c2mhfr2 | t1_c2mhe54 | null | 1427645328 | 2 | t5_2fwo | null | null | null |
True | Game_Ender | null | You have to ask yourself, what overhead does this system create? It's a parallel set of information about your classes. If you don't use it won't cost you anything besides some extra disk space. | null | 0 | 1316974067 | False | 0 | c2mhgcb | t3_kqtat | null | t1_c2mhgcb | t1_c2mggg0 | null | 1427645337 | 1 | t5_2fwo | null | null | null |
True | pistacchio | null | free classes from valuable people are awesome. unfortunately, databases are the single thing related to programming that bores me the most, but that's just me. | null | 0 | 1316974297 | False | 0 | c2mhhbm | t3_kqucu | null | t1_c2mhhbm | t3_kqucu | null | 1427645354 | 37 | t5_2fwo | null | null | null |
True | Inverter | null | Yes, I've been missing compile-time reflection for years ... you can get half-way by using std::tuple instead of structs etc. but then you don't have names (of the fields) any more! | null | 0 | 1316974410 | False | 0 | c2mhhtb | t3_kqtat | null | t1_c2mhhtb | t3_kqtat | null | 1427645360 | 2 | t5_2fwo | null | null | null |
True | JustToUpvoteYou | null | Know of anything version 130 or above examples?
I find these extremely hard to find. Especially since they deprecated pretty much all the old keywords and global variables. | null | 0 | 1316974533 | False | 0 | c2mhiby | t3_kqqd5 | null | t1_c2mhiby | t3_kqqd5 | null | 1427645362 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | On Thu, 20 May 2004, Rob Pike wrote:
> when ken and i described the new features we were proposing for plan 9 C,
> including inherited structure elements, to bjarne stroustrup, he said, "if you
> want C++ you know where to find it." and stormed from the room.
> i don't think he understood exactly why we were proposing these features.
> -rob
oops, wrong discussion | null | 0 | 1316974810 | False | 0 | c2mhjf0 | t3_kqtat | null | t1_c2mhjf0 | t3_kqtat | null | 1427645377 | 16 | t5_2fwo | null | null | null |
True | kirakun | null | May not be massive, but every object would have to have something like a pointer to the reflection object so that pointers to base-classes can reflect on the derived classes. If you have mostly small number of large objects, then this adds nothing; but if you have lots of small objects, performance may take a hit---and C++ is all about performance. Of course, if all your objects have vtable pointer already, then there is no extra cost. | null | 0 | 1316974875 | False | 0 | c2mhjow | t3_kqtat | null | t1_c2mhjow | t1_c2mhgcb | null | 1428192880 | 6 | t5_2fwo | null | null | null |
True | xardox | null | I like PostScript, where if and ifelse are just regular functions (operators).
"if" takes a boolean and an executable array, and executes it if the boolean is true.
"ifelse" takes a boolean and two executable arrays, and executes the first if the boolean is true, or the second if the boolean is false.
condition {stuff to do if true} if
condition {stuff to do if true} {stuff to do if false} ifelse
The looping constructs work similarly -- they are just normal functions that take executable arrays as parameters.
So of course it's easy to define your own flow control constructs.
But I must say: I hate TCL, after having written a lot of [it](http://code.google.com/p/micropolis/source/browse/trunk/micropolis-activity/res/micropolis.tcl). | null | 0 | 1316974907 | False | 0 | c2mhjti | t3_kooiy | null | t1_c2mhjti | t1_c2mbr3i | null | 1427645382 | 0 | t5_2fwo | null | null | null |
True | [deleted] | null | The "official" D compiler doesn't even target x64. | null | 0 | 1316975123 | False | 0 | c2mhkqg | t3_kqoz2 | null | t1_c2mhkqg | t1_c2mhc7y | null | 1427645397 | 2 | t5_2fwo | null | null | null |
True | myliverhatesme | null | Who ever thought this non-programming proggit submission would get up votes? People need to stop up voting this shit or these idiots will keep doing it. | null | 0 | 1316975235 | False | 0 | c2mhl7h | t3_kqriv | null | t1_c2mhl7h | t1_c2mfog5 | null | 1427645404 | 1 | t5_2fwo | null | null | null |
True | ErstwhileRockstar | null | Classes, esp. constructors and destructors, function overloading, exception handling, ... simplified C++ code compared to C code (considerably less lines of code). That's why today 'C/C++' is the prevailing C++ idiom in the real world.
OTOH, "[C++ has shown that if you slowly bloat up a language over a period of years, people don't seem to mind as much](http://harmful.cat-v.org/software/c++/)." | null | 0 | 1316975321 | False | 0 | c2mhlkh | t3_kos4z | null | t1_c2mhlkh | t1_c2mfjz1 | null | 1427645409 | -5 | t5_2fwo | null | null | null |
True | WalterBright | null | dmd will generate code for 64 bit Linux. | null | 0 | 1316975397 | False | 0 | c2mhlw9 | t3_kqoz2 | null | t1_c2mhlw9 | t1_c2mhkqg | null | 1427645413 | 4 | t5_2fwo | null | null | null |
True | Fifth_Business | null | Not sure what kind of detail you're looking for, so I'm going to be somewhat general. I could dig up some links if you're interested.
The more interesting lightingg models that I can think of are from games, who have customized or added extra terms to suit their art direction. The TF2 model that I linked to a couple of comments back is a good example. Killzone 3 has a very thorough and, IIRC, well-documented pipeline as well.
IMO, the Phong model is under-descriptive instead of outright wrong, so some relatively recent *additional* terms/passes like ambient occlusion or subsurface scattering (or some approximation thereof) definitely help make things look more natural. | null | 0 | 1316975438 | False | 0 | c2mhm1k | t3_kqqd5 | null | t1_c2mhm1k | t1_c2mhfr2 | null | 1427645417 | 1 | t5_2fwo | null | null | null |
True | echeese | null | I'm new to shaders, but I've been writing shaders for the new Flash 3D API, and I was just looking for new things to try. My latest one is this [normal-mapped lambert/phong shader](http://www.youtube.com/watch?v=rL7D2VccfVI). | null | 0 | 1316975654 | False | 0 | c2mhmxq | t3_kqqd5 | null | t1_c2mhmxq | t1_c2mhm1k | null | 1427645430 | 1 | t5_2fwo | null | null | null |
True | toaster13 | null | I personally don't care for ruby very much but some of that is subjective surrounding the (especially rails) community. I guess I generally like what it does but the syntax strikes me as ugly. Admittedly my background is C/C++/Perl/Java so there you go. At the end of the day it isn't a terrible language and the ability to run in the JVM is a plus. I still wouldn't go for a scripting language when you're talking a big application, to be honest. Java really has some of the best facilities for that. Its damn fast and damn powerful. I used to hate on it but it has grown up very nicely IMO. Without digging around I'm pretty positive you could pull off what node.js does in pure java without too much effort. And you would be doing it in a VM that was designed to be big and fast and relatively efficient.
Interestingly, I have a feeling I know who that dev was in that thread...I found [this](http://mashable.com/2011/03/10/node-js/) which mentions a company called Voxer, who is on their third iteration of a real time walkie talkie type app and they're using node.js for the server side. I see how it fits their use case but at the same time I can't help thinking they skipped the obvious java solution. I guess node.js is filling in where erlang's learning curve turns people off. I get the need, but I don't like the solution - it feels very forced - and at the risk of making assumptions, I would guess that a lot of the reasons you would want to use erlang were lost on the way. | null | 0 | 1316975697 | False | 0 | c2mhn4r | t3_kq27q | null | t1_c2mhn4r | t1_c2mhd0z | null | 1427645440 | 0 | t5_2fwo | null | null | null |
True | B_Master | null | The article has almost nothing to do with test driven development, it's really just a rant against overbearing management. | null | 0 | 1316976103 | False | 0 | c2mhopx | t3_kq001 | null | t1_c2mhopx | t3_kq001 | null | 1427645455 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | The right way to look at it is in terms of opportunity cost. A day that a programmer spends on optimizing is a day that he doesn't spend on revenue-generating activities. A programmer that makes $100k might cost a company $150k in overhead, benefits and taxes, and bring in $300k in revenue. This is at a small shop. A programmer at Google is probably worth $1-2m in revenue per day (they have a $1m revenue/employee). The real cost of a day of optimizing is $300k / (5 days/week * 50 weeks/year) = $1,200.
With 32GB of memory costing $550, so $1100 for two sets, and the incremental cooling and power costs from 2x4GB to 4x8GB being almost nil (a DDR3 DIMM uses around 3 watts), 32GB is worth about a day of programmer time at a small shop, and the numbers only get less favorable from there. | null | 0 | 1316976233 | True | 0 | c2mhp8r | t3_kq27q | null | t1_c2mhp8r | t1_c2mh6d9 | null | 1427645464 | 0 | t5_2fwo | null | null | null |
True | jtxx000 | null | Jim Blandy, apparently, judging by `git blame`. | null | 0 | 1316976285 | False | 0 | c2mhpg3 | t3_kq001 | null | t1_c2mhpg3 | t1_c2mfsy6 | null | 1428192868 | 1 | t5_2fwo | null | null | null |
True | Iggyhopper | null | I don't see anything that could possibly relate to programming. | null | 0 | 1316976377 | False | 0 | c2mhptt | t3_kqzw8 | null | t1_c2mhptt | t3_kqzw8 | null | 1427645477 | 38 | t5_2fwo | null | null | null |
True | frixionburne | null | [deleted] | null | 0 | 1316976412 | 1408427214 | 0 | c2mhpyv | t3_kqzw8 | null | t1_c2mhpyv | t3_kqzw8 | null | 1427645479 | 8 | t5_2fwo | null | null | null |
True | Game_Ender | null | Yes, C++ already has RTTI so you can add this to the existing typeinfo structure. | null | 0 | 1316976506 | False | 0 | c2mhqcr | t3_kqtat | null | t1_c2mhqcr | t1_c2mhjow | null | 1427645482 | 3 | t5_2fwo | null | null | null |
True | Cyantwo | null | i don't suppose you can use this class as credit.. | null | 0 | 1316976597 | False | 0 | c2mhqqt | t3_kqucu | null | t1_c2mhqqt | t3_kqucu | null | 1427645487 | 4 | t5_2fwo | null | null | null |
True | grauenwolf | null | More likely Netbeans was used to prove that the new syntax could be handled by an IDE. That's what Microsoft does. | null | 0 | 1316976732 | False | 0 | c2mhrbk | t3_kq0ms | null | t1_c2mhrbk | t1_c2mbeco | null | 1427645503 | 3 | t5_2fwo | null | null | null |
True | Anonymous343 | null | >Something I find frustrating is that there are two different concepts here. Think about interpreting
> if (a) then b; else c;
>as an expression.
Yep, that's a different concept all right. But no, I won't think about it, because that's not how C-like languages work. The ternary operator is thataway. ----> | null | 0 | 1316976757 | False | 0 | c2mhrg0 | t3_kooiy | null | t1_c2mhrg0 | t1_c2lzj1g | null | 1427645496 | 1 | t5_2fwo | null | null | null |
True | pingveno | null | Did it also incur other penalties like adding pointers to PyDict? I'm under the impression that the python-dev folks want to keep PyDict as light as possible. | null | 0 | 1316976843 | False | 0 | c2mhrsn | t3_kos4z | null | t1_c2mhrsn | t1_c2mf0ri | null | 1427645501 | 2 | t5_2fwo | null | null | null |
True | MyTribeCalledQuest | null | Dat wire porn. | null | 0 | 1316976887 | False | 0 | c2mhryo | t3_kqzw8 | null | t1_c2mhryo | t3_kqzw8 | null | 1427645503 | 6 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316977233 | False | 0 | c2mhteq | t3_kqtat | null | t1_c2mhteq | t3_kqtat | null | 1428192865 | 1 | t5_2fwo | null | null | null |
True | NruJaC | null | Take the machine learning or AI class instead then. | null | 0 | 1316977276 | False | 0 | c2mhtkp | t3_kqucu | null | t1_c2mhtkp | t1_c2mhhbm | null | 1427645520 | 12 | t5_2fwo | null | null | null |
True | baudehlo | null | Over hyped maybe. But it's a nice little server side environment otherwise. You probably speak as someone who has never used it. | null | 0 | 1316977314 | False | 0 | c2mhtpy | t3_kq27q | null | t1_c2mhtpy | t1_c2md2qp | null | 1427645523 | 0 | t5_2fwo | null | null | null |
True | grauenwolf | null | I do.
When working with old code I often find countless horrors hidden in the getters and setters. I don't manually write the tests, I have a code generator that does that for me, but I do make sure they are well covered. | null | 0 | 1316977336 | False | 0 | c2mhttm | t3_kq001 | null | t1_c2mhttm | t1_c2mac44 | null | 1427645526 | 1 | t5_2fwo | null | null | null |
True | AeroNotix | null | It was interesting up until your 50th question mark? If you go back and edit it let me know because I will surely am read it? It's good that there's someone being frank in the tense business world? I realise that you spent a lot of time on this, but could you just Control-F->Replace '?' with '.'? It would make reading it a little less like jabbing my jap's eye with a syringe? Thanks? | null | 0 | 1316977425 | False | 0 | c2mhu5p | t3_ko2wv | null | t1_c2mhu5p | t1_c2lv8ef | null | 1427645529 | 1 | t5_2fwo | null | null | null |
True | grauenwolf | null | How says you have to spend any time?
Getters and setters have well defined contracts. It is really easy to use a code generator to write the basic tests. | null | 0 | 1316977436 | False | 0 | c2mhu86 | t3_kq001 | null | t1_c2mhu86 | t1_c2mbgto | null | 1427645531 | 1 | t5_2fwo | null | null | null |
True | grauenwolf | null | There can be a lot of subtle interactions with properties that normal tests won't necessarily reveal. For example, the property change notifications for a UI-bound class in XAML. Manually writing the tests is very tedious, but without them you can have hard to catch errors such as the screen failing to update. | null | 0 | 1316977569 | False | 0 | c2mhush | t3_kq001 | null | t1_c2mhush | t1_c2mcfod | null | 1427645537 | 1 | t5_2fwo | null | null | null |
True | TrevelyanInc | null | This book still makes me want to claw my eyes out, but thanks for converting a resource seemingly everyone else loves to a nice neat e-reader format. | null | 0 | 1316977677 | False | 0 | c2mhv87 | t3_kqixo | null | t1_c2mhv87 | t3_kqixo | null | 1427645542 | 1 | t5_2fwo | null | null | null |
True | kmmeerts | null | Disregard that other guy, and good luck! I started working on an engine about a month ago and I've learned a lot. | null | 0 | 1316977792 | False | 0 | c2mhvop | t3_kqqd5 | null | t1_c2mhvop | t1_c2mfta2 | null | 1427645550 | 2 | t5_2fwo | null | null | null |
True | IanCal | null | It can be useful to prove that a test would fail if the code is wrong/missing. I've seen a lot of tests that pass even if the code they should be testing is missing.
Writing the test first is a way of doing a basic check on the test, making sure the software is failing in the way you expect, then you get to fix it.
Edit -
I'd add you probably do tdd, as do most sane developers. You know what's failing/missing and can show that's the case, then you go and sort the problem out, and finally check everything seems to be working. Automating the test just helps stop you breaking it later.
However I'm not a proponent of having to test drive every little buggering thing, because it costs more time than it saves and often I've seen code with tests heavily tied to the code written. | null | 0 | 1316977819 | True | 0 | c2mhvsu | t3_kq001 | null | t1_c2mhvsu | t1_c2m9yvv | null | 1428192863 | 2 | t5_2fwo | null | null | null |
True | munificent | null | > simplified C++ code compared to C code (considerably less lines of code)
Yes, which means they greatly *complicated* C++ the language. | null | 0 | 1316977822 | False | 0 | c2mhvtf | t3_kos4z | null | t1_c2mhvtf | t1_c2mhlkh | null | 1428192863 | 7 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316977885 | False | 0 | c2mhw19 | t3_kqzw8 | null | t1_c2mhw19 | t1_c2mhpyv | null | 1427645555 | 3 | t5_2fwo | null | null | null |
True | munificent | null | Rust compiles to LLVM, so I'm assuming that means it gets all of LLVM's supported backends for free. | null | 0 | 1316977907 | False | 0 | c2mhw41 | t3_kos4z | null | t1_c2mhw41 | t1_c2m8h6d | null | 1427645554 | 5 | t5_2fwo | null | null | null |
True | grauenwolf | null | > TDD enforces cohesion and loose coupling in ways that pretty UML diagrams never will.
I'm getting rather tired of that lie. TDD only ensures that you have tests. It does nothing to ensure the quality of those tests, nor the quality of overall design. | null | 0 | 1316977909 | False | 0 | c2mhw4f | t3_kq001 | null | t1_c2mhw4f | t1_c2mbflf | null | 1427645554 | 0 | t5_2fwo | null | null | null |
True | matthieum | null | I've used it several times in the past using Boost.Fusion.Map, you create data-less structures for the names and use them as the keys in the map. Once you have it, you have both descriptives fields *and* automatic serialization/printing/getters-setters...
Example:
typedef boost::fusion::map< std::pair<Name0, Type0>,
std::pair<Name1, Type1>,
std::pair<Name2, Type2> > Data;
Obviously, it is still a bit of boilerplate, so you can combine it with Boost.Preprocessor to get a nicer syntax (using the Sequence objects):
DEFINE_DATA_TYPE(Data, ((Type0, Name0))((Type1, Name1))((Type2, Name2)) ) | null | 0 | 1316977925 | False | 0 | c2mhw6q | t3_kqtat | null | t1_c2mhw6q | t1_c2mhhtb | null | 1427645564 | 4 | t5_2fwo | null | null | null |
True | andytuba | null | We also use it for Nook. It's brilliant. | null | 0 | 1316977960 | False | 0 | c2mhwbg | t3_kqixo | null | t1_c2mhwbg | t1_c2mfzuc | null | 1427645557 | 1 | t5_2fwo | null | null | null |
True | grauenwolf | null | TDD is a way of reinforcing bad habits. It lets you jump right into writing code without thinking of all those things you listed. | null | 0 | 1316978025 | False | 0 | c2mhwll | t3_kq001 | null | t1_c2mhwll | t1_c2mbaxg | null | 1427645562 | 2 | t5_2fwo | null | null | null |
True | toaster13 | null | I admit my fast math there was for 7 days a week (oops). 52 weeks is still valid since a programmer typically gets paid for vacation days as well. There is also the overhead you mention, which I didn't factor in. Shall we call it $150,000?
Opportunity cost goes both ways. Only one thing can use most of that 32G at a time, and it has a daily impact in overall capacity, not just a one time cost as would happen when a programmer works on project A rather than project B. Admittedly project B may have fan-out implications as well and we could go on forever about potential situations. At the end, opportunity cost is going to be largely futile in this discussion. I intentionally left it out.
One server with 32G doesn't use much more power than one with 2G, sure. This adds up, however, as you add servers to a rack and racks to your DC and DCs to your power grid. There is only so much capacity to go around, only so much memory you can stuff into a cage, and there are always other applications and systems outside of the little box most programmers think in. One 32G "splurge" to save a few days of dev time is a marginal but very real increase in finite resource usage and costs. The end of the story is hardware is sometimes cheap but its not free and its not infinite. Your dev time is not always worth more.
| null | 0 | 1316978040 | False | 0 | c2mhwnp | t3_kq27q | null | t1_c2mhwnp | t1_c2mhp8r | null | 1427645570 | 1 | t5_2fwo | null | null | null |
True | IanCal | null | But that internal state must affect the outside behaviour of the class, or else it's useless. You want to be checking the external behaviour changes as expected. | null | 0 | 1316978136 | False | 0 | c2mhx18 | t3_kq001 | null | t1_c2mhx18 | t1_c2mc9zb | null | 1427645569 | 2 | t5_2fwo | null | null | null |
True | grauenwolf | null | > The advantage of tests written before you start coding
The problem with that statement is TDD actually encourages you to not write the tests before you start coding. You skip the whole "design the tests" phase and jump right into implementing them. | null | 0 | 1316978166 | False | 0 | c2mhx5z | t3_kq001 | null | t1_c2mhx5z | t1_c2mb369 | null | 1427645572 | 1 | 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.