Settings

Theme

3 Dogmatic Beliefs that Make Development Painful

info.rjmetrics.com

15 points by cmcarthur 14 years ago · 14 comments

Reader

_ea1k 14 years ago

The TDD issue is really the biggest for me. I've run into many developers over the years who shout how much more efficiently things would be built if we all just did that. Surprisingly few do it themselves, though, due to a "lack of time". The contradiction in that never quite hits them for some reason.

TDD has it's place, but taking it as an incontrovertible dogma is not useful.

  • rads 14 years ago

    It depends on the person. Does writing tests help you understand the problem, and if so, does that help you solve it faster? Only you can answer that. Here's a quote from Rich Hickey that really struck home with me:

    > I never spoke out 'against' TDD. What I have said is, life is short and there are only a finite number of hours in a day. So, we have to make choices about how we spend our time. If we spend it writing tests, that is time we are not spending doing something else. Each of us needs to assess how best to spend our time in order to maximize our results, both in quantity and quality. If people think that spending fifty percent of their time writing tests maximizes their results—okay for them. I’m sure that’s not true for me—I’d rather spend that time thinking about my problem. I’m certain that, for me, this produces better solutions, with fewer defects, than any other use of my time. A bad design with a complete test suite is still a bad design. (http://www.codequarterly.com/2011/rich-hickey/)

    Another question to ask is does this help others understand the problem? You often don't write tests for yourself, but for other people, including the later you that has popped the problem off the mental stack long ago. Writing tests might lose you time right now, but the net gain of time saved by others may make up for it. Let me emphasize the word "may", because you might make the problem clearer by writing documentation in English rather than code. So the only conclusion is that it depends, it depends...

    • _ea1k 14 years ago

      I agree with essentially everything that you said. The one thing that I'll add is that I was speaking specifically of Test Driven Development, not of tests in general.

      The benefits of using tests as documentation come regardless of religious adherence to test-first, and in my opinion are often hindered by it. I agree that tests can make great documentation, as well as adding value for a number of other reasons (regression, etc).

      I severely question the concept of writing them first in all (or even most) cases, though.

  • cruise02 14 years ago

    What you've constructed here is called a straw-man argument.

    • tomjen3 14 years ago

      Nope, he speaks the truth. The only thing I have learned in development is that there is no answer that is always right (with the possible exemption that you should always use a version control system) but there are some that are always wrong. TDD does not belong in that category, and it can be a very useful tool when you know exactly what you want the code to do and just have to figure out how to get it to do that.

      In general this means you will be writing mathematical or algorithmic code which can easily be separated from the rest of the system.

      • moonchrome 14 years ago

        I don't think there is a majority of developers out there that believe that TDD is the end all be all solution to software development problems - and thereby "make programming painful". A lot of people think it applies well to a very large domain of problems and his argument doesn't address any particular scenario - it just states it's not a panacea - strawman.

  • MartinCron 14 years ago

    taking it as an incontrovertible dogma is not useful

    I dare anyone to provide any example of incontrovertible dogma as being useful.

Skroob 14 years ago

I disagree with the first point. I think that there are such things as objectively bad languages, and that their use should be avoided. Whether or not C++ or PHP is on the list can be argued ad infinitum, but there isn't any reasonable argument for implementing anything in, to take the most extreme example, Brainfuck.

  • mikedougherty 14 years ago

    Additionally, while the author is correct that a bad developer is a bad developer regardless of toolset, it's much easier to completely fuck everything up in certain languages. It's quite easy to write code that allows for buffer overflows or XSS vulnerabilities in some languages, and not quite so easy in others.

    The important thing, to me, is that the language's path of least resistance leads you to The Right Thing. This generally improves quality of life for good devs and reduces the amount of harm bad devs can cause.

  • SomeCallMeTim 14 years ago

    I absolutely hate C++ myself, and yet I'm an expert in the language, and I still use it when I need a combination of speed and object-oriented development (which comes up a lot in game development).

    So is it an objectively bad language? Arguably. It just happens to be better for some tasks than all the alternatives, giving me code that's "safer" than C, almost as fast as C, and portable to all the platforms I need to target.

    • moonchrome 14 years ago

      One would hope that in light of great compiler tools such as LLVM, different parser generators/toolkits and extensible IDE's we wouldn't be stuck writing code in a languages designed in the early 80's, manually separating definitions in to headers and using preprocessor to "include" files. Every time I see the accretion of junk/legacy design decisions in software get entrenched further (eg. Microsoft pushing for a return to C++) I die a little.

      • SomeCallMeTim 14 years ago

        The problem is the huge activation energy required to get people to move to a new language.

        Microsoft TRIED to get people to move to a "better" language (C#, which IS arguably better than Java) but the .NET runtime is massive and doesn't ship with existing tablets/phones, meaning it (or rather, Mono) would add 10Mb+ to a download size that needs to stay under 20Mb to download over-the-air (2G/3G/4G).

        A lot of people did jump on that bandwagon, but C# isn't really great for games, and so the adoption has been lukewarm outside of the Xbox/Windows Phone development community.

        Point is, until someone has created something that really is BETTER than C++ in the ways that it needs to be (which probably requires heavy investment in tools as well as libraries), it's going to be an uphill battle to get people to change.

        Even if you had the Perfect Ultimate Language designed an implemented today, you'd need support in everyone's editors, debuggers (including source-level remote debugging support and any necessary server modification on all target platforms), cross-platform build support to all the relevant architectures, C/C++ linkage (unless you plan to rewrite all current libraries), JNI linkage (so you could interoperate with Java, which is required on Android), and support for multiple paradigms (NO single-paradigm language will ever be adopted across the board, nor should it be -- different programming problems are solved best with different paradigms).

        Honestly "D" is the language that best fits the bill that I'm aware of, though it has a long way to go as far as support on other platforms and mindshare. I haven't yet USED D, though, so I can't really critique it intelligently.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection