Currently, the app reloads the entire data set after every addition and every row edit. Not a problem with small sets, but a significant performance penalty when dealing with large ones. Let’s fix that by interacting directly with local DataTables data set in the browser.
Today, I’ll update the selenium automation test to wait on ajax calls. We haven’t seen any problems so far because our web application is too fast - not surprising as it is running with all data in memory on the local server.
Let’s start by slowing things down to see the problem. I’ll do this by adding a query parameter to the getUserMap method and using that parameter to request some sleep before returning the User set.
Today, I’ll update the selenium automation test to check whether the user exists before adding. The general algorithm goes like this:
- Use DataTables search on email address
- Check the table rows to see if the user already exists
- If the user does not exist, then add the user
- If the user does exist, then clear the search
The first step is to update our pom.xml. I’ll be using:
I’m a Broncos fan. So I freely admit that my objectivity regarding DeflateGate is suspect. But one thing is clear.
Not so long ago, Jastremski and McNally would have said they were living the dream. Jastremski worked for one of the premier franchises in the NFL, perennial Super Bowl contenders. Half the male population of the United States wanted his job. McNally was a part time employee of the Kraft group, working Patriots home games. McNally is reported to have been associated with the Patriots for ⅔ of his life.
Now, Jastremski is indefinitely suspended without pay. He will probably never work for a professional sports team again. McNally will never be on the sidelines of an NFL game again.
However DeflateGate plays out, Robert Kraft, Bill Belichick and Tom Brady will be fine. Kraft will be a fabulously wealthy NFL owner, Belichick will be one of the best coaches in NFL history and Brady will be an all time great at quarterback. But the lives of Jastremski and McNally will never be the same again.
I hope you find it useful.
Thanks to a Tyler Cowen post, I just lost the better part of a day reading posts by Jo Walton on Tor.com this past week. If you love science fiction and fantasy, then you owe yourself a skim of her posts - there are only about 800 of them. And subscribe to the tor.com rss feed while you’re at it.
That is the title of the new Jo Walton book, and the subtitle is Re-Reading the Classics of Science Fiction and Fantasy. It is an extended paean to the pleasures of re-reading, exhibiting a taste which is interesting , useful, and yet uneven …
Today, I’ll add the ability to edit users. This will be easy, as most of the pieces are already in place. First, I’ll add a new editUser method that accepts an updated user object, verifies that the user exists and then saves the updated user object. The only differences between the new editUser method and the existing postUser method are:
- Invert the test on users.containsKey() to throw an error when the user does not exist (editUser) rather than when the user already exists (postUser).
- New method name and @Path annotation
I caught Saving Mr Banks, on the making of the Mary Poppins Disney movie, on cable the other night. Worth seeing, especially if you prepaid via a cable subscription. Many reviewers praise the flashbacks to Mrs. Travers’ past and how it tied to her current behavior. Personally, I wasn’t that interested in why she was a pain. I just enjoyed watching the Disney team work their way through it.
The final scene has a tape recorder playing some of the original recordings between Mrs. Travers and the Disney team. I can’t be positive, but I believe my family owned a Wollensak T-1500 reel to reel tape recorder in the early 70’s.
I am a sterling example of:
Human beings adjust behavior based on the metrics they’re held against. Anything you measure will impel a person to optimize his score on that metric.
A daily weigh in on the Wii Fit helped me lose 15 pounds in 2010 (I gained about five pounds back over the next three years). I received a Fitbit Force as a present last year and I was able to ride that for another 15 pound loss. Another 15 pounds and I can declare victory.
I’d like to have a heart rate sensor in my next fitness tracker. The Fitbit Charge HR or Surge might be the answer. I just don’t know if I can wait that long - a new fitness tracker would be a great Xmas present.