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 | mao_neko | null | I like Qt's `Q_OBJECT` / `moc` / `Q_PROPERTY` approach too. Get all the reflection you might need, but only on the classes where it actually matters. | null | 0 | 1317024988 | False | 0 | c2mn0ru | t3_kqtat | null | t1_c2mn0ru | t1_c2mjuzi | null | 1427647960 | 1 | t5_2fwo | null | null | null |
True | xcbsmith | null | That kind of depends on the language. | null | 0 | 1317025065 | False | 0 | c2mn0xr | t3_krklz | null | t1_c2mn0xr | t1_c2mmx6n | null | 1427647952 | 5 | t5_2fwo | null | null | null |
True | hylje | null | I can receive credit on Stanford courses while attending Helsinki. | null | 0 | 1317025499 | False | 0 | c2mn1tl | t3_kqucu | null | t1_c2mn1tl | t1_c2mkrv5 | null | 1427647967 | 1 | t5_2fwo | null | null | null |
True | tobycatlin | null | Yeah sure i am jealous of every fuckwit that has made billions by being in the right place at the right time. | null | 0 | 1317025765 | False | 0 | c2mn2bz | t3_kp0u2 | null | t1_c2mn2bz | t1_c2m3oh7 | null | 1427647972 | 0 | t5_2fwo | null | null | null |
True | creporiton | null | yeah but you can't participate in the course. question/answers, assignments, tests | null | 0 | 1317025777 | False | 0 | c2mn2cx | t3_kqucu | null | t1_c2mn2cx | t1_c2mjyc7 | null | 1427647972 | 1 | t5_2fwo | null | null | null |
True | mariuz | null | This is the type of class to avoid contains all the buzzwords xml , nosql ...
I would trust a course that contains only the relational model and use one open source implementation (no is not mysql) | null | 0 | 1317026114 | False | 0 | c2mn2zq | t3_kqucu | null | t1_c2mn2zq | t3_kqucu | null | 1427647986 | 0 | t5_2fwo | null | null | null |
True | dan00 | null | Hm, I just tried it with vim 7.3 and clang 2.8 (ubuntu 10.10),
added the include paths to '.clang_complete' and only got
a 'Pattern not found' all the time. | null | 0 | 1317026206 | False | 0 | c2mn359 | t3_kr2x5 | null | t1_c2mn359 | t1_c2mmrnf | null | 1427647991 | 1 | t5_2fwo | null | null | null |
True | tobycatlin | null | A great documentary called "Rise of the Geeks" tells the stories of how Microsoft, Apple and other big computer firms got started and became what they are. Gates simply saw a opportunity for a cheap OS and bought one. The genius behind Microsoft was to market a substandard product to the masses and keep it just good enough | null | 0 | 1317026275 | False | 0 | c2mn39q | t3_kp0u2 | null | t1_c2mn39q | t1_c2m2qfg | null | 1427647991 | 1 | t5_2fwo | null | null | null |
True | eric_t | null | Has anyone been able to get the examples working on a Mac? | null | 0 | 1317026371 | False | 0 | c2mn3g1 | t3_kqqd5 | null | t1_c2mn3g1 | t1_c2mhahm | null | 1427647992 | 1 | t5_2fwo | null | null | null |
True | Teekoo | null | >Yeah sure i am jealous of every **fuckwit** that has made billions by being in the right place at the right time.
| null | 0 | 1317026502 | False | 0 | c2mn3pb | t3_kp0u2 | null | t1_c2mn3pb | t1_c2mn2bz | null | 1427647995 | 1 | t5_2fwo | null | null | null |
True | tobycatlin | null | What's your **point**? | null | 0 | 1317026703 | False | 0 | c2mn42w | t3_kp0u2 | null | t1_c2mn42w | t1_c2mn3pb | null | 1427647999 | 0 | t5_2fwo | null | null | null |
True | Jookia | null | Not programming. | null | 0 | 1317026919 | False | 0 | c2mn4gz | t3_krmpy | null | t1_c2mn4gz | t3_krmpy | null | 1427648001 | 4 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1317026928 | False | 0 | c2mn4hl | t3_krklz | null | t1_c2mn4hl | t1_c2mn0xr | null | 1427648001 | 1 | t5_2fwo | null | null | null |
True | Peaker | null | That's the 1-2% I was talking about.
Overall, performance remained roughly the same (slightly improved) and particular examples (globals/builtins access) were far faster. | null | 0 | 1317027013 | False | 0 | c2mn4n8 | t3_kos4z | null | t1_c2mn4n8 | t1_c2mhrsn | null | 1427648003 | 1 | t5_2fwo | null | null | null |
True | QuestionMarker | null | > modularity
I do not think this word means what you think it means. Modular code will inevitably be *larger* than the same code written monolithically, if only because module definition and use requires explicit lines of code. | null | 0 | 1317027063 | False | 0 | c2mn4qq | t3_krklz | null | t1_c2mn4qq | t1_c2mmg5e | null | 1427648004 | 11 | t5_2fwo | null | null | null |
True | fjonk | null | The downvotes has more to do with the stupidity. In a thread about how you do something in a piece of software that kind of reply is stupid and pointless. Trolling? Who cares, I can't be bothered to find out if someone is trolling or not, I'm not 12. | null | 0 | 1317027700 | False | 0 | c2mn5wc | t3_kravz | null | t1_c2mn5wc | t1_c2mn0me | null | 1427648020 | 6 | t5_2fwo | null | null | null |
True | ascii | null | If that's what you took from the article, then you're missing the point the author was trying to make. If you account for code size, then traditional code quality metrics like interface depth, class coupling and number of methods per class have no impact on the actual number of bugs.
So two projects, both 500 000 lines long, where one is a few dozens of files with plain old classes communicating directly with each other and the other is divided into a thousand classes with massive inheritance trees and where all communication between classes happens through an extremely enterprisey object broker will have roughly the same number of bugs.
And that is a very interesting result, given that there are huge numbers of firms that evaluate code quality on these metrics. | null | 0 | 1317027734 | False | 0 | c2mn5yr | t3_krklz | null | t1_c2mn5yr | t1_c2mmk64 | null | 1427648017 | 5 | t5_2fwo | null | null | null |
True | [deleted] | null | maybe it's supposed to be a metaphor for TDD.. | null | 0 | 1317027906 | False | 0 | c2mn68n | t3_krmpy | null | t1_c2mn68n | t1_c2mn4gz | null | 1427648019 | 0 | t5_2fwo | null | null | null |
True | D_duck | null | What font is this? it hurts the eyes | null | 0 | 1317028891 | False | 0 | c2mn7w5 | t3_krklz | null | t1_c2mn7w5 | t3_krklz | null | 1427648045 | 8 | t5_2fwo | null | null | null |
True | davemcuk | null | This is completely and utterly illogical, and reeks of strawman concluding.
A better conclusion is: Using more than the required number of lines of code to solve a problem is waste, and waste leads to problems.
or
The number of individual problems to be solved dictate the size of the code produced. | null | 0 | 1317029198 | False | 0 | c2mn8d4 | t3_krklz | null | t1_c2mn8d4 | t3_krklz | null | 1427648052 | 4 | t5_2fwo | null | null | null |
True | sulumits-retsambew | null | In related news "Programs of size 0 have 0 bugs". | null | 0 | 1317029417 | False | 0 | c2mn8o1 | t3_krklz | null | t1_c2mn8o1 | t3_krklz | null | 1427648062 | 33 | t5_2fwo | null | null | null |
True | ninjeff | null | Really? *Really?*
> Trying to open a file and finding it not there is hardly an exceptional circumstance, for instance.
[File.Exists](http://msdn.microsoft.com/en-us/library/system.io.file.exists.aspx)
> Similarly, trying to convert a text string to a number – that frequently fails, particularly in my line of work.
[int.TryParse](http://msdn.microsoft.com/en-us/library/f02979c7.aspx) | null | 0 | 1317029536 | False | 0 | c2mn8v8 | t3_krodl | null | t1_c2mn8v8 | t3_krodl | null | 1427648056 | 14 | t5_2fwo | null | null | null |
True | LenHolgate | null | The comments about the API issues are valid though... | null | 0 | 1317029657 | False | 0 | c2mn91y | t3_krodl | null | t1_c2mn91y | t3_krodl | null | 1427648067 | 7 | t5_2fwo | null | null | null |
True | elperroborrachotoo | null | Interestingly, OO metrics are supposed to control for exactly the variations you describe, to provide a comparable prediction for, among others, maintenance cost and fault rates.
The study is not about the benefits of counting lines. It casts doubt on the benefits of *other* measures.
-----
It simply says this:
**After you control for code size, typical OO metrics do not correlate with fault rate.**
**A careful interpretation** could be that *code structure does not affect error rate* significantly. Maybe we all have learnt to structure code the way we make less mistakes - even though that might differ from person to person. Maybe code structure doesn't matter at all.
**A slightly bolder interpretation** would be: *language choice matters*. A language that allows simple expression of the problem may decrease fault rate.
**A warranted conclusion** is that we need to reevaluate the known correlations between OO metrics and fault rate.
**A possible policy** to derive would be to spend more resources testing large modules. Most of the code size fluctuations are orders of magnitude less if you don't compare across different code bases.
| null | 0 | 1317030313 | False | 0 | c2mna5f | t3_krklz | null | t1_c2mna5f | t1_c2mmtvy | null | 1427648072 | 43 | t5_2fwo | null | null | null |
True | matthiasB | null | Cardo | null | 0 | 1317030401 | False | 0 | c2mnab3 | t3_krklz | null | t1_c2mnab3 | t1_c2mn7w5 | null | 1427648074 | 1 | t5_2fwo | null | null | null |
True | elperroborrachotoo | null | *sigh* Michelle Bachman is looking for a science advisor, I heard. | null | 0 | 1317030404 | False | 0 | c2mnabb | t3_krklz | null | t1_c2mnabb | t1_c2mmk64 | null | 1427648074 | 0 | t5_2fwo | null | null | null |
True | littlemetal | null | So a guy wants to write a math heavy sound file analyzer. This means passing a lot of data between managed and unmanaged, if he is using C libraries (which it sounds like, why else would he need to). This is not the easiest thing to do. Why is he surprised... no one wrote the library he wants in c# yet? Is that all this is about? I can't honestly believe this guy is an MVP.
Only thing I can say is right is the int.Parse() throwing an exception. It *should* throw one, but there really should have been a better, native, way to test the conversion a long time ago. TryParse is ok, but came late. Seriously, it's still just a few line wrapper function.
Nothing to see here... managed/unmanaged can be hard. Whine. | null | 0 | 1317030652 | False | 0 | c2mnao0 | t3_krodl | null | t1_c2mnao0 | t3_krodl | null | 1428192742 | 6 | t5_2fwo | null | null | null |
True | howfun | null | As opposed to soap. | null | 0 | 1317031077 | False | 0 | c2mnbb3 | t3_kpk8d | null | t1_c2mnbb3 | t1_c2m8us8 | null | 1427648088 | 1 | t5_2fwo | null | null | null |
True | rawlyn | null | I hate the way he claims that .NET can't handle audio files, then goes on to explain that his real gripe is that he can't find an FFT library, which isn't audio-specific. | null | 0 | 1317031208 | False | 0 | c2mnbhy | t3_krodl | null | t1_c2mnbhy | t3_krodl | null | 1427648091 | 4 | t5_2fwo | null | null | null |
True | sztomi | null | The most ridiculous is `\si` which maps to `if` wtf? (don't get me wrong, I do have mappings and abbreviations in my .vimrc, but mapping to something that is longer than what you want to type is retarded).
Also, I prefer snipmate for this. | null | 0 | 1317031249 | False | 0 | c2mnbkf | t3_kr2x5 | null | t1_c2mnbkf | t1_c2mj2vt | null | 1427648092 | 1 | t5_2fwo | null | null | null |
True | mycatverbs | null | We have one. It's called "anonymous Diffie-Hellman." It's in SSL, you can turn it on with mod_ssl and Apache, and it's turned off by default specifically because it's trivially vulnerable to MITM. | null | 0 | 1317031357 | False | 0 | c2mnbpy | t3_kp1b5 | null | t1_c2mnbpy | t1_c2mkcvl | null | 1427648092 | 2 | t5_2fwo | null | null | null |
True | rawlyn | null | *But there's a chart!* | null | 0 | 1317031442 | False | 0 | c2mnbur | t3_krmpy | null | t1_c2mnbur | t1_c2mn4gz | null | 1427648094 | 2 | t5_2fwo | null | null | null |
True | Poddster | null | >How did you know if rawlex had any previous experience under his belt before trying to write his "graphics engine"?
Because he doesn't know anything on that page?
>I am not sure what you're going on about. A graphics engine is simply what you use to render graphics to the screen within your application.
Yes, it is. But when people make a "graphics engine" as opposed to "a game" they're making a more general purpose library that can be used by any game/app. How an you write a library if you have no knowledge of what is required from the API?
reddit can downvote me all it wants, but all it's doing is encouraging people to write APIs blind. | null | 0 | 1317031486 | False | 0 | c2mnbwz | t3_kqqd5 | null | t1_c2mnbwz | t1_c2mkv7e | null | 1427648095 | 0 | t5_2fwo | null | null | null |
True | johnnieinlab | null | Very simple and straightforward tool to make wireframes.
It has a variety of stencils, working links between sketches, a nice templating scheme and even html export.
| null | 0 | 1317032191 | False | 0 | c2mncwr | t3_krp4h | null | t1_c2mncwr | t3_krp4h | null | 1427648108 | 1 | t5_2fwo | null | null | null |
True | tamrix | null | For me there's nothing that compares with Spring for dependancy injection. Aspect orientated programming sucks in C#. | null | 0 | 1317032209 | False | 0 | c2mncxr | t3_krodl | null | t1_c2mncxr | t3_krodl | null | 1427648108 | 2 | t5_2fwo | null | null | null |
True | jabatti | null | I'm drawing essentially all my knowledge from the papers published in the Netflix competition. The [paper describing the winning algorithm](http://www.commendo.at/UserFiles/commendo/File/GrandPrize2009_BigChaos.pdf) (or a combination of them) describes nicely how the different algorithm families compare to each other. It isn't a very gentle introduction to the algorithms, though, so you may want to find other resources for figuring them out.
My understanding about the kNN is that it works best when combined with some other algorithm. The input data in the Netflix competition is very sparse (~0.1% density) and there's a large amount of users (~500k), which makes running the kNN on it directly both slow and rather fickle. Running it on the features gotten from an SVD model apparently does a much better job, and can probably be much faster too.
| null | 0 | 1317032535 | False | 0 | c2mndfe | t3_knoub | null | t1_c2mndfe | t1_c2lz1q7 | null | 1427648117 | 2 | t5_2fwo | null | null | null |
True | Kevin_Raven | null | Sure they do - I can't get them to run | null | 0 | 1317032640 | False | 0 | c2mndka | t3_krklz | null | t1_c2mndka | t1_c2mn8o1 | null | 1427648119 | 9 | t5_2fwo | null | null | null |
True | codingcanary | null | Maybe just me, but this doesn't look like it contains 'quite complicated issues' at all. I would also put no trust in the experience of a programmer who thinks XOR is 'encryption. Not your blog by any chance is it? | null | 0 | 1317032794 | False | 0 | c2mndsw | t3_krkg3 | null | t1_c2mndsw | t3_krkg3 | null | 1427648121 | 1 | t5_2fwo | null | null | null |
True | mikaelhg | null | This is stupid.... this is /r/programming! | null | 0 | 1317032941 | False | 0 | c2mne01 | t3_krklz | null | t1_c2mne01 | t1_c2mn8d4 | null | 1427648122 | -3 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1317032958 | False | 0 | c2mne0v | t3_krklz | null | t1_c2mne0v | t1_c2mmuef | null | 1427648122 | 2 | t5_2fwo | null | null | null |
True | _Fil_is_TylerDurden_ | null | Ok, for just one minute, let me have just have a liiiiitle bit of hope. | null | 0 | 1317033433 | False | 0 | c2mnepl | t3_krpio | null | t1_c2mnepl | t3_krpio | null | 1427648131 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | I'm a developer - I prefer gleaming white on black, or luminous matrix green on black. I like to have the text etched into my retinas so I can read it later when I'm trying to sleep. | null | 0 | 1317034289 | False | 0 | c2mng1u | t3_krklz | null | t1_c2mng1u | t1_c2mmjzv | null | 1427648149 | 8 | t5_2fwo | null | null | null |
True | destraht | null | My metric is just how favourably does god smile upon the code. | null | 0 | 1317034312 | False | 0 | c2mng2n | t3_krklz | null | t1_c2mng2n | t3_krklz | null | 1427648151 | 2 | t5_2fwo | null | null | null |
True | bulldada | null | I've written several evented IO servers in PHP, it's really not that bad, no worse than writing an evented server in C. It also outperformed every other language I tested on a simple 'hello world' socket server benchmark with high concurrency. | null | 0 | 1317034501 | False | 0 | c2mngcm | t3_kq27q | null | t1_c2mngcm | t1_c2mi9t4 | null | 1427648153 | 1 | t5_2fwo | null | null | null |
True | akoprowski | null | Yup, we will certainly want to (and will) produce XHTML5, however I'm not sure the time is ripe for that, what with the specifications still being in the works... | null | 0 | 1317034691 | False | 0 | c2mngno | t3_kn8ra | null | t1_c2mngno | t1_c2lvyxb | null | 1427648159 | 1 | t5_2fwo | null | null | null |
True | elperroborrachotoo | null | Yes, but testability is only one stake in the design. | null | 0 | 1317034693 | False | 0 | c2mngnu | t3_kq001 | null | t1_c2mngnu | t1_c2ma4kl | null | 1427648159 | 0 | t5_2fwo | null | null | null |
True | IRBMe | null | Lines of code don't always correlate with amount of code, nor does amount of code always correlate with the complexity of the code, and I would say it's more likely that the complexity of the code correlates with the number of bugs better than number of lines or amount of code.
For example:
if (foo)
{
bar();
}
else
{
baz();
}
Compared to:
if (foo) bar(); else baz();
The second version has 1/8th the number of lines as the first version, but is it more complex? No. Is the first version 8 times more likely to contain bugs? No. Is it more likely to contain bugs *at all*? No. If anything, it's slightly more maintainable. | null | 0 | 1317034827 | False | 0 | c2mngvy | t3_krklz | null | t1_c2mngvy | t1_c2mmxgo | null | 1427648167 | 2 | t5_2fwo | null | null | null |
True | foonix | null | A database can act as its own abstraction layer using views, triggers, and stored procedures. For example, a view can act as an abstract interface to two or more logically related tables. An app doesn't have to know exactly what a stored procedure does, and a doesn't even have to know a trigger exists. | null | 0 | 1317034848 | False | 0 | c2mngx3 | t3_kqucu | null | t1_c2mngx3 | t1_c2mlcg2 | null | 1427648167 | 5 | t5_2fwo | null | null | null |
True | BobTheSCV | null | It makes sense as a visitor pattern. Because eating is breaking down something into constituent nutrients. This requires detailed implementation knowledge. It should look something like:
*Food*:
acceptConsumer(consumer); // what the book calls "eat"
~~~~
*Consumer*:
eat(Food) { food->acceptConsumer(this); }
eatNutrient(Nutrient, int quantity);
eatCalories(int kcal);
etc.
~~~~
*Apple* : public *Food*:
acceptConsumer(consumer) {
consumer.eatNutrient(VitaminC, 0.7);
consumer.eatCalories(150);
}
| null | 0 | 1317034848 | True | 0 | c2mngx4 | t3_kr0ir | null | t1_c2mngx4 | t1_c2mmq9q | null | 1428192736 | 1 | t5_2fwo | null | null | null |
True | heptadecagram | null | [smr begs to differ](http://www.ioccc.org/years.html#1994_smr). | null | 0 | 1317034875 | False | 0 | c2mngyl | t3_krklz | null | t1_c2mngyl | t1_c2mndka | null | 1428192737 | 13 | t5_2fwo | null | null | null |
True | akoprowski | null | You may want to take a look at the newer entry on the subject, describing the changes we made following community complains: http://blog.opalang.org/2011/09/opa-license-strikes-again.html.
TL;DR: Now it's free, except for BIG companies. | null | 0 | 1317034913 | False | 0 | c2mnh08 | t3_kn8ra | null | t1_c2mnh08 | t1_c2lscys | null | 1428192737 | 0 | t5_2fwo | null | null | null |
True | akoprowski | null | Yes, I do. I'm not trying to hide it. It's just a bit impractical to include such a disclaimer in every comment I post. | null | 0 | 1317034957 | False | 0 | c2mnh29 | t3_kn8ra | null | t1_c2mnh29 | t1_c2ls2xq | null | 1428192738 | 1 | t5_2fwo | null | null | null |
True | ezekiel | null | And, a 100,000 line program with 10,000+ classes barely runs at all. The only thing worse than gigantic classes and methods are classes with one-line methods, all affecting a pile of class-global variables. This identifies the real bug-inducing factor: sloppy manipulation of state. | null | 0 | 1317034974 | False | 0 | c2mnh39 | t3_krklz | null | t1_c2mnh39 | t1_c2mmuef | null | 1427648173 | 2 | t5_2fwo | null | null | null |
True | rib-bit | null | TIL :) | null | 0 | 1317035031 | False | 0 | c2mnh66 | t3_krklz | null | t1_c2mnh66 | t1_c2mngyl | null | 1427648179 | 2 | t5_2fwo | null | null | null |
True | JL235 | null | I think that would only take up a small percentage of the total code base. The majority of the code would still end up being the implementation of those classes.
I think the reason why they would be less buggy is because each class is doing less work. If you split code up into smaller tasks, each individual task becomes easier to write and debug, because it is easier to reason about them.
It also makes it much easier to leverage code re-use, allowing bugs to be found earlier (since that section of code will be hit more often).
Code re-use should actually allow a with the same number of lines, but with more classes, do more work. | null | 0 | 1317035345 | False | 0 | c2mnho0 | t3_krklz | null | t1_c2mnho0 | t1_c2mmx6n | null | 1427648185 | 1 | t5_2fwo | null | null | null |
True | TWith2Sugars | null | I had to build a maze generator / solver in Mozart back in uni, I enjoyed playing with the language. Forgot about it until this post. | null | 0 | 1317035426 | False | 0 | c2mnhsb | t3_kpwjl | null | t1_c2mnhsb | t1_c2m9rl4 | null | 1427648181 | 1 | t5_2fwo | null | null | null |
True | deadowl | null | Not off the top of my head. It's basic encapsulation if you really think about it though. Rather than have a class/function handle its queries, have a class/function for each query and reuse the query classes/functions. That way you just need to swap out the code in the query classes rather than attack a mindf*ck of functional dependencies anywhere and everywhere (I've seen it too many times). Foonix's mention of views, triggers, etc are good examples of encapsulation within the database layer itself, but maintaining encapsulation in your other code layers is good practice. | null | 0 | 1317035511 | False | 0 | c2mnhx3 | t3_kqucu | null | t1_c2mnhx3 | t1_c2mlcg2 | null | 1427648183 | 3 | t5_2fwo | null | null | null |
True | JL235 | null | Like most programmers, the way I normally try to avoid bugs is through code re-use. That is to have tasks performed once, rather then in multiple places, so the application tends to end up flowing through the same code paths multiple times.
That way if there is a bug in a class or a module, then the bug is likely to be hit more often and from more places, and so become easier to spot and fix. It gives my modules/classes more battle-testing during development.
In a sense, it is about having as few 'code paths' as possible, or to overlap them as much as possible. I'd be interested in seeing a study that attempted to analyze how many ways data can flow through your program, branch into other sections, or how many tasks are performed using separate code; all in relation to the number of bugs in the project. | null | 0 | 1317036021 | False | 0 | c2mnirq | t3_krklz | null | t1_c2mnirq | t3_krklz | null | 1427648192 | 9 | t5_2fwo | null | null | null |
True | taw | null | I'd guess this coding style:
if (foo)
{
bar();
}
else
{
baz();
}
to lead to more bugs than this coding style:
if (foo) {
bar();
} else {
baz();
}
simply because in the first case programmer can see less code on screen.
It's probably not a big difference, but these differences add up.
There's definitely a point where further conciseness just makes matters worse, but current programming practice is to err on side of verbosity much more often than on side of conciseness, so moving towards more concise styles from what people do now would mostly be pure benefit. | null | 0 | 1317036070 | False | 0 | c2mniug | t3_krklz | null | t1_c2mniug | t1_c2mngvy | null | 1427648192 | 2 | t5_2fwo | null | null | null |
True | alexeyr | null | > A language that allows simple expression of the problem may decrease fault rate.
However, did the study compare code in different languages? | null | 0 | 1317036095 | False | 0 | c2mniw7 | t3_krklz | null | t1_c2mniw7 | t1_c2mna5f | null | 1427648193 | 4 | t5_2fwo | null | null | null |
True | rampion | null | What language are you using? | null | 0 | 1317036160 | False | 0 | c2mnj06 | t3_krklz | null | t1_c2mnj06 | t1_c2mn4qq | null | 1427648195 | -3 | t5_2fwo | null | null | null |
True | troyanonymous1 | null | "Don't Repeat Yourself" | null | 0 | 1317036177 | False | 0 | c2mnj18 | t3_krklz | null | t1_c2mnj18 | t1_c2mnirq | null | 1427648195 | 11 | t5_2fwo | null | null | null |
True | name_was_taken | null | I love the idea that someone thinks there are low-resolution mandelbrot programs. The whole idea behind fractals is that they have infinite resolution. | null | 0 | 1317036327 | False | 0 | c2mnja9 | t3_krpem | null | t1_c2mnja9 | t3_krpem | null | 1427648196 | 9 | t5_2fwo | null | null | null |
True | IRBMe | null | > I'd guess this coding style ... to lead to more bugs than this coding style ... simply because in the first case programmer can see less code on screen.
Firstly, what kind of programmer is using such a small screen that using a different brace style or a bit more whitespace leads to significant problems? We're no longer working in terminals that are limited to displaying 25 lines of code, and if you are, then I would say that your equipment is the problem, not your coding style. Even when working on a terminal, I can easily see more than 50 lines of code.
Secondly, I'm not sure of your reasoning for why not being able to see more code on the screen will necessarily result in more bugs. Why would that be? What kinds of bugs would I make that I would *not* if I was able to see about 10 more lines of code on the screen?
Thirdly, if an entire method can't fit on a reasonable sized screen, it's probably too large and that is an argument for refactoring it, not cramming the code together so that it fits. That would be missing the point entirely.
Finally, I'm not arguing for one brace style over another, or for conciseness of code, so you seem to have missed the point entirely. The point was that lines of code do not necessarily correlate with the amount of code. One can fit lots of code on a single line or can break it up over multiple lines without affecting the complexity of the code. Additionally, the amount of code there is also does not necessarily correlate with complexity, and it is far more often code *complexity* which leads to bugs. | null | 0 | 1317036406 | True | 0 | c2mnjfd | t3_krklz | null | t1_c2mnjfd | t1_c2mniug | null | 1427648197 | 3 | t5_2fwo | null | null | null |
True | kraln | null | Guilty, actually :-) | null | 0 | 1317036759 | False | 0 | c2mnk2h | t3_kr2x5 | null | t1_c2mnk2h | t1_c2mjtyq | null | 1427648202 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | That may be the case. Netbeans still sucks as an IDE. Sorry to say it, but it just does. | null | 0 | 1317036993 | False | 0 | c2mnkh2 | t3_kq0ms | null | t1_c2mnkh2 | t1_c2mbcp2 | null | 1427648206 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Herp code size increase -> more bugs derp
Isn't this kind of a "well duh" article? | null | 0 | 1317037040 | False | 0 | c2mnkjl | t3_krklz | null | t1_c2mnkjl | t3_krklz | null | 1427648206 | 0 | t5_2fwo | null | null | null |
True | axilmar | null | > Right but your problem came from not using a reference type in the beginning not, "the struct vs class dichotomy requires upfront knowledge of how a type will be used." And so is not an example of such an issue.
But I didn't need a reference type in the beginning. That's exactly the problem.
> I disagree with this. But you are also leaving out the polymorphic switch. And best I can tell your example isn't about value vs polymorphic, but value vs. reference and for that you do have struct.
Yes, my example wasn't about polymorphism, but that's irrelevant to this discussion. In C++, I can make structs/classes polymorphic, if I choose to. It is entirely up to me.
> Structs have a reference semantic through pointers and ref-counting.
which is silly, because class references ARE pointers, although they are not ref-counted.
What if I want to use ref-counting with classes?
What if I want my structs to be garbage collected?
You see, there is no real difference between structs and classes. They are both records. D artificially separates them, which is a problem.
| null | 0 | 1317037155 | False | 0 | c2mnkqn | t3_kljc0 | null | t1_c2mnkqn | t1_c2m1g5e | null | 1427648210 | 1 | t5_2fwo | null | null | null |
True | kraln | null | I don't know why it is that you think I'm not in the real world. Code completion and stuff is part of the downfall, how that code got to be that way, because you can still edit and update stuff even if it doesn't make sense just based on what your IDE tells you.
It took me about three months to get the hang of how the whole system works, and now I can add to it without breaking anything. If I don't remember where something is supposed to be, I go trace through the execution and find it. Novel concept, I suppose.
Oh, and by the way?
SLOCCOUNT:
Totals grouped by language (dominant language first):
ansic: 9261184 (94.55%)
asm: 252361 (2.58%)
sh: 123484 (1.26%)
perl: 50517 (0.52%)
| null | 0 | 1317037156 | False | 0 | c2mnkqo | t3_kr2x5 | null | t1_c2mnkqo | t1_c2mk6kx | null | 1427648210 | 2 | t5_2fwo | null | null | null |
True | want_to_want | null | Define "very simple" How many lines of code (configuration included) for "hello world"? | null | 0 | 1317037203 | False | 0 | c2mnkto | t3_kn8ra | null | t1_c2mnkto | t1_c2ltf0x | null | 1427648211 | 1 | t5_2fwo | null | null | null |
True | JL235 | null | My point is though, could that be measured? | null | 0 | 1317037636 | False | 0 | c2mnlo1 | t3_krklz | null | t1_c2mnlo1 | t1_c2mnj18 | null | 1427648223 | 2 | t5_2fwo | null | null | null |
True | iaH6eeBu | null | Another reason for code-golfing | null | 0 | 1317037667 | False | 0 | c2mnlq0 | t3_krklz | null | t1_c2mnlq0 | t3_krklz | null | 1427648229 | 3 | t5_2fwo | null | null | null |
True | disidentadvisor | null | I assumed they would limit enrollment in each class. I could be completely incorrect with that belief and simply not fully understand the offering. | null | 0 | 1317037680 | False | 0 | c2mnlqv | t3_kqucu | null | t1_c2mnlqv | t1_c2mmfdw | null | 1427648229 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | Give me a clang_refactor plugin and I will be high as a kite! | null | 0 | 1317038015 | False | 0 | c2mnmd2 | t3_kr2x5 | null | t1_c2mnmd2 | t1_c2mmd7n | null | 1427648232 | 0 | t5_2fwo | null | null | null |
True | judgej2 | null | In my experience, the amount of duplicated code is a really good indicator of the bugs I will find. The more duplicated code, the more bugs. I do, however, think that the root cause of that is the number of bugs that are introduced by making changes in code where there is a lot of redundancy. It may be reliable on first using it, but it falls apart quickly. | null | 0 | 1317038050 | False | 0 | c2mnmen | t3_krklz | null | t1_c2mnmen | t3_krklz | null | 1427648235 | 3 | t5_2fwo | null | null | null |
True | __j_random_hacker | null | I don't know much about Javascript, but it's always interesting to see languages that provide both an object system *and* closures separately -- since the latter always strikes me as the perfect way to implement the former. (Perl is another example.) It seems to me that the only reason *not* to use closures as the basis for objects is because supporting closures implies that handling the function call stack becomes much more complicated -- it's no longer a "stack" at all, since a stack frame can now remain live long after its parent frame has disappeared. But if you (as the language designer) have decided to pay the price of supporting closures, why not use them for this?
My feeling is that the closure approach you describe is much to be preferred for anything besides a quick hack, because of its strict no-meddling policy. If this approach becomes popular, then future Javascript engines will optimise for it to remove the overhead of storing multiple copies of the actual functions, just as V8 optimises heavily for common use cases now. | null | 0 | 1317038139 | False | 0 | c2mnmkk | t3_kroia | null | t1_c2mnmkk | t3_kroia | null | 1427648234 | 8 | t5_2fwo | null | null | null |
True | merlinm | null | One letter variable names here I come! | null | 0 | 1317038144 | False | 0 | c2mnmky | t3_krklz | null | t1_c2mnmky | t3_krklz | null | 1427648234 | 4 | t5_2fwo | null | null | null |
True | D_duck | null | Enroll? Can't I just watch the lecture videos, like MIT? | null | 0 | 1317038146 | False | 0 | c2mnml2 | t3_kqucu | null | t1_c2mnml2 | t3_kqucu | null | 1427648234 | 1 | t5_2fwo | null | null | null |
True | tiftik | null | This article might help:
http://zwiener.org/vimautocomplete.html | null | 0 | 1317038180 | False | 0 | c2mnmn6 | t3_kr2x5 | null | t1_c2mnmn6 | t1_c2mn359 | null | 1427648238 | 2 | t5_2fwo | null | null | null |
True | judgej2 | null | > How do you determine whether a given size is particularly small for a given program?
I think you look for redundant and repeated code. Strip the code down to its information content, and that gives you a pretty good feel for the real complexity. | null | 0 | 1317038184 | False | 0 | c2mnmne | t3_krklz | null | t1_c2mnmne | t1_c2mmtvy | null | 1427648238 | 2 | t5_2fwo | null | null | null |
True | perlgeek | null | I'd prefer to have a choice. | null | 0 | 1317038215 | False | 0 | c2mnmp9 | t3_kn8ra | null | t1_c2mnmp9 | t1_c2lpyo3 | null | 1427648238 | 1 | t5_2fwo | null | null | null |
True | ethraax | null | [Fixed](http://msdn.microsoft.com/en-us/library/wzxffy8c\(v=vs.80\).aspx). | null | 0 | 1317038317 | False | 0 | c2mnmwl | t3_krd8f | null | t1_c2mnmwl | t1_c2mmhao | null | 1427648238 | 2 | t5_2fwo | null | null | null |
True | m0llusk | null | Lots of people love Python, but the idea that the format of the code is also code gives me the willies. | null | 0 | 1317038357 | False | 0 | c2mnmz8 | t3_krpem | null | t1_c2mnmz8 | t3_krpem | null | 1427648239 | 4 | t5_2fwo | null | null | null |
True | AlyoshaV | null | >However, it will only run on Python <= 2.7; Python 3 is not supported.
Author is worse than Hitler | null | 0 | 1317038509 | False | 0 | c2mnnb5 | t3_krpem | null | t1_c2mnnb5 | t3_krpem | null | 1427648243 | -13 | t5_2fwo | null | null | null |
True | preshing | null | Forgive me... | null | 0 | 1317038548 | False | 0 | c2mnne0 | t3_krpem | null | t1_c2mnne0 | t1_c2mnnb5 | null | 1427648244 | 17 | t5_2fwo | null | null | null |
True | ntrel2 | null | Did you read the submission? D uses braces but disallows any programmer-ambiguous syntax. Where is the problem? D's solution could easily be used in all C-brace languages. | null | 0 | 1317039003 | False | 0 | c2mnoct | t3_kooiy | null | t1_c2mnoct | t1_c2m88ml | null | 1427648263 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1317039004 | True | 0 | c2mnocw | t3_krd8f | null | t1_c2mnocw | t1_c2ml0if | null | 1427648263 | 1 | t5_2fwo | null | null | null |
True | icebraining | null | Closures aren't necessarily functional. The functional approach is to eliminate side-effect, by not relying on mutable state. But most languages implement closures which capture mutable variables, which goes against this approach.
"Pure" functional languages only let closures capture *immutable* variables, but you obviously can't easily rewrite a class with class-level fields using them. A whole new way to look at the problem is required. | null | 0 | 1317039149 | False | 0 | c2mnonx | t3_krklz | null | t1_c2mnonx | t1_c2mmzp2 | null | 1427648272 | 1 | t5_2fwo | null | null | null |
True | Gotebe | null | I'd venture that papers like the one discussed do know about [cyclomatic complexity](http://en.wikipedia.org/wiki/Cyclomatic_complexity) (and other stuff) by now. That is, let's all forget line count. | null | 0 | 1317039159 | False | 0 | c2mnooi | t3_krklz | null | t1_c2mnooi | t1_c2mmxgo | null | 1427648272 | 1 | t5_2fwo | null | null | null |
True | robertcrowther | null | > Firstly, what kind of programmer is using such a small screen that using a different brace style or a bit more whitespace leads to significant problems?
Monitors seem to be getting wider rather than taller. For cost effectiveness we're developing on screens optimized for viewing movies. | null | 0 | 1317039160 | False | 0 | c2mnooj | t3_krklz | null | t1_c2mnooj | t1_c2mnjfd | null | 1427648272 | 2 | t5_2fwo | null | null | null |
True | MrSqueezles | null | I'm pretty sure that's not what the paper is about at all. The abstract from the actual paper, not the blog post about the paper, talks about class size, not total size.
It seems that they first attempt to show that nobody has ever thought that class size mattered, that they were the first ones to think of this metric. Then, they examine one C++ application to make their point. They show that using class size alone is enough to show which parts of that one application are fault-prone.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.20.2141 | null | 0 | 1317039172 | False | 0 | c2mnopj | t3_krklz | null | t1_c2mnopj | t1_c2mn5yr | null | 1427648272 | 3 | t5_2fwo | null | null | null |
True | [deleted] | null | I can see 47 lines of code, and it bothers me that we have to use the Allman style.
And it also bothers me when somebody goes over 80 (max 90) columns. | null | 0 | 1317039179 | False | 0 | c2mnoq7 | t3_krklz | null | t1_c2mnoq7 | t1_c2mnjfd | null | 1427648274 | 1 | t5_2fwo | null | null | null |
True | runedk | null | Creating an individual copy of each procedure for each object is not only wasteful in terms of memory (both space and allocation time), but effectively prevents many useful optimizations available in modern JavaScript implementations such as just-in-time compilation of frequently-called procedures. | null | 0 | 1317039190 | False | 0 | c2mnorb | t3_kroia | null | t1_c2mnorb | t3_kroia | null | 1427648274 | 4 | t5_2fwo | null | null | null |
True | MrSqueezles | null | I'm pretty sure that's not what the paper is about at all. The abstract from the actual paper talks about class size, not total size.
It seems that they first attempt to show that nobody has ever thought that class size mattered, that they were the first ones to think of this metric. Then, they examine one C++ application to make their point. They show that using class size alone is enough to show which parts of that one application are fault-prone.
I would read the paper, but none of the download links are working.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.20.2141 | null | 0 | 1317039284 | False | 0 | c2mnoxv | t3_krklz | null | t1_c2mnoxv | t3_krklz | null | 1427648276 | 3 | t5_2fwo | null | null | null |
True | hackinthebochs | null | I think the reason is more fundamental than that. Classes provide abstraction. Code with more abstraction primitives have fewer points of interaction, aka fewer moving parts to grind against each other inadvertently. Adding abstraction primitives to your domain reduces the potential for unintended interactions, and thus reduces the number of potential bugs. | null | 0 | 1317039296 | False | 0 | c2mnoyx | t3_krklz | null | t1_c2mnoyx | t1_c2mmx6n | null | 1427648277 | 1 | t5_2fwo | null | null | null |
True | __j_random_hacker | null | You make a good point in distinguishing between program size and class size -- something the blog article actually linked to by the OP gets wrong. Thanks! | null | 0 | 1317039497 | False | 0 | c2mnpel | t3_krklz | null | t1_c2mnpel | t1_c2mmuef | null | 1427648280 | 2 | t5_2fwo | null | null | null |
True | skilldrick | null | I absolutely agree about optimisation - in the future I can foresee a lot more engines optimising for closures in JS.
Then again, future EcmaScript versions will have more options for object creation, like setting properties to non-enumerable, and freezing objects etc., so they may be a more attractive option as well. | null | 0 | 1317039502 | False | 0 | c2mnpf4 | t3_kroia | null | t1_c2mnpf4 | t1_c2mnmkk | null | 1427648282 | 5 | t5_2fwo | null | null | null |
True | __s | null | I was figuring it meant arbitrary precision numbers. But the code uses floats | null | 0 | 1317039536 | False | 0 | c2mnphv | t3_krpem | null | t1_c2mnphv | t1_c2mnja9 | null | 1427648283 | 3 | t5_2fwo | null | null | null |
True | adolfojp | null | Have you tried using [Spring.net](http://www.springframework.net/) or any of the other alternatives?? | null | 0 | 1317039546 | False | 0 | c2mnpip | t3_krodl | null | t1_c2mnpip | t1_c2mncxr | null | 1427648283 | 1 | t5_2fwo | null | null | null |
True | skilldrick | null | Which is why I said I use objects "when memory is a concern". Not using closures because of concerns about memory usage when you haven't measured it is premature optimisation. If you're only producing a handful of objects then there's generally not going to be a measurable performance hit.
The important thing is to use the appropriate tool for the job, not to throw out a whole style of programming because it's "wasteful". If all we cared about was memory usage everybody would be coding in C. | null | 0 | 1317039660 | False | 0 | c2mnprp | t3_kroia | null | t1_c2mnprp | t1_c2mnorb | null | 1427648296 | 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.