Friday, April 12, 2019

DomLinks

There are several ways, how to store a link between DOM element and it's representation in your virtual/shadow DOM. If your object model allows, you can store it right where your element is.

Advantage is you don't need to look it up anywhere, disadvantage is you'll lose the link on serialization or converting to JSON. The worst case scenario is the element is serialized as well, but there's no use for it there.

Another approach is a dedicated collection of DOM links.

Monday, April 22, 2019

Amazfit Bip

I had my Xiaomi MiBand 1s (also called “Pulse”) fitness tracker for three years and it worked rather well, the only bigger issue I experienced was with the silicon rubber band, which lasts no more than a year. Of course the measurements are not precise, but for under $20 it's amazing.


I didn't (and still don't) like newer MiBands, because except for the screen it didn't offer much more. But I also didn't like wearing something 24/7 on my wrist, that doesn't tell time, so after about a year of serious thoughts about upgrade, the price for Amazfit Bip dropped below my threshold of $65 at local seller and I got myself a treat.

The good: I can confirm it's incredible battery life – during first charge cycles I even exceeded it, even with occasional runs with GPS on and HR assist for sleep. GPS precision is fine, I'd say similar to my iPhone SE.

I use almost all of it's features – SMS notifications are great for 2FA or bank codes, my phone is completely silent, because all incoming calls are notified just by watch vibrating (except when I accidently turn DND on :-), also I love the silence of vibrating alarm clock.

Countdown timer is useful for cooking or brewing coffee. It's great that alarm can be turned on/off on the screen, but I wish to be able to set it on watches as well, it would be possible in the same way as countdown timer. And I even occasionally use the barometer, altimeter or magnetic compass.

The glass on the display seems to be quite durable. I try to be careful, but it's not always the case and I have far less scratches, than “incidents” I had.


The bad: I can find just a few dislikes – they are quite thick, so they push to my wrist in the bed (as expected...), which MiBand didn't and that was the major cause I had such a hard time finding it's successor.

I found (and reported, without a response) several bugs in the Mi Fit app:

  • Shortcuts are customizable, but will reset on the next sync.
  • Touchscreen sometimes doesn't work properly or at all; after a while it starts to work again.
  • It sometimes won't sync and I have to try it multiple times.
  • Sleep history doesn't show up (I lost the history until the next update few days later).

I experienced strange battery drain, that was fixed by hard-reset. Now I'm back to 35 days.

Updating A-GPS takes about two minutes, which is usually fine, but other times you have stuff to do and you're forced to wait. And I miss it doesn't tell sunrise and sunset.

The ugly: It can't log longer workouts, like 6 hour hike or 3 hour run, sync of such workouts takes forever. What is even worse is quite often (I'd say 1 in 5 workouts) they hangs during an activity tracking and you lose the progress completely! That's REALLY annoying. I'm not able to find a pattern, but it seems it's not that often if I don't wait for GPS before workout. On the other hand, it sometimes hangs twice in an hour.

And of course there's the “political” issue of Chinese manufacturer with uncertain working conditions and quite suspicious requirement to be online for the app sync to work.