Wednesday, November 30, 2016

Review: Internet and Fax 56K USB Modem (Sewell)

I know: you're thinking that Piaw has finally taken this "retro-grouch" thing too far. Sure, my phone's from 2015, and my computers from 2009, and many parts on my bicycle are even older than that, but a modem? In this day and age?

So what happened is that in dealing with my parent's long term care insurance, I frequently have to fax documents to them. You can use FaxZero, which is free for faxes under 3 pages (with a maximum of 5 free faxes a day), but more than that and you're paying $2 per fax (which is insane). Other online fax services start from $17/month and go up from there, with $10 setup fees and what not. I bet they're really hard to cancel too! Then I remembered that I actually had a landline that came as part of my internet plan. I actually try to get rid of it every so often, but it apparently qualifies as some sort of "double play" promotion which means that my internet price would be higher without it!

I tried buying a dumb old fax machine, but they start at $40. That in itself is not a problem but they're huge! So I went with a USB Fax Modem. I went for the cheapest $14 modem, which is still cheaper than even a month of fax service. Windows 10 came with a Fax and Scan software (though in practice I use Acrobat 9 to scan and then convert the PDF to TIFF). It's clunky and not the best UI but I don't have to install anything, and it works.

I don't use it often (maybe once a week or so), but if you need to fax something and have a computer with a scanner, this is way to go. It's tiny, doesn't chew power or require an extra power socket, and you can just plug it into a computer with a USB-A port. If that means I'm stuck buying PCs instead of Chromebooks, so be it. Tag me with a retro-grouch label. See if I care!

Recommended.

Tuesday, November 29, 2016

Review: Medical School for Everyone: Emergency Medicine

I picked up Medical School for Everyone: Emergency Medicine thinking that it'll be a boring litany of cases of what you need to go to the emergency room is for. I was wrong. This course (I'm tempted to say "show") is an exciting, fun, and informative series of case studies that are fast paced, interesting, and way more fun than real medical school would be, since you wouldn't have to suffer sleep deprivation to go through it.

The first couple of episodes cover some basic things: triage (or why you have to wait so darn long to be seen when you visit the ER --- and why you do not want to be the person who skips over everyone else to be seen first!), how emergency responders work. Then the course goes into how to do diagnosis, from the initial ABCs (Airway, Breathing, and Circulation, then Disability and Exposure) and the OLD CARTS rule (Onset, Location, Duration, Character, Aggrevating factors, Relieving factors, Timing and Severity).

Every episode contains a bunch of case studies, each of which is a patient, some of which are modeled on famous outbreaks. You're then challenged to provide a diagnosis (and yes, all the clues are fair, so when you do get one there's a very strong sense of satisfaction!) and then the lecturer provides the outcome. It's all told in second person, choose-your-own-adventure style and I guarantee it provides intellectual challenge and interest. In some cases, he even interrupts your thinking with another patient that's come in and triaged ahead of the current case, which is very realistic, and then you'll have to return to the previous patient later, providing added mental challenge.

Not all of the problems are completely medical in nature. In a number of cases, sociological factors come into play. This truly is a comprehensive array of interesting cases. If I'd audited this series when growing up I might have decided that being an ER doctor would be a lot of fun (or maybe not, Dr. Benaroch doesn't shy away from the massive amount of blood and trauma he has had to deal with, and the occasional patient who doesn't survive the ER visit, despite doing everything right). In any case, I think it presents a fair, undramatic portrayal of how an ER doctor's day goes --- many of the diagnosis are only arrived upon after calm thinking, listening and reflection, and the tests are only there to confirm the diagnosis.

The series closes with an exploration of some practical issues: what cases are worth going to the ER for, and what cases aren't. When should you treat a fever, and when is a fever actually helpful? What should you do before traveling to a foreign country? This advise is good and also illustrated by case studies that amplify the point.

Needless to say, this audio book comes highly recommended, and is well worth your time. Highly recommended, especially if you have accident prone kids who have to visit the ER often.

Monday, November 28, 2016

Review: Moonwalking with Einstein

Moonwalking with Einstein is Joshua Foer's memoir of his experience going from a journalist covering the world memory championships to becoming a competitor himself and winning the U.S. memory championships.

Along the way, Foer covers deliberate practice, and even provides a few tips on how to overcome plateaus. At one point, his speed in memorizing numbers stopped improving, and upon asking for help from an expert, was told to approach it differently (instead of directly trying to improve his time, tried to memorize more numbers in the same amount of time, which would inevitably lead to failure, which actually created more learning), which overcame his barrier. This is good stuff, and well worth reading.

He also describes Daniel Tammet (who wrote Born on a Blue Day). He presents compelling evidence that Tammet wasn't an Autistic Savant as he claims in that book, but rather, a normal person who secretly practiced memory techniques in order to pull off the stunts and claims that he was in fact, an Autistic Savant. This is huge as well.

There's the usual coverage of well-known memory techniques, like memory palaces, and the social scene revolving around the posturing and out-psyching of each other that you would expect to find at top level competitions. Even then, the behind the scenes look at the memory championships makes you realize something --- even these experts have to triage on what to remember. In one of the events, Foer basically gives up on memorizing phone numbers and won simply by becoming lucky enough to never be called on to remember them!

In the end, however, Foer realizes (and even says it outright) that while becoming the U.S. memory champion was a great experience in and of itself (it's pretty impressive to be tops at anything in the US), the memory techniques he learned didn't really help out in day-to-day life: he still forgot where he placed his car keys and other random mundane things, which was one of the primary drivers for him to try to improve his memory in the first place!

Finally, he explains why most people find that "time passes faster as you get older":
“In youth we may have an absolutely new experience, subjective or objective, every hour of the day. Apprehension is vivid, retentiveness strong, and our recollections of that time, like those of a time spent in rapid and interesting travel, are of something intricate, multitudinous and long-drawn-out,” he wrote. “But as each passing year converts some of this experience into automatic routine which we hardly note at all, the days and the weeks smooth themselves out in recollection to contentless units, and the years grow hollow and collapse.” Life seems to speed up as we get older because life gets less memorable as we get older (Kindle Loc 1157)
 In other words, if you want a subjectively longer life, have more fresh experiences rather than allow your life to become routine. I've often had this experience during a tour: 2 days ago feels like ages ago, and a week ago might as well have been a lifetime, yet every memory is fresh when I go back to write it up. Life lived intensely is memorable and easy to recall, while the routine gets compressed and lost in time.

I'm surprised by how much I enjoyed this book. Recommended!

Wednesday, November 23, 2016

Review: Nutrition Made Clear

You probably already know everything that's in the course, Nutrition Made Clear. For instance, In Defense of Food, summarized everything in one sentence: Eat food, not too much, mostly plants. But those books tend to be written for English majors: there's a huge amount of text devoted to the author's personal foibles, etc., while being tremendously short on facts or how you should approach the entire process.

Nutrition Made Clear is a good antidote for the typical nutrition book. It's very focused, and while it does make use of anecdotes (in the form of case studies of patients she's seen, or members of the Rice football team), goes mainly for the facts and what we know (and don't know) about nutrition.

She's brutally honest about her profession, noting that over the years, nutritionists have shifted from the vitamins and minerals approach to whole foods approach, mostly because the many ingredients found in fresh fruits and vegetables (phytochemicals) have many beneficial properties that have yet to be extracted, understood, or properly studied, hence the advise to "eat all colors of the rainbow." She also notes that coffee and tea also have similar properties, which are also not well understood --- though in the case of coffee and tea, the tannins also have some adverse interactions with certain minerals (in particular, coffee and tea reduces iron absorption --- don't drink coffee while eating your oysters, for instance!).

Sprinkled throughout the lecture series are several tips:

  • Nutritionists used to think that you have to eat complementary vegetable proteins to make a whole protein in the same meal (e.g., rice and beans). Now they think it only has to make it through your stomach on the same day to make the whole protein.
  • Use cast iron frying pans to increase iron absorption in during normal cooking. The contamination properties of cast iron frying pans can really make a difference in adding iron to your body!
  • Omega-3's beneficial properties for people at risk of heart attacks also thins the blood. So don't assume that a little is good means more is better. Too much Omega-3 could thin your blood so much that you could have trouble clotting! In particular, don't combine with blood thinners.
  • Most people who successfully lose weight and keep it off eat breakfast every day! Don't skip this meal if you want to lose weight!
  • Moderation is key. Too much of anything could cause problems. But in general, your plate should be 50% vegetables, 25% meat, and 25% whole grains. She provides detail and color as to why eliminating carbs entirely might not work out.
  • Calories in vs calories out is not obsolete!
  • People think that exercise doesn't work when it comes to losing weight. This is wrong. It mostly doesn't work because people out-eat their exercise. A 1 mile walk (2000 steps) is 100 calories burned. It's very easy to go for a 1 mile walk, and then come back and eat  a bar of chocolate (280 calories), and then you've out-eaten your exercise and then some! If you actually want to control your weight, you need to exercise half an hour a day, every day! If you want to lose weight, you need to bump it up to at least an hour a day, every day! (By the way, this explains why step counters actually hurt some people when it comes to weight loss -- that 10,000 steps is only 500 calories, which is trivially easy to out eat) Conversely, this explains why I practically have to force-feed my companions chocolate and ice cream during the Tour of the Alps. It's substantially much harder to try to eat 3X your normal calorie intake.
  • Other benefits of exercise (such as reducing risks of heart attacks and diabetes) only work for 24 hours after the exercise. So treat exercise like a pill you take every day.
So, in general, you know all this. But it's very nice to have someone spell it out for you (such as eating an extra slice of bread a day - 50 calories more) adds up to about 10 pounds of weight gain a year. The lecture series lays it out in stark terms.

Anyway, I enjoyed the series and would recommend it to anyone, even if they think they already know everything there is to know about nutrition.

Tuesday, November 22, 2016

Review: Madame Xanadu Vol 1 - Disenchanted

I saw Madame Xanadu: Disenchanted at the used book stack for $2 at the library, and when I saw the Matt Wagner by-line, I immediately picked it up.

Madame Xanadu is one of the more obscure characters in the DC canon. Wagner cleverly ties her to Merlin, Etrigan, the Phantom Stranger, Marco Polo, Jim Corrigan, Zatara, Jack-the-Ripper, and Marie-Antoinette. The tromp through history is interesting, but the story doesn't really go anywhere. I supposed if I picked up the other 3 volumes, I might some enlightenment, but I suspect that I could end up just tolerating a whole bunch of cameos in a comic book that has no real direction to it.

That's very disappointing for a writer of Matt Wagner's caliber.

Not recommended.

Monday, November 21, 2016

Video Games of the Year 2016

I didn't get around to too many video games this year, but by far the best was The Witcher 3. Lovingly produced, tons of content, and beautiful graphics. I'm still waiting for a sale so I can pick it up again and pick up the DLC and keep going on that lovely story. It's a huge time sink, but well worth it. Thinking back on it, I was surprised that Uncharted 4 or Rise of the Tomb Raider didn't win this instead. Both are very much worth your time, though I'd tip more towards Uncharted simply because I felt the creative team took more risks with the story on that one. But neither are games I'd want to come back to.

On the PC/Android side, Her Story is an unusually great story and well worth your time. It's game UI is essentially a search box, so if you pride yourself at being great at search engines, this one is for you. I think you can't go wrong on that.

Friday, November 18, 2016

Books of the Year 2016

This year I read a total of 59 books, with audio books helping out in a big way, getting me more material to read while my hands can do something else.

This is once again a great year for novels, and there's no question that my favorite book this year was Matterhorn. Intelligent, well-written, a reflection on the politics of large organizations as well as the realities and dysfunction of war, you can read this book so many ways and get something new out of it every time. I highly recommend this book, and think it should be in every person's library.

Coming in next was The Rosie Project, which was a heck of a fun book, and well worth your time. In fact, it makes a great counter-balance to Matterhorn and it's deep heavy themes.

On the non-fiction side, I'd rank Scientific Secrets for Raising Kids Who Thrive as the best non-fiction "book" of the year. It's full of surprising results, and if you're a parent, well worth your time to read and review. On a similar note, Producing Excellence is also great reading, though it's mostly of the cautionary nature, rather than prescriptive. It's difficult to find, so few have read it, which I think is a pity.

I didn't get to too many graphic novels this year. The Sculptor was a good novel, but just falls slightly short of "great."

Thursday, November 17, 2016

Review: Eccentric Orbits

I picked up Eccentric Orbits after learning that there was a book about the Iridium satellite system. I'd always thought that the system had been decommissioned and was no longer used, but it turns out that Iridium is alive and well, and has even launched a second generation set of satellites.

The interesting thing about Iridium is that it truly is a "world phone", as in, it would work anywhere in the world. The conception behind is improbably and only a company the size of Motorola could have done it --- launching 66 satellites into low earth orbit and designing and building a system where satellites could pass connections to each other in real time while routing calls to an Earth gateway station. It is even today an astonishing bit of engineering in an age where big companies seemed content to do unambitious stuff like continually launching new messaging apps and copies of each other's phones.

Unfortunately, the book spends preciously little time on the engineering of the system. It mostly focuses on Dan Colussy, who basically organized a buyout deal for Iridium after Motorola gave up on it and was about to de-orbit the satellites. That story is interesting: Motorola could have run the system at a reasonable profit, but chose not to. The lack of vision by Chris Galvin (who's clearly the villain of the book) fore-shadows the ultimate destruction of Motorola until its repeated sale to Google and Lenovo.

But there's only so much stomach I can have for stories about financial desperation, of chasing after Arab sheikhs with retinues whose jobs depend on showing how important they are. After the nth iteration of such stories I simply started skimming the book. I didn't get the feeling I missed much even right at the end, where the author simply skimmed on current applications of the Iridium Satellite system, Iridium NEXT, and the analysis of how nobody cared enough about Iridium despite it's obvious benefits.

Here's what I got out of the book from a marketing point of view:

  • Iridium was flawed in that it required a clear line of sight to the sky. It wouldn't work inside buildings, so despite being a truly world phone, it's market was pretty restricted to outdoors people. Soldiers, hikers, sailors, maritime applications were the only major markets willing to pay for a phone with such restrictions.
  • The low bandwidth meant that once the mobile internet took off, there was no chance of Iridium getting mass market appeal.
  • The handsets were huge and expensive. They did get smaller, but never got very much cheaper.
  • All the other technology solutions being investigated by Google and Facebook (balloons, etc) were investigated by the Iridium researchers. All of them had crippling flaws which was why Iridium is still the go-to- system today for the military and maritime applications.
All in all, the book's barely worth a read unless you're Dan Colussy or much more of a financial nerd than I am.

Wednesday, November 16, 2016

First Impressions: Woom 3

It was inevitable: Bowen outgrew his Woom 2, and we had to buy him a bigger bicycle. The Woom 3 was the natural choice: I briefly did some research, and confirmed that nobody else made anything better, placed an order, and waited a month because Bowen's favorite color (red) was back-ordered.

The box arrived, and I immediately put it together and was amazed by the improvements Woom has made in the bike over a year:

  • The bike was now 3 pounds lighter than the Woom 2, despite being a bigger frame with bigger wheels! The weight savings were done by substituting an aluminum fork for a steel fork, and by reducing the size of the tubes used in the bike.
  • Assembly is also dramatically improved. The Woom 2 came with V-brakes that were mal-adjusted, and Pardo and I had to adjust them quite a bit from the "out of the box" condition. If you've ever adjusted V-brakes you know that's a pain because they have too many degrees of freedom. Well, this year, the Woom 3 came with brakes that were adjusted correctly!
  • No more coaster brake option! All Woom bikes now come with 2 hand brakes and a freewheel! This is so obviously the correct design that you would think the bicycle industry would adopt it as standard. But that would be way too sensible, like building a waterproof phone or something, so practically nobody does it. It also means that if Amazon is your preferred vendor, you can buy it from Amazon as there's no need to order a separate freewheel rear wheel, etc.
  • Bikes now come with a kickstand and bell. The kickstand is dramatically improved from the 2015 version, and Bowen can now actuate and de-activate it at will.
Well, nobody's perfect. There's one obvious defect in the new design:
The rear dropout faces backwards. This is poor design because when you get a rear flat, how the heck are you going to remove the rear wheel? The older Woom 2 had forward facing dropouts like an old-style track racing bike. That's correct, because when you have a flat, you'd undo the nuts (still no quick release, but that's CPSC's fault), push the wheel forward, and the rear cog would disengage from the chain and now you can remove the wheel. If a flat occurs on the Woom 3, you'd have no choice but to get out the chain tool to break the chain so you could remove the wheel in order to fix that flat. Bad design, and a head-scratching one because they did it correctly last year!!

Bowen took a day or so to get used to the bike but now he loves it. It's obviously well done, and he likes it. (He put 100+ miles on the Woom 2, and it'll obviously go for another 100+ miles when his brother learns to ride) As long as he doesn't get any flats on the rear wheel, I'll like it too.
Highly recommended, and kudos to Woom for actually listening to customers and improving their product!

Tuesday, November 15, 2016

Review: Hard Choices (Audio Book)

Hard Choices is Hilary Clinton's memoir of her time as the Secretary of State for the USA. It's a long book --- I started listening to it on the train during the Tour of the Alps, and it took the better part of several months of listening before I finished.

Rather than being a strict chronological account of her time as Secretary of State (SoS), the book's divided into sections geographically first, and then at the end based on themes regarding the future of human rights. The choice of geographical partition allowed Clinton to highlight what she thought were important themes during her tenure (e.g., the pivot to Asia), but also served to reduce what seemed to be a particularly hectic time into much more than a frenetic series of activities.

International diplomacy is a strange affair for those of us not particularly interested. In particular, the US has an outsized influence mostly because of its wealth and military prowess. Yet under certain administrations, the State Department tries very much not to appear as though it's twisting arms. I was amused by Clinton's account of how the State Department maneuvered around China's claims of sections of the South China seas: while China would rather do one-on-one negotiations with each of the smaller countries, the US would try to organize negotiations as a group at regional meetings like at ASEAN so that the smaller countries (with US backing) could feel like they could all stand up together against China.

If you enjoy the back-story of various such diplomatic shenanigans, you'll enjoy the book, as there were many descriptions of such back-room arm twisting (such as during the Israeli-Palestinian rocket assaults, as well as sections of the Arab Spring). What comes through is that Clinton tries to sell really hard that (1) diplomacy is much cheaper than military action, and the State Department is massively under-funded and under-staffed, and (2) the US (at least, under Obama) did try to promote human rights throughout the world, even when it has to deal with foreign leaders who aren't as enthusiastic about such rights.

(1) is a slam dunk. It's very clear that when the State department succeeds in achieving US goals without force, it's a huge cost savings. The times when they failed and the U.S. military gets pulled in, it's almost always going to cost more in both lives and money. (2) however gets subject to cynicism. However, Clinton does do a decent  job of explaining that whenever the US comes in to help save lives or perform emergency rescue operations, its image in the target country improves significantly (at one point, Japan had an 80% approval rating of the US after the Tsunami aid efforts, up from 60%, which is huge). So the 1% of the federal budget that goes into foreign aid is very good value.

There's also a good explanation for both Clinton's and Obama's support for the TPP, which has been much maligned during the recent election: fundamentally, US diplomacy holds out access to US markets in exchange for nudging other countries towards US policy. Once countries have a taste for the wealth access to US markets can bring, they're much more likely to toe the line when Washington comes calling. It makes sense, but of course, the US is unique in having next to no safety nets for workers displaced by such strategic considerations --- it seems to me that if something like the TPP is an important part of international diplomacy (and the US really does need to pay attention to such diplomacy --- imagine a world in which China dominated South East Asia!), then spending more on social safety nets makes more sense in tandem with something like the TPP than just shoving it down the public's throat, which has not gone over well and probably will never go over well, as recent events illustrate.

Finally, as someone who's an engineer, it was a bit jarring for me to hear Clinton praise someone as being a "great Politician." It's funny since engineers view politicians as people who're great at promoting themselves without actually doing any work, but of course, when you're a career politician, being a good politician would be high praise. Judging by the results of the election earlier this month, most Americans agree with my attitude than with Clinton's.

The book's a bit of a long slog, but I learned quite a bit. It's not my book of the year by any means, but it's still worth your time.

Monday, November 14, 2016

Review: The Stinky and Dirty Show

I don't usually review TV shows, but The Stinky and Dirty Show has captured Bowen, and I'm not horribly unhappy about that, so I figure I'll talk a bit about why it's special as well as tie it to why Amazon doesn't care about killing Netflix.

The premise of the show is simple: a garbage truck (Stinky) and a bulldozer (Dirty) are friends. Through the course of an episode (about 11 minutes each, with each "streaming episode" being 2 episodes joined together), the two friends encounter problems and solve them. Most of the problem-solving involves brain-storming many "what if" scenarios before settling on the correct approach. Some of them involve calling in friends who can help, and many of the solutions are found through serendipitous observations. I can't watch an episode with Bowen without saying, "Wow, what a smart show for kids!"

What's more, Bowen's been brought up on a steady diet of shows where the protagonists are female (e.g., Nausicaa, Totoro, Frozen), so it was nice to introduce some diversity and have a show that's mostly about boys (sure, the vehicles are gender neutral, but names like Stinky and Dirty typically apply to boys :-).

Incidentally, we went and checked out the books from the library (it's an indication that the show has not yet hit the mainstream yet that the books are still easily available at our local library) and the books are disappointing and much worse than the TV show. No brain-storming or problem solving to be found anywhere in the books, which aren't nearly as smart as the Amazon show. How rare!

So the show's good and recommended. But why is Amazon doing this? The big factor that drives parents to become Amazon Prime customers is diapers. I once did the math and the savings from diapers alone pay for the Amazon Prime membership. But of course, kids do eventually grow out of diapers, and so after that Amazon needs something to hook families on them. While shows like Peppa Pig are easily found on Youtube (and free if you're willing to put up with ads), unique shows like The Stinky and Dirty Show could very well drive me to keep the Amazon subscription even after the littlest one is out of diapers. Here's the thing --- parents don't have time for TV/movies (we've long cancelled our Netflix subscription). As much as I'd love to watch the new Daredevil show, I just don't have time for it. But kids not only have time to watch shows, they keep watching the same show over and over. It doesn't take too many such shows before they become a "must-have" for the parents. This makes Amazon Prime a much better value than if it's just for 2 day shipping.

Friday, November 11, 2016

Review: Brasscraft BC260

One penalty of living in an old house like mine is that the kitchen sink clogs up about twice a year. I got fed up of paying the plumber to come out and unclog it every time, so I tried various solutions. The hand powered augers were too painful to use, and the drill auger I rented once turned out to be difficult as well. Finally, I asked the plumbers to give me a recommendation. They were reluctant but eventually pointed me at the BrassCraft machine.

The BrassCraft auger sits on the ground, which is perfect, because then you're not holding the power drill. It comes with a foot switch so you can activate it while feeding the cable into the clean-out. I've used it in anger twice since I bought it earlier this year, and it works, though the set up is laborious. Because the power cable is too short, I have to first run an extension cord out to it. Then, I have to thread the proper cleaning tool onto the front, and then screw it on.

After plugging everything in, you then put on gardening gloves, and then pull out the cable and feed it into the cleanout, stepping on the foot switch to help everything grind along. Note that even though there's a "reverse gear" on the drill, the manual says not to use it! Fortunately, if you've actually cleared the obstacle in the pipe, you can generally pull the cable out by hand.

To my surprise, you can actually over-drive the cable machine: the cable itself is not anchored in anyway to the drum, so if you get over-enthusiastic and drive out all 50', you can end up pulling the cable out of the machine entirely. This sucks, because you'll spend at least 15 minutes working the cable back in.

Nevertheless, the machine will pay for itself if you use it just 3 times over it's lifetime, and it looks like it'll survive quite a bit longer than that. It also saves quite a bit of time since the penalty with calling the plumber isn't just that you have to pay him, but also wait for him to come around to where you are.

Recommended.

Thursday, November 10, 2016

Review: JavaScript: The Good Parts

While building my Shared Checklist application, I learned JavaScript mostly by reading examples on the web as well as a library copy of Javascript: The Definitive Guide. The problem with learning a language this way is that you're generally clueless about the idiomatic uses of various language features, as well as what general good practice is.

JavaScript: The Good Parts promised to be a good introduction to the latter, so I checked it out from the library. The book's very reasonable if you have a good understanding of Scheme, Self, and one other "classical" object-oriented programming language, and have read SICP. Since I qualify as all of the above, I found the book to be a breeze, reading it in a couple of hours.

In general, I found the explanation to be clear, to the point, and comprehensible. There are a few sections that I thought weren't very good: for instance, he introduces object-oriented programming in JavaScript through the use of a programming paradigm meant to emulate "classical" object-oriented languages. The idea is that most readers come from C++, Java, or some other OO language in wide use. Then he tells you to throw away all that and switch to the Self-like prototypes-based object-oriented language instead. From a pedagogic point of view, he should have gone straight for the prototype based learning approach --- never teach someone "the wrong way" to do something first, and then teach them "the right way."

Nevertheless, reading this book before I'd gone ahead with my JavaScript implementation of Shared Checklists would have been very useful. My code's much messier than it had to be, and there are a few "best practices" that would have made everything neater.

Reading the Amazon reviews, it seems like most of the people who rate this book badly do not have the required background I mentioned above. If you have the right background, reading this book is as much fun as reading Dennis Ritchie's The C Programming Language. That's high praise, and the book deserves it.

Recommended.

Wednesday, November 09, 2016

Building Shared Checklist (Part 2): The Web Application

After the Android App was done, I turned my attention to building a web application. There were several motivations for this: first, I do enjoy sitting down in front of a desktop (or laptop) with a real keyboard. Nothing makes for fast data entry than a real physical device that's optimized for typing. Secondly, I wanted to explore the world of web applications. Remember that as a back-end guy for much of my career, I'd skipped the entire javascript-heavy universe of web application frameworks.

In the old days, web applications used to have 3 tiers: the client, the application server, and the database. The application server would keep tracks of things like sessions and cookies, using the database only for persistent data. The "new" approaches are forked into 2 types: the single page Javascript-oriented web application (which Firebase was designed to facilitate), where the client web-browser's Javascript engine would keep track of all the state, and went directly to the database for persistent data, and the REST-ful approach, where each click on a link would encode all the session data so that the application server was essentially stateless and didn't have to maintain state for the client. Both approaches eliminate the scaling problems of the traditional 3-tier approach, but introduced several new problems of their own, as I was about to find out.

My first thought was to try it using GWT. GWT had several nice features: one would have been that I wouldn't have to learn any Javascript. Another was a one-click deploy into Google's App Engine, which was also very appealing. Finally, I'm a big fan of static type-checking being able to eliminate an entire class of bugs.

Imagine my disappointment when I discovered that there was no integration package between Firebase and GWT whatsoever. OK, no problem, I could write my own wrapper around the Firebase javascript stuff and GWT. I tried that and discovered that Javascript objects passed into the GWT Java code became opaque objects that couldn't be used! This was very disappointing. I was even more disappointed when I discovered that it also made debugging very painful --- the GWT-generated Javascript was even more impenetrable than I imagined, and I'd have to end up learning Javascript anyway to do any kind of intense debugging. So I gave up on GWT and went full-on into writing a Javascript single-webpage web application.

Not being much of a UI guy, I looked around for a Javascript UI library, and found webix. The Treeview looked like exactly what I wanted, and I jumped right into using it. As with the Android App, the Firebase Web API (really Javascript API --- there's no server->server integration in Firebase land) is callback-oriented.

This is really weird, since if I wanted to get the user to Login right away, there's no easy way to say, "Hey, show this UI only after the user's done logging in." I tried some forms of deferred execution, but there's a real weird interaction between "login using a popup window" and the use of the Javascript firebase API.

In the end, I got it all to work, but it was clunky. For instance, I was forced to pop up dialog boxes, etc., to get the user to input a new checklist, or even a new checklist item. This was unsatisfying: in practice, I wanted people to be able to push a "+"  button somewhere on the tree and then edit a text-field inline like in the Android app. But since Webix wasn't really designed to do so without you jumping in and modifying the code, I couldn't easily do this. In the end I stuck with dialog boxes all over the place.

All in all, I'm definitely unsatisfied with the result. The debugging was also a pain: any kind of error in the Javascript causes the entire web page to freeze, and then you'll be digging through the debugger's console trying to spot and reproduce what's going on. It's not even fast compared with the Android app despite not having to download to a device. I guess that makes responsive, fast UIs in Javascript applications like GMail even more impressive to me now than they were in the past.

Tuesday, November 08, 2016

Building Shared Checklists (Part 1): The Android App

After determining that there's no app that did what I wanted, I decided to create Shared Checklists, which was an Android app that does do what I want.

I started with an Android app, since I did some development for my wife's app a year or so ago. The requisite tools are all free: Android Studio, my Windows PC, and my already registered custom domain. At first, I thought that I would have to write all the cloud-syncing code, but this being 2016, it turned out that I didn't have to: Firebase (acquired by Google in 2014) did all this fancy cloud-synchronization.

This is ironic, because as a back-end guy, the development of a cloud-database with syncing capability would have been fun for me, as opposed to the mostly UI-oriented development that an Android app would turn out to be.

Firebase's real-time database is a JSON-tree in-cloud database that lets you get at any subtree as a Java object inside an Android app, or treat each leaf-node as a subfield at whatever granularity you wanted. This is very nice: you get to do a write() using a Java object and have the serialization all done for you.

The penalty to this is that the Firebase API is a callback-oriented API. What this means is that updates coming in from the cloud can happen at any time, and you need to update the App's UI to reflect that. If not coded carefully, this can turn into a mess of synchronization bugs and crashes (not a surprise, right)? Even when coded correctly, you could spend a lot of time working through UI glitches, etc.

I started with a basic simple approach: a sequence of Android activities (screens) in which you deal with one aspect of the real-time database at a time: there'd be a checklist management screen, and a checklist screen. The checklist screen would let you add and remove items from a given checklist, while the checklist management screen would handle adding new checklists, sharing new checklists, and deleting checklists.

This was all pretty good: I eventually figured out that the Android App UI needed to be a dumb reflection of whatever the database was seeing, and rather than screwing around with the UI's model whenever the user made an edit or a change, I would just reflect the change in the real-time database in the cloud, and let the inevitable notifications filter down and then refresh the UI based on the cloud-activated events.

One surprising pain point was integration with cloud single-signon services. I don't know about you, but I get very annoyed now with apps and/or websites that force me to create an account. Don't make me create yet one more (likely insecure) password for your website. Make use of Facebook login or Google login services.

Facebook login was surprisingly easy. I basically got it working on the first try, which was pretty awesome. Again, it's a callback-oriented API, so I had to jump through hoops and play all sorts of tricks to get the UI to force the user to login first before I could show the contents. And that was OK. One major pain point is the integration between a database-oriented app and Android's concepts of activity screens and restore events. The documentation is horrible, and when restored from a stopped state, there's every chance that the real-time database connection had been severed! My quick and dirty solution was to basically force a Firebase reconnect and authentication every time the app was resumed from a stopped state. It's not very satisfying, but from a development point of view it was the easiest way to prevent crashes. Android studio has no way of simulating this sort of event, so it was a major pain doing it manually, fixing the crashes, and then attempting to get the OS to evict the process again. You would think that Android Studio would have a means of injecting such events into your app for testing purposes, but no.

Google sign-in integration, however, was a nightmare. Superficially, the steps seem similar. In reality, what you have to do is to run a backend server somewhere, serving a particular JSON file with certain values. You'd think that Google would automate this for someone who was running an app-engine backend on a Google hosted custom domain, but no dice. It could never get it to work! I eventually gave up completely and stuck with just Facebook login. This, by the way, now explains to me why you see Facebook login everywhere, while non-Google sites don't tend to provide Google login: the process is sufficiently onerous that you can't expect the typical web-site maintainer to use it.

After using the app for a couple of days, I grew unsatisfied with the UI. Upon reflection, I realized that the Navigation Drawer approach was the correct UI for the app. This effectively required a rewrite for the entire app to use the new approach. It was only a little painful: every Activity had to be turned into a Fragment, and then I had to rejigger some of the database schema to reflect the new approach. This approach also eliminated an entire class of bugs related to having a default checklist, so I was relatively happy with the end result.

In the end, the experience was surprisingly good. While Android Studio's layout tool still leaves much to be desired (and to be honest, for it to be a useful tool would require some sort of standardization of device that's pretty much impossible in the Android universe), it was usable most of the time. The compilation time had now sped up to the point where a full signed APK build took only 35s or so, while incremental debug builds during the crucial edit/compile/debug cycle was now under 3s. In practice, that was fast enough that the transfer to my debug device over USB was now as much of a bottleneck as build time.

All in all, given that the entire tool chain was free, I thought this was relatively satisfying as a hobbyist project.

Monday, November 07, 2016

Texting and Parenting

I've discovered that I'm getting less and less enamored of texting as a communications medium whenever I have to spend time with my kids. A lot of it is because I usually need both hands to deal with Bowen and/or Boen, and texting is never hands free. In fact, it's a major distraction as I'd need to look at the phone, and of course with modern touch screen phones you can't even type "ok" without using your hands and looking at the screen.

In theory, text-to-speech and voice recognition should make texting as easy as a phone call, but the reality is that voice recognition is pretty awful on today's phones. I think I've narrowed it down to the microphone on phones not being in the right place whenever you need to be hands free, as the Amazon Echo, for instance, with its multiple microphones had zero issues with speech recognition.

As a result of using a bluetooth headset, I no longer fear long hold times on phone queues, nor do I fear phone calls from friends and family, but text messages (whether from hangouts, facebook, or even SMS) now elicit annoyance. With my Vivoactive, it's no big deal to at least read some of those messages, but of course, responding is still pretty much a "both hands and eyes on screen" affair.

As such, if you discover that I no longer respond to text messages with the speed, and it's convenient for you, ask me if I'd rather take a phone call. You might discover that the answer is "yes," surprisingly often.

Friday, November 04, 2016

Review: BLU R1 HD 16GB Prime Exclusive Smartphone

I had an App project that required 2 phones to test, and I was looking to buy the cheapest Android phone for testing. Amazon offered the BLU R1 HD, with the 16GB Storage/2GB RAM model going for $60. The 8GB/1GB model goes for $50. The catch is that the phone comes with Amazon ads scattered everywhere, and is pre-loaded with Amazon apps.

For the price, I expected a slow, balky phone, but that was OK --- I wanted a phone just for testing, and I didn't care about performance. That it was unlocked was a bonus.

Instead, the phone impressed me. It was fast (almost as fast as my Moto G, and for development purposes I can't tell the difference), and almost immediately updated its OS, connecting to my WiFi without a SIM installed. The ads, while they show up on the home screen, don't bother me at all.

The places where costs are cut are the camera (which is relatively low quality, but good enough for receipts, etc) and the USB port: while my Moto G had no problem serving as a USB host for external flash drives, etc., the BLU R1 HD doesn't. And of course, the Moto G is waterproof. But for the same price, you can buy 3 of the BLU R1 HD! Compared to the Moto E, of course, the BLU R1 HD is superior --- there's no reason you should pay for a Moto E when you can get the BLU for the same price or less.

By the way, I looked into getting a tablet instead so I could test a bigger screen size. No dice --- the decent ones cost way more than the equivalent phones. I guess tablet sales have fallen off a cliff so there's no economy of scale there any more.

Recommended. It's a great development phone and a good general use phone.

Thursday, November 03, 2016

Review: PRO BIKE TOOL Mini Bike Pump

For my mountain bike, I decided that the Topeak Morph pump was too big, and I wanted something smaller. Since mountain bikes don't go to as high a pressure as road bikes, I didn't need the elegant fold-down "turns into a floor pump" design.

The PRO BIKE TOOL Mini Bike Pump got good reviews on Amazon, so I gave it a shot. It should have known better. Bike pumps, like bike computers and lights, are one of those places where even if you don't 'care about the major functionality, the mount is way more important.

I've used the pump a few times (never in anger --- always because I have a road ride just before or after a trail ride), and it serves its purpose, barely. What I've observed from other cyclists who have this is that if you have a large snake bite, the pump doesn't move enough volume for you to pump it up fast enough so it's easy to see where the leak is. The Topeak Morph pumps (even the tiny ones) do so.

But the biggest ding against the pump is the mount. I've had less than a year of use out of the pump, and it's already broken. This is beyond ridiculous. Lesson learned. Don't buy pumps that are not named "Topeak .* Morph".

Wednesday, November 02, 2016

Review: Cognitive Behavioral Therapy (Great Courses)

The subtitle to the Great Courses's video series for Cognitive Behavioral Therapy is "Techniques for Retraining Your Brain." That sounded so exciting that I checked it out from the library. The instructor, Professor Jason M. Satterfield, is affiliated with UCSF, so comes with great credentials.

The target audience for this course isn't clear. Is it for the person looking to become a therapist? Is it for a patient looking to see which type of therapy suits him or her best? Is it for someone looking to acquire new habits? That's completely unclear. As a result I spent the first couple of episodes kinda confused, but then got into it.

The idea behind cognitive behavioral therapy (CBT) is that traditional therapy is open-ended, doesn't have any hard end-points, and all too focused on digging deep into the human psyche without providing any relief from the symptoms the patient is suffering from. That's great for producing a continuous stream of revenue from a few patients, but if your goal is to help as many people as possible, it's unsatisfying.

CBT differs from this in having completely different goals:

  • Specific treatment of symptoms and behaviors that the patient would like to change
  • Providing tools for the patient to use, so that when he/she leaves therapy, he/she can continue to use those tools to prevent relapse or help himself/herself.
  • Specific end point in mind. Since the goal is self-sufficiency and self-treatment, once those symptoms are relieved, the patient gets off the therapy, with only occasional checkups.
The tools CBT provide are very secular and focused:
  • Capture a thought diary, so that triggering situations can be analyzed and dissected at a distance.
  • Note that thoughts are opinions, and strength of emotion doesn't necessarily mean that the opinions are true.
  • Attack those opinions using three approaches: (1) experiment with behavioral changes to prove those opinions false (2) stand from a distance to see if you can reinterpret the same events in a different way (3) make a prediction of whether you'll enjoy a new activity, and then re-evaluating that activity after you've done it to show that what you rated as being unenjoyable turned out to be good
Throughout the videos, the course examines 3 patients struggling with different behavioral issues: one of severe shyness, one with managing anger, and one with depression. We watch each of them deal with their problems, run experiments with changing behavior, and reflecting and evaluating the results of their experiments. Throughout the program, the patients are treated with respect, sympathy, and encouraged to solve their problems through a toolbox. There's no hocus-pocus involved. Some of the exercises involved:
  • Muscle relaxation (progressive relaxation of muscle)
  • A mindfulness based approach of meditation --- including talking to yourself. This seemed very new-agey to me, but hey, if it works, it works.
Throughout the entire course, Dr. Satterfield provides pointers to further books, studies and results. Don't expect to be super impressed by the numbers. A success rate of 30% in treatment is considered good as far as psychotherapy is concerned. If you think about it, that makes sense. Think about trying to change a habit, like eating less calories so you can lose weight. Lots of people try, but very few manage to do so. Illnesses like depression, a hair-trigger temper, or severe shyness would be even harder.

Nevertheless, it's an interesting no-nonsense approach that I'd never even heard of before. It's well worth checking out, especially if (like me), your former impression of psychotherapy is Freudian mumbo-jumbo.

Tuesday, November 01, 2016

Return to the Santa Cruz Factory Demo

It's been a year since my last Santa Cruz Factory Demo, and I've had enough riding under my belt on my mountain bike that it was worthwhile for me to try another demo to see if dual suspension bikes were any good.

I convinced 2 of my friends to come along, Eva Silverstein, who booked a Furtado. I booked a Tallboy for myself, but apparently had taken the last one, so had no choice but to book a Bronson for Arturo. It turned out that the Bronson was the higher end bike, but I'd actually wanted Arturo to try a 29er bike. Nevertheless, the 27.5" wheels were still substantially bigger than his 26" wheels.
We took a modified version of the ride I did with Arturo last time. This time, we did the Enchanted Loop twice, because the first time I did it, I accidentally rode it with the rear shock locked out! This gave me a good contrast, however, between what I would expect from a dual suspension bike and what a similarly weighted hard tail would do.
The most impressive thing about the dual suspension bike is how easy it made everything. Now, it's not a miracle --- I still couldn't do the kind of jumps that I couldn't do before, but it made all the jumps and drops I could do easier. In addition, at the end of the ride neither me nor my friends were as beat up as on hard tails, so I led them on a ride along the cliff-sides of wilder ranch as well.
The next day, I went over to El Corte Madera Park to ride a loop with my regular hardtail mountain bike (about $9000 cheaper than the Bronson Arturo rode if you're comparing MSRP).
El Corte Madera Park is a much more technical ride than Wilder Ranch. While Wilder Ranch is for beginners, the drops on El Corte Madera let you catch serious air if you're good. What I noticed was that while I was very fast at the beginning, as the ride wore, my fatigue made me less willing to do challenging stuff on my bike. On the dual suspension bike, I would have been more willing to ride more challenging material. For some of the super drops, my hard tail would be buckling like a bronco while the full suspension bike would be much more sedate.

In the end, while there's no question that the $6000+ MSRP bikes are better than my cheapie $700 eBay special, it's not clear that they're $5,000 better. Mountain bikes reward skill and finesse a lot more than road bikes do (and from an economic point of view, road cyclists can get their per mile cost down into the dimes per mile, which mountain bikes cannot easily do even with cheap mountain bikes like mine), so I'm unlikely to buy one of these new. I did notice that the eBay prices for the same bikes that are a year old are more than 50% off the MSRP, indicating that the first year depreciation of these bikes are ridiculous. Of course, buying a used carbon MTB comes with its own set of crazy hassles.

Of course, a $20 rental of the same bike is such an amazing deal that I'd urge you to try a factory demo for yourself!