Skip to main content

View Diary: Astounding True DK4 Bug Story (181 comments)

Comment Preferences

  •  Yes, that's correct... (8+ / 0-)

    ...and I suspect it's at least in part by design; I'm guessing the API puts a cap on the length of the list returned. I think I might have heard something about mumble mumble fixed-length string.

    While we ponder a way to keep that from busting the rec button (and all the other rec button madness, heaven help us), you can of course confirm whether or not your rec has worked by viewing your recent comment ratings list in your profile:

    My Page -> Comments -> My Comment Ratings

    •  Well, as long as you're pondering it, (3+ / 0-)
      Recommended by:
      rs, KenBee, ebohlman

      that's what counts!

      Thanks for everything, and I'll keep in mind how to see whether I've already recommended something.  Now that I know what is going on I don't think it will bother me.

      I'm going to make one suggestion, since I can't help myself (seeing as how I am a programmer myself) but please feel free to ignore it.  I'm guessing you have a database table that stores the people who have recommended a comment, so can't you make a method that gets that info for the user id, and based on the value, choose whether to show the radio button as selected or de-selected?  I.E. don't base it on the value of what's showing up in the fixed length string, but rather base it on the underlying data.

      OK.  Done now.  I will go back to my day job.  Thanks again!

      •  Very important principle here (4+ / 0-)
        Recommended by:
        rs, KenBee, swaminathan, pensivelady

        Once you've transformed some data into a human-readable representation, the only thing you should be doing with that representation is displaying it to humans, and the only decisions you should be making based on the content of that representation are ones about how to display it. You absolutely should not be parsing or otherwise digging into the representation in order to make decisions that depend on the underlying data that the representation was created from; those decisions must be made based on the original data itself.

        In other words, the controller should be making decisions based on the model, not the view.

        For some reason, sloppy programmers are especially likely to break this rule when it comes to representations of dates/times.

        If you Google "headache brain tumor", you will come away convinced that your headache is actually cancer—Seth Mnookin

        by ebohlman on Mon Feb 28, 2011 at 06:49:36 PM PST

        [ Parent ]

        •  That's a good principle... (4+ / 0-)
          Recommended by:
          asterlil, Tinfoil Hat, KenBee, pensivelady

          ...when the client side of your client-server system has everything it needs to transform the underlying data to its human-readable form.

          So yes, that would absolutely be excellent advice if each browser had a uid to uname mapping of all 300k+ users for the site.  Or a transient partial table that would need updating, make the API unwieldy, and be an error-handling headache on unreliable connections.

          There are times when Correct Software Engineering Principle conflicts with that other rule where you don't build needlessly complex systems just for the sake of Correctness.  I think it's got an acronym and everything.

          pensivelady's solution is the right idea; have the API obtain the current user's uname (if any), and return it, if appropriate, at the beginning of the (potentially truncated) list; this is a drop-in fix requiring no change to the client-side code (or perhaps one change-- an extra parameter passed into the API call if there's no authentication as is).

          I definitely hear you on the time/date thing, though, having nerded on the Y2K team for a Large Company with a Very Large internal codebase... I still get the vapours whenever I have to process a timestamp that isn't a 64-bit integer.

        •  If I understand that right, (0+ / 0-)

          it would be saying don't pipe text files. That it's against some sort of rule.

    •  Oh, and... (5+ / 0-)

      ...there may be a brief delay before your rec shows up on your Comment Ratings list.  So if you don't see it IMMEDIATELY OMG WHAT HAPPENED, then, uh, wait a bit and check again.

      Yes, yes, annoying.  Also UI design principles, no-latency feedback, responsive controls, tangential rant about fonts, and in conclusion, righteous harrumphing.

    •  I super super miss being able (0+ / 0-)

      to expand the list of who has recc'd my comment into a long, ordered list.  

      How am I supposed to keep track of, and get to know, my fans and imaginary friends, when they're all jumbled up in paragraph format???

      I need to STUDY those names.  

      "The extinction of the human race will come from its inability to EMOTIONALLY comprehend the exponential function." -- Edward Teller

      by lgmcp on Tue Mar 01, 2011 at 06:27:50 AM PST

      [ Parent ]

    •  Can you fix it? (1+ / 0-)
      Recommended by:

      My lowly Mojo Analyzer (for Mojo Friday) depends on all the comment recommenders being listed.  Until this is fixed, then the Mojo Friday Post Game stats are (gasp!) tainted.

    •  Like I don't have enough windows/tabs open (0+ / 0-)

      already? Sheesh.

      Information is abundant, wisdom is scarce. The Druid

      by FarWestGirl on Tue Mar 01, 2011 at 10:00:03 AM PST

      [ Parent ]

Subscribe or Donate to support Daily Kos.

Click here for the mobile view of the site