Micro Matt

Micro thoughts and mini posts.

Banged my head against the wall for a bit on how to have dynamic blog routes on Write.as, so we can support custom redirects (as might be needed when moving from another platform to ours).

I dug into Go’s http library for a bit, then came across this Stack Overflow answer that pointed me in the right direction. Then it was a matter of how I’d make this multi-user and entirely dynamic, loading rules from the database for any blog that had redirect rules. For a minute, I was just going to hard-code things for the single blog that needs this feature to avoid more database overhead, but even that got messy, and it was better to do it right.

My solution was this: when the app starts up (and initializes all routes), query the database for all blogs with custom redirect rules. Then for each one, add a special handler that runs through all the custom rules for that blog. This handler only applies to the blog’s canonical URL (e.g. a custom domain) to keep things simple.

If a from path (the old URL we’re redirecting from) matches the address the visitor navigated to, move on to handling the request. There, we again match the from path to the current URL, and expand it into the desired to path (the destination) with any regex variables replaced — and finally redirect the user. This maintains support for regular expressions in these redirect rules, and most importantly, doesn’t add new overhead for other users or valid URLs. Phew, that was a challenge. But I’m pleased with the results!

#dev

Thoughts? Discuss...

Back to some coding today / tonight. Just finished the option to put posts on a sub-path, which mostly just lays the groundwork for things like static home pages (it won’t be widely available yet). Next I’m working on custom redirect support, which again won’t be widely available. Then it’ll be more work on our new category system.

Tonight I spent some time thinking about an easier post management UI, and ended up designing something that combines that with an early “drafts” system — that is, completely private posts tied to a blog, so you can preview them with your blog’s theme and share them with any team members before publishing. Basically, this will be an early, built-in version of Draft.as (without any version control).

It’s also very interesting to me, because it’ll live alongside our continued support for Anonymous posts, which are always useful as publicly-shareable “drafts.” In other words, each kind of post (anonymous, draft, blog post) will have a distinct use case, so we’re not adding pointless cruft or shoehorning any functionality into where it doesn’t fit. Excited to develop this, when time allows for it.

#dev

Thoughts? Discuss...

Very excited to be a featured speaker at the Introvert Writer Summit, hosted by another member of the Write.as community, Jas Hothi (of indiewriter.net), and Lauren Sapala. It starts today and runs through March 9th — I'll be speaking on the 7th!

You can read more about this free online event and sign up here: https://laurensapala.com/join-us-for-the-introvert-writer-summit-its-free-and-starts-march-1/

Thoughts? Discuss...

Shipping soon: native support for Markdown and HTML in blog descriptions!

This was a long-requested feature, and there’s really no reason not to support it — both Snap.as and our future Remark.as support it. Now you can do things like verify your blog for Mastodon and elsewhere in the IndieWeb.

Further reading: dev task T874, WriteFreely PR #531.

#dev #WriteFreely

Thoughts? Discuss...

Just came across Woob — a way to interact with the Web outside of a browser. Will be cool to see if I can use it with Write.as / WriteFreely — I guess using the msg-qt application. (This is mostly a personal bookmark; I’ll have to look into it later.)

Thoughts? Discuss...

I think I was always looking to live in a place that meant I walked more.

Ever since starting to think about moving out of Jacksonville, over two years ago, I wasn’t sure if I wanted to be out in the country or in the city. Maybe I’d live in the mountains and spend more time hiking. Maybe I’d get a place where I could walk out my back door and walk up a hill — a topographical feature sorely missing in the Florida swamp.

As I spent some time in east coast cities to get a feel for them, I realized I wanted the city more — people around me, things going on, the ability to live without a car. Today walking around Brooklyn, where I’ve finally settled, I realized it’s just this: I need to be in a place where I have to move my body to get through the day.

I started tracking my “steps” back in August for the fun of it. What struck me (probably not as much as it should have) is how little I’d walk around on certain days. A month would go by with barely any daily steps until… I walked around a city. Maybe it was visiting a friend in DC on weekend or going to Mexico City for a week. It could even be going out with friends in Jacksonville one night. But I just didn’t spend that much time moving around otherwise.

Back in college, if I was tracking my steps, I would’ve seen plenty every day. I had to go to class, go home, meet friends, go eat, go study. I’d walk basically everywhere, or ride my bike. I was always moving; there wasn’t as much sitting in one place for so long. It became so natural that I’d do it for fun, riding my bike to nowhere in particular or just taking a stroll. It was certainly a compact little town there, but it was also a more distributed life — not everything you need in one big house; activities and people spread out around the area.

It’s funny that I didn’t see this sooner, but I’m glad I’ll have it now. It’s not the mountains, but I get the same effect I was going for: to have to walk.

Thoughts? Discuss...

Today I added a capability to Snap.as that’ll open up more customization options: the ability to mark an uploaded photo for a particular use. This way, for example, we can store a favicon for Write.as or an avatar for Remark.as, and Snap.as will keep only one image for that particular use.

#dev

Thoughts? Discuss...

Switching from a crowded email inbox to a more organized system for customer support has helped a ton over the past month. Now, that “email hour” I added to my daily schedule actually works, because I have limited inboxes to visit, and can view each request as a to-do item.

Everything is powered by our Discourse forum. Write.as users get a certain email address to send to, based on their support level. Those emails show up in different Discourse group inboxes. The high-priority group also pings my personal email, just so I don’t forget it’s there. But the low-priority group won’t ever disturb me — I have to visit that inbox to see messages there.

When my email hour starts, first I visit my high-priority inbox, where paying users send their requests. As soon as I respond, I archive the thread, so I eventually get to “inbox zero” and know that I’m done. Then I move on to the low-priority inbox, and then public conversations on the forum.

Between limiting how much I’m personally pinged, and having a UI that shows requests as a limited to-do list, all of it is much more manageable.

#customerSupport

Thoughts? Discuss...

First “Welcome to New York” was from a postal worker today, after asking me why the hell I'd move from Florida, telling me I'm gonna regret it. I love it here so much.

#personal

Thoughts? Discuss...

Recently remembered our Android app, while writing our blog post about changes to Free registrations on Write.as. A “version 2” of the app that would let you log into your account never materialized — we got about 95% of the way there, but the developer I’d hired to do the update had other things come up before we could finish.

Still, it works perfectly well as the same anonymous publishing app it launched as, nearly 7 years ago. Pretty cool that it has over 100,000 installs total (25,000 active) and still holds a 4.4-star rating after all this time. But I think I’ll send out a marginal update that makes sure it looks nice on modern Android devices.

I tinkered with it a bit today, updating all dependencies and build tool versions, and got it to compile again. But it seems the Tor library the app relied on has changed a lot, so I’ll have to re-learn Android development if I want to release that update. Probably something for another day.

Thoughts? Discuss...

Enter your email to subscribe to updates.