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 | ricodued | null | I just went to test it since I do all of my C++ assignments in VS2010 and the lack of Intellisense was... annoying, at best, for an experienced C# dev trying to learn C++.
Lo and behold, though, VS 2011 is actually much better. Even syntax highlighting is improved. Things like pair<T,T> and string that weren't h... | null | 0 | 1318953950 | True | 0 | c2sgilc | t3_lg1xx | null | t1_c2sgilc | t1_c2sezfd | null | 1427748503 | 3 | t5_2fwo | null | null | null |
True | Mignon | null | > 446 bytes going spare in the MBR
446 bytes ought to be enough for anybody. | null | 0 | 1318953983 | False | 0 | c2sgir5 | t3_lfqqr | null | t1_c2sgir5 | t1_c2sen2x | null | 1427748505 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | C# generics aren't really an equivalent of C++ templates, run-time reflection/strong typing vs compile time metaprogramming | null | 0 | 1318953986 | False | 0 | c2sgiru | t3_lg1xx | null | t1_c2sgiru | t1_c2sg546 | null | 1427748505 | 3 | t5_2fwo | null | null | null |
True | [deleted] | null | > I left LtU not because I trolled, but because most people there are truly assholes. They are immature, self-hyped people. It was a waste of time.
You "left" because if you hadn't, you'd have gotten yourself banned for not contributing to the discussions. Multiple people, multiple times, answered your repetitive, ... | null | 0 | 1318954087 | False | 0 | c2sgjai | t3_lfm1k | null | t1_c2sgjai | t1_c2sg644 | null | 1427748510 | 7 | t5_2fwo | null | null | null |
True | i8beef | null | Constructor Parameter = Dependency Injection / Inversion of Control.
And yes, how you hand those parameters to a class can be done three ways:
1. Tightly coupled, hard coded new'ing of the object everywhere it's needed. - Means finding and replacing if you ever need to change it.
2. Using a factory that scans some co... | null | 0 | 1318954129 | False | 0 | c2sgjit | t3_lf1px | null | t1_c2sgjit | t1_c2sg39y | null | 1427748513 | 1 | t5_2fwo | null | null | null |
True | locster | null | Strings are immutable in both Java and .Net, as such I think it was just a design choice that went in opposite directions. 'tis all. | null | 0 | 1318954168 | False | 0 | c2sgjq5 | t3_lg1xx | null | t1_c2sgjq5 | t1_c2sf0a8 | null | 1427748515 | 1 | t5_2fwo | null | null | null |
True | boyo17 | null | Are you attempting to make a point relevant to the linked article, or was that just a Pavlovian response when you saw the word "Perl"? | null | 0 | 1318954181 | False | 0 | c2sgjso | t3_lg940 | null | t1_c2sgjso | t1_c2sg8o4 | null | 1427748516 | 9 | t5_2fwo | null | null | null |
True | sidfarkus | null | While I disagree with some of your statements the point is correct: finalizers are often VERY hard to get correct and should only be used if you know *exactly* what you are doing.
When I describe C# to C++ people I explicitly tell them not to use a destructor/finalizer at all. The C# finalizer syntax looking like C... | null | 0 | 1318954288 | False | 0 | c2sgkdc | t3_lg1xx | null | t1_c2sgkdc | t1_c2seuiq | null | 1427748524 | 2 | t5_2fwo | null | null | null |
True | ManicQin | null | Better:
http://www.vincehuston.org/dp/ | null | 0 | 1318954288 | False | 0 | c2sgkdj | t3_lg6ms | null | t1_c2sgkdj | t3_lg6ms | null | 1427748524 | 24 | t5_2fwo | null | null | null |
True | drysart | null | > In .net you accomplish this by implementing the IDisposable interface, which the GC looks for.
No. The GC has nothing to do with the IDisposable interface. The GC does *nothing* special when IDisposable is on an object versus when it is not.
The IDisposable interface is used by consumers of a class, to enable ... | null | 0 | 1318954302 | False | 0 | c2sgkgd | t3_lg1xx | null | t1_c2sgkgd | t1_c2sf2o6 | null | 1427748525 | 8 | t5_2fwo | null | null | null |
True | Taladar | null | Shouldn't -B be undefined for unsigned types? | null | 0 | 1318954369 | False | 0 | c2sgkt9 | t3_lg59j | null | t1_c2sgkt9 | t1_c2sgct5 | null | 1427748529 | 1 | t5_2fwo | null | null | null |
True | ixid | null | Is there no safe way of doing that? Being white-space dependent seems very dangerous. | null | 0 | 1318954406 | False | 0 | c2sgl0d | t3_lfm1k | null | t1_c2sgl0d | t1_c2sf77s | null | 1427748533 | 1 | t5_2fwo | null | null | null |
True | Kah-Neth | null | Depends on the compiler. | null | 0 | 1318954424 | False | 0 | c2sgl4a | t3_lg59j | null | t1_c2sgl4a | t1_c2sgbio | null | 1427748533 | 1 | t5_2fwo | null | null | null |
True | Maristic | null | FWIW, here's a halfway decent way to do the discarding you suggested:
/*
* Generate a uniformly distributed random integer between 0
* (inclusive) and a specified maximum value (exclusive). For
* example, randomInt(6) will generate a number between 0 and 5, with
* each value being equally probable.
*
* ... | null | 0 | 1318954437 | True | 0 | c2sgl6p | t3_lfsfk | null | t1_c2sgl6p | t1_c2sdc6n | null | 1428192123 | 3 | t5_2fwo | null | null | null |
True | locster | null | The situation is further complicated by built-in string interning which may or may not collapse all strings with the same content into a single reference depending on various environmental factors. These two factors together could confuse the hell out of a coder transitioning from Java to .Net as you can observe seemin... | null | 0 | 1318954448 | True | 0 | c2sgl9b | t3_lg1xx | null | t1_c2sgl9b | t1_c2sgjq5 | null | 1427748545 | 1 | t5_2fwo | null | null | null |
True | AltAltDarkbane | null | I'd say it's usually some combination of the two :). | null | 0 | 1318954480 | False | 0 | c2sglfj | t3_lg6ms | null | t1_c2sglfj | t1_c2sfr9t | null | 1427748537 | 6 | t5_2fwo | null | null | null |
True | doomchild | null | You're right, and that's an important distinction that I missed. Even so, I think the point stands; the important fact is the passing semantics, not the implementation-specific details of storage. | null | 0 | 1318954511 | False | 0 | c2sglll | t3_lg1xx | null | t1_c2sglll | t1_c2sggqa | null | 1427748550 | 2 | t5_2fwo | null | null | null |
True | drysart | null | Flushing a stream is a different operation than closing a stream.
*Closing* the stream is deterministic resource management. | null | 0 | 1318954523 | False | 0 | c2sglnm | t3_lg1xx | null | t1_c2sglnm | t1_c2sf0mf | null | 1427748545 | 2 | t5_2fwo | null | null | null |
True | calcfreak83 | null | Seems kind of a waste of an arduino. Why use an entire development board to do something that an external programmer can do much faster?
When you become serious about a hobby, or start a business, it makes sense to invest in higher quality tools.
You can use an arduino as a JTAG debugger, but its a hell of a lot slo... | null | 0 | 1318954550 | False | 0 | c2sglsq | t3_lf57z | null | t1_c2sglsq | t1_c2sbvnc | null | 1428192121 | 1 | t5_2fwo | null | null | null |
True | winterkoninkje | null | Perl was the first programming language I really learned. I tried learning C++ a few times but it never made any sense (until college); whereas Perl just worked. So I learned all the basics of modularity, reusability, and software engineering from a language people constantly slag for not being a "real" language and on... | null | 0 | 1318954764 | False | 0 | c2sgmz0 | t3_lde7w | null | t1_c2sgmz0 | t1_c2se8cv | null | 1427748573 | 1 | t5_2fwo | null | null | null |
True | PstScrpt | null | How often do programs like that even have any tests?
And if you want to start writing some, hard to reason about implies hard to test. | null | 0 | 1318954838 | False | 0 | c2sgndr | t3_lehrj | null | t1_c2sgndr | t1_c2s9wrp | null | 1427748575 | 2 | t5_2fwo | null | null | null |
True | jkff | null | Well, I was not saying that the fact that all C programs are executed in the IO monas has any practical applications per se. I was just trying to give some ground to my claim that monads are about sequencing, and that there are more elaborate forms of sequencing than the one found in C. | null | 0 | 1318954889 | False | 0 | c2sgnm9 | t3_lfm1k | null | t1_c2sgnm9 | t1_c2sgidb | null | 1427748585 | 2 | t5_2fwo | null | null | null |
True | i8beef | null | I would agree with that statement in principal, but feel that most modern DI Frameworks side step this issue with autowiring via convention.
The convention is that the default implementation of IThing is always Thing. Only stuff that deviates from this needs to be configured manually. So I don't have to configure
... | null | 0 | 1318954951 | False | 0 | c2sgnyh | t3_lf1px | null | t1_c2sgnyh | t1_c2sg3v3 | null | 1428192120 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318955000 | True | 0 | c2sgo7c | t3_ld12r | null | t1_c2sgo7c | t3_ld12r | null | 1427748589 | 1 | t5_2fwo | null | null | null |
True | ricodued | null | As a long-time C# developer learning C++ in college, I could write up what I know so far.
If I start it as a Google Doc, can other people write in it too? I only know the basics, really, and it'd be cool to have more experienced people contribute.
EDIT: Google Docs doesn't really seem to be able to do what I want it ... | null | 0 | 1318955082 | True | 0 | c2sgomy | t3_lg1xx | null | t1_c2sgomy | t1_c2sfpd7 | null | 1427748594 | 6 | t5_2fwo | null | null | null |
True | kixx | null | Well then, screw intuitive. What matters is that you've got your indentation right, come hell or high water. | null | 0 | 1318955179 | False | 0 | c2sgp52 | t3_lg940 | null | t1_c2sgp52 | t1_c2sgc4o | null | 1427748598 | 2 | t5_2fwo | null | null | null |
True | eaturbrainz | null | You do realize that when the terms MIT-ish and New Jerseyish were coined, the latter was held to be a *bad thing*, and the former to be the Right Way? | null | 0 | 1318955247 | False | 0 | c2sgpjh | t3_lfm1k | null | t1_c2sgpjh | t1_c2sdwo5 | null | 1427748604 | -4 | t5_2fwo | null | null | null |
True | Frem | null | The benefit is that you can join any iterable, not just lists.
See http://stackoverflow.com/questions/493819 | null | 0 | 1318955255 | False | 0 | c2sgpl3 | t3_lg940 | null | t1_c2sgpl3 | t1_c2sgc4o | null | 1427748604 | 9 | t5_2fwo | null | null | null |
True | stonefarfalle | null | [try](http://ocaml.janestreet.com/?q=node/85) Sure it is about Ocaml, but it applies to Haskell as well. It covers at least a few of your common error sources there. Especially the error conditions\corner case type bugs.
| null | 0 | 1318955277 | False | 0 | c2sgppw | t3_lfm1k | null | t1_c2sgppw | t1_c2se7zn | null | 1427748614 | 1 | t5_2fwo | null | null | null |
True | pnpbios | null | I think a 2 column approach could be quite usefull. Column A -> what you would do in C#, Column B, what you would do in C++, a paragraph underneath the two explaining the C++ code in detail. | null | 0 | 1318955381 | False | 0 | c2sgqa6 | t3_lg1xx | null | t1_c2sgqa6 | t1_c2sgomy | null | 1427748618 | 2 | t5_2fwo | null | null | null |
True | julesjacobs | null | How about using a modern non insane language with a module system and classes as objects? This obviates the whole of DI frameworks, since you just pass the class where you need it. No need to create a factory, all classes are factories. `new` is just a method on an object of type `Class`. | null | 0 | 1318955620 | False | 0 | c2sgrjm | t3_lf1px | null | t1_c2sgrjm | t1_c2sfjl7 | null | 1427748640 | 0 | t5_2fwo | null | null | null |
True | [deleted] | null | No problem. I'm a windows LoB dev. A couple of years ago I transitioned from winforms to xaml, and then began investigating MVVM and the techniques that can accompany it.
The framework I've used most often is Prism (+ unity/mef). Prism itself definitely is cumbersome, but I agree that the proper way to approach it ... | null | 0 | 1318955770 | False | 0 | c2sgsdi | t3_lf1px | null | t1_c2sgsdi | t1_c2s8z4j | null | 1427748642 | 2 | t5_2fwo | null | null | null |
True | eaturbrainz | null | Well no. Each of those operators belongs to one type-class. That doesn't mean it really only does one thing; it just means the many things the operator does all have matching type-signatures. | null | 0 | 1318955777 | False | 0 | c2sgses | t3_lfm1k | null | t1_c2sgses | t1_c2sfs6b | null | 1427748644 | 3 | t5_2fwo | null | null | null |
True | curious_redhead | null | same here! | null | 0 | 1318956008 | False | 0 | c2sgto9 | t3_lf038 | null | t1_c2sgto9 | t1_c2s6s39 | null | 1427748662 | 1 | t5_2fwo | null | null | null |
True | paranoidinfidel | null | I would be interested in the link if you could provide it. | null | 0 | 1318956035 | False | 0 | c2sgtt3 | t3_lg1xx | null | t1_c2sgtt3 | t1_c2sf3ja | null | 1427748664 | 3 | t5_2fwo | null | null | null |
True | mtVessel | null | It sounds like you don't quite have it. There's a difference between value vs. references *types* and value vs. reference *parameters*.
[Here's an excellent, concise explanation of both in C#](http://www.yoda.arachsys.com/csharp/parameters.html) for you or anyone else whom it might benefit. | null | 0 | 1318956165 | False | 0 | c2sguiw | t3_lg1xx | null | t1_c2sguiw | t1_c2sglll | null | 1427748672 | 2 | t5_2fwo | null | null | null |
True | haoest | null | why wait, you have complete freedom to find out now. | null | 0 | 1318956179 | False | 0 | c2sgulr | t3_lg6zg | null | t1_c2sgulr | t3_lg6zg | null | 1427748673 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Definitely agree that field/method injection **can be** a "painfully fragile design." I've not generally been comfortable with the approaches I've seen there and have opted in my own solutions to use alternative methods.
Have not seen that book, will check it out, thanks. | null | 0 | 1318956235 | False | 0 | c2sgux1 | t3_lf1px | null | t1_c2sgux1 | t1_c2se7m6 | null | 1427748675 | 2 | t5_2fwo | null | null | null |
True | eaturbrainz | null | In performance terms, yes, but that's true of every language and every compiler in performance terms.
On the other side, the semantic model if C is a pretty thin layer over assembly language. *Provided your compiler preserves the original semantics*, you can rely on its being pretty easy to understand just what's goi... | null | 0 | 1318956321 | False | 0 | c2sgvdu | t3_lfm1k | null | t1_c2sgvdu | t1_c2sekru | null | 1427748681 | 6 | t5_2fwo | null | null | null |
True | julesjacobs | null | Yeah, that is a much better approach than mocking. Some people mock as much as possible. I say that mocking is an evil that should be a last resort when it is absolutely necessary.
Say you have A which depends on B. The mocking programmer would create a BMock, and use that instead of B when testing A. This is complete... | null | 0 | 1318956323 | False | 0 | c2sgvem | t3_lf1px | null | t1_c2sgvem | t1_c2sev9a | null | 1427748680 | 1 | t5_2fwo | null | null | null |
True | sclv | null | http://www.haskell.org/haskellwiki/Performance | null | 0 | 1318956413 | False | 0 | c2sgvy4 | t3_lfm1k | null | t1_c2sgvy4 | t1_c2sfkj9 | null | 1427748686 | 3 | t5_2fwo | null | null | null |
True | sclv | null | http://www.haskell.org/haskellwiki/Performance | null | 0 | 1318956431 | False | 0 | c2sgw20 | t3_lfm1k | null | t1_c2sgw20 | t1_c2scyjm | null | 1427748686 | 2 | t5_2fwo | null | null | null |
True | sclv | null | http://www.haskell.org/haskellwiki/Performance | null | 0 | 1318956436 | False | 0 | c2sgw32 | t3_lfm1k | null | t1_c2sgw32 | t1_c2sdvkq | null | 1427748686 | 2 | t5_2fwo | null | null | null |
True | gms8994 | null | Can you explain how this actually works in a better way than https://www.cs.indiana.edu/~kapadia/project2/node9.html does? | null | 0 | 1318956450 | False | 0 | c2sgw64 | t3_lfsfk | null | t1_c2sgw64 | t1_c2sepa4 | null | 1427748688 | 1 | t5_2fwo | null | null | null |
True | pipocaQuemada | null | > errors in understanding the specification
Admittedly, no language will help you if your boss expected A and you delivered A' instead
> errors in reasoning about the problem
Most of these kinds of problems will shake out as type errors
> math errors
> logic errors
Admittedly, no type system... | null | 0 | 1318956454 | False | 0 | c2sgw70 | t3_lfm1k | null | t1_c2sgw70 | t1_c2se7zn | null | 1427748687 | 3 | t5_2fwo | null | null | null |
True | NruJaC | null | Yea, but you can actually infer something from that type signature. There's no question of what crazy things are occurring behind the scenes. The typeclass makes a guarantee on the semantics of the operator via the type constraint. You just don't have that in C++. | null | 0 | 1318956506 | False | 0 | c2sgwih | t3_lfm1k | null | t1_c2sgwih | t1_c2sgses | null | 1427748691 | 3 | t5_2fwo | null | null | null |
True | eaturbrainz | null | Because Haskell is a culture of PL and compiler hackers. | null | 0 | 1318956563 | False | 0 | c2sgwu4 | t3_lfm1k | null | t1_c2sgwu4 | t1_c2sfnxs | null | 1427748692 | -1 | t5_2fwo | null | null | null |
True | animalchin99 | null | Works best on Chrome and not at all on the other 5-6 HTML5 browsers.
I don't mean that to put down the OP's work, just to show how half-baked HTML5 video support is, and how much more complicated it's becoming to develop multimedia web sites/apps with HTML5 vs Flash. | null | 0 | 1318956591 | False | 0 | c2sgwzq | t3_lg7sg | null | t1_c2sgwzq | t3_lg7sg | null | 1427748695 | 1 | t5_2fwo | null | null | null |
True | asdfaoeu | null | Isn't using the ref keyword an example of pass by reference by reference? (or a double pointer in c/++) | null | 0 | 1318956612 | False | 0 | c2sgx3a | t3_lg1xx | null | t1_c2sgx3a | t1_c2sggqa | null | 1427748695 | 2 | t5_2fwo | null | null | null |
True | irascible | null | by wtf, I meant why the fuck would anyone write an article about signed pointer arithmetic. | null | 0 | 1318956676 | False | 0 | c2sgxgm | t3_lg59j | null | t1_c2sgxgm | t1_c2sf19j | null | 1427748698 | 5 | t5_2fwo | null | null | null |
True | curious_redhead | null | I am currently trying to learn matlab as my first programming language. (Some familiarity with programming because my husband is a programmer, but I need to know matlab for my neuroscience career.)
I'm really good at breaking down problems into their component parts in real life, but when I try to program I get frustr... | null | 0 | 1318956720 | False | 0 | c2sgxpd | t3_lf038 | null | t1_c2sgxpd | t1_c2s7iim | null | 1427748700 | 1 | t5_2fwo | null | null | null |
True | CylonGlitch | null | Pointer of cake... :D | null | 0 | 1318956764 | False | 0 | c2sgxye | t3_lgfp0 | null | t1_c2sgxye | t3_lgfp0 | null | 1427748704 | 4 | t5_2fwo | null | null | null |
True | sclv | null | If you think this article was enlightening, there's an even better random generator for you described here: http://cspangled.blogspot.com/2010/04/real-number-generator.html | null | 0 | 1318956771 | False | 0 | c2sgxzw | t3_lfsfk | null | t1_c2sgxzw | t3_lfsfk | null | 1427748704 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Singly-linked lists are widely used in Lisp because they have useful properties, in that you can add or remove elements to the front as an O(1) operation without mutating any state. This is often all you need to do, and as long as you aren't doing any mutation, you can save a lot of memory by sharing list tails. Lisp i... | null | 0 | 1318956868 | False | 0 | c2sgyjb | t3_lfm1k | null | t1_c2sgyjb | t1_c2sg9op | null | 1427748710 | 5 | t5_2fwo | null | null | null |
True | MarshallBanana | null | Not really. I haven't made any effort to understand the theory part at any point before the "This results in a very fast, hardware-based implementation technique called Feedback Shift Register (FSR) which involves shift, AND, and XOR operations on a small set of k-bit registers", and from there on it is all pretty triv... | null | 0 | 1318956896 | False | 0 | c2sgyp8 | t3_lfsfk | null | t1_c2sgyp8 | t1_c2sgw64 | null | 1427748712 | 1 | t5_2fwo | null | null | null |
True | knome | null | Ah. PHP for math. *shudder* | null | 0 | 1318956945 | False | 0 | c2sgyzw | t3_lg5ri | null | t1_c2sgyzw | t1_c2sfujn | null | 1427748715 | 26 | t5_2fwo | null | null | null |
True | paranoidinfidel | null | > Properties on collections are a code smell.
Properties and methods on a collection allow you to encapsulate the business rules for a collection of items. Those properties/methods can use LINQ under the hood but the collection is reusable and fits nicely with the class hierarchy.
Helper methods are great for ext... | null | 0 | 1318956962 | False | 0 | c2sgz3i | t3_lg1xx | null | t1_c2sgz3i | t1_c2sg6iw | null | 1427748716 | -1 | t5_2fwo | null | null | null |
True | JL235 | null | A lot of negativity over this article in the comments. All I'd say is, if people didn't do this kind of stuff in real programs, then there wouldn't have been a blog post about it. | null | 0 | 1318957002 | False | 0 | c2sgzba | t3_lg59j | null | t1_c2sgzba | t3_lg59j | null | 1427748720 | 8 | t5_2fwo | null | null | null |
True | i8beef | null | I couldn't really help, but I would love to read it. | null | 0 | 1318957028 | False | 0 | c2sgzgj | t3_lg1xx | null | t1_c2sgzgj | t1_c2sgomy | null | 1427748722 | 2 | t5_2fwo | null | null | null |
True | curious_redhead | null | I am currently trying to learn matlab as my first programming language. (I have some familiarity with programming because my husband is a programmer, but I need to know matlab for my neuroscience career.)
I'm really good at breaking down problems into their component parts in real life, but when I try to program I get... | null | 0 | 1318957058 | False | 0 | c2sgzmc | t3_lf038 | null | t1_c2sgzmc | t3_lf038 | null | 1427748734 | 1 | t5_2fwo | null | null | null |
True | quattro | null | I added documentation finally. Well, some barebones docs. I'll be adding tutorials and introduction stuff soon. As well as more algorithms! :) | null | 0 | 1318957062 | False | 0 | c2sgzn7 | t3_km4pr | null | t1_c2sgzn7 | t1_c2lh8n6 | null | 1427748734 | 2 | t5_2fwo | null | null | null |
True | SrGrieves | null | > Indirectly, this confusion also contributed to some software engineering folklore about the role of supposed Fortran code in the guidance systems. This folklore has persisted at least as late as 2006, despite a lack of evidence that Fortran was even in use for real-time guidance computations for the Mariner missio... | null | 0 | 1318957090 | False | 0 | c2sgztm | t3_lgfky | null | t1_c2sgztm | t3_lgfky | null | 1427748727 | 6 | t5_2fwo | null | null | null |
True | i8beef | null | And more readable, at least to me... though I suppose I'm used to Fluent interfaces and method chaining. Never really got the "make it look like SQL, but not SQL" mentality of the "LINQ Syntax", but the METHODS underlying them are awesome. | null | 0 | 1318957103 | False | 0 | c2sgzvu | t3_lg1xx | null | t1_c2sgzvu | t1_c2sf45y | null | 1427748737 | 10 | t5_2fwo | null | null | null |
True | erg | null | My first C program was to send data file to an [arbitrary waveform generator](http://www.directindustry.com/prod/stanford-research-systems/arbitrary-waveform-generators-7218-54629.html). I got some serial communication to work, but it would always error out during the transfer. I had to go ask a resident C expert (50+ ... | null | 0 | 1318957278 | True | 0 | c2sh0vl | t3_lf7o7 | null | t1_c2sh0vl | t3_lf7o7 | null | 1427748749 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318957392 | False | 0 | c2sh1i6 | t3_ld12r | null | t1_c2sh1i6 | t1_c2s615q | null | 1427748766 | 1 | t5_2fwo | null | null | null |
True | pipocaQuemada | null | Haskell makes it difficult to have global mutable state, but simple mutable state isn't that hard.
Essentially, the idea is that a function with mutable state is equivalent to:
foo :: (Bar, BazState) -> (Quux, BazState)
where you then just thread the BazState through your calculations correctly. The Random lib... | null | 0 | 1318957406 | False | 0 | c2sh1l2 | t3_lfm1k | null | t1_c2sh1l2 | t1_c2se7q6 | null | 1427748767 | 2 | t5_2fwo | null | null | null |
True | Flarelocke | null | > So this type system can prevent me from writing an infinite loop, which means it has solved the halting problem?
Yes, they can do this, but only by cheating. They are *conservative*, meaning that they reject programs which would terminate but the system cannot prove that they terminate. Because of this, the ty... | null | 0 | 1318957413 | False | 0 | c2sh1mj | t3_lfm1k | null | t1_c2sh1mj | t1_c2seiqd | null | 1427748767 | 10 | t5_2fwo | null | null | null |
True | Funkliford | null | I'm glad they did though. I think KDevelop 4 was the first time I thought someone beat Visual Studio pretty decisively in this regard, and in an open source Linux IDE no less. | null | 0 | 1318957423 | False | 0 | c2sh1nz | t3_lg1xx | null | t1_c2sh1nz | t1_c2sfzmu | null | 1427748769 | 2 | t5_2fwo | null | null | null |
True | jerkimball | null | Ooooh, I like this one. Good find! | null | 0 | 1318957536 | False | 0 | c2sh2ar | t3_lg6ms | null | t1_c2sh2ar | t1_c2sgkdj | null | 1427748774 | 7 | t5_2fwo | null | null | null |
True | nascent | null | > Polymorphism has nothing to do with how a type is treated, i.e. by reference or by value. In C++, these two design decisions are unrelated.
You wanted your type to be: polymorphic, non-polymorphic base, and a standalone type. This goal is at odds even in C++.
> I think it's better to have 'virtual' being expl... | null | 0 | 1318957605 | False | 0 | c2sh2ow | t3_kljc0 | null | t1_c2sh2ow | t1_c2seqao | null | 1427748790 | 1 | t5_2fwo | null | null | null |
True | haskell_rules | null | I can't wait for this guy's next series of riveting articles, "Why keyboards can't display values" and "Why you shouldn't compile Java source with GCC". | null | 0 | 1318957674 | False | 0 | c2sh31v | t3_lg59j | null | t1_c2sh31v | t3_lg59j | null | 1427748792 | 1 | t5_2fwo | null | null | null |
True | horsepie | null | I interpreted the parent comment as the typical elitist "You're too thick to use C++, stick with C#" message and thought maybe that's what the downvotes were for? | null | 0 | 1318957797 | False | 0 | c2sh3qu | t3_lg1xx | null | t1_c2sh3qu | t1_c2sf3di | null | 1427748801 | 2 | t5_2fwo | null | null | null |
True | josefx | null | You are right about flushing streams, thought closing streams without flushing them seems to be worse since it would leave the resource associated with the stream in an unknown state in non error situations.(explicit flushing before the stream is closed is still the best thing to do)
I am aware that the java finalize... | null | 0 | 1318957804 | False | 0 | c2sh3sd | t3_lg1xx | null | t1_c2sh3sd | t1_c2sf0mf | null | 1427748801 | 0 | t5_2fwo | null | null | null |
True | FlySwat | null | Methods yes...Properties no.
Properties that compute things in the getter in a collection should be a method so that the intent is more clear.
| null | 0 | 1318957872 | False | 0 | c2sh45u | t3_lg1xx | null | t1_c2sh45u | t1_c2sgz3i | null | 1427748816 | 3 | t5_2fwo | null | null | null |
True | codeflo | null | Pointers *are* easy. Even pointer arithmetic has only a few, simple, well-defined rules.
What's confusing here is the behavior of *arrays*. Arrays in C are weird constructs with all kinds of special and arcane rules about when they do and don't decay into proper, easy-to-understand pointers.
| null | 0 | 1318958057 | False | 0 | c2sh57h | t3_lgfp0 | null | t1_c2sh57h | t3_lgfp0 | null | 1427748820 | 144 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318958122 | False | 0 | c2sh5mk | t3_lc090 | null | t1_c2sh5mk | t3_lc090 | null | 1427748824 | 1 | t5_2fwo | null | null | null |
True | LaurieCheers | null | Surely on a 64-bit system, sizeof(int) should be 8? | null | 0 | 1318958237 | False | 0 | c2sh69m | t3_lgfp0 | null | t1_c2sh69m | t3_lgfp0 | null | 1427748831 | 9 | t5_2fwo | null | null | null |
True | FluffyCheese | null | [Head first design patterns](http://www.google.com/products/catalog?q=head+first+design+patterns&oe=utf-8&rls=org.mozilla:en-GB:official&client=firefox-a&um=1&ie=UTF-8&tbm=shop&cid=4263304705204607972&sa=X&ei=L7SdTuWcJJOGhQeWv5mdCQ&ved=0CDsQ8wIwAg)
I owe that book everything I k... | null | 0 | 1318958284 | False | 0 | c2sh6iq | t3_lg6ms | null | t1_c2sh6iq | t1_c2sfm1h | null | 1427748835 | 7 | t5_2fwo | null | null | null |
True | Hyrule34 | null | Thanks for your reply. Up until now I've been trying to learn as much as I could just to get an idea how feasible of a route it is for me to take. I guess I will continue on with it. | null | 0 | 1318958419 | False | 0 | c2sh7b5 | t3_lf038 | null | t1_c2sh7b5 | t1_c2s5xyq | null | 1427748843 | 1 | t5_2fwo | null | null | null |
True | shamen_uk | null | I agree about the API comment, but it is important to consider performance also. Virtual functions do come with an overhead. | null | 0 | 1318958421 | False | 0 | c2sh7bi | t3_lg1xx | null | t1_c2sh7bi | t1_c2sfydv | null | 1427748843 | 3 | t5_2fwo | null | null | null |
True | petermlm | null | I expected this to be little more confusing, but it was interesting. | null | 0 | 1318958445 | False | 0 | c2sh7gd | t3_lgfp0 | null | t1_c2sh7gd | t3_lgfp0 | null | 1427748843 | 3 | t5_2fwo | null | null | null |
True | monocasa | null | It depends on the system. (But yeah, I assumed sizeof(int) was 8 too to begin with) | null | 0 | 1318958455 | False | 0 | c2sh7if | t3_lgfp0 | null | t1_c2sh7if | t1_c2sh69m | null | 1427748843 | 4 | t5_2fwo | null | null | null |
True | otakucode | null | Surely the most frequently asked question would be "Why doesn't C++ do it that way?!"
I don't know if I'm the only one, but at every turn with C# I am pleasantly surprised. The way I would do a thing is the way it was done. Rarely do I run into some overly-complex syntax which is C++'s hallmark. I really liked C++ ... | null | 0 | 1318958456 | False | 0 | c2sh7ij | t3_lg1xx | null | t1_c2sh7ij | t3_lg1xx | null | 1427748843 | 2 | t5_2fwo | null | null | null |
True | matthiasB | null | A c compiler is allowed to represent "unsigned" as 32 bit unsigned type and most compilers actually do just that. | null | 0 | 1318958525 | False | 0 | c2sh7x2 | t3_lg59j | null | t1_c2sh7x2 | t1_c2sgct5 | null | 1427748848 | 2 | t5_2fwo | null | null | null |
True | Flarelocke | null | [here](http://book.realworldhaskell.org/read/profiling-and-optimization.html) | null | 0 | 1318958551 | False | 0 | c2sh83d | t3_lfm1k | null | t1_c2sh83d | t1_c2sfkj9 | null | 1427748850 | 3 | t5_2fwo | null | null | null |
True | qiwi | null | Very few system use the so-called ILP64 model -- where both ints, longs AND pointers are 64-bit. Most use LP64, i.e. ints are still 32 bit. See http://en.wikipedia.org/wiki/64-bit#64-bit_data_models | null | 0 | 1318958575 | False | 0 | c2sh88q | t3_lgfp0 | null | t1_c2sh88q | t1_c2sh69m | null | 1427748859 | 34 | t5_2fwo | null | null | null |
True | Deinumite | null | Yeah I wouldn't say it is an necessity but it catches simple typos pretty well. | null | 0 | 1318958620 | False | 0 | c2sh8ib | t3_lf038 | null | t1_c2sh8ib | t1_c2sdb5l | null | 1427748855 | 1 | t5_2fwo | null | null | null |
True | mitsuhiko | null | Oh well, I got the sizeof int wrong. Should have known that it's 4 not 8. | null | 0 | 1318958849 | False | 0 | c2sh9v1 | t3_lgfp0 | null | t1_c2sh9v1 | t3_lgfp0 | null | 1427748870 | 4 | t5_2fwo | null | null | null |
True | generic_0 | null | While I typically hesitate to recommend c2 wiki these days because of how out of date it can be (and how hard to tell when it's out of date), its antipattern list is formidable and probably more interesting than what wikipedia has to offer.
[http://c2.com/cgi/wiki?AntiPatternsCatalog](http://c2.com/cgi/wiki?AntiPatter... | null | 0 | 1318958880 | True | 0 | c2sha22 | t3_lg6ms | null | t1_c2sha22 | t1_c2sfcze | null | 1427748878 | 8 | t5_2fwo | null | null | null |
True | shamen_uk | null | With your example, I don't quite get how your base class method would throw an exception if the developer forgot to call the base class version. Or maybe I misunderstood.
I definitely go with the it's the overriding developer's responsibility. I generally shove plenty of asserts and invariants all over the place so su... | null | 0 | 1318958901 | False | 0 | c2sha6h | t3_lg1xx | null | t1_c2sha6h | t1_c2sfa46 | null | 1427748873 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1318959023 | False | 0 | c2shatw | t3_lchhd | null | t1_c2shatw | t1_c2rtl0h | null | 1427748881 | 1 | t5_2fwo | null | null | null |
True | turpent1ne | null | Thankfully, you can define _CRT_SECURE_NO_WARNINGS. | null | 0 | 1318959036 | False | 0 | c2shaxw | t3_lchhd | null | t1_c2shaxw | t1_c2rtl0h | null | 1427748884 | 1 | t5_2fwo | null | null | null |
True | doomchild | null | No, I got it, I just impertinently glossed over a detail in my quest to vent mild frustration. Passing a reference type to a function involves the reference itself being passed by value, which means that while any changes made to the reference itself don't persist outside the function in question, changes to the refer... | null | 0 | 1318959095 | False | 0 | c2shbbw | t3_lg1xx | null | t1_c2shbbw | t1_c2sguiw | null | 1427748890 | 2 | t5_2fwo | null | null | null |
True | ErstwhileRockstar | null | Don't you see all the unnecessary dependencies you create?
E.g.
> Module DateCalc does date calculations, and needs a holiday loader module.
DI injects (= creates) *dependencies*. That's the problem, not the solution. Modular design separates concerns and thereby minimizes dependencies. | null | 0 | 1318959099 | False | 0 | c2shbcf | t3_lf1px | null | t1_c2shbcf | t1_c2sasya | null | 1427748890 | 3 | t5_2fwo | null | null | null |
True | mb86 | null | No problem! I posted it right here on Reddit.
http://www.reddit.com/r/simpleios/comments/kquii/objectivec_syntax_for_c_users/
Enjoy! | null | 0 | 1318959141 | False | 0 | c2shblp | t3_lg1xx | null | t1_c2shblp | t1_c2sgtt3 | null | 1428192108 | 4 | t5_2fwo | null | null | null |
True | KrzaQ2 | null | sizeof(int) should have been given in the example. | null | 0 | 1318959276 | False | 0 | c2shcd2 | t3_lgfp0 | null | t1_c2shcd2 | t3_lgfp0 | null | 1427748915 | 99 | t5_2fwo | null | null | null |
True | eaturbrainz | null | Yes, there is a question. The List monad and the IO monad do two *very* different things. | null | 0 | 1318959477 | False | 0 | c2shdkd | t3_lfm1k | null | t1_c2shdkd | t1_c2sgwih | null | 1427748933 | 2 | t5_2fwo | null | null | null |
True | ErstwhileRockstar | null | > This is easily achieved by passing interfaces instead of concrete classes, and more many years this was usually achieved through Factory patterns.
This is your (and all the DI aficionado's) misconception. You think you need the dependencies (created/injected by DI or "Factory patterns"). Good design avoids depen... | null | 0 | 1318959517 | False | 0 | c2shdsj | t3_lf1px | null | t1_c2shdsj | t1_c2sdftu | null | 1427748928 | 1 | t5_2fwo | null | null | null |
True | djork | null | > I can write efficient and correct programs just as fast or faster in other languages, and they end up less fancy
This is what us dynamic language guys have been saying forever. It just takes you type system guys a trip deep into Category Theory Land and back to figure it out! | null | 0 | 1318959543 | False | 0 | c2shdxl | t3_lfm1k | null | t1_c2shdxl | t1_c2scu0d | null | 1427748933 | 2 | t5_2fwo | null | null | null |
True | kakaroto_BR | null | Monad Transformers are hard to understand but I barely understand monads too. | null | 0 | 1318959558 | False | 0 | c2she0t | t3_lfm1k | null | t1_c2she0t | t3_lfm1k | null | 1427748932 | 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.