Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Thursday May 01 2014, @01:52PM   Printer-friendly
from the relax-its-a-holiday dept.

An outrageous, insightful, and sadly accurate commentary on programming. I found this an extremely entertaining read and agree with most of it. It doesn't offer solutions, but certainly highlights a lot of the problems.

"Double you tee eff?" you say, and start hunting for the problem. You discover that one day, some idiot decided that since another idiot decided that 1/0 should equal infinity, they could just use that as a shorthand for "Infinity" when simplifying their code. Then a non-idiot rightly decided that this was idiotic, which is what the original idiot should have decided, but since he didn't, the non-idiot decided to be a dick and make this a failing error in his new compiler. Then he decided he wasn't going to tell anyone that this was an error, because he's a dick, and now all your snowflakes are urine and you can't even find the cat.

Personally, I think things will only get better (including salaries) when software development is treated like other engineering disciplines.

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by SplawnDarts on Thursday May 01 2014, @08:44PM

    by SplawnDarts (3962) on Thursday May 01 2014, @08:44PM (#38642)

    The problem with programming, and this is not really news, is that it doesn't scale up with size or down with programmer intelligence/capability.

    Yes, in theory you can use any number of techniques to modularize and create interfaces so you don't have to know everything about everything to change the code. And those techniques plain and simple DO NOT WORK. For every successful example of modularization, there are 20 failures. Just look at language standard libraries - about 1/10th are both functional and easy to use. About 3/10ths are theoretically functional but a complete shitstorm to actually use (STL anyone?). The rest aren't even really functional. So for a very well understood problem on which we've spent about 60 years trying to modularize it, roughly one attempt in 10 is successful. Failure rates are obviously higher for things on which less effort is spent, like your code.

    Where does that leave us? Well, if you can't really modularize then the key programming skill is to be able to retain in your brain the full machinations of whatever Rube Goldberg program you're working on so you can make changes and find all the consequences. Great - that's a skill that's about 0.9 correlated with IQ. Only problem: not enough high IQ programmers to go around. So management hires some guy who's merely average, and he's be unable to hold it all in his brain and as a result screw up left and right. So management puts him in a pair with someone who is smart enough, and now that person's output drops and the original dude's still not smart enough.

    The problem, it appears, is largely unfixable. In other words, the amount of complicated, working code the world can have is finite and dependent on a small (relative to all programmers) pool of people.

  • (Score: 2) by maxwell demon on Thursday May 01 2014, @10:41PM

    by maxwell demon (1608) on Thursday May 01 2014, @10:41PM (#38667) Journal

    About 3/10ths are theoretically functional but a complete shitstorm to actually use (STL anyone?).

    I honestly cannot understand the issues that most people seem to have with the STL. For me it's one of the best libraries. Sure it's not perfect, but it's quite close to it.

    --
    The Tao of math: The numbers you can count are not the real numbers.
    • (Score: 1) by SplawnDarts on Thursday May 01 2014, @10:54PM

      by SplawnDarts (3962) on Thursday May 01 2014, @10:54PM (#38672)

      Because it generates code like (taken from an example - maybe not optimally readable): // Dump the list to check the result
          for (list::const_iterator citer = mylist.begin();
                citer != mylist.end(); ++citer)
          {
              cout (*citer).m_iData endl;
          }

      Instead of (python):

      for item in list:
            print(item)

      • (Score: 1) by SplawnDarts on Thursday May 01 2014, @11:01PM

        by SplawnDarts (3962) on Thursday May 01 2014, @11:01PM (#38677)

        OK, HTML formatting mangled that (my bad for not checking)

        // Dump the list to check the result
          for (list<MyData>::const_iterator citer = mylist.begin();
             citer != mylist.end(); ++citer)
          {
            cout << (*citer).m_iData << endl;
          }

        vs (python)

        for item in list:
           print(item)

        • (Score: 2) by maxwell demon on Friday May 02 2014, @06:17PM

          by maxwell demon (1608) on Friday May 02 2014, @06:17PM (#39009) Journal

          In C++11, you can write

          for (auto& item: mylist)
            std::cout << item << '\n';

          Not that much more complicated than your Python variant, is it? But note that (both in C++11 and in Python) this sort of loop needs specific language support, while the STL was written are pure library for C++ (and only afterward integrated into the C++ standard library). You cannot add new for loop syntax using a library.

          Anyway, your examples are not equivalent: The equivalent code in C++89 to your Python code would be cout . I wonder if you intentionally made the C++ code do something more complex to increase the perceived complexity of C++ (also your use of (*citer).m_iData instead of the equivalent but simpler citer->m_iData hints in that direction).

          --
          The Tao of math: The numbers you can count are not the real numbers.
          • (Score: 2) by maxwell demon on Friday May 02 2014, @06:19PM

            by maxwell demon (1608) on Friday May 02 2014, @06:19PM (#39011) Journal

            Damn, should have been preview instead of submit ...

            Of course the corresponding C++89 line would be

              std::cout << *citer << '\n';

            --
            The Tao of math: The numbers you can count are not the real numbers.