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 | toaster13 | null | Just for the hell of it I am going to make 150,000 connections in another language. I bet you I can do it in less than 32G ;-)
| null | 0 | 1316897907 | False | 0 | c2mbe5e | t3_kq27q | null | t1_c2mbe5e | t1_c2maxzg | null | 1427642406 | 14 | t5_2fwo | null | null | null |
True | terror406 | null | Sure, I usually hack the first design together before I start writing test, but at least I'll admit it's because I'm a lazy fuck who is is only slowly getting into the discipline of writing tests first.
I don't need half-baked strawman arguments and insults to cover up my own weaknesses, like the author seems to need. | null | 0 | 1316897907 | False | 0 | c2mbe5j | t3_kq001 | null | t1_c2mbe5j | t3_kq001 | null | 1427642406 | 5 | t5_2fwo | null | null | null |
True | henk53 | null | They had, but RTFA; Eclipse didn't want to take the risk to release 'official' support for syntax that wasn't officially final at the time.
Netbeans did take that risk. (of course, the Netbeans team being part of Oracle could have access to inside information or might have gotten a promise the syntax absolutely wouldn't change) | null | 0 | 1316897954 | False | 0 | c2mbeco | t3_kq0ms | null | t1_c2mbeco | t1_c2mbcp2 | null | 1427642407 | 10 | t5_2fwo | null | null | null |
True | gthank | null | That doesn't sound accurate. Are you thinking of the front-end, which is written in GWT? | null | 0 | 1316898066 | False | 0 | c2mberl | t3_kq27q | null | t1_c2mberl | t1_c2mae3l | null | 1427642411 | 4 | t5_2fwo | null | null | null |
True | staticfish | null | Sweet. Thanks. Pity it's Linux only at the moment. | null | 0 | 1316898129 | False | 0 | c2mbf07 | t3_kq27q | null | t1_c2mbf07 | t1_c2mb4kr | null | 1427642413 | 1 | t5_2fwo | null | null | null |
True | gthank | null | I thought the limitation itself was a bit shocking. Hard to believe that such a large project was using `int` instead of `size_t`. The people whining were irritating, though. | null | 0 | 1316898205 | False | 0 | c2mbfad | t3_kq27q | null | t1_c2mbfad | t1_c2m9c67 | null | 1427642415 | 2 | t5_2fwo | null | null | null |
True | mushishi | null | Yes. It seems many an ideology tries to replace thinking by a process that should enforce that everything will go like a train.
In my opinion, software development practioners need to focus on context based thinking, not mechanisms that are thought out by other people never even seen your particular domain problem and technology combination. | null | 0 | 1316898236 | False | 0 | c2mbfe2 | t3_kq001 | null | t1_c2mbfe2 | t1_c2mb256 | null | 1427642416 | 5 | t5_2fwo | null | null | null |
True | robertwilliams | null | It's not a "hack" - it's a feature of TDD.
In my experience, it's hard to design things well in my head or on the whiteboard. I do get an idea of what classes I'll need and generally what they do (CRC method usually) but only as a starting point. The actual design (which is to say, the code) evolves only *as I use it*.
TDD enforces cohesion and loose coupling in ways that pretty UML diagrams never will. It also gives you the tools you need to safely change that design - provided you design your tests well.
If you do "test later" then in my experience you wind up hacking the design to add in the tests, making the tests and code tightly coupled and the whole design very brittle.
| null | 0 | 1316898293 | False | 0 | c2mbflf | t3_kq001 | null | t1_c2mbflf | t1_c2mb256 | null | 1427642419 | 7 | t5_2fwo | null | null | null |
True | hasslemaster | null | You do understand that there is a galaxy's worth of difference between an civil engineer and a software engineer, right? | null | 0 | 1316898302 | False | 0 | c2mbfmk | t3_kq001 | null | t1_c2mbfmk | t1_c2mbbzi | null | 1427642419 | 7 | t5_2fwo | null | null | null |
True | BraveSirRobin | null | My problem (which the article mentions) is that it sometimes leads to bad designs. Quite often private methods and fields need to be exposed to make the test possible. This irks me greatly; I do it because the tests are useful but it's just crying out for someone to misuse the classes in future. | null | 0 | 1316898461 | False | 0 | c2mbg9l | t3_kq001 | null | t1_c2mbg9l | t1_c2ma4kl | null | 1427642427 | 10 | t5_2fwo | null | null | null |
True | terror406 | null | Clearly, you don't understand what TDD or unit testing is. I know the word "test" is confusing, but it isn't about "testing things first", it is about *designing things first*, just like your father does.
The only difference is that since it is *soft*ware, you can design by writing a test that not only describes the solution, but can be ran against the actual implementation to confirm you've actually correctly implemented what you've designed.
TDD is all about design. The tests are a useful byproduct. | null | 0 | 1316898472 | False | 0 | c2mbgb9 | t3_kq001 | null | t1_c2mbgb9 | t1_c2mbbzi | null | 1427642428 | 6 | t5_2fwo | null | null | null |
True | robertwilliams | null | I think you must be arguing against unit tests rather than TDD, as TDD has no incremental costs in development or maintenance.
You may be able to identify very specific cases where a unit test doesn't add much value, but it's overall a valuable enough practice to just do it 100% of the time. When you get into a mindset of only doing unit tests sometimes, that always turns into "don't do it if it's too hard" - and those are usually the times it would have been the most value. The cases where it didn't add much value were probably trivial cases, so the tests were by definition trivial to write.
> ongoing maintenance
Tests only have to be "maintained" *when the code changes*, either in terms of design (refactoring) or functionality. And that's precisely when you want unit tests!
| null | 0 | 1316898611 | False | 0 | c2mbgt9 | t3_kq001 | null | t1_c2mbgt9 | t1_c2mb37f | null | 1427642434 | 5 | t5_2fwo | null | null | null |
True | BraveSirRobin | null | Time is a limited resource and in reality 100% coverage does not exist. You are better spending time writing good tests for important classes than testing boilerplate code elsewhere. | null | 0 | 1316898613 | False | 0 | c2mbgto | t3_kq001 | null | t1_c2mbgto | t1_c2maray | null | 1427642435 | 8 | t5_2fwo | null | null | null |
True | scgtrp | null | > everyone has their own preferences for the tab expansion length
That is not a problem when you're only using tabs - in fact, it's a *feature*. (It is certainly a problem when you mix tabs and spaces, but mixed tabs and spaces are significantly worse than either of the alternatives and anyone doing that should be clobbered.) | null | 0 | 1316898629 | False | 0 | c2mbgw5 | t3_kooiy | null | t1_c2mbgw5 | t1_c2madrr | null | 1427642435 | 5 | t5_2fwo | null | null | null |
True | hasslemaster | null | Software testing? lol, that's what PRODUCTION is for! | null | 0 | 1316898642 | False | 0 | c2mbgxo | t3_kq001 | null | t1_c2mbgxo | t3_kq001 | null | 1427642436 | 6 | t5_2fwo | null | null | null |
True | BraveSirRobin | null | Prototyping, e.g. testing if two frameworks work well together. TDD is a waste of time in code that probably won't be kept. If it lives beyond the experiment then you should write tests of course. | null | 0 | 1316898749 | False | 0 | c2mbhck | t3_kq001 | null | t1_c2mbhck | t1_c2marsz | null | 1427642441 | 8 | t5_2fwo | null | null | null |
True | robertwilliams | null | And "other people" can be "you six months from now." | null | 0 | 1316898749 | False | 0 | c2mbhcm | t3_kq001 | null | t1_c2mbhcm | t1_c2mb7ol | null | 1427642441 | 2 | t5_2fwo | null | null | null |
True | xiongchiamiov | null | Python no longer supports backticks for execing. | null | 0 | 1316898799 | False | 0 | c2mbhkf | t3_kpqzv | null | t1_c2mbhkf | t1_c2m8gq6 | null | 1427642450 | 1 | t5_2fwo | null | null | null |
True | rcinsf | null | Ditto. | null | 0 | 1316898828 | False | 0 | c2mbho9 | t3_kq001 | null | t1_c2mbho9 | t1_c2m9yqy | null | 1427642446 | -4 | t5_2fwo | null | null | null |
True | BraveSirRobin | null | Make sure your manager sees this, it's far too easy for them to ignore efforts that eliminate future work. | null | 0 | 1316898840 | False | 0 | c2mbhq3 | t3_kq001 | null | t1_c2mbhq3 | t1_c2ma4uc | null | 1427642446 | 4 | t5_2fwo | null | null | null |
True | steven_h | null | Enjoy your self-flagellation -- a lot of monks were convinced it was a mark of piety, too. | null | 0 | 1316898939 | False | 0 | c2mbi3r | t3_kq001 | null | t1_c2mbi3r | t1_c2mbe5j | null | 1427642452 | 3 | t5_2fwo | null | null | null |
True | yataf | null | Can you explain what you mean? In my group, everybody picks up what I say. | null | 0 | 1316898985 | False | 0 | c2mbi9i | t3_kogj4 | null | t1_c2mbi9i | t1_c2ma5il | null | 1427642455 | 1 | t5_2fwo | null | null | null |
True | BraveSirRobin | null | TDD UI Automated Testing? As someone with many years of GUI automation experience on numerous platforms, don't even bother. That is a road to hell. | null | 0 | 1316898987 | False | 0 | c2mbi9s | t3_kq001 | null | t1_c2mbi9s | t1_c2ma9e0 | null | 1427642455 | 2 | t5_2fwo | null | null | null |
True | ReasonableCause | null | Nope. With TDD, refactoring your code takes place once all tests pass. That way, you can be sure that the refactored code still works. I think what kamatsu was trying to say is, to not add new functionality to your code without a test that requires that new functionality.
The "rules" of TDD restrict you to doing just one thing at a time. First, write a test that fails. Then, write the simplest piece of code to make that test pass. Then, refactor your code to make it better structured. | null | 0 | 1316899024 | False | 0 | c2mbidr | t3_kq001 | null | t1_c2mbidr | t1_c2mb407 | null | 1427642456 | 3 | t5_2fwo | null | null | null |
True | organic_code | null | TDD has been around for over 10 years.. I would hardly consider it the latest example of or a new methodology. | null | 0 | 1316899033 | False | 0 | c2mbiet | t3_kq001 | null | t1_c2mbiet | t1_c2mb92r | null | 1427642456 | 2 | t5_2fwo | null | null | null |
True | rcinsf | null | Didn't see the part where they said they wrote tests before coding. | null | 0 | 1316899056 | False | 0 | c2mbihp | t3_kq001 | null | t1_c2mbihp | t1_c2ma0kq | null | 1427642457 | 7 | t5_2fwo | null | null | null |
True | steven_h | null | I'm wondering why you bothered to post to boast about your willful ignorance of the original essay. | null | 0 | 1316899061 | False | 0 | c2mbiih | t3_kq001 | null | t1_c2mbiih | t1_c2maz1k | null | 1427642457 | 3 | t5_2fwo | null | null | null |
True | robertwilliams | null | If it's truly trivial code, the tests are trivial and take very little time to write or maintain.
If it's generated code, then yeah I probably wouldn't bother with a test.
If it's "boilerplate" code that is duplicated over and over, then you need to eliminate the duplication and test it once.
I have run into some situations where it didn't seem worth it to get 100% coverage, but it was mostly trying to force error conditions. The handling was straightforward enough that I didn't want to add all the mocks necessary to get to 100%. Although it might have been a good exercise for an intern or junior programmer, if we had those. | null | 0 | 1316899083 | False | 0 | c2mbiky | t3_kq001 | null | t1_c2mbiky | t1_c2mbgto | null | 1427642465 | 1 | t5_2fwo | null | null | null |
True | runn3r | null | If you sign up at tynt.com you can set this up on any website that you control. Neat in some ways, and the stats you can get about what is being copied from your site is interesting. | null | 0 | 1316899147 | False | 0 | c2mbito | t3_kp82i | null | t1_c2mbito | t1_c2m1vqj | null | 1427642460 | 1 | t5_2fwo | null | null | null |
True | xiongchiamiov | null | I never realized that all scripting languages lack modules! | null | 0 | 1316899161 | False | 0 | c2mbivc | t3_kq27q | null | t1_c2mbivc | t1_c2m9nn2 | null | 1427642462 | 2 | t5_2fwo | null | null | null |
True | BraveSirRobin | null | "You can call it the art of testing without testing". | null | 0 | 1316899184 | False | 0 | c2mbiy8 | t3_kq001 | null | t1_c2mbiy8 | t1_c2m9zeq | null | 1427642463 | 2 | t5_2fwo | null | null | null |
True | steven_h | null | Are those tests written before the code is written? | null | 0 | 1316899260 | False | 0 | c2mbj8j | t3_kq001 | null | t1_c2mbj8j | t1_c2ma0kq | null | 1427642467 | 9 | t5_2fwo | null | null | null |
True | robertwilliams | null | I often use unit tests for prototyping or experimenting with a framework. But yeah if I'm just doing a spike or hacking something together I don't care about tests.
So maybe I should say "I have yet to encounter a case
*when working with code destined for production* in which TDD is a bad idea." | null | 0 | 1316899302 | False | 0 | c2mbjdl | t3_kq001 | null | t1_c2mbjdl | t1_c2mbhck | null | 1427642470 | 6 | t5_2fwo | null | null | null |
True | [deleted] | null | Hey man,
I wrote the article this links to. I've got a whole bunch of articles lined up that I'll be posting on how to integrate automated testing in to your business and team - how to describe tech debt to a business; how to organize your testing; how to decide the appropriate amount of testing, etc
It's going to take me a while to produce them, but hopefully the content upcoming on that blog will be just what you're after! | null | 0 | 1316899418 | False | 0 | c2mbjse | t3_kq001 | null | t1_c2mbjse | t1_c2maqym | null | 1427642477 | 3 | t5_2fwo | null | null | null |
True | UnoriginalGuy | null | Buildings are relatively simple compared to software. Many software projects are closer to an entire city of buildings and pipework between all of them.
It isn't realistic to design software in the same slow methodical way as you design buildings primarily because nothing would ever get done. | null | 0 | 1316899495 | False | 0 | c2mbk1r | t3_kq001 | null | t1_c2mbk1r | t1_c2mbbzi | null | 1427642480 | 3 | t5_2fwo | null | null | null |
True | robertwilliams | null | I mostly run into this when I'm writing tests for code that already exists. But if I do TDD then it's less likely.
I thoroughly disagree with making my design worse to allow the tests, although I have to do it sometimes.
Philosophically, I think one should always be able to test a class using its public methods. If I call some methods on a class, then at some point it's either going to call a method on one or more classes, or I'm going to inspect it's state. That should be enough to verify the class's behavior. Practically it doesn't always work out that way, but I think it's because I have a bad design.
| null | 0 | 1316899590 | False | 0 | c2mbkez | t3_kq001 | null | t1_c2mbkez | t1_c2mbg9l | null | 1427642482 | 5 | t5_2fwo | null | null | null |
True | skilless | null | The people that have a problem with this seem likely to dislike python as well, since it has no provisions for private methods. As a fan of both TDD and Python, I don't consider these people to be worth worrying about :P | null | 0 | 1316899609 | False | 0 | c2mbkhl | t3_kq001 | null | t1_c2mbkhl | t1_c2mbg9l | null | 1427642482 | 1 | t5_2fwo | null | null | null |
True | tjdziuba | null | He mad. | null | 0 | 1316899641 | False | 0 | c2mbklx | t3_kq001 | null | t1_c2mbklx | t1_c2ma44y | null | 1427642485 | 2 | t5_2fwo | null | null | null |
True | yellowbkpk | null | Did anyone read the comments at all? It was marked as fixed last week. Why are you all complaining? | null | 0 | 1316899756 | False | 0 | c2mbl0w | t3_kq27q | null | t1_c2mbl0w | t3_kq27q | null | 1427642489 | 12 | t5_2fwo | null | null | null |
True | agentlame | null | If you had written a test *before* your comment that typo would have never happened. | null | 0 | 1316899819 | False | 0 | c2mbl9w | t3_kq001 | null | t1_c2mbl9w | t1_c2mabxb | null | 1427642493 | 22 | t5_2fwo | null | null | null |
True | toaster13 | null | Sound like normal programmers to me... | null | 0 | 1316899852 | False | 0 | c2mble0 | t3_kq27q | null | t1_c2mble0 | t1_c2mb2a1 | null | 1427642504 | 8 | t5_2fwo | null | null | null |
True | Xorlev | null | I bet you can too, but whatever his usecase it apparently takes 32G per 140,000 concurrent connections o.O | null | 0 | 1316900018 | False | 0 | c2mbm03 | t3_kq27q | null | t1_c2mbm03 | t1_c2mbe5e | null | 1427642506 | 11 | t5_2fwo | null | null | null |
True | BobTheSCV | null | TDD =/= Software Testing. TDD is all about writing the test before the code, which may or may not be useful depending on the code being written. | null | 0 | 1316900116 | True | 0 | c2mbmch | t3_kq001 | null | t1_c2mbmch | t1_c2mbgxo | null | 1427642518 | 0 | t5_2fwo | null | null | null |
True | toaster13 | null | I'm so sorry. | null | 0 | 1316900274 | False | 0 | c2mbmxs | t3_kq27q | null | t1_c2mbmxs | t1_c2maedg | null | 1427642521 | 4 | t5_2fwo | null | null | null |
True | rush22 | null | You could call it Java | null | 0 | 1316900402 | False | 0 | c2mbneq | t3_kketr | null | t1_c2mbneq | t1_c2l03bv | null | 1427642524 | 1 | t5_2fwo | null | null | null |
True | quiI | null | I'm sure your subordinates love you. | null | 0 | 1316900466 | False | 0 | c2mbnmi | t3_kq001 | null | t1_c2mbnmi | t1_c2mabjt | null | 1427642526 | 6 | t5_2fwo | null | null | null |
True | StrangeWill | null | I write in a _ton_ of languages at work (current projects are mostly C# + C++/CLR + Java though), I swap it up based on what I need to do, PHP has it's uses, I don't do it all day (I'd probably cry if I was trying to do some of the tasks I do in C#/Java/C++ in PHP). | null | 0 | 1316900517 | False | 0 | c2mbntc | t3_kq27q | null | t1_c2mbntc | t1_c2mbmxs | null | 1427642527 | 2 | t5_2fwo | null | null | null |
True | StrangeWill | null | Showed our CIO Friday, he wants me to get the rest of our developers on board. :)
I already have all of their projects auto-building and alerting of problems, but they don't have any tests in place (I've noticed though one has started adding NUnit support though). | null | 0 | 1316900663 | False | 0 | c2mbobo | t3_kq001 | null | t1_c2mbobo | t1_c2mbhq3 | null | 1427642533 | 4 | t5_2fwo | null | null | null |
True | ryeguy | null | Right, so write the tests when the logic becomes complicated. Why write it before? | null | 0 | 1316900667 | False | 0 | c2mboch | t3_kq001 | null | t1_c2mboch | t1_c2malmi | null | 1427642533 | 14 | t5_2fwo | null | null | null |
True | BobTheSCV | null | TDD produces highly modular and decoupled code, which is good in some places, but generally something you wish to limit in performance critical code, as modular code is expensive code (polymorphism is expensive, which rules out techniques like dependency injection). | null | 0 | 1316900787 | True | 0 | c2mbosl | t3_kq001 | null | t1_c2mbosl | t1_c2ma8ta | null | 1427642547 | 0 | t5_2fwo | null | null | null |
True | foreheadteeth | null | Thanks for your comment! I have not yet implemented sparse matrices but obviously that is an interesting feature for the future. I don't want to put out a roadmap because it's hard to tell how these things go, but definitely important. | null | 0 | 1316900824 | False | 0 | c2mboxr | t3_koxfh | null | t1_c2mboxr | t1_c2m9bhl | null | 1427642543 | 2 | t5_2fwo | null | null | null |
True | neoquietus | null | Sometimes I do wait until the logic gets complicated. Othertimes I don't.
The advantage to writing it before hand is that you don't have to write it later, and in fact you don't have to remember to write it later. This means a few less bugs slip through.
It's a trade off, especially for the simpler functions like getters and setters. | null | 0 | 1316901216 | False | 0 | c2mbq9o | t3_kq001 | null | t1_c2mbq9o | t1_c2mboch | null | 1427642558 | 1 | t5_2fwo | null | null | null |
True | Iggyhopper | null | He chose a tool for a purpose, and what he needs is what he needs. When there are problems with that, you can't just all willy-nilly assume that his needs are silly and the tool is wrong. | null | 0 | 1316901217 | False | 0 | c2mbqav | t3_kq27q | null | t1_c2mbqav | t1_c2mbdzm | null | 1427642558 | 8 | t5_2fwo | null | null | null |
True | starspangledpickle | null | Doing it upfront is insane but it is a useful tool to guard against regressions. Plus it makes you think about how you design your ui as well. Is it keyboard or screen reader friendly and are there ui lag issues. | null | 0 | 1316901235 | False | 0 | c2mbqdb | t3_kq001 | null | t1_c2mbqdb | t1_c2mbi9s | null | 1427642569 | 1 | t5_2fwo | null | null | null |
True | tborwi | null | Didn't Eclipse complain about not knowing what the getter/setter was referring to? | null | 0 | 1316901250 | False | 0 | c2mbqfe | t3_kq001 | null | t1_c2mbqfe | t1_c2mbdro | null | 1427642560 | 1 | t5_2fwo | null | null | null |
True | [deleted] | null | "m OZ art" I guess.. | null | 0 | 1316901334 | False | 0 | c2mbqpy | t3_kpwjl | null | t1_c2mbqpy | t1_c2max57 | null | 1427642565 | 6 | t5_2fwo | null | null | null |
True | andytuba | null | ... I'll take it! | null | 0 | 1316901436 | False | 0 | c2mbr2g | t3_kpwjl | null | t1_c2mbr2g | t1_c2mbqpy | null | 1427642569 | 1 | t5_2fwo | null | null | null |
True | Zarutian | null | this is one of the reasons why I like Tcl. Control contstructs are commands like everything else in the code.
For example:
if {$answer == 42} {
puts "The answer is correct"
}
is the command [if] that takes condition, body to run when condition is true and additional optional parameters for elseif and else clauses. | null | 0 | 1316901445 | False | 0 | c2mbr3i | t3_kooiy | null | t1_c2mbr3i | t1_c2maxpn | null | 1427642571 | 0 | t5_2fwo | null | null | null |
True | gthank | null | Honest question: what's the advantage to using an `int` instead of a `size_t`? I don't do enough C to know, I just know the general rule is `size_t`. | null | 0 | 1316901571 | False | 0 | c2mbrjr | t3_kq27q | null | t1_c2mbrjr | t1_c2mb27q | null | 1427642577 | 3 | t5_2fwo | null | null | null |
True | flexd | null | Considering we still have no idea what each of those 140k concurrent connections do or handle how can you claim 32GB is horribly wrong?
32GB/140k is 239.67 kilobytes, if he was handling lets say users in some sort of chat server or whatever else you might think of is 32GB really that bad? You have no idea what he is doing and claiming some arbitrary value of RAM is too much is just stupid when you don't know the first thing about his product. | null | 0 | 1316901576 | False | 0 | c2mbrka | t3_kq27q | null | t1_c2mbrka | t1_c2mbdzm | null | 1427642577 | 14 | t5_2fwo | null | null | null |
True | kragensitaker | null | Maybe you should write your code in a different way so that it's not full of triviality! | null | 0 | 1316901659 | False | 0 | c2mbrvc | t3_kq001 | null | t1_c2mbrvc | t1_c2mamhh | null | 1427642581 | 2 | t5_2fwo | null | null | null |
True | MarshallBanana | null | Well, they probably did it because they didn't think they'd need all that much memory, since they were just making a browser, and their GC couldn't handle it very well anyway. | null | 0 | 1316901737 | False | 0 | c2mbs61 | t3_kq27q | null | t1_c2mbs61 | t1_c2mbfad | null | 1427642585 | 8 | t5_2fwo | null | null | null |
True | [deleted] | null | >Robert C. Martin, who loves his TDD, actually advocated running a small test suite every time a single line of code is changed, and if you ever want to make changes to the code, you must first write a failing test for it that will be passed when it is completed - if the tests passed, you aren't allowed to edit the code.
I don't think it's that crazy. My build scripts run the unit tests every time the code is compiled, regardless of lines changed, and it's probably the fastest part of the build process. | null | 0 | 1316901764 | False | 0 | c2mbs9q | t3_kq001 | null | t1_c2mbs9q | t1_c2ma3fc | null | 1427642586 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | And if you work on your own that's great and you're free to do what you want.
When you work on a bigger team, if you're changing the API's as you see fit you're basically screwing everyone else over. | null | 0 | 1316901940 | False | 0 | c2mbswi | t3_kq001 | null | t1_c2mbswi | t1_c2mb7ew | null | 1427642593 | 3 | t5_2fwo | null | null | null |
True | lampshadish2 | null | At one point, it was rather difficult to install rails applications. It's gotten easier, but the stigma remains. I had the same initial reaction since I was expecting a thick client. | null | 0 | 1316901945 | False | 0 | c2mbsxe | t3_kolze | null | t1_c2mbsxe | t1_c2m0af8 | null | 1427642593 | 1 | t5_2fwo | null | null | null |
True | kragensitaker | null | > If it's generated code, then yeah I probably wouldn't bother with a test.
Right. Test the code generator instead.
> If it's "boilerplate" code that is duplicated over and over, then you need to eliminate the duplication and test it once.
Well said, sir. | null | 0 | 1316901980 | False | 0 | c2mbt1q | t3_kq001 | null | t1_c2mbt1q | t1_c2mbiky | null | 1427642595 | 1 | t5_2fwo | null | null | null |
True | DrMonkeyLove | null | >First, write a test that fails. Then, write the simplest piece of code to make that test pass. Then, refactor your code to make it better structured.
Is it just me, or does this seem incredibly inefficient when developing something from scratch? | null | 0 | 1316902066 | False | 0 | c2mbtbd | t3_kq001 | null | t1_c2mbtbd | t1_c2mbidr | null | 1427642598 | 3 | t5_2fwo | null | null | null |
True | BooksAndSwords | null | Generally if I'm writing a completely new feature, I start implementing first, because it's only by writing a skeletal implementation that I come to understand the problem(s) in enough detail to know what the solution looks like well enough that I can start to write tests. Then I flesh out the implementation and write the tests in parallel, sometimes code first, sometimes test first depending on how well things are flowing.
If I'm just refactoring code or adding on small pieces of functionality, tests, tests, and more tests before I change a line. | null | 0 | 1316902164 | False | 0 | c2mbtm7 | t3_kq001 | null | t1_c2mbtm7 | t1_c2mbjdl | null | 1427642601 | 7 | t5_2fwo | null | null | null |
True | [deleted] | null | TDD? Lol. Whatever u thunk u need bro. | null | 0 | 1316902165 | False | 0 | c2mbtng | t3_kq001 | null | t1_c2mbtng | t3_kq001 | null | 1427642603 | -1 | t5_2fwo | null | null | null |
True | lx45803 | null | I wouldn't imagine you'd need a 64-bit build, since each tab and plugin is a separate process. No individual process would need more than 4 GB in any sane situation, right? Or am I missing something? | null | 0 | 1316902211 | False | 0 | c2mbtuw | t3_kq27q | null | t1_c2mbtuw | t1_c2mbf07 | null | 1427642605 | 1 | t5_2fwo | null | null | null |
True | BooksAndSwords | null | Generally if I'm writing a completely new feature, I start implementing first, because it's only by writing a skeletal implementation that I come to understand the problem(s) in enough detail to know what the solution looks like well enough that I can start to write tests. Then I flesh out the implementation and write the tests in parallel, sometimes code first, sometimes test first depending on how well things are flowing.
If I'm just refactoring code or adding on small pieces of functionality, tests, tests, and more tests before I change a line. | null | 0 | 1316902221 | False | 0 | c2mbtw2 | t3_kq001 | null | t1_c2mbtw2 | t1_c2mbjdl | null | 1427642606 | 1 | t5_2fwo | null | null | null |
True | MarshallBanana | null | You do realize that the people actually writing the code *do not need it*? That is why they left it like that.
The people who want it are those who are trying to use the code for things it wasn't designed for. Google were nice enough to go out of their way to fix the code *anyway*, and somehow now they are bad? | null | 0 | 1316902312 | False | 0 | c2mbu7n | t3_kq27q | null | t1_c2mbu7n | t1_c2m9zdw | null | 1427642609 | 5 | t5_2fwo | null | null | null |
True | Smallpaul | null | Every packet in a connection takes the same path? | null | 0 | 1316902352 | False | 0 | c2mbuck | t3_kp1b5 | null | t1_c2mbuck | t1_c2m9yok | null | 1427642618 | 2 | t5_2fwo | null | null | null |
True | [deleted] | null | while i havent tried TdD myself, i am pretty sure any methodology you use regularly will help to write better code. Just because one has success with it does not mean its the only or best way. Rather, THEY have found it works for them. | null | 0 | 1316902352 | False | 0 | c2mbucn | t3_kq001 | null | t1_c2mbucn | t1_c2ma6hy | null | 1427642618 | 2 | t5_2fwo | null | null | null |
True | nemtrif | null | I know - that was a joke. Sorry if the joke turned to be a bad one. | null | 0 | 1316902548 | False | 0 | c2mburq | t3_kooiy | null | t1_c2mburq | t1_c2m53gi | null | 1427642616 | 3 | t5_2fwo | null | null | null |
True | otterdam | null | As far as I'm concerned, unit tests are there to test the object does what it's advertised to; it's not to test the implementation, the internal state of the object after certain operations. What happens then is your tests become tightly coupled to the implementation rather than the design.
Sometimes that's impossible to avoid, but I tend to prefer debug asserts where possible. | null | 0 | 1316902566 | False | 0 | c2mbuv1 | t3_kq001 | null | t1_c2mbuv1 | t1_c2mbkez | null | 1427642618 | 9 | t5_2fwo | null | null | null |
True | kragensitaker | null | I've run into trouble with unit tests when refactoring. Refactoring usually means moving functionality from one side of an interface to another. To do that, you have to change all the tests that either stub out an implementation of that interface (e.g. with mock objects) or test the implementation of that interface. Stubbing makes this worse.
I've also run into trouble with unit tests when changing functionality. It's not a big deal if you only have to change one test, but when there are a lot of tests that depend on the behavior you're changing, it's a big deal. Stubbing makes this better. | null | 0 | 1316902606 | False | 0 | c2mbv0l | t3_kq001 | null | t1_c2mbv0l | t1_c2mbgt9 | null | 1427642621 | 4 | t5_2fwo | null | null | null |
True | nemtrif | null | Having *automated* tests is extremely valuable for elaborate or sensitive business logic. | null | 0 | 1316902669 | False | 0 | c2mbv8b | t3_kq001 | null | t1_c2mbv8b | t1_c2m9yvv | null | 1427642624 | 6 | t5_2fwo | null | null | null |
True | mitsuhiko | null | Unsigned types in general have very annoying semantics regarding overflows and when mixed with other types. Temporary results in expressions with unsigned types depend on the type of the other operand.
Especially when things are not directly assigned to results it becomes ugly.
unsigned x = 1;
int y = x - 1;
`y` will be 0 as expected. But when you attempt to apply that knowledge to comparisons you will be disappointed:
printf("%d\n", (unsigned)1 < -1);
Yes, unsigned 1 is smaller than signed -1. And gcc will not even warn with Wall about that. Signed and unsigned types also have different behavior when combined with floats which is a painful experience.
On top of that reverse iteration over unsigneds often ends up in an infinite loop. Yes, you should know that, but often people introduce unsigneds later when they were using signeds before and things become weird.
On top of that: accidental negative values become huge positive values which mask errors and cause a lot of really interesting overflows. As such many people decide that half the size is good enough and they make assertions that things don't go negative because that would indicate an error. | null | 0 | 1316902693 | True | 0 | c2mbvcb | t3_kq27q | null | t1_c2mbvcb | t1_c2mbrjr | null | 1427642625 | 7 | t5_2fwo | null | null | null |
True | garymrush | null | As I mentioned in another comment, if you feel the need to expose private members of your class in order to test, that's an indication that you've got another class hiding inside. Rip that sucker out, test its now public methods and properties, and then simply verify that your original class uses it properly (often a mocked interface). | null | 0 | 1316902746 | False | 0 | c2mbvit | t3_kq001 | null | t1_c2mbvit | t1_c2mbg9l | null | 1427642627 | 16 | t5_2fwo | null | null | null |
True | ottawadeveloper | null | disagree - its a mechanism that forces you to consider what the routine will do and all possible results before you code it. if you do that anyways, the testing can come later. as with most thing, its for mediocre :). | null | 0 | 1316902851 | False | 0 | c2mbvvn | t3_kq001 | null | t1_c2mbvvn | t1_c2ma2w5 | null | 1427642635 | 1 | t5_2fwo | null | null | null |
True | nucking | null | As the second comment in that thread pointed out, the person who wrote this has absolute no clue about big software projects.
For small 5-10 people projects he might be correct, but the way he portrays TTD is simply childish and narrow minded. | null | 0 | 1316902884 | False | 0 | c2mbvzw | t3_kq001 | null | t1_c2mbvzw | t3_kq001 | null | 1427642636 | 0 | t5_2fwo | null | null | null |
True | mazenharake | null | I'm glad someone shares by view on TDD. Something I can slap in the face of all those constantly trying to convince me that writing my unit tests before I code is a superior strategy. | null | 0 | 1316902937 | False | 0 | c2mbw5i | t3_kq001 | null | t1_c2mbw5i | t3_kq001 | null | 1427642635 | 1 | t5_2fwo | null | null | null |
True | mazenharake | null | I'm glad someone shares my view on TDD. Something I can slap in the face of all those constantly trying to convince me that writing my unit tests before I code is a superior strategy. | null | 0 | 1316903009 | False | 0 | c2mbwej | t3_kq001 | null | t1_c2mbwej | t3_kq001 | null | 1427642638 | 3 | t5_2fwo | null | null | null |
True | nemtrif | null | > just want to point out that the problem domains that we are dealing with are considerably smaller than "the real world".
The domains may be smaller than the real world, but I have yet to see unit-tests that account for every possible state of the system they test. | null | 0 | 1316903053 | False | 0 | c2mbwl2 | t3_kq001 | null | t1_c2mbwl2 | t1_c2maol7 | null | 1427642642 | 2 | t5_2fwo | null | null | null |
True | GeorgeForemanGrillz | null | The one thing that TDD instantly gives you is documentation for your code. If you write software for an industry that is regulated this comes in handy for your auditors. You can compile a list of your Cucumber tests and provide it for them. No more headaches of having a completely separate exercise of documenting your code and what each method/function does.
| null | 0 | 1316903079 | False | 0 | c2mbwoj | t3_kq001 | null | t1_c2mbwoj | t3_kq001 | null | 1427642654 | 1 | t5_2fwo | null | null | null |
True | novascorpio | null | I lol'd | null | 0 | 1316903073 | False | 0 | c2mbwom | t3_kqd8o | null | t1_c2mbwom | t3_kqd8o | null | 1427642654 | 3 | t5_2fwo | null | null | null |
True | adrianmonk | null | 64-bit builds might run faster since they can use the more-modern x86_64 instruction set.
In a generic sense, switching from 32-bit to 64-bit just buys you larger native datatypes and the ability to address more memory. In the specific case of the x86/x86_64 architecture, x86 is ancient and has a lot of weaknesses (like only has 6 general-purpose registers) that x86_64 doesn't have. | null | 0 | 1316903163 | False | 0 | c2mbwyt | t3_kq27q | null | t1_c2mbwyt | t1_c2mbtuw | null | 1427642658 | 4 | t5_2fwo | null | null | null |
True | garymrush | null | I couldn't agree more. While I believe there is a real benefit to the TDD methodology, simply following ANY decent methodology is more important. | null | 0 | 1316903176 | False | 0 | c2mbx12 | t3_kq001 | null | t1_c2mbx12 | t1_c2mbucn | null | 1427642652 | 0 | t5_2fwo | null | null | null |
True | [deleted] | null | [deleted] | null | 0 | 1316903183 | False | 0 | c2mbx1u | t3_kqd8o | null | t1_c2mbx1u | t3_kqd8o | null | 1427642652 | 3 | t5_2fwo | null | null | null |
True | ezekiel | null | Functional programming has been around 50 years. Structured programming and abstract data types have been around 40 years. Those are well-researched and extensively used software principles providing known benefits and predictable results.
In contrast to that, TDD is a fad. It has been hyped for 10 years by consultants and IT-shop complexifiers who cannot understand how under-representative their handful of tests really are. They refactor against this handful of tests and the fallout is discovered over the course of months. The data cleanup and code repair takes forever because their odd software design is a mismatch for reality.
The reason: *Thorough software testing* is the weakest skill in most programmers' arsenal. | null | 0 | 1316903228 | False | 0 | c2mbx7n | t3_kq001 | null | t1_c2mbx7n | t1_c2mbiet | null | 1427642655 | 9 | t5_2fwo | null | null | null |
True | cryo | null | Writing a test that fully tests the domain of a function, say, is hard, error prone and ridiculously verbose, and so will generally never happen.
But when it doesn't, it can't really tell you when to stop writing code. It just transfers complexity to the test writing. | null | 0 | 1316903241 | False | 0 | c2mbx9c | t3_kq001 | null | t1_c2mbx9c | t1_c2maie0 | null | 1427642656 | 2 | t5_2fwo | null | null | null |
True | ezekiel | null | That "guru" was not an anomaly. His personality type and the TDD religion go hand in hand.
*High-quality software design and testing* is not a fad nor religion. It becomes cool only after you practice it for years. | null | 0 | 1316903518 | False | 0 | c2mby5f | t3_kq001 | null | t1_c2mby5f | t1_c2mapdg | null | 1427642664 | 5 | t5_2fwo | null | null | null |
True | cryo | null | Fine, but what does that have to do with test driven development, and not just it testing which, I think, no one here is opposing. | null | 0 | 1316903583 | False | 0 | c2mbyen | t3_kq001 | null | t1_c2mbyen | t1_c2ma4uc | null | 1427642666 | 0 | t5_2fwo | null | null | null |
True | MarshallBanana | null | > Some seem to think this reddit is for "links that programmers might find interesting or funny". No. It's for programming links. Programming. *Programming.* **Programming.** | null | 0 | 1316903732 | False | 0 | c2mbyyh | t3_kqd8o | null | t1_c2mbyyh | t3_kqd8o | null | 1427642673 | 7 | t5_2fwo | null | null | null |
True | ajness | null | As a project manager, the earlier that design flaws are caught the more reliably a project can be delivered on time and on budget. TDD forces the developers and thus, me, to analyze the assumptions in the design and to avoid the nearly inevitable moments of "oh, you wanted THAT??" late in the game.
I fully recognize that it's a pain in the ass. But it is an overall net time-saver when I work with many developers. | null | 0 | 1316903753 | False | 0 | c2mbz1k | t3_kq001 | null | t1_c2mbz1k | t3_kq001 | null | 1427642674 | 3 | t5_2fwo | null | null | null |
True | foobeans | null | Learn by picking a better language. | null | 0 | 1316903758 | False | 0 | c2mbz2b | t3_kmygn | null | t1_c2mbz2b | t3_kmygn | null | 1427642674 | 1 | t5_2fwo | null | null | null |
True | cryo | null | Improving code and its tests when it fails in the real world isn't what distinguishes TDD, it's the order in which you do it, so your comment doesn't seem to be in favor of TDD in particular. | null | 0 | 1316903775 | False | 0 | c2mbz4k | t3_kq001 | null | t1_c2mbz4k | t1_c2m9yp6 | null | 1427642674 | 0 | t5_2fwo | null | null | null |
True | immerc | null | Sure, but not being able to copy and paste between a website and an editor is different from checking in code with terrible-ass formatting. | null | 0 | 1316903818 | False | 0 | c2mbzav | t3_kooiy | null | t1_c2mbzav | t1_c2magya | null | 1427642677 | 2 | t5_2fwo | null | null | null |
True | cryo | null | Those inputs can still be unboundedly complex; writing a covering and correct test can be as hard as writing the code, which is my biggest problem with TDD. | null | 0 | 1316903873 | False | 0 | c2mbzhx | t3_kq001 | null | t1_c2mbzhx | t1_c2maol7 | null | 1427642679 | 2 | 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.