Strange Loop Day 1

How to Build a Meaningful Career

Taylor Poindexter and Scott Hanselman kicked things off with an opening keynote filled with thoughts and ideas about career building.

They’re both great speakers. They transitioned between sharing the stage and taking turns at center stage several times. The talk was a lot of fun.

Playing with Engineering

Next, AnnMarie Thomas gave her keynote about play. She runs a place called the Playful Learning Lab which sounds amazing. Learn by building fun things.

My biggest takeaway was “Play is about process, not about outcome.”

Without Open Data, There is no Ethical Machine Learning

Keynotes are done. Time for some tech. I started with Erin Mikail Staples talk about Open Data.

Maybe scraping all of Reddit and Twitter isn’t the best way to build an AI?

President Obama signed an executive order stating that government data should be open and accessible. Unfortunately, releasing data in an open format takes funds and that funding has been disappearing since he left office.

Programming Distributed Systems

Mae Milano’s talk on distributed systems was so good. It was definitely the most technical talk I saw today.

She was a little soft spoken, but very smart and had some great one-liners. The audience favorite was:

The speed of light is pretty slow — around 4 inches per clock cycle.

Mae Milano

And this explains why global distributed systems are so hard to build.

I was really impressed by MixT, a DSL for writing transactions to guarantee consistency across multiple databases.

Oatmeal is Cheap: A Fundamental Theorem for Procedural Generators

Indie game developer and university student Younès Rabii shared mathematical formula for creating procedurally generated art.

He built an interactive graph showing the three properties of procedurally generated art. Adjusting the graph in real-time showed the effects. A great way to demonstrate the math.

Software & The Game of Go

I was a few minutes late to David Nolen’s talk so maybe I missed the part about software.

It was a great overview of the history and rules of Go. I’ve played in the past, but never had much luck. It’s much harder than it looks.

He ended with the ten rules above which are good for many thibgs beyond Go.

Designing Dope Distributed Systems for Outer Space with High-Fidelity Simulation

I finished the day learning about simulation testing from Toby Bell.

He and his team are building software for a pair of satellites that will orbit the Earth every 90 minutes and line up to take pictures of the sun’s corona.

The two satellites will line up 40 meters apart, the satellite closer to the sun has optics, the other captures the image. They effectively form a 40 meter long camera system.

When your software is running in space, effective testing on earth is obviously very important.

Day 1 Done

And with that day one is done. Time for the after party.

Strange Loop Day 0

I’m in St Louis for a few days for the last ever Strange Loop Conference. I attended back in 2019, but skipped the last few years due to the plague. When I heard this was the last ever Strange Loop I knew I had to come back.

Part of what makes this conference so special is the venue. Union Station is a great hotel and the party at the City Museum is awesome. Here are a few example pictures in and around Union Station:

The hotel lobby, no filter.
Outside my first-floor room there’s a live band and pyrotechnics.
That water is actually a koi pond. I wonder what the fish think about the pyro?
Around the corner there’s a giant Ferris Wheel, of course.

The conference kicks off tomorrow morning at 9:30 AM so I better start getting my schedule figured out. I’ll post more pictures tomorrow, including the City Museum.

About Time

As we prepare to “fall back” this weekend in the US I’ve been thinking about writing code that deals with dates and times. This is easy to get wrong and is a common cause of bugs.

Dates

The first issue is how to write dates. For example, if I write 11/03/2021 that means November Third in the US, but in other countries it might be March Eleventh. Oops.

With that in mind, I always use ISO 8601 format for dates: 2021-11-03. To me this just makes sense. The year is the biggest so it comes first, followed by the month and day. In a Rails console you can try something like this:

Date.new(2021, 11, 3)

Date.parse(“2021-11-03”)

Easy. No confusion. The order is the same in both cases.

Times

Times are easy, right? Everyone does hours, colon, minutes. Well, not exactly. Some folks like 24-hour time and some like AM / PM.

In casual conversation I use AM / PM, but in code I try to always use 24-hour time. That way you immediately know if the time is before or after noon. For example, 1:00 could be AM or PM, but 01:00 and 13:00 are clear. Back to Rails, it looks like this:

Time.parse(“2021-11-03 13:00”)

But there’s still one piece missing.

Time Zones

The bane of programmers everywhere. The dreaded time zone.

In my experience things usually default to UTC time. I’ve never seen a database that stored times in a different time zone. In Rails you can configure the default time zone:

# config/application.rb

config.time_zone = “UTC”

You can parse times in other time zones. You can also change the time zone on existing objects. This is useful when you want to display a time in the user’s time zone.

t = Time.parse(“2021-11-03 13:00 CDT”)
=> “2021-11-03 13:00:00 -05:00”


t.in_time_zone(“America/New_York”)
=> “Wed, 03 Nov 2021 14:00:00 EDT -04:00”

Notice how the format is different after I changed the time zone? That’s because it also changed the class of the object.

t = Time.parse(“2021-11-03 13:00 CDT”)
=> “2021-11-03 13:00:00 -05:00”

t.class
=> Time


t.in_time_zone(“America/New_York”).class
=> ActiveSupport::TimeWithZone

You can format the output however you like, these are just the defaults. Note that setting the time zone in Rails only changes the way the time is displayed. The actual value remains the same.

t = Time.parse(“2021-11-03 13:00 CDT”)
=> “2021-11-03 13:00:00 -05:00”

t.to_i
=> 1635962400


t.in_time_zone(“America/New_York”).to_i
=> 1635962400

Comparisons between times in different time zones will work as expected. 13:00 central time is equal to 14:00 eastern time.

I’m on call for work this weekend. Look for a follow-up post on Monday talking about everything that broke on Saturday night.

The MacBook Pro

Apple has really put the “Pro” back in MacBook Pro. Ars Technica says “Yep, it’s what you’ve been waiting for”. That looks to be true.

I guess some might say I’m an Apple fanboy. I have an iPhone, iPad, Apple Watch, Apple TV, etc. Now that I’m so deep in the ecosystem it just makes sense to stick with it.

I bought 13-inch M1 MacBook Pro a year ago when they were announced. I was immediately impressed. It’s the fastest computer I’ve ever owned, the battery lasts all day, and it seems like the fan never even turns on.

There are a few things I’m not crazy about. I never use the touch bar. I don’t look at the keyboard while I type, so I don’t even think about it. I would like a little more screen real estate. The M1 is still plenty fast, but faster is always better.

The lack of ports doesn’t bother me. I rarely plug in anything other than the charging cable. On my old MacBook Pro I did occasionally use the SD Card reader, and I’ve even used HDMI to connect to TV.

So of course I ordered a 14-inch MacBook Pro with the M1 Pro. The good news is I can get $880 for my 1-year-old 13-inch M1. Combine that with 3% cash back on the Apple Card (of course) and the price tag doesn’t look so bad.

I won’t receive it until end of November, early December. Once it arrives I’ll post more details about how it compares to the M1. And decide if it was really worth it or I just like having the latest and greatest.

Foundation

I’m really enjoying the new Foundation series on Apple TV+. Here’s the trailer if you haven’t seen it.

I read the books years ago and listened to the audiobook of Foundation earlier this year. As I started watching the series I found myself trying to compare it to the book which was a mistake.

The series is based on the books, but differs in some pretty significant ways. For one thing, the future that Asimov’s books describe seems to be made up entirely of white males. In the series both Gaal Dornick and Salvor Hardin are played by young black women. A much needed change.

The special effects are very well done. I don’t remember especially vivid descriptions of space travel in the books, but the series does a great job. I also like the fact that space travel takes time. The ships look amazing, but they aren’t magical.

Readers of the books know that just as you get comfortable with a set of characters the story jumps forward and introduces a new cast. This happens between episodes 2 and 3 of the new series and it was a little jarring.

Some are already calling this the next Game of Thrones, but I don’t think that will be the case. I hope it makes it to eight seasons, but it seems like things come and go quickly in the streaming world.

It’s a smart series, very well done, and updated for modern times. I’m looking forward to future episodes.

iPadOS 15

Of course I updated to iPadOS 15 as soon as I could. I don’t run beta versions anymore, but since I don’t use my iPad for anything critical, I’m not afraid of release day updates.

The way multitasking works now is great. Discovering and remembering the multitasking gestures before was next to impossible. I can’t believe it took this long to add a tiny menu to the top of every app.

Reading and Writing

It’s nice having the App Library on iPad now. I only use a handful of apps on a daily basis. It’s nice having all of the infrequently used apps available, but out of the way. This should also help make room for the new widgets.

Speaking of widgets, I’m not currently using any. I’m not sure I really see the point. Maybe they just don’t fit my iPad usage patterns. I spend most of my time catching up on news, reading books, writing a bit, and playing casual games. I’m not sure where widgets fit into that.

I’m still getting used to the changes to Safari. The new extensions UI is great. I was able to install 1Password with just a few taps. The new rounded tabs are growing on me, but I still think they look more like buttons than tabs.

The best new features, in my opinion, are additional privacy protections in Safari and Mail. It seems like Apple is continuing to focus on online privacy. Anything that keeps advertisers from tracking me across the web makes me happy. I understand that content creators want to get paid, but you can still show ads without tracking.

Crafting Interpreters

I’ve been working my way through Crafting Interpreters by Robert Nystrom for the past few days. It’s an excellent book about creating your own programming language.

I was already familiar with Nystrom’s previous book Game Programming Patterns. A great book on design patterns, even if you’re not a game programmer.

Crafting Interpreters covers a new object-oriented scripting language called Lox. You’ll first implement a tree-walk interpreter in Java and then create a bytecode virtual machine in C.

I probably won’t ever directly use these skills in my day job, but gaining a deeper understanding of interpreters and virtual machines can’t hurt. Especially considering I split my time between the Ruby interpreter and Java VM.

Almost as interesting as the book itself is the way he wrote it using a combination of Markdown for prose and hand-drawn diagrams. More details are in his blog post Crafting “Crafting Interpreters”.

If the book sounds interesting to you, you can read it online for free at the link above. After reading the first few chapters onscreen, I bought a print copy. I like having the book open on my desk while writing code.

The Matrix Resurrections

Oh my god. I realize this is two Matrix posts in a row, but this trailer looks amazing!

In theaters and HBO Max on December 22. That makes me even happier. I really want to see this, but I’m still not ready to step back into a theater. I honestly may never be.

Matrix Time

When I was a younger there was a phone number you could call where a recording would tell you the current time and temperature. I never really thought too much about that. It was obviously an early computer generated voice filling in the time and temperature.

Now, there’s a website for the upcoming Matrix movie that incorporates your local time the right way.

The Choice Is Yours

Thanks to a post on Reddit, you can see how it was done. There are 1,440 copies of each trailer, one for each minute of the day. A bit of clever code picks the correct video to play based on the local time in your browser.

Not rocket science, but it did get people talking.

Bringing Back WebRings?

If you can make it past the over abundance of ads (Reader View is your friend), this is an interesting article about the Internet days of old.

What these rebellious programmers are building goes by many names—indieweb, yesterweb, folk internet—and relies on simple design choices, often borrowing elements from the 1980s and 1990s.

Tech Workers Rebel Against A Lame-Ass Internet By Bringing Back ‘Geocities-Style’ WebRings

I don’t think this is exactly the modern definition of indieweb. See IndieWeb.org for more info. But I guess this is close. I like the terms yesterweb and folk Internet for this style of website.

I had a webring on one of my old web pages, and I had a Geocities site back in the day, but I don’t see myself jumping on Neocities any time soon. I understand the nostalgia, for sure. I guess I could create a page with a few of those “under construction” gifs and call it done.

Remember the time before content was served via algorithms designed to exchange attention for dollars? At the end of the day, this is just another example of a group of old folks like me longing for the web that was.