A jar on a hill in Philadelphia
6/16 '23
A jar on a hill in Philadelphia
6/16 '23
OnePo is a lil' bit better (but selfishly so)
6/15 '23
I made some improvements to OnePo this week. Specifically:
These changes work well on desktop, should also work well on tablets (let me know if you get the chance to try it), and work okay on mobile. I do find the new experience of dragging an image a little weird on the iPhone, but it works and hopefully I can continue to fine-tune it.
However... these changes are a bit selfish. There's nothing wrong, obviously, with putting my own uncompensated free time into features I like. Honestly! The nerve of this guy!
But, I've also promised alt text for images and that's a matter of accessibility. So I will get back to that next.
Alt text will be easiest to add for images in posts, because those are full-blown blocks in the editor. Adding one more editable field to them is no big deal.
But for images in comments, it's necessary to rethink the user experience. Right now it's a bit of a hack: "just pick an image and it'll upload and bam your comment is live!" That's cute, but it closes the door on adding alt text before your comment is live. And also there is currently no way to edit an existing image comment. So yeah, rethink.
I did carry out some interesting experiments in that area recently, which also included improvements to the image uploading experience. If I manage to carry that through, image uploads will be a lot faster because the browser will be doing the initial resizing work if necessary.
Bug hunting
5/6 '23
I fixed a bug. Turns out "delete comment" didn't work, for some unspecified amount of time, but probably since early this year. It failed in a very obvious way though, so I doubt anyone was misled into thinking they had removed a comment. All tidied up, sorry about that. Thanks to the person who reported it.
I also modernized a few boring technical details while I was in the neighborhood.
Every now and then I remember my new machine has a touchscreen. Then I try to forget. I'll never clean it.
What I'm Listening To (Podcasts)
4/19 '23
Thanks to Matt Lichtenwalner for the idea.
I start the day by asking Siri to play the news, which for me means NPR News Now, the top-of-the-hour newscast. I use Siri a lot, but that's a subject for another post.
After that I usually dip into The Late Show Pod Show with Stephen Colbert, especially if there's a monologue or a Meanwhile segment. What can I say, I love me some Meanwhile.
Lately I've also started listening to Coder Radio. They talk about software and technology and politics surrounding that. I don't like everything they say, but that's good for me, as long as I'm disagreeing with other members of the reality-based community. And they had a strong recent episode on the Restrict Act, which is some bullshit. These guys also do a bunch of Linux podcasts.
Alternatively, if there's a new episode of Gadget Lab from the Wired crew I'm all over that. As with Wired in general these days, they spend at least as much time critiquing tech as they do nerding out over it.
That's about it on a typical weekday. But sometimes, just sometimes folks, I throw on yesterday's clothes, strap on my Bose headphones, saddle up my trusty Oreck, lean into the household chores and go full beast mode with Planet Money, The Indicator, Linux Action News, Life in the Ted Lane, EV News Daily, and occasionally The Moth. I have a puzzling resistance to firing up The Moth, I think because it seems like a Bigger Deal, and then I'm reliably captivated.
Last year I also spent a lot of time listening to How We Survive, a podcast from NPR's marketplace about fighting and adapting to climate change — or, in many cases, putting our heads in the sand (*cough* Miami). But I'm all caught up for now.
Just recently I got into Serious Trouble, which covers the legal travails of people who are in serious trouble, most of whom should have known better. Quality schadenfreude, but they are currently annoying me by demanding payment for multiple consecutive stories and just airing teasers on their free feed.
I did decide to pay for Planet Money+, which mostly entitles me to behind-the-scenes and extra-details stories I mostly skip, but I don't mind because Planet Money has been in my life so long I felt like a heel not supporting them. What can I say, I'm addicted to the Beigie Awards.
I use Apple Podcasts for all of the above. It works with Siri and I never seem to have difficulty finding a show I've heard about. But I will hit play directly on a website if there's something in my way, of course.
And that's my 100% brutally honest podcast list. Apparently I'm an econ fiend. Who knew?
Today's OPW nudge-provement
2/10 '23
No more goldang inexplicable sidey-scrolling on yer phonez goldangit!!
What was it, you ask?
Why, it was the fleuron, of course. The fleuron with the negative margins.
He wants a fleuron
With negative margins [doop dweet doooo]
Because he knows there's no such thing
It's the wild weekend (and it's 22 degrees out), time for OPW bugwhumping
2/5 '23
Fixed:
Also, code quality things:
All in all, I'd say I got away with the rewrite pretty well. Nothing went hugely sideways. Twitching to do more with the site now, which is a nice feeling after slogging through / dreading the rewrite for so long.
Thanks to all who reported bugs.
Nice Open Graph example (CNN article).
Vastly more important Open Graph example (Mastodon #caturday post).
Looks like Mastodon's og:image tags have site-relative URLs. I noticed 'cuz I had a bug handling those. Amusingly, Facebook does not support relative URLs in open graph at all. This means I now have better support for Open Graph than Facebook. Phbbbbbt.
BTW Open Graph only "unfurls" if you paste a link straight into your text without clicking the link icon in the rich text editor. So if you don't want it, if you just want to type some text and then link it to something because this is the hyper-texter-webs goshdarnit, then type that text, select it and click the link button.
Open Graph still needs some styling love on mobile fixed that shizzle too.
New code - who dis?
2/2 '23
Hey, did you feel something? I hope not.
I've deployed a new version of the One Post Wonder source code. And it should be... exactly the same, for you. If not, please let me know.
For avoidance of confusion: if something seems busted, it's not you, it's me. Let me know. Thanks! I did lots of testing. But... software is hard.
Just in case, my email is tommybgoode@gmail.com. If stuff broke, tell me things ASAP. Thanks!
"So... if everything is the same... what's different?"
I rewrote the code using a modern idiom that other programmers will be able to follow. Which makes it more practical for others to help me move OPW forward. It's a hell of a lot easier for me to maintain the code as well.
You see, back in the Bad Old Days, Node.js programming was like this:
"Hey Jane, fetch me some blog posts, then call me." [Hand-sign of phone]
"Hey Jack, when Jane calls me, fetch some comments, then call me." [Hand-sign of phone]
"Hey Joe, when Jack calls me after Jane calls me, fetch some images, then call me." [Hand-sign of phone]
Except dozens of requests are coming in at once so it's like a telethon in there with only one person manning the phones and everybody wants a fucking tote bag and theoretically that's OK because you don't actually speak continuously to one person right, so...
AAAAAAAA yeah complete madness.
In the New Idiom, Node.js JavaScript programming is like this:
MOTHER MAY I fetch some blog posts.
MOTHER MAY I fetch some comments.
MOTHER MAY I fetch some images.
Behind the scenes, it's the same telethon, but the management of all that parallel madness is encapsulated in the magic words "MOTHER MAY I," which allow us to express what we need to do as a simple series of steps and let JavaScript sort it out behind the scenes.
An astute observer will note that I still have to say "MOTHER MAY I" before each thing. I can't just do the fucking things. Which is still weird and unintuitive. However, in modern JavaScript "MOTHER MAY I" is expressed in the single word "await," which is at least convenient and readable. Crucially, it's at least readable by people who don't do this all day and who don't know this particular codebase by heart.
And the performance benefits are real enough that these days, Ruby, Python, PHP and even Rust optionally offer the same thing for those who need the speed.
So, we've got that going for us.
[Waves tattered flag]
A person might ask why programmers put up with any of this. Java and Python and Ruby and frickin' PHP all let you just write:
Do a thing
Do another thing
Do a third thing
THE END
So why would you put up with this "MOTHER MAY I" bullshit from JavaScript?
Well... because it's fast. Most languages for the web give you a separate thread, aka basically a completely separate telethon volunteer, to think about each request, aka person calling to get a tote bag. Which is enormously convenient. But, also slower because you're not maximizing the throughput of your telethon volunteers.
And... you have to write JavaScript for the browser anyway. To a first approximation, at least. So you may as well double down and use those skills on the server too, right? Less mental context switching. Which gives you plenty of energy for typing MOTHER MAY I! This is sane. [Nods firmly]
"So what's next?" New features? Probably new features. I promised alt attributes a LONG time ago.
Probably also breaking up that massive "routes.js" file into separate collections of API routes by topic, so I can find stuff.
Probably also TypeScript, just so I can put "8 billion years TypeScript experience" on my resume.
"What's TypeScript?" It's a new flavor of JavaScript that is "strongly typed." That means you have to say "MOTHER MAY I" even more often and in twisty new ways... but, if you fail to say it in exactly the same way when you try to call that same code later, it'll stop you and say "uh-uh, that's going to introduce a bug."
So it's a good thing.
One may well ask: does that mean TypeScript can check the original "MOTHER MAY I" incantations (aka "await" keywords) to make sure none are missing? That would be seriously useful.
Oh gosh no, it can't do THAT. Who would want to catch by far the most common source of bugs in a Node.js program? No, it only stops you if you pass a string instead of a number (*), which I practically never do.
But I hear you can do it if you combine TypeScript and eslint and a roll of duct tape. So maybe I'll give that a try.
(*) Yes, yes, and a thousand more complicated but ultimately similar things.
Comet… not quite fail?
1/31 '23
I didn't think I'd see anything at all from a construction site on the edge of a major urban area, but everything lined up in Stellarium and that is very probably the comet. I guess. I have to say my phone saw it a little better than I did. It is a little green.
For those in darker places, now is certainly the time to go outside and have a look. Shortly after sunset in the northern sky. You still have a few days.
I’m working on it. Really.
11/30 '22
To my astonishment, I've actually finished my first pass of converting the entire back end code base of one post wonder to modern async/await syntax. What does this mean for you? Absolutely nothing, except that it will be easier to maintain in the future, and I will hopefully be better able to get others to consider assisting in that task.
I'm making other changes as I go along that aim toward maintainability, and just making it hard to write bugs in the first place.
I reached a point where all I'm doing is testing and debugging, testing and debugging, until it actually works again, and I can think about pushing it as the new current release.
After that, it will be time to think about refactoring the front end code. Refactoring is a fancy word for rewriting, or at least restructuring. All I have to do is choose a front end framework so the code will be more maintainable for other contributors, easier for everyone to understand. All I have to do is choose a framework. Like, insert a list of at least 1000 possible choices. Of course, there are just a few well-known ones. If I go with React, people will know that word 10 years from now when they try to contribute to my code. This does not necessarily mean that what is called React in 10 years will look anything like it, but they'll know the word.
Seriously, I can see that I write software with very long release cycles. This makes me an excellent candidate to maintain the software stack for the interstellar multigenerational probe. Just slow me down and run me as a low priority process.
Rebooting, stand by...
11/17 '22
Taking an early upgrade slot rather than waiting for Linode to do scheduled maintenance at 5am.