Grow up JavaScript

The other week, somebody posted this article by Jared White in one of the chats at work.  It decries the "shocking immaturity" of the ecosystem around JavaScript and Node.JS.

I mean...yeah.  But it's not like this is news.  The Node ecosystem has been messed up for years.  Remember the left-pad debacle?  That was five years ago.  It's pretty clear that the ecosystem was messed up then.  So I guess this article just tells us that not much has changed.

To be fair, a lot of the stuff Jared complains about isn't really specific to the JavaScript ecosystem.  I've also been in the industry for 20 years and I can say from experience that bugs and hype are endemic to most of the industry and have been for quite some time.  For example, in the early days of Rails, I remember seeing a million variations on the "build your own blog in 10 minutes with Ruby on Rails" tutorials.  And yes, that's fine, you can make a simple demo app in 10 minutes.  Whoop-de-doo.  In reality, what that usually means is that on a two-month project you've saved yourself...maybe a day or two at most.  There are lots of tools and framework in lots of language ecosystems that are grossly over-hyped - it's almost standard practice in the industry.

As for bugs, I can't speak to Jared's experience.  In any software ecosystem, bugs are obviously common and not mentioning them is almost de rigueur.  I mean, if you're developing a framework or library, of course you're not going to advertise the bugs and limitations of your tool.  You want people to use it, not be scared away.  But I'm willing to accept Jared's assertion that the JavaScript world is uniquely bad.  I know my experience of client-side JS libraries is...not fantastic in terms of reliability or documentation.  So while I'm not sure he's right, I wouldn't be surprised if he was.

I do think his point about the learning curve is interesting and valid, though I don't know that it relates specifically to bugs.  I haven't gotten deep into many of the fancy new JavaScript frameworks, but they do seem to be staggeringly complex.  I started working with JavaScript way back in 2005, when all you needed to do what save your code in a text file, open that file up in a browser, and see what it did.  It was extremely simple and the bar to entry was ridiculously low.  Then, a few years ago, I decided to try out React, since that's the big new thing.   Just to do "Hello, World!", I had to get my head around their weird template syntax, install a transpiler, and run some kind of server process (I don't even remember - maybe that's changed by now).  And when I saw that work, I quit because I had actual work to do.  It's hard for me to remember what it was like to be a beginner, but I can imagine that this kind of an on-ramp would be pretty daunting, even with the dumbed-down tutorials.  Heck, it seemed like kind of a lot to me, and I'm an experienced professional!

Honestly, I kind of wonder how much of the problems Jared is seeing stem from the "youth" of the JavaScript ecosystem.  I'm not talking about the language, of course.  I'm thinking more of the historical and cultural part of the ecosystem.  Consider:

  1. While JavaScript has been around for a 25 years, it was widely considered a "toy" language for the first 10 years or so.  Remember - JavaScript came out in 1995, but jQuery didn't come along until 2005.  And these days, building your site on jQuery is the equivalent of building your house out of mud and sticks.
  2. In the roughly 15 years of JavaScript's non-toy lifespan, there's been a lot of churn in the web space.  And during much of that time, it was considered important for many businesses to support legacy web browsers.  I remember many times having to stop myself from using "new" features of JavaScript because, well, we still have to support old versions of Internet Explorer.  Yeah, nobody cares about that anymore (thank God), but it wasn't all that long ago that they did.  Heck, I remember getting yelled at in 2015 because I forgot to test something in IE9, which was released in 2010!
  3. From 1 and 2 above, it's clear that, in terms of the evolution of the ecosystem, the 25 year history of JavaScript is really a lot less than 25 years.  In fact, it's probably only within the last five years or so that we've managed to shake off most of the legacy cruft and get adoption of modern stuff beyond the handful of early-adopters.
  4. On the cultural front, it's been my experience that a lot of young people these days get into coding through web development.  This is not a bad thing - everybody has to start somewhere and the web is a relatively accessible and popular medium.  But it's also my experience that a lot of the people who create open-source tools and libraries are younger, because they're less likely to have families and other obligations and hence more likely to have the free time.  Again, this is not bad, but it means that the people writing the tools are disproportionately likely to be less experienced.
  5. So while there are plenty of things in the JavaScript world that are old enough that they should be mature, we can see from 3 and 4 that this might not necessarily be the case.  When a tool is developed by relatively inexperienced coders and hasn't been widely used outside a relatively small circle for very long, it shouldn't come as a surprise when they have some issues.

Of course, I'm just spit-balling here - I could be completely wrong.  But the point is that developing a stable ecosystem takes time, and the JavaScript ecosystem hasn't actually had as much real time to develop as the calendar suggests.  I mean, there's still a hot new framework coming out every other week, so it doesn't seem like the ecosystem has even finished stabilizing yet.  Maybe in a few years things will settle down more and quality will improve.

Or maybe not.  We'll see.  In the mean time, we just have to make do with what we have.

Back to the movies: The Eternals

A couple of weeks ago, my wife and I took a nice, relaxing long weekend at Keuka Lake.  We had some nice meals; went to the Glenn Curtis museum, which I'd never visited before; and we tasted some very nice wines, particularly the Cabernet Frank from Domaine LeSeurre and several of the wines at Dr. Konstantin Frank.  We even did something we haven't done in the almost two years since the pandemic started - we went to a movie!  It was a late afternoon show and there were only a couple of other people in the theater, so it was pretty nice.

The only down side was that the movie we saw was Marvel's Eternals.  Spoiler alert: it wasn't very good.  (But seriously, there are a couple of spoilers.)

Honestly, I didn't have high hopes going into this movie.  I saw the last two Avengers films and, frankly, after those I'm kind of done with the Marvel Cinematic Universe.  It's not that those particular movies were bad, it's just that I'm tired of the whole concept.  There's too many characters, too many movies, too many attempts to tie them together.  The movies aren't that good and I just don't care enough to even try to keep up with them.  And I went into this film knowing basically nothing about The Eternals other than being vaguely aware that it was the title of a comic book in the Marvel Universe.

On the up side, the special effects were very good.  I mean, for the most part.  (But for the kind of budget Marvel movies get, they damned well better be.)  And I guess some of the action scenes were entertaining.  Unfortunately, that's about it.

I had a number of problems with this film.  One of the overriding issues is probably that they actually try to develop all of the Eternals as characters, at least to some extent.  Normally, this would be a good thing.  But there are like ten Eternals and this is only a two and a half hour film.  There just isn't time to develop that many characters to a significant extent and it didn't really work.  They gave most of the characters a little development, but it wasn't enough to make me actually care about them.  So all it really did was drag out the movie and slow down the pace.

The two characters that they did put more effort into were the leads, Sersi and Ikaris.  This was also a problem, because they didn't do a good job.  These characters were supposed to have had a very long-term romantic relationship in the past, which was shown in a number of flashbacks.  However, the actors had absolutely no chemistry at all.  I mean, to me it not only didn't look like they were in love, I wasn't even convinced that they liked each other all that much.  The end result was that the relationship angle didn't land at all and the scenes that were trying to develop it were just tedious and unengaging.  The only silver lining was that the leads were so boring and unlikable that they made the other characters more relatable.

Not that most of those were much better.  The actors didn't necessarily do a bad job, but they didn't have much to work with.  And I'm a little mystified by the casting.  I mean, aren't Salma Hayek and Angelina Jolie kind of big names to be taking what amounted to bit parts?  Are their careers in the toilet or something and I just didn't know it?  It's not like they got no screen time, but they were definitely not focal characters.  Most of the focus was on Gemma Chan and Richard Madden, who are not unknowns, but are decidedly "small" names by comparison (as were most of the other Eternals).  And it's not like this was a compelling artistic choice, like Milos Foreman casting a relatively unknown Tom Hulce as Mozart in Amadeus.  Chan and Madden weren't a phenomenal combination, they didn't have amazing chemistry - they were "fine" at best.  It just seems really odd to have such big names in the film if you're not going to use them.

But, of course, my main issue was with the writing.  Inspired by this movie, I'd like to propose a new law: Screenwriters are hereby prohibited from writing characters who are supposed to be significantly older than the average human life span.  

Seriously, the Eternals are supposed to be 7000 years old.  They've been around humans that entire time.  They were supposed to have disbanded as a team and assimilated into the human population something like 500 years ago.  And yet their actions and motivations are portrayed as the kind of thing you'd see from a teenager or twenty-something.  It's absurd.  I know they're technically not supposed to be human, but they're certainly portrayed that way.  Yet we're supposed to believe that they haven't matured or developed a wider perspective in 7000 years?  Come on!  I know everybody has issues, but I kind of feel like a few centuries should be more than enough time to deal with them.  But maybe my expectations are a little high.  

The one I found especially galling was Ajak's change of heart.  She actually remembered all of planets that she'd helped Arishem destroy to hatch new celestials, but when she saw the Avengers undo Thanos' "snap", she decided that this planet was different, that the people on this world deserved to live.  But what about all those other worlds she helped destroy?  Were they just populated by no-account NPCs who didn't deserve to live?  What about the dynamism added to the universe by the rise of new celestials and their continued creation of innumerable new worlds and galaxies?  Does she just not think that's important anymore?  Does creating a handful of super heroes really make Earth so much more special than all the others?  So nothing she saw in the previous 7000 years convinced her that humanity was worth saving, but the Avengers completely changed everything?  To put it generously, the moral calculus of that analysis seems a little sketchy.  You'd think someone who's been around that long would have put some more thought into ethics.

Sorry, but this whole thing is just stupid.  And that's my main problem at the end of the day: the plot was just stupid.  They spent too much time trying to the develop the characters and didn't leave enough time to make the plot actually make sense.  If they'd been successful in making a compelling, character driven story, then maybe it could have been OK.  But they weren't.  The dialog was clumsy and the characters were one-dimensional, with the result that I couldn't maintain enough suspension of disbelief to overlook the plot holes and simplistic characterization.  This is why I stopped caring about the MCU.

Readera finally has synchronization

In recent years, I've been reading a lot more e-books. However, I've tended to stay away from PDFs and other non-proprietary formats when I could. This is weird, because it's the opposite of my usual preference.

The reason is, quite simply, convenience. The Kindle and Nook apps are free, easy to use, and offer good (or, at least, sufficient) support for the two things I care most about: text zooming and synchronization.

While changing text size is a basic feature for mobi and epub most readers, it's awkward for PDFs because they do page-based text layout. So you can zoom in on a page, but it's not generally possible to change the font size and reflow the page, which makes reading less pleasant - particularly on a phone. Now, if you have a 10-inch tablet, that's not really an issue, as the real size of the text will be about what you'd get in a physical book.

This leads to the second feature: synchronization. Sometimes you just don't want to carry a tablet around. But if you find yourself waiting for something, it would be nice to read your book. And since you always carry your phone, why not read on that? It may not be as good, but it's fine for 15 minutes here or there. And the proprietary apps are great for that. But DRM-free e-books, not so much. You can always use a file synch app to get copies of them, but syncing the last read page is a different question.

It turns out that Readera Premium now has me covered on that. I've been using the free version for a while, but never really needed the premium features. However, it looks like they recently added file and progress sync via Google Drive to the list of premium features. This alone was enough to make me she'll out the $11 for it.

So far it works pretty well. When I fired up the premium version on my tablet, it searched for files on my device and created.a library. Unfortunately, many of the files it "found* were phantoms - they'd long since been deleted, but for some reason Readera thought they existed. Apparently this is an artifact of how they scan the device. The main issue was that this seemed to interfere with the sync. I removed those and was able to sync the handful of real files I cared about.

Next step: install and run the premium version on my phone. It went through the same scanning process, adding the local files to my library, but no sync problems this time. And best of all, I was able to open up the PDF book I'd been reading on my tablet and it opened to the correct page!

So now I can read any book anywhere. That'll be nice for books like the one I'm reading now, which is out of print and not available on the commercial platforms. I'm not crazy about it using Google Drive (as I don't use that for anything else), but for progress sync, I'll take it.

Phone upgrade time

It's that time of the year again: phone upgrade season.  

This one was a long season.  It's been a while since my last phone upgrade - almost exactly four years, actually.  My previous phone (and my wife's - I generally get us the same thing) was a OnePlus 5 which I bought in September of 2017.  It was a really nice phone and, to be honest, I didn't really want to upgrade.  I mean, why spend $500 on a new one when the one you have is perfectly fine?

However, this time I didn't have much choice.  A month ago I got a text from Cricket telling me that my phone would stop working on their network in February.  Apparently, this is due to the retirement of their 3G network.  For your phone to keep working, it has to support "HD Voice".  Of course, I had no idea what the heck "HD Voice" was, but a quick search revealed that that's just AT&T's nicer sounding term for VoLTE (Voice over LTE).  And, sadly, the OnePlus 5 does not support VoLTE.  At least, not out of the box.  In a previous version of the firmware, there was an experimental setting in the debugging utility that allowed you to enable VoLTE and voice-over-WiFi, but that seems to be gone now.  And, frankly, I'm not really comfortable with the idea of downgrading the software on my primary communications device so that I can rely on an experimental feature.  Seems like that's just asking for something to go wrong.

So I decided to bite the bullet and upgrade.  I really loved the OnePlus 5, so I wanted to stick with OnePlus.  And as luck would have it, the 8T happened to be on sale.  

When I got the OnePlus 5, one of the "criticisms" of it was that it was grossly over-powered.  I forget what the processor was, but the model I got had 8GB of RAM and 128GB of internal storage.  So it was closer to a decent-quality laptop than a typical cell phone.  And the OnePlus 8T is pretty much the same - my model has 256GB of storage and 12GB of RAM.  So my wife's phone now has more RAM than her laptop.  Is this necessary?  I don't know - maybe not.  But with the OnePlus 5, I noticed that I never had problems with it feeling "slow".  With my previous Samsung Android phones, that did become an issue after a few years, but the OnePlus had enough horse-power to handle anything the app store could throw at it.  So I figured it would be nice to continue that trend.

There's not really much to say about the OnePlus 8T itself.  Like the OnePlus 5, it's really nice.  It runs the same Oxygen OS, so there's no difference in the UI.  And OnePlus's "Clone Phone" utility made it pretty simple to copy apps, settings, and data to the new phone.  (It didn't get everything, particularly in terms of settings, but it got enough.)  In terms of the hardware, the big changes from the OnePlus 5 are:

  • The lack of front-facing "buttons".  Whereas the OnePlus 5 had reserved space at the bottom for the fingerprint scanner and dedicated virtual buttons, the displayable area on the 8T includes the entire pane of glass.  For navigation, you can either use virtual buttons along the bottom, or gestures (which seemed annoying and counter-intuitive to me).
  • Related to the above point, the front camera is in a cutout in the screen.  That's different.
  • The rear camera is friggin' massive!  Four lenses and two flashes.
  • The fingerprint sensor is under the screen.  So you can actually just put your finger in a certain spot on the screen rather than a dedicated spot at the bottom.  The fingerprint scanner on the OnePlus 5 never really worked all that well for me.  In fact, when I had a screen protector on the phone, it basically never worked at all.  But the one on the 8T seems pretty good.  Having a screen protector does interfere with fingerprint detection, but not so much as to make it unusable.

So far, I'm liking the new phone.  It's very much an incremental upgrade to the OnePlus 5, but that's not a bad thing.  I wasn't looking for anything revolutionary - just a comparable phone that would work on a modern network.  And I got that, plus a few bells and whistles.

Cali Move Home Workout Review

My last fitness post was on the CaliMove mobility program. Well, I just finished their at-home program as well. And (spoiler alert) I really liked it.

General Structure

This program is a bit different from the mobility program. It's also different from the Athlean-X strength training programs, in that the workouts all time-based.  The exact details vary depending on what phase of the program you're in, but this means that the length of any given workout is fixed, so you know going into it exactly how long it will take.  Personally, I really liked this, as one of my main issues with the mobility program, as well as the Athlean-X Xero calisthenics program, was that the workouts could drag on for an hour or more.  With this program, you know the length up front and it's never too long - I think they top out at around 40 minutes, which isn't bad at all.

I started this program when I was half way through the mobility program. At the time, it was a good fit because you start out only training three days a week.  Also, they advertise that, while this isn't meant to be done with other training programs, it's OK to do the mobility program at the same time.  If you're going to do that, though, I would recommend staggering them like I did.  As I mentioned, the mobility program ramps up to six days a week and probably an hour or more per workout by the end.  Combine that with four days a week of 30 to 40 minutes of the at-home workout and you've got a pretty long and tiring workout there.

Anyway, like the mobility program, the at-home workout program is six months long, with a one-week de-load half way through.  Each month is a different "phase", with a slightly different training schedule and approach.  The phases vary, with some focusing on circuit training, some doing straight sets, supersets, AMRAP intervals, etc.  They're all challenging and give you enough variation to keep the program interesting and engaging.

In terms of the exercises, there's nothing really new or revolutionary here.  The program is designed to be done at home, with no exercise equipment at all (not even a pullup bar), so there's only so many options available.  So lots of variations on pushups, crunches, planks, lunges, squats, and so forth.  The only thing that requires any "equipment" is the row variations, which can be done with a pair of folding chairs or something equivalent.  But that said, there are actually a lot of variations in this program.  And the exercises rotate and progress as you move through the program, so the workouts stay challenging and change often enough that you don't get bored.

Program Presentation

In terms of presentation, this program is quite different from the mobility program.  Since this one is time-based, each session has a follow-along video (also available as downloadable audio) that tells you the intervals and exercises.  It also has a very spiffy set of graphics that summarize the workout.  Basically, they're animated GIFs that show the exercise, the time on and off, number of repetitions, and an indication of the workout flow (so for circuits the images flow together).

2021-09-11T14-17-36-527Z-med.png

I have to say, I really like this presentation.  Of the programs I've done so far, this is by far the most visually interesting and and easy to follow workout summary.  Once you get used to it, you can get all of the information you need in a single glance, without having to search the page or think about the instructions.  This is especially nice for the circuits and supersets.  When dealing with simple text presentations of more complicated flows, I find that it's easy to get lost when I start to get tired.  The graphics make it easy to reorient yourself and prepare for the next exercise, while the video helps keep you from getting lost in the first place.

The rest of the program presentation is also quite good.  Each phase starts with a brief video overview describing the approach and a set of demo videos for the exercises employed in that stage.  As usual for CaliMove, the exercise demo videos are exceptional.  Each phase also has an Excel spreadsheet that you can download to track your progress.  This is a little inconvenient, in that it's a little hard to compare between phases with each one being a different file and the spreadsheet doesn't break down sets, but that's not a big deal.  With a calisthenics program there's no weight to track, so really all you care about is that the number of reps keeps going up.  Besides, if you don't like it, you can always track things on your own, whether in your own spreadsheet or just on paper.

Nutrition

I also purchased the "nutrition upgrade" with this program.  The base program is just the workouts - it doesn't come with any kind of nutrition information, or eating plan, or anything like that.  If you want that stuff, you have to buy it as an add-on.

The nutrition upgrade was...fine, I guess.  I watched the videos and read the PDFs, but ended up deciding not to follow the nutrition program.  It had a lot of good information, as well as some that seemed iffy.  There was some mention of "detox" and a couple of other things that made me cringe a little.  For the most part, though, it seemed sane and reasonable.  As I recall, the plan involved using food categorization and relative portion sizes to reach specific macro targets that change week by week.  To me, it seemed like yet another way to track macros without actually tracking them. 

Personally, I didn't care for this approach and ended up just doing plain-old food tracking with Cronometer.  I was already in a place where I was eating a healthy, balanced diet, and just needed to change my energy balance a little to drop 5 - 10 pounds.  I was up to close to 170lbs after the holidays and wanted to get down to around 160, so I tried to cut my calorie intake back by an average of 250kcal per day (give or take - some days I was at maintenance, others I was 500 under) for five or six months.  That worked well for me and averaged out to around half a pound per week of weight loss.  I know some people really hate tracking their food, but I don't mind it all that much.  At least, I don't really find it any more painful than the "no-tracking tracking" alternatives like this program uses.  I'd rather just look at the numbers than have to figure out what group and portion size each of my foods fits in.  But that's just me.

Conclusion

Overall, I really liked the at-home program.  It's extremely well presented and easy to follow.  The workouts themselves are good and stay challenging, despite the lack of any equipment.  I also really liked the relatively short duration and fixed time.  If I had it to do over, I wouldn't bother with the nutrition upgrade, but if you're looking for a more structure nutrition plan, then maybe it could be helpful to you.  But if you're looking to stay in shape, get a bit stronger, and do it at home without equipment, then I highly recommend this program.