Cody Casterline: Posts

Cody Casterline

Cody Casterline updated their profile.

Cody Casterline

FeoTweet v0.2.0

Now available here! https://deno.land/x/feotweet@v0.2.0

It adds support for syncing a single user's tweets to FeoBlog, as well as copying tweet attachments into FeoBlog.


Developing in Deno is still pretty fun. Though I did spend a couple days scratching my head due to this bug.

Apparently HTTP clients don't do well when you close the HTTP connection when they're still sending bytes at you, even if you've already sent a response.

The HTTP 1.1 spec isn't super clear on what should happen in this case. For example, it says this about closing connections, but seems to imply it's only for idle connections:

A client, server, or proxy MAY close the transport connection at any time. For example, a client might have started to send a new request at the same time that the server has decided to close the "idle" connection. From the server's point of view, the connection is being closed while it was idle, but from the client's point of view, a request is in progress.

This means that clients, servers, and proxies MUST be able to recover from asynchronous close events.

And it says this about "Client Behavior if Server Prematurely Closes Connection":

If at any point an error status is received, the client

  • SHOULD NOT continue and

  • SHOULD close the connection if it has not completed sending the request message.

... but that's only in the case of an "error" status, not an OK status.

Chrome handled this case by ... pausing for about 5 seconds, then continuing without error. (!?) And Deno handled this case by ... well, in the case I reproduced in that bug report, the next call to fetch() would fail, but during debugging I saw other sorts of odd failures. Like calling .read() on a Deno.Reader that seemed completely unrelated to the HTTP connection would fail and say the rid (Deno "resource ID") was invalid. Yeah, that one had me confused for a while. I wasn't able to reproduce that one in a minimal example, though.

I was able to work around the issue by just waiting for all the bytes to be sent before sending an HTTP response. But this seems like a thing that people could use to DoS your server. If you try to be nice and read all these unnecessary bytes they sent to you they can just do it forever. Though I guess there are countless other ways to DoS an HTTP server in addition to this, so what's one more?

Cody Casterlinecommented

🤦‍♂️ This post got backdated due to this bug. Well, now I have something else to add to my work queue.

Cody Casterline

Cody Casterline updated their profile.

Cody Casterline

Mastodon, now in FeoBlog

One of the first questions I got when I told folks about FeoBlog was "Does it support ActivityPub?" (i.e.: "Does it interoperate with Mastodon?")

And while there are some reasons why it can't interoperate directly with ActivityPub, it's always possible to sync data back and forth.

So, I wrote feomasto, a little tool to sync my Mastodon feed into FeoBlog. You can see the results here.

Some design decisions I'm interested to hear feedback on:

  1. Since FeoBlog is all public, I decided to only sync "public" and "unlisted" posts from Mastodon, so as not to expose any private posts from users I follow. (i.e.: not "private" or "direct" posts.)

  2. So as not to unnecessarily use bandwidth of (often for-free) Mastodon servers, I decided to not inline images. Though, I could see myself coming back and deciding to add them as FeoBlog attachments, which would allow for inlining them without touching Mastodon servers. (Beyond the first download.) For now, I just link to the attachments so you can click in and view them as you wish.

Let me know what you think!

I'm also still really enjoying writing stuff with Deno. Not having to deal with package.json, tsconfig.json, npm, etc, just removes a lot of friction. Plus, it's super easy to write, run, and share a standalone script that imports dependencies from online. (Though, I haven't really used the new module stuff in Node, so maybe you can do that there too these days?)

Cody Casterline

Deno & rss2fb

Had fun writing code for Deno! :D

https://deno.land/x/rss2fb@v0.1.1

Just published my first #Deno package. It's pretty cool!

One unexpectedly nice thing -- if there are errors in code hosted on https://deno.land, the error message contains URLs that take you directly to the line(s) of code in a web page. ❤

https://twitter.com/NfNitLoop/status/1411547380302839811

It's a pretty fun and easy way to write and distribute some TypeScript!

I want to write more, but I was "done in 20 minutes" a couple hours ago, and I need to clean the apartment. We're heading out of town tomorrow to see some friends for the 4th of July. So I don't get to play with code again until we're back on Monday afternoon. 😢😛

Cody Casterline

Cody Casterline updated their profile.

Cody Casterlinecommented

This has been a lot of fun to work with. ❤

Cody Casterline

Cody Casterline updated their profile.

Cody Casterlinecommented

Oops, I failed at markdown. That Twitter link:

https://twitter.com/rahsfan/status/1387040932101386246

Cody Casterlinecommented

I'd love to hear from members of that working group […]

And the answer:

I work at Basecamp and I co-spearheaded the DEI Council formation. I’ve seen people ask what the DEI Council did to warrant such a response. The answer is nothing. We formed in February and we’re still getting ourselves organized.

Cody Casterline

What is "political" at work?

re:

paste_1619472506698.png
(Twitter)

I assume that's in response to this line in the blog post:

  1. No more societal and political discussions on our company Basecamp account.

This is such a tone-deaf "got my privilege blinders on" rule.

What counts as "political" discussion?

I've worked with people who I'm sure would claim it's "political" that I casually mention my husband in work chat, since they're "politically" (and likely religiously) against same-sex marriage.

Is openly mourning the death of yet another black person killed by a cop "political" because "black lives matter" is somehow a sentiment that needs to be "both sides"-'d politically?

What about saying that you're for equal pay for women, and compensation transparency?

I'm not saying work chat should have a #politics channel or invite irrelevant quarrels, but when you're in chat with folks 8+ hours a day (especially when you're remote), "real life" stuff creeps into chat. It's impossible to separate politics and real life in general, but it's doubly impossible when your existence and lived experience is politicized.

I suspect what counts as "political" will just be whatever makes trouble for The Company, or makes the leaders uncomfortable. They don't want to take a side because that's hard, so they'd rather just pretend the problem doesn't exist. And who will bear the brunt of that rule? People who speak up about issues.

And that leads me to the thing that always makes me confused at this kind of thinking, something that feels like cognitive dissonance when I come across it at a company: You can't be for "diversity and inclusion" and against talking about "political issues". Your workplace is not inclusive if some of your coworkers need to censor themselves, and others get to be "the default". And your workplace will not be as diverse once those employees find other, better places to work.

But, maybe Basecamp isn't for diversity and inclusion? Seems like their "Diversity, Equity, and Inclusion" working group is getting axed:

  1. No more committees. For nearly all of our 21 year existence, we were proudly committee-free. [...] But recently, a few sprung up. No longer. We're turning things back over to the person (or people) who were distinctly hired to make those decisions. The responsibility for DEI work returns to Andrea, our head of People Ops.

I'd love to hear from members of that working group how they feel about these changes.

My ideal workplace would be one that actually sticks to and implements its stated values. If you value DEI, then it seems like the issue isn't "political" discussion, it's sexist, racist, homophobic, transphobic, etc., statements. And, hey, some of those are already illegal in the workplace so you're probably already enforcing bans on that kind of speech. If you've got people in your company who are angry because they don't get to be the "other side" of those "political" issues, I'd suggest you've found the "divisive" problem in your company culture.

Cody Casterline

Bike Ride

We ended up buying the e-bikes that I was thinking about. They've been great! Definitely happy to have a motor to help me up some of the steep hills in this neighborhood. Even with the electric motor at full, and on the lowest gear, some of them are quite tough, so I definitely wouldn't be managing this on a non-electric bike.

After a few trips out, my husband found a nice circular route for us to ride which has been our de facto route recently. It starts with a climb up a into some hilly neighborhoods, and just when I'm getting exhausted it ends with a nice downhill coast most of the way back home.

We got a little bit of rain last month so the hillsides are looking nice and green. Here's one of my favorite views from that route:

IMG_3157.JPG

IMG_3156.JPG

Cody Casterline

E-Bikes

A few months ago, I was perusing the YouTubes, as one does while social distancing during a pandemic, and it served up a video review of an e-bike. It's been a while since I owned a bicycle, so the tech was new to me, and I watched enough videos that now YouTube thinks I'm an e-bike fanatic or something.

So after months of watching videos I thought, hey, I should try riding one of those things. So, today Heiðar and I went out to test ride a few.

At the first stop, I tried out a Trek Verve+ 2, and (I think) the Trek Verve+ 3. They were both quite nice! They've got a "mid-drive" electric motor, situated down between the pedals, that assists you as you pedal. Even if you turn it off completely, the bike rode quite nicely despite the extra weight.

At the second stop, we tried out a brand whose name I'll avoid mentioning. When their sales guy heard we'd tried a Trek earlier that day, he spent a lot of time telling us how bad it was. He claimed mid-drive motors are worse because they're harder to pedal when the assist is off. (I did not find this to be the case, and in fact, the bikes he was selling with hub drives in the wheels seemed harder to pedal with no assist.)

Still, he was nice and we each tested a few different models. I'm both out of practice and out of shape so we called it quits for the day, but I'm looking forward to trying some more later this week.

I'm trying to decide if the expense will be worth it. I'd like some activity to get me out of the house, and biking sounds fun. We're thinking e-bikes because the neighborhood we live in (and San Diego in general) is pretty hilly, so having something to help get up the steeper hills would be nice. But there's always the chance that after biking for a while the novelty will wear off and we'll have bought ourselves a couple expensive, electrified dust collectors.

Cody Casterline

First Post! (... with a cat)

FeoBlog v0.3.0 is out and it supports file attachments. Everyone knows The Internet is for pictures of your cat, so here we go.

Giles.jpg

Cody Casterline

Cody Casterline updated their profile.

Cody Casterlinecommented

See also: v0.2.2. Always find some bugs right after creating the release. 🤦‍♂️

Cody Casterlinecommented

Had a lot of fun updating the design and adding comments for this release. Hope someone actually uses this thing one day. 🙂

Cody Casterline

Cody Casterline updated their profile.

Cody Casterlinecommented

This is the first thing that's made me consider buying an Apple Watch. 😆

Since we're wearing masks all the time, FaceID has become useless. I'm constantly wishing I had a phone with a fingerprint reader instead.

Cody Casterlinecommented

I wrote comments for FeoBlog just so I could say: 🙄🙄🙄

Cody Casterline

It's funny. I'm way more interested in writing FeoBlog than posting to it. Sometimes I feel my own words are boring or tedious, so I'd rather just read others'.

I've been having fun working on the next version of FeoBlog. It's going to have comments, as well as some other features I worked on along the way. (Faster loading of items. Relative timestamps. Some style updates. Uhh... other stuff I've forgotten. Don't worry, there'll be a changelog. 😛)

Cody Casterline

Cody Casterline updated their profile.

Cody Casterline

Cody Casterline updated their profile.

Cody Casterline

Video Editing

Today I recorded a screencast demoing some of the features of FeoBlog. I'm excited to share it with the world, but first I had to brush up on my video editing skills. (... as if I had any to start with.)

If I were on a Mac, I'd probably have just used iMovie. But, since I recorded using OBS on my Windows PC, I thought I'd just edit the video there.

Windows Photos

So Windows used to have an app called "Windows Movie Maker". Apparently that's just been folded into the Photos app in Windows 10. After I used OBS to "remux" my files to .mp4 files, Photos was able to edit them. Basic trimming worked, but when I went to export things, the resolution was limited to 1080p, though I'd recorded in 1440p.

I was a bit worried about things becoming blurry since some text was unfortunately already a bit small, so I looked for alternatives.

Shotcut

I came across a nice video on YouTube that recommended Shotcut, so I gave that a try. But at first it seemed unable to play my video files.

After some googling, I found that I needed to go to Settings → Display Method → OpenGL (instead of DirectX). That seemed to let it render my videos, but despite having really beefy hardware, things were still really sluggish.

I briefly tried out OpenShot, which has a much nicer site than Shotcut, but it had even more performance issues. (At one point, it took ~15 seconds to close after I'd clicked the close button, and all it was doing was playing back video clips I had put into the timeline.)

Back in Shotcut, I was able to edit things into a somewhat nice state. Tips for any beginners:

  • If playing video/audio becomes choppy, save the project and re-launch the application.

  • Save often. I found myself accidentally pressing keys that mapped to shortcuts I didn't know about. Having a restore point is handy.

  • Though the app tells you it'll auto-detect your video size & frame rate from the first video you attach, it does not seem to do so for 1440p. You'll need to add a custom video mode in Settings → Video Mode.

    I'd neglected to do this, and my first export shrank my 1440p video to 1080p, then upscaled it back to 1440p since that was the export resolution I chose. Took me a while to figure out why just exporting my video had made it so blurry. 👎

Exports are still really slow, unfortunately. My 21.5 minute video is taking over an hour to export. It looks like a lot of operations may be CPU bound. I wonder if it would've been faster to just copy things over to my old MacBook Air and use iMove.

Cody Casterline

Giles

🐱 stares at my feet

"... yes?"

🐱 looks up at my face, then at my feet

Oh! Uh... is this the first time you've seen me in socks? 😆


So we adopted a cat about a month ago. We named him Giles. There are some pics on Instagram.

It's been nice seeing him come out of his shell. He was quite shy when we got him. Before we let him have free roam of the apartment, he would hide behind between the shower curtain and the front of the tub. Once he had access to the whole apartment, he lived under the bed until we started fishing him out from under there and having "no bedroom access" time.

Now he'll happily spend time with us in the living room or in my office, even when he has access to his hiding spot. But sudden movements do still send him running for cover. We can't scold him for anything because he seems to constantly think he's already in trouble. Poor thing!

Cody Casterline

First Post!

... on my personal account, at least. :)

Cody Casterline

Cody Casterline updated their profile.