Wednesday, January 2, 2013

Computer programming remains the province of experts

Every so often, you'll hear people bemoan the fact that computer programming is so intricate and obtuse and complex, and wonder when we'll arrive at a time when computers aren't so doggone hard to program, and everybody who wants to can simply program computers to do whatever they want.

Well, today's news is that, though that might be a laudable goal, we're still an incredibly long way away from that.

Two postcards from the front lines of today's most mature programming languages, C++ and Java, follow:

  • Herb Sutter brings us a treat of a video: You Don’t Know const and mutable (the video is here).
    there's actually another major change that isn't being talked about anywhere, or even being listed as a change in C++11 at all as far as I know, because I and other key experts and committee members I've asked didn't fully realize that we altered the basic meaning of not one but two fundamental keywords in C++. It's a change that has profound consequences, that rewrites and/or invalidates several pieces of pre-C++11 design guidance, and that's directly related to writing solid code in a concurrent and parallel world. This isn't just an academic change, either — everyone is going to have to learn and apply the new C++11 guidance that we'll cover in this session.
  • Meanwhile, from Java-land, Heinz Kabutz digs deeply into the meaning of Java's "final" keyword: Final Parameters and Local Variables
    I am not against marking fields final, as this has some useful concurrency semantics. I am also not against making methods and classes final if that is going to help to guide users of your classes on how they should be extended. This is only a rant against marking local variables and parameters as final, when it is not necessary to do so.

An interesting aspect of both of these situations is that they involve bits of the programming language (const for C++ and final for Java) which have been around for more than 20 years (I remember working with const in 1987 or so, and with final in 1995 or so, but they both probably pre-date those memories).

It's my job, nay my career, nay my entire professional life, to learn, keep tabs on, and otherwise eat, drink, and breathe incredibly annoying details like these.

If that is your life, too, then hopefully you found these links useful.

And if that is not your life, then maybe you know understand a little bit more about why it's going to be a long time before the fundamental aspects of why computer programming is hard cease to matter.

No comments:

Post a Comment