Monday, November 23, 2020

Countering News Bias - A Simple Solution

Getting your news from a single source is a great way to lock yourself into an echo chamber. Clearly, the smart news diet is the diverse news diet. And yet, there's no denying that I nearly always turn to CNN when I want to quickly check the news.

To try to kick this habit, I've added a new 'News' bookmark to my browser's toolbar. Rather than directing me to one site, it runs this code:

javascript:
(function(){
  U=[
  'https://cnn.com/',
  'https://msnbc.com/',
  'https://abcnews.go.com/',
  'https://foxnews.com/',
  'https://wsj.com/',
  'https://vox.com/',
  'https://arlnow.com/'
  ];
  window.location = U[Math.floor(Math.random()*U.length)]})()

This bookmarklet, as hopefully any first year CS student can tell you, creates an array of sites and picks one at random to visit. As long as I hit the News button on my toolbar, I won't be sucked into one news source.

I figured a random URL bookmarklet could come in handy in other contexts, so I created a tool for generating them. Check it out at http://code.benjisimon.com/bookmarklets/random-url.php. Here's an example of me creating a goof-off bookmarklet that sends me to a random site for a quick laugh:

Are my worries about news bias put to bed? Not by a long shot. But I feel like I'm at least headed in the right direction.

Check out the code behind the bookmarklet generator on github.

Thursday, November 19, 2020

Killer Artwork

Weeks ago, I was running at nearby Theodore Roosevelt Island and came across these cool abstract sketches:

And here's another example from our recent Blue Ridge Mountains adventure:

Is this ancient indigenous art? A coded message from aliens? Teens messing around? Nope, they're bug trails. Specifically, the side effect of beetle activity. The phenomenon even has an appropriate name: Beetle Galleries. While beautiful, they're art with consequences: the beetles can (often? always?) kill the tree.

That's some high stakes art right there.

Wednesday, November 18, 2020

Building a Garmin Watch Widget | Part 3: The UI

Once I had my Sun Compass Widget calculating the correct azimuth for the Sun, I was left with one more challenge: rendering this information graphically. My plan was to generate a simplified compass dial and then plot the current location of the Sun on it. The first hurdle was to realize I had to stop using XML based layouts and program the UI directly using the Dc object. The second challenge was learning how to convert polar to rectangular coordinates. With these obstacles surmounted, the UI came together with ease:

The above UI is drawn using a this strategy:

 for(degrees = 0; degrees < 365; degrees++) {
   var color = i % 90 == 0 ? "red" : "gray";
   drawDot(degrees, color);
 }
 var start = pol2rect(watchFaceWidth / 2, azimuth);
 var end   = pol2rect((watchFaceWidth / 2) - 5, azimuth);
 drawLine(start, end, "yellow");

In short: once you can think of a round watch dial as a polar coordinate space, working with it becomes a breeze.

Looking at the above UI, I realized that along with creating a compass I'd also started down the path of creating a solar clock. For example, when the Sun is due South, it's solar noon. To build on this idea, I added markings for sunrise and sunset.

In the above UI, the red dots represent cardinal directions, the yellow line represents the position of the sun and the green lines represent sunrise and sunset. You can tell this screenshot was taken about an hour after sunrise. You can also tell this was taken in the winter when the day is relatively short and the Sun will never be due East or West.

I built the above app for my watch, loaded it on my Vivoactive 4 and spent a week field testing it in the Blue Ridge Mountains.

Generally, the widget performed well. It loaded quickly and always displayed accurate information. The biggest shortcoming: the effort needed to derive my current direction. To figure this out, I had to either stop and rotate my body until the yellow mark lined up with the Sun, take off my watch and line the yellow mark up up with the Sun, or attempt to do this translation mentally. While in motion, none of those options were ideal. I wanted the watch to do the work, not me. So I added the following feature.

By default, the widget shows a North-is-up view:

Clicking the top watch button rotates through a series of variations. It shows the compass with the sun ahead, to the right, behind and to the left of me:

The idea is that I can re-orient the display to roughly match where the Sun is relative to me at that moment. For example if the Sun is roughly behind me, I can click through until the compass dial shows this, and then use the cardinal markings to learn my direction.  This view is sticky, so re-checking the Sun Compass a few minutes later doesn't require me clicking through the options again.

I've now got this version running on my watch and I psyched to field test it. Once I'm satisfied with the UI, I'll finish off this project by uploading it to the Garmin IQ Store so others can give the widget a try.

As always, check out the code for this project on github.

Monday, November 16, 2020

Blue Ridge Mountains Adventure - Day 4

I wanted to squeeze in one more hike before we called it a trip. In the name of efficiency, we opted to string together trails located within the Wintergreen Resort itself. We connected up the Old Appalachian Trail, Upper Shamokin Gorge Trail and Chestnut Springs Trail. Given the density of housing within the area and the range of clientele who visit the resort, I had my expectations for these trails set low. If we got out in the woods for another hour or so, that was going to be considered a win.

The Old Appalachian Trail started off delightful, and as expected, quite tame. However, things took a turn for the interesting when we started down the Upper Shamokin Gorge Trail. This was a fun trail with plenty of rock scrambling. I finished that trail quite impressed. The Chestnut Trail brought us back to reality as we made up way up from the gorge to civilization and our car.

We stopped at one of the overlooks for one more picture and I continued to be blown away by the scene in front of me. This place is truly gorgeous.

With our last trail logged, we officially called it a trip and made our way back to DC.

I couldn't have been happier with our choice of vacation spots. The weekday off-season rate we paid for our condo was incredibly low. And the range of hikes, from those just a few minute drive away, to an hour away, were all impressive. And I could get used to drinking hard cider every night.

With all that said, we can't really speak to how nice a resort Wintergreen is. We didn't engage with any of the amenities, activities or restaurants. Still, there's no arguing they've got an ideal location. I'd go back in a minute.

Friday, November 13, 2020

Blue Ridge Mountains Adventure - Day 3

Today we took a break from accumulating trail miles and played tourist in our home state of Virginia. The first stop: we headed an hour away to Natural Bridge State Park.

I'd heard about Natural Bridge a few years ago, but could never justify the 3+ hour drive to see the famous rock formation. Staying at Wintergreen Resort put us close enough that it was a no brainer.

So, did the bridge live up to the hype? It did. First off, the rock formation is much larger than the pictures I'd seen suggested. There's also a mile-length trail that runs under the bridge which made for a pleasant walk. Because we visisted off season and early in the day we had no crowds to contend with, which surely furthered the quality of the experience.

I'm still not entirely convinced that it's worth taking the 3+ hour drive on a weekend from Northern Virginia, but if you're anywhere in the area, it's a must see.

After Natural Bridge, we made our way to another natural wonder: the Devil's Marbleyard. While far more esoteric, this site definitely deserves your attention if you are in the Natural Bridge area. The Marbleyard is an epic boulder field crying out for your exploration. I'd seen pictures before, and yet, I was impressed as the rock yard came into view after hiking through serene forest. One can't help but wonder how the rocks formed. One hypothesis, which I'm rooting for, is that worms did it.

I hopped around on the boulders like a 6 year taking in a new playground. It was awesome. Before I knew it, it was time to descend the trail back to our car and head back to Wintergreen.

Back in the Wintergreen area, we squeezed in one more sight for the day: Crabtree Falls. I assumed the falls were going to be pretty and all, but after Natural Bridge and Devil's Marbleyard, I figured they would pale in comparison. Apparently I missed the fine print: the falls are the highest vertical-drop cascading waterfall east of the Mississippi River. In short, they were quite impressive and fit in perfectly with the day's theme of seeing the Wonders of Virginia. I can't believe we were in the area and almost missed seeing them.

After the falls, we made our way to the secluded Bryant's Cidery, where we had the place nearly to ourselves. Bryant specializes in dry ciders, which have the (to me) unintended consequence of containing notably more alcohol than their sweet brethren. The flight of ciders I drank were both tasty and quite disinhibiting.

Tuesday, November 10, 2020

Blue Ridge Mountains Adventure - Day 2

Technically, my day started at 3am when I rolled over to check my phone to see how badly Joe Biden had lost the election. Shira was awake doing the same, and gave me the quick update: Joe had lost Florida, but there were a number of states that were too close to call. I took some comfort in knowing that the race wasn't over and tried to go back to bed.

Over breakfast, we continued to be glued to election coverage. During one of CNN's panel discussions, the obviously leaning Democrat explained that despite the overwhelmingly red map, the Biden team was optimistic. More surprisingly, the Republican guest didn't argue this point, but instead emphasized the record turn-out and victories in the House and Senate. Might Biden actually win this? After last night, I wasn't sure of anything.

Mostly, I was happy that once again we had a day planned in the woods and I'd have my phone in Airplane Mode. This meant I could finally tune out the endless stream of meaningless, yet tantalizing, Key Race Alerts that CNN was issuing every few minutes. Damn you Blitzer. You get me. Every. Single. Time.

Today we planned to cover the 9+ mile Torry Ridge - Lower Shernado Lake - White Gap Trail. The hike promised views, a waterfall and a picturesque lake. Perhaps it was the stellar weather, but I have to say, the hike delivered. The hike up to, and down from Torry Ridge was challenging and made more so by the at-times slippery leaf cover. But thanks to the now leafless trees, we had amazing views from the ridge. The waterfall at White Gap Creek was in impressive form, and served as one of a number of interesting stream crossings we'd make during the day.

We saw almost no wildlife during the hike. But thanks to Shira's keen eyes, we did have an encounter with one remarkable creature: a Phasmid, more commonly known as a walking stick insect. It was kind enough to pose for me as I captured pics. Even a few inches away from it, it looked more stick-like than insect-like. This guy was truly a natural wonder.

After 6.5 hours of hiking, we arrived at our car as the sun was setting. From there we headed to a brewery for more pub-food. This time I enjoyed hot apple cider without booze and some of the best fried pickles I'd ever had the privilege to eat. Back at our condo, we tuned back into election coverage, and like the rest of the nation, watched the equivalent of paint drying as we waited for ballots to be counted.

LinkWithin

Related Posts with Thumbnails