Cubesat Launch →

Randall Munroe · xkcd · ·

Cubesat Launch

For someone who loves space, this is a pretty darn cool way to experience nearly real-time data from GOES-16 and GOES-17 on my computer. No more static images of planets, now you have a real time view of the world we live in. Amazing.

While browsing the GOES Image Viewer a few months ago, I had an idea: with the data frequency that these new GOES satellites provide, I could build a Mac app that pulls the newest image every 20 minutes and sets it as your desktop background.

What resulted was a simple little menu bar app that gives you a near real-time view of Earth all day long. I’ve been using it for a few weeks as I’ve built it, and it is an absolute joy to have a window to Earth all day.

There are 8 different views of Earth to choose from in the first version of the app, including full disk images from GOES-East, GOES-West, and Himawari-8 (which happens to have a nearly identical imager). Real time views of Earth (and other planets) are only going to get more popular, so the idea is to keep the app updated with the newest image sources in the future.

Head over to the Mac App Store, get Downlink for free, and let me know what you think!

There used to be a great resource out on the Internet located at www.convert-unix-time.com. It allowed you to see the current Unix time, convert a Unix timestamp to a human readable date, or convert a date string to Unix time. That resource has since disappeared, so I decided to recreate a new version of the site.

UI vs UX →

Randall Munroe · xkcd · ·

UI vs. UX

It’s hard to believe that the President of the United States seems to be exempt from accountability. The only accountability seems to be whether or not he gets re-elected. Why is that? Government has other checks and balances, and has certainly stymied some of his goals and objectives. But my question is this, do we allow the behavior and actions we’ve seen from President Trump to go without consequences? Do we allow anyone who becomes President of the United States to act as he has acted in the future? I hope not.

I resonated with this quote from Tom Nichols that Gruber pulled from Twitter:

But there’s an argument, internal to us, that Trump should be impeached as a lesson in civics, as a reminder that trashing the rule of law and discarding your oath is not cost-free. That’s a political question. Until now, I’ve said it’s probably a bad idea for the Dems.

But political expediency is a bad idea too. At some point, not impeaching means that nothing matters in our constitutional life, and that nothing ever will matter. Impeachment, if it follows a careful rollout and debate, can negate that legacy.

And maybe, years from now, what we need is an asterisk in the history books that says: “There was a penalty for violating the oath of office, and engaging in these high crimes. And President Trump survived due only to the corruption of a single party.”

This is one of those things I thought I’d figured out years ago — turns out I had another thing or two to learn.

The root of my quandary was this, I wanted all the permutations of my domain mekstudios.com to be redirected to https://mekstudios.com. My test cases (what I typed into a browser window) were as follows:

  • mekstudios.com
  • www.mekstudios.com
  • http://www.mekstudios.com
  • https://www.mekstudios.com
  • http://mekstudios.com

What I found was that some of my test cases weren’t redirecting appropriately. So, notes for future me on how to properly configure things.

Apache Virtual Hosts File

ServerAlias

My first mistake was not to include www.mekstudios.com as a ServerAlias. When properly configured, my VirtualHost file (/etc/apache2/sites-available/mekstudios.com.conf) should include the following:

<VirtualHost *:80>
    ServerName mekstudios.com
    ServerAlias www.mekstudios.com
</VirtualHost>

Be sure your VirtualHost file includes both the ServerName and the www version as the ServerAlias.

Rewriting

I use Certbot to create SSL certificates — sure beats the days of buying SSL certificates from various places online and configuring them.

You can have Certbot add “Redirect” code to your VirtualHosts file which I recommend. Then, go back and check your mekstudios.com.conf file and make sure it looks like this. Remember I want all traffic to redirect to the non www version of the website.

RewriteEngine on
RewriteCond %{SERVER_NAME} =mekstudios.com [OR]
RewriteCond %{SERVER_NAME} =www.mekstudios.com
RewriteRule ^ https://mekstudios.com%{REQUEST_URI} [END,NE,R=permanent]

In the default RewriteRule that Certbot inserts, the last line is: RewriteRule ^ https://%{SERVERNAME}%{REQUESTURI} [END,NE,R=permanent], that’s what I’ve changed.

Certbot

As mentioned above, Certbot is a wonderful tool. If you’re like me and you’ve neglected to add the correct ServerAlias, you can run this handy command — thank you Certbot Command documentation — to get yourself sorted out:

certbot certonly --cert-name mekstudios.com -d mekstudios.com,www.mekstudios.com

htaccess File

Last thing to do from a configuration standpoint is to redirect everything in the htaccess file. Something tells me I could be doing something smarter in the VirtualHost file — tell me if you know what that would be. But I know this works:

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\.mekstudios\.com [NC]
RewriteRule ^ https://mekstudios.com%{REQUEST_URI} [L,NE,R=301]
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"

My hypothesis is that adding the last three to the VirtualHost file would do the trick, but I’m not going to mess with it any further this evening.

Check Your Work

Your work isn’t done until you’ve checked everything. So run through your test cases again:

  • mekstudios.com
  • www.mekstudios.com
  • http://www.mekstudios.com
  • https://www.mekstudios.com
  • http://mekstudios.com

Each should now point to https://mekstudios.com. If not, go check your work.

Lastly, run your domains through the Qualys SSL Labs checker:

https://www.ssllabs.com/ssltest/analyze.html?d=mekstudios.com
https://www.ssllabs.com/ssltest/analyze.html?d=www.mekstudios.com

You should get an “A+” on the mekstudios.com and an “A” on the www.mekstudios.com domain. Something tells me the “A” for www.mekstudios.com is because I’m not doing Strict-Transport-Security for that subdomain. And the plan is to leave it as is for the moment.

Why?

Why did I write this, and why is it so informal? I was reminded recently that writing is good, and writing can be helpful. So why not write? And perhaps future posts will be less first-person and more instructional, but this is what I have for now.

Want to give me some input or have some feedback? Shoot me an email.

Note: Thanks to the author of this Website for Students page — it was helpful in troubleshooting my issue and realizing some of my errors and misconfigurations.

Notes on AI Bias →

Benedict Evans · Benedict Evans · ·

With the caveat that Benedict Evans is a partner at Andreessen Horowitz (a16z) which funds AI based businesses, take this with a grain of salt. I think his first two sections on “What is ‘AI Bias’” and “AI bias scenarios” are worth reading, the third on “AI bias management” reads a bit more like “by be scared about AI?” and didn’t appeal to me.

But go for it, read the first two sections. I’d encourage it.

Hey Apple Newsroom team! You’ve got some bugs in your RSS feed.

I discovered this bug recently after adding the Apple Newsroom feed to my Feedly. The expected behavior when you click on the title of an article in Feedly is that it takes you to the article on the source website. In Apple Newsroom’s case, it took me to a new tab. Odd.

Bad URL in Apple RSS feed

I wrote Feedly support and got a quick reply from the CEO Edwin:

Thanks for the heads up Michael,
We will take a look at this tomorrow.
-Edwin
Edwin K
CEO

I dug a little bit more, curious mostly, and found some interesting things.

The Newsroom RSS Feed

Not RSS, rather Atom

Despite the feed URL referencing an RSS feed https://www.apple.com/newsroom/rss-feed.rss, the feed is an Atom feed.

<feed xmlns="http://www.w3.org/2005/Atom">

That’s okay, it doesn’t really matter so long as the XML in the feed validates as Atom, and it does successfully validate as a “valid Atom 1.0 feed”.

Lots of CDATA

For those who need a refresher, CDATA or character data, as defined by Wikipedia: “In an XML document or external parsed entity, a CDATA section is a section of element content that is marked for the parser to interpret purely as textual data, not as markup.”

However, all the content in every tag in the feed begins with <![CDATA[. Odd and unnecessary it seems.

The Bug: No Link Tag

What I discovered is that Apple’s Newsroom feed is malformed. Specifically, it includes the link to the article, for example the link to the most recent article — AirPods, the world’s most popular wireless headphones, are getting even better — in the id tag. Again, odd.

<id><![CDATA[https://www.apple.com/newsroom/2019/03/airpods-the-worlds-most-popular-wireless-headphones-are-getting-even-better/]]></id>

If you hop over to the W3 Feed Validation Service, they’ve got a nice summary of the Atom specification, RFC 4287. As the page notes, the link element contained in the entry element “Identifies a related Web page. The type of relation is defined by the rel attribute. A feed is limited to one alternate per type and hreflang. A feed should contain a link back to the feed itself.”

That’s where the link to the article should be, in the link tag, not in the id tag. The id tag “Identifies the entry using a universally unique and permanent URI.”

Link Tag used for Images

The Newsroom feed breaks the Atom standard here as well as it includes not a single link element for the article, but three, and they’re all images associated with the article not links to the article itself:

<link href="https://www.apple.com/newsroom/images/product/airpods/standard/Apple-AirPods-worlds-most-popular-wireless-headphones_03202019_big.jpg" rel="enclosure" title="New AirPods build on the magical experience customers love delivering 50 percent more talk time, hands-free “Hey Siri” and the option of a new Wireless Charging Case." type="image/jpeg" />
<link href="https://www.apple.com/newsroom/images/product/airpods/standard/Apple-AirPods-worlds-most-popular-wireless-headphones-hey-siri_03202019_big.jpg" rel="enclosure" title="The new AirPods feature the convenience of &quot;Hey Siri&quot; making it easier to change songs, make a call, adjust the volume or get directions." type="image/jpeg" />
<link href="https://www.apple.com/newsroom/images/product/airpods/standard/Apple-AirPods-worlds-most-popular-wireless-headphones_woman-wearing-airpods_03202019_big.jpg" rel="enclosure" title="Switching between iPhone, Apple Watch, iPad or Mac is two times faster with the new AirPods." type="image/jpeg" />

Opportunities for Improvement

The CDATA comment aside, I’d love to see the body of the articles, the content element, contain richly formatted HTML. Their webpage certainly has beautifully formatted HTML.

Apple AirPods press release

The only HTML elements in use in their feed are:

<a>
<br/>
<li>
<strong>
<ul>

Where are the paragraph tags? Where are all the nice inline images? And if you notate all the content as CDATA, that doesn’t really help your formatting woes. Adding <content type="html"> would also help.

Here is what their feed articles look like today in Feedly:

Screenshot of Apple Newsroom article in Feedly

Next Steps

I sent a thorough email to Apple’s Media Helpline email address and to the two folks listed as media contacts on the most recent article. As I should have expected, that’s not the right way to report a bug on their website. I received the following reply:

Apple's email reply

Shucks. So I’m writing this post in hopes that someone on the Apple Newsroom team, or the team that maintains the CMS for the Newsroom team notices and fixes the feed. I love Atom feeds! And I know lots of other people do too.

Thanks in advance for fixing up the feed, Apple.

-Michael

A neat presentation looking at the transition from Gutenberg and the printing press to the exponential growth of the Internet today.

Google’s put together a neat way to browse the archive of NASA photography.

To celebrate 60 years of NASA and 50 years of Project Apollo, the Google Arts & Culture Lab has created NASA’s Visual Universe - an experiment drawing on NASA’s vast image archive.

Using NASA’s public API, we explored 127,000 historic images stretching back to 1915, and analyzed them using machine learning - bringing surprising and interactive results.

We especially used Google Cloud Natural Language to extract keywords and information from the archive.

Browse the Archives

By author or source

Author

Source

Search