back to article Seven pet h8s: Verity is sorely vexed

Peter Wayner, a tech columnist, claims to have identified the seven most vexing problems in programming. According to his subheadings, these are: multithreading, closures, "too big data", np-completeness, security, encryption and identity management. Such lists are constructed to be disputed. Game on. To start with, Mr Wayner' …

Page:

  1. martinusher Silver badge

    A bit of real-time work should see their minds right....

    Programmers as a group have always puzzled me. Applications programmers, that is. They seem live in a world dominated by their user interfaces with a lot of the nuts and bolts -- the boring bits of their software creations -- being relegated to libraries, canned objects and the like.

    They should get a behind-the-scenes peek at real time work where software isn't programming so much as a way of expressing some kind of logical machine using code. This machine may sport an interface, something they'd recognize, but its only a relatively small part of the whole.

    They'd also get a much better appreciation for bugs. Real time systems tend to have real world consequences when the software misbehaves. You can't just pop up a dialog with a cryptic error message in it and quit, there's nowhere to quit to.

    As a BTW, I don't know what people have against curly braces. They're just a delimiter. Try writing a parser using flex/bison or similar and you'll get the idea about why things are the way they are. Trying to pretend -- like Python does -- that somehow spaces can substitute for an unambiguous delimiter to delineate a structure block is, well, just plain stupid. It shows massive egos at work.

  2. Anonymous Coward
    Anonymous Coward

    "Real time systems tend to have real world consequences when the software misbehaves."

    Reminded me of working on software to control a tank turret. After an unfortunate accident, a large lump of nickel steel was attached to the turret, and ditto to hull, to prevent the turret rotating too far and taking the cabling with it, along with the damage to a human occupant.

    Working on the thing from the inside, it was less than encouraging to notice the large dents in the lumps of nickel steel, and having to hope that the welds were still sound.

  3. zanshin

    As a fairly heavy-duty Python coder

    I don't understand the resistance to Python 3.

    I *do* understand the issues it causes with legacy codebases, and how the pain involved in porting an existing codebase to the new version (where even possible), may not make sense. This, in turn, may result in needing to write new code in older versions of Python so they work with these legacy codebases. I have to do this myself, and find it manageable. (I have also successfully ported existing code libraries, though they were all pure Python with no C extensions.)

    Aside from maintaining legacy codebases, though, I don't really understand why anyone would prefer the 2.0 branch. As someone who started with Python back in 2.2, I personally find the 3.x dialect's modest syntax changes and its library reorgs sensible, useful, and less obtuse in a number of ways.

    Tying in to the discussion of Uncode text, I find the Py3K change to dealing with all strings as Unicode to be far more practical and safe in any context where you have to deal with non-ASCII data. Which these days means just about anything that touches text.

    And finally, though I love working with Python, no, I'm not the biggest fan of the syntactic relevance of white space. I deal with it without serious issue, but I wouldn't mind at all if I didn't have to deal with it. That said, I really think anyone who can't deal with it doesn't really want to try. If interns opening and closing a Python source file in a text editor is actually a problem, that's pointing out a pretty serious deficiency in source code management. I'll agree it'd be much nicer to not need to worry about it, but come on, really.

  4. Kevin McMurtrie Silver badge
    Boffin

    Concurrency

    Multi-threading has many well developed mechanisms for producing exactly deterministic results in a predictable amount of time. It's a solved problem.

    The hard one is distributed concurrency - a large number of machines all solving a single task. The difference is that machines are connected with latency, machines may go silent, and machines may suddenly come back to life after they were presumed dead. Anybody working at a hot startup will quote a bunch of Apache projects claiming to completely solve distributed concurrency with eventual consistency. The "eventual" in "eventual consistency" is normally a short period of time but it also may be infinity, and there might not even be a method of determining when the transient results have finally passed. There may also be eventual failures due to conflicting inputs that could not originally see each other. Such projects are typically poorly documented, not bug free, and may contain features that will not work in realistic conditions.

    Distributed concurrency is fairly new and not solved as much as people expect it to be. Depending on the type of task, it might produce exact solutions in a known time, exact solutions in an unknown time, or inexact solutions in a known time. The hard part is transforming your task or expectations to match what can be done.

    1. Roo
      Windows

      Re: Concurrency

      "Distributed concurrency is fairly new and not solved as much as people expect it to be."

      Depends on your definition of "new", folks were working on this problem before ARPAnet first started punting bytes around the place. Leslie Lamport et al wrote the "The Byzantine Generals Problem" paper ~1980, and it was not a new problem for them to solve even at that time...

      From my point of view, academically, distributed computing/parallel processing is fairly mature, there are plenty of robust models and papers out there, the problem is that folks invest their time in looking for silver bullet frameworks rather than reading papers and applying grey matter.

  5. Flocke Kroes Silver badge

    Zed Shaw's rant

    People have already lambasted Shaw's ignorance of why bytes and unicode need to be different underlying types. He mentioned a combined bytes/unicode object, but shows no understanding of why it came into existence. (Lazy scripters waste lots of cycles encoding and decoding the same string. By keeping the unicode and encoded versions together, python can recycle an existing objects instead of creating new ones.) I noticed Shaw did not mention the new style classes available in python3 that make multiple inheritance work. It is almost as if he has left multiple inheritance in the tool box because he never recognised the right times to use it.

    Python devs believed fixing python2's defects with multiple inheritance and unicode properly were going to require changes that would be incompatible with the existing language. They created python3. Shaw did not create a language compatible with Python2 that fixed the inherent flaws.

    After a huge tiresome rant about the need for backward compatibility, Shaw recommended deleting python's legacy string formatting mechanisms. I could not find the words to express what I thought about that, but someone has helpfully created a suitable web page here.

  6. W.S.Gosset

    >Well, I say "okay". Actually it is a pig to use, and its makefiles tend to be as robust and immune to environmental changes as a mechanical wristwatch fashioned from ice. But at least it was standard.

    Verity -- that rationality, on both sides -- I think I just fell in love with you.

Page:

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like