Linus's law by way of the shiba inu doge

Streamed

Reviewed issues including emoji in titles and self-promotion rules. Improved story merging UI, fixing N+1 queries and cleaning up the presentation. Found and reported a bug in Brakeman error reporting. Experimented with removing custom font sizes after discussion of accessibility.

scratch


topcis
  PRs, issues
    self-promo rule https://github.com/lobsters/lobsters/pull/1498
    emoji https://github.com/lobsters/lobsters/issues/1497
    sitemaps https://github.com/lobsters/lobsters/issues/1496
    bump nokogiri
  story merging
    fixed up singledetail
  error(?) in brakeman https://github.com/presidentbeef/brakeman/issues/1927
  font size experiment https://github.com/lobsters/lobsters/issues/1284#issuecomment-2749425161

title
  the more code I delete, the fewer bugs I have

post-stream
    

Transcripts are generated with whisperx, so they mistranscribe basically every username and technical term. They're OK but not great, advice appreciated.

Recording



02:17I'm Peter. This is Lobster's Office Hours stream. And if you've got questions about the site or the code base, ask anytime. pushcx If you've got questions about the site, ask anytime!
Throw that in the chat.

...38And then otherwise, I... work on the site and the code base. Yeah, let's see. Last Thursday's stream ended with some work on the story merging UX. I didn't end up finishing that over the weekend, so there's still that hanging out. There's some famous writer whose writing advice was to end sessions literally in the middle of a sentence so that it was easier to pick up the next day. I want to say it was like Hemingway. So I am lazy like Hemingway, is what I'm saying. Great comparison. So let's take a look at, yeah, somebody dropped in with a meta pull request.

03:41I have actually peaked this diff, so I'm going to go ahead and run the Yankit hub. OK. So they wanted to tweak the wording in a way that is correct to the spirit, but not the implementation, which is not super clear. So this is a box on the user profile.

04:22not stories submitted submissions no one has ever said submissions were authored

...56I guess my spell check doesn't like submitters. Yeah.

05:24Why is this making it clear? I'm talking about our database models.

...49That's a terrible run on sentence.

06:33Not a lot to say here. Like, I do appreciate the... Yeah.

07:26I submitted by you.

08:26I'm not sure what to do there. All right. So let's see. There's also a couple of issues open. Let's take a look. This one I looked at on the last stream, and I don't think there was anything more to say. No, it's an open feature request. And then this one I haven't really looked at.

09:10So there's a Rails plugin we use called sitemap generator. It's certainly possible it's been broken for a while. We may have accidentally bumped the dependency and Never updated config sitemap line nine. I would guess it changed API.

10:08yeah let's see about that one and then all right next issue oh from stream regular dpk i wonder if she's around so there is a

...38There is a validation on the story model that prevents emoji and other kind of text graphics like arrows. I think it allows some mathematical notation, maybe not all of the mathematical notation. The general idea, yeah.

11:13Yeah, the error message were accurate according to. I don't know what the actual kind of class is then, because clearly I took this graphic character language from having read Unicode docs. So I'm trying to find emoji. That's the thing we're trying to break or prevent, really. So there's emoji pictograph.

12:07Let's go look at that code.

...14bigrick7815 hello o/
So I know Daphne said she would like to see the rule gone, but it's there to prevent emojis in titles, and I am happy to fix the terminology, but... Hi, Big Rick. Welcome. But the pages would not look better if they were covered in emojis. So... Hmm.

...45Alright.

13:44Let's go ahead and look at where I'm at on the code. Yeah, so this is everything from last session. Let's just stash this for now and take a look at that story model. I think I'm just going to copy that language better.

14:18I'm mentioning emoji first because it's the most popular one.

...59$13.97. No. Not dollars. All right.

15:44so let's go ahead and hold that one good i wonder if she'll drop by the stream now that i've just put activity on the issue file see how it goes all right so this was i didn't write down any of these i'm not following firing on all cylinders today Didn't write down all these issue numbers in the stream notes.

16:22So there was emoji. Epic_Ninja_Elephant Happy Monday. Is the break-overlay deliberately still on?
There was the salt promo rule.

...38There was something else. Ah, sitemap generation.

...47No, no, it's definitely not. Thanks for catching it. Epic_Ninja_Elephant I am super observant.
That's just something I goof up and leave up sometimes. Thank you, Epic Ninja Elephant. Yeah, it's especially obvious when I have a big open BlackBim terminal and there's some big thing floating on it, huh? Shows you how much I watch the OBS console as a professional streamer. Maybe I need an Elgato stream deck or some other neat toy.

17:24How's your Monday?

...34All right. What is this? I don't think I know this idiom.

...50Epic_Ninja_Elephant Monday's semi-ok. I appear to be going from too few clients to too many clients this week, or next.
Yeah, it's one of those where Haskell makes nouns out of things that other languages make statements.

18:12And this one, it's been really interesting the last couple of weeks. There's been a surge of interest in Ruby Rectors.

...23Oh, well, charge more if you have too many clients, right? Raise prices until some of them tell you to have a nice day. Oh, what are we mad about here? Let's look at Dependabot. I'm going to pull that up off stream in case it's actually high. Most of the time it's not. And it's a couple of use after free bugs. That might actually affect us.

19:01Go ahead and bump that. Make sure everything runs. Should be fine. When this runs fine, I'll go ahead and deploy it.

...29And something has changed in Nokogiri, apparently. Great, great, great. What do we have?

...46Oh, this is actually me breaking the build. I didn't deploy this, right? Okay, so this is the cat giving me an allergy attack. Hang on, I've got to mute.

20:28YmeYnot45 LOL, I read your email about going live wrong and read UK instead of UX. I thought there had been some big update.
YmeYnot45 I missed that sorry.
pushcx https://lobste.rs/c/xevn8a
ah so why me why not 45 there was a big update to uk stuff last monday if you didn't see it oh actually thank you for the reminder i should clean that off of the footer there that code is dead now no no no it's fine so last let's see i wrote this on saturday and sunday not you know two days ago but a week and two days ago so here's the link where i wrote up a big explanation of why i decided to drop the geo block of the uk we've done a ton of research on this in the last couple of months since the story and the I've talked a bunch with a lawyer in the UK and tried to talk to the regulator, talked with other sites, especially Wolf Group, which is a Mastodon instance run by Kyle Kingsbury, who I don't think is very active on lobsters, but does have an account. And then I wrote everything up as a explanation of what the Online Safety Act is because I saw some folks who were linking into our threads as a way to say, hey, here's this thing that's happening. Let's talk about it for our site. And if, I mean, the whole law and the circumstances are hard to follow and getting dropped into a threaded conversation on a forum you don't know is also real confusing. And there was lots of back and forth along the way of, does it mean this or does it mean that? Does it mean the other thing? And then we get to, oh, it actually means this third thing. And so I decided to write up a whole introduction to what the law is and means and why it's so concerning. even as a non-UK person. And I think this has been useful. In the last week, I've seen it linked a bunch from a bunch of people who are trying to make sense of this censorship, including... This was actually really neat. I got a kick out of this. So there is a podcast from Mike Masnick and... Ben Whitelaw. And I'm not very familiar with Ben Whitelaw, but I have been reading Mike Masnick's stuff for something like a decade. pushcx https://podcast.ctrlaltspeech.c…
And he's one of my he's basically my go-to reference for writing about the law and online speech he's one of the few reporters who has actually covered this beat for years so he understands who the players are and when a law shows up with a different name two years later he's like oh this is that same thing as opposed to oh it fell out of the sky and it's called the save the children so it must be saving children that kind of credulous bad writing that's very common unfortunately and i was very pleasantly surprised as i was walking to the grocery store that he mentioned my post and specifically there was a so it's linked here in the show notes and he especially liked oh yeah the one error in this was he said they're based in oregon i am in chicago not oregon That's okay. And the main thing he liked was a quote I found from Ofcom, which was one of the things they said in the middle of their couple of days of webinars that is It was them threatening to shoot first and ask questions later. They said we may. So he met them at this big trust and safety convention, TrustCon, which is the big industry event around moderation and big sites. And Ofcom had claimed they were not going to shoot first. And then in their actual webinar, they admitted, oh yeah, no, we are actually going to shoot first. and ask questions, maybe never. Cause you know, once you get an $18 million fine there's, or no, it's a $22 million, 18 million pounds. There's not a lot of after to ask questions. Unless you're Facebook, like Facebook doesn't care about this law, that's pocket change. So, it was very surreal to be walking down the street and listening to a podcast and have my writing described and linked that was very neat i'm glad it was useful and i hope it helps other people understand what's going on so there was for the last week i've had this i thought i put an if around this yes So let's take all of this out because it's now all dead code. We're past the date.

26:46Epic_Ninja_Elephant It's "funny" how GDPR-like laws aimed at big tech are being neutered, but this new law put smaller sites at risk.
But because I had that footer on the bottom of the site for like two months trying to get information and help from folks in the UK, I figured I should put a footer on the bottom.

27:06Oh, are you thinking of the Digital Markets Act? That one's real interesting. I don't know a heck of a lot about it, but I know there's a lot of activity about that the last couple of months. That one is interesting. It has this idea of, are you a gatekeeper kind of platform? Which basically seems to mean, do you run an app store? This is me talking very off-the-cuff about the law. I have barely read anything about it. So if you are curious about the Digital Markets Act from the EU, don't take anything I say as gospel. I mean, don't in general about the law. Oh, that was actually... So one of the things I wrote in here was... I'm actually proud of this little bit of... that I think... programmers are bad at playing lawyers because the law feels, reading the law feels a lot like reading code, but the actual practice of it is, the meaning of it is very different. And we are very prone to, we programmers are very prone to misreading the law because our assumptions and our principles are very different from the law. But we have this same like, When I read code and I see things that don't add up, I go, Hey, wait a minute. YmeYnot45 Precise verbose style?
And I, I have a suspicion about them and I'm surprised and I am mildly bothered. And I'm like, wait, the program can't say the array is eight bytes long here. And then over here, it's seven bytes long. And whenever I see that and I have that like, aha, I've caught you in a contradiction as a programmer. I'm catching bugs, or I'm catching design issues, or I'm catching, at the very least, comment issues where the code is unclear. Epic_Ninja_Elephant Orgs here in Denmark have been fined (under GDPR) for privacy violations, but the fines have all been less than a month's salary for a senior security person. So it's cheaper by a factor of ~36 to break the law than hire qualified staff.
And in the law, when I'm like, aha, I caught you in a contradiction, 99% of the time I'm just making a mistake because I'm missing some basic legal principle.

29:23Hmm.

...28there's a what is it there was a game called final fantasy tactics that came out in god i don't know 95 something like 30 years ago and people like to it had some political messages and so people like to edit messages into the game. And so like this is a fake screenshot. The actual quote here does not exist in the game, but if the for a crime is a fine, and that law only exists for the lower classes. So when you describe a company being fined less than a month's salary for a senior security person, yeah, the law sort of only exists for the little guys. It's this one. Can't read it, it's too small.

30:31pushcx https://aftermath.site/how-a-le…
I don't know that one. Here we go. There's actually a whole investigation of where this cute gag came from. Someone in the last few weeks has made like a screenshot generator for this so you can pick a profile and then type your own text in it. Because I saw a whole pile of those go by on Blue Sky. Anyways, that was a pretty good game. It was... I remember playing it on the PlayStation 1 and waiting very impatiently through the CD-based load times. Man, was that game broken. There were some of the abilities and classes you could get or some of the items that just broke that game wide open where, you know, usually these things have a power curve where you get better and you upgrade your guys and the game gets more difficult. So over time, there are some variations. There's occasionally a gap or a narrowing between claimed difficulty of the numbers and the actual difficulty of the gameplay. But there was a whole bunch of stuff you could do to just break that game wide open, which was part of its charm. What were they called? Calculators? Yeah, there were classes that were just so broken. All right, so let's finish that.

32:05Let's grab those CVE numbers.

...24Because Lobster tries to fetch story text, it is very possible that we're affected by that.

...50this will pull that off yeah that i didn't put this notice on right after i posted the comment but i did turn off the old footer and then we had three or four people drop by the chat room or text me on the socials who were like hey the footer went away what happened and i guess it didn't occur to me because i had been dealing with it for so long but they didn't immediately go, oh, let me pull the link out of my history. And so then I put this little footer in.

33:32That's fine. And let's get that deploy running in the background. All right. So if that's done, this is done.

...53oh so to finish that thought there why me we're not 45 if you have any questions about the osa or where we landed or that big statement you're welcome to ask questions it ended up being 3400 3500 words so basically a dozen or 14 pages something like that just eight YmeYnot45 You next Keynote Speech!
huge long post because there's so much to say about how much time went into that and seeing folks use that and link it around has been enormously satisfying i'm glad it's getting used and there is

34:51My next keynote speech? I have never keynoted a conference. YmeYnot45 Oh, I thought you had for ruby
I have given some talks at conferences, but no keynotes.

35:07No, I've spoken... You know, I mentioned, I think, last stream of the one before that I spoke at RailsConf in 2015, and it's the first big conference I spoke at, and I was on the big stage, but it was not a keynote slot. And so there were talks. The thing, I don't know if you've been to a bunch of tech conferences, but the big difference there is for a keynote talk, they will only have one talk on the big stage and then they continue to use it, but they'll have talks on the other stages at the same time or other events happening at the same time. And the keynotes tend to just be Even in a multi day conference they tend to be like one or two right at the start of the first day and the end of the last day, sometimes the start and the end of each day but. yeah. So I was. let's see I think I think it was a two or three day conference and I was first on the last day of the conference, but I definitely did not have a keynote slot.

36:29And of course, the last RailsConf is coming up in, I don't know, a couple of months. July? Ah, yeah. So... July in Philly. The final RailsConf. We'll see how that goes.

37:05Why do I have any git diff here? Oh, this is me. So this is all deployed. This is pulling out more of the, I forgot to commit this.

...35So let's take a look at where I left off.

38:08Yeah, so this is going to be one of those where if folks don't have meta questions about the site or policy, I tend to work on the code base. And there's been a bunch of stuff I've been doing to improve the UI around story merging. Yeah, and I said in the stream notification, the UX, the user experience, not the UK. Let's see.

...42but i guess in the issue i wrote ui whatever not a huge difference between the two all right right so this was cleaning up when you're on the single story view cleaning up what that display looks like and where i eventually got was let's go back to localhost and I had a recent story with a merge here on localhost.

39:30Let me just find it. It was this one.

...46yes all right so i've got that and i know what this is all right this is probably way happening because I'm logged in as a moderator. This is one of the funs of ActiveRecord is it's constantly generating one plus n queries.

40:57This is when we render the show. Where's the story located? Loaded. I think there's a load story function. Yeah.

41:28So select the count star from hidden stories. Why is it doing that? Is it not walking? So we got line 608 is throwing the exception. Because we're counting things instead of, yeah.

42:10That's probably enough, no?

...28So it's if, it's literally, So I'm in the single detail. It says one, okay, I typed the wrong line number 132. If the hiding count, which I don't think this even needs to be a function.

43:18Oh, it's happening because even though I'm reloading the hidings, I bet I'll see the query up in here.

...55If you ask for a count, the association is going to go and call count again instead of use the thing it should have loaded because of the way the cache works on collections.

44:23Yeah.

...36Yeah, so it's got it preloaded, but it doesn't know it.

45:35Now we're doing the same fucking thing for taggings. God, active record.

46:00Can I introspect them and ask them if they're preloaded? It's so irritating that I have to do that.

...32So we've got some methods for causing it to preload. but not methods for asking if it is preloaded.

47:03Yup.

...11That's not useful.

...48This is not useful. I've seen this article before.

48:19This is a different n plus 1 query.

...56Yeah, so even though those are preloaded, the method goes and hits the database because Rails doesn't, I guess, keep track of the fact that it preloaded it. I'm not in a great mood, and this is kind of exasperating that ActiveRecord is always like this.

49:55I get that.

50:16So there, just did the preload. But then if I say a dot suggested taggings, you get nothing.

...35But if I do this again, and I ask any first no, then why are you failing on me now?

...50It's acting like I didn't preload the thing I preloaded. Let's go look at the story view.

51:15I wonder if i'm yeah no so i'm only in here because i'm the moderator right, so if I delete this function call. Does it go away. Yes, I was wondering if I was logged in as the submitter but I don't think submitters actually get a notice that they have suggestions waiting.

...44So it is a call to has suggestions.

...54And it should have gone through the mod preload. And we can ask if it did that by getting the error up. Yeah. to reload so that vim the vim terminal is not super smart about word wrap yep so there it is doing the preload and then there it is doing the one plus n because It's ignoring its preload. Brails.

53:14Well, maybe I'm wrong here.

...25Maybe the, you know, what's interesting is there's only two stories listed here rather than three. I wonder if it is actually one plus N, because if we go look back here.

...48201, 202, but only it preloaded 200. So somehow the code that loaded the merged stories failed to preload the merged stories.

54:39And what I would love is a trace back here to know where the story, merge story, came from. I can't really get one.

55:28So this calls merge stories, which comes from where? That's my new thing, isn't it? Yeah. So that comes from the controller. And rather than OK, so for presentation. is the preload, but it also needs the mod single preload on the end.

56:21Okay, it was a legit one plus N rather than a, well, how about the other one that I thought was giving me trouble?

...44yeah that one's still all right i guess i broke oh no if there's no hiders it just says zero all right okay better

57:20I was thinking about this, how I removed these no comments at the end, and I think I actually want to put them back, because the plan was to have the different comment sections for the different stories. And this is going to force me to think about the null case for when there's no comments, but at least it's in a working state.

58:09So let's see. Actually, have I got the specs passing again? Because I changed where that merge icon appears. So it is possible there is one random failure here. Yep.

59:00So it should be there.

...14Let's go look at that test. Home spec 45. Home spec.

...33Just getting a better formatting of the output.

...56So there's the title.

01:00:04I wonder if this No, the factory bot builder should run through all the callbacks.

...56This stories count as a countercache field. Let's take a look.

01:01:30Why would this work if Alice's is merged into others? It just doesn't. Did I intend for it to appear on Alice's page? It doesn't feel right.

...54Clearly, some story appears. Where is its title?

01:02:24Yeah, this looks like a, let's take a look at the,

...34So I would expect the story to be just missing. I'm confused by what's happening here. Stories count as one, so that's why we're not seeing the icon. But stories count should be one.

01:03:08because by other has one story merged in.

...21Who did it attribute it to? Alice.

...33Okay, so that's just broken functionality.

01:04:21So we see Alice's story, even though it's merged into another, because it's her page, right?

...37It's over in Home Controller.

...45Stories newest by user. without unmerged scope, yes. Okay, so we're seeing the correct thing. The test caught a bug, all is well. All right. Nice to have a green build again. All right, so I'm running, it's been about an hour. I will do my little bumper. This is the lobsters office hours stream. If you have any questions about the site of the code base, you can pop up anytime to ask. Otherwise I work on the site and right now I am trying to improve the display of stories. thechosenone1080 imagine having a job
And I think this should probably be at the bottom because having it be the first thing is a big, ugly distraction. Hmm. I don't actually need to imagine having a job. I can remember having a job.

01:05:57All right, so that's over in here. This section I will take out. and just bring down.

01:06:32Better.

...38Let's get that up onto the same line now.

01:07:01Actually not sure why that's out dented. Let's take a look. StoryLinerHEntry, right?

...37It's not in the details div. That's why. Because I took it out of .. So I will just go ahead and grab that in.

01:08:20If it's not 0, we'll say that.

...45Seems better. I should maybe copy this. slightly lower contrast. Is that coming from the byline? It must be, right? Because where do you get your, yeah, from their domain? Okay. So it's tempting to just say that I will reuse byline.

01:09:30Let's take a look at the CSS, make sure there's nothing odd in there.

...48All right.

...55These are just the allies. These are story okay this actually seems fine i double check the inspector as long as i have it up right that's what it's for yeah it's all the parts i was just comparing good

01:10:35That might actually be a good... No, I've got to restore those comment links. And then... And then I'm probably good. All right, so... That was the last thing on the end of the line for the vote summary after the archives.

01:11:52And these should all sprout at no comments. Good. 0, 0, 0. Do I want 0 or no? I think I want the no. That's an error.

01:12:11Pluralize doesn't have a special option for it, does it, Rails? Let's grab the docs.

...27Yeah, it takes a count. For any other, the plural will be returned. That's such an English-specific quirk. OK. So no, I have to do it myself.

...56What did I type up? Comments plural.

01:13:03Good.

...11Alrighty. So if that's... That... That's a real improvement, I think. Where's that other... I've got to look out at the single story view with just one story. Let's do the one with all the comments on it. 100 test comments, right? Yeah, that also has text on it, so that's fine. Boy, the way these story texts display is going to be a little... I should just take it off of... So this story text is, if somebody, if this is say an Ask Lobsters post and someone writes a whole body here of, I don't know, what's the best window manager for Mac OS? They might write a couple hundred words here. And if there are merged stories, a current limitation of the design is you only see the description for kind of the parent story, the one that all the stories have been merged into, and the other ones vanish and are not visible anywhere in the UI. Was this, why is this on the end? I think it should be in the middle. Yeah, it should be after the heading. And it jumped down here to the end of the line. That's just, all right, let's do the annoying inconsistency and then I'll come back.

01:14:58Yeah, so this comes out. And where's the title? Goes up here. Now let's take a look at that. One sec. I'm shoving around all my windows off screen. There we go. So there's that saved. This ought to jump up here to match. Good. This... Maybe I'll give one of these a description just so we can see it. Yeah. What just happened? That linked to the wrong place? So on this one, I've got the correct URL because I see the mod path. But I landed on the show page. Why did I land on the show page? Or J, what is the?

01:16:25And I'm just losing track of my tabs. Oh, the... My streaming browser kind of sorts tabs differently. There's some deep old Firefox setting that I've ignored. So I... Let's get a little bit of lorem ipsum text. That's probably plenty.

01:17:07Save. Yeah, so now you can see this icon, and you can see it in the right place. I didn't realize the description was a title tag. But you should be able to see it. So I'm kind of torn. Should this be just this high level listing, and then you go down into the page? Because the other part of this change is story merging UX is split the tree of comments by which merge story on with a list detail header on the top of each. So then this thing with its text. Yeah, I think that's the best thing if that just goes down here.

01:18:05Okay.

...11I didn't say merge stories. Well, yeah. So I'm still not sold on the use of the word stories. So I'm taking that out.

...38I'm fine with it in the test. I just don't want it in the user visible copy. Let's run that spec again.

01:19:09That might be good. Let's review. So preloading the merge stories. Instead of having 1 plus n, we count visible merge stories yes that went away because that's the old cabinet model i should double check that because that the reason of making that was to see all these templates in a bunch of different things

01:20:00And that's fine. That's heinous inline partial. Single detail. All right, so I grab all the classes just to simplify this, and then

...56we loop everybody oh man diphtastic so the tool i'm using here is called diphtastic or diff t for short and it's smart about understanding the page structure because otherwise this would just be one giant blob of diff but it's recognizing that i'm indenting and shoving stuff around rather than rewriting this totally okay authored by via yeah it's a little bit of a false diff but that's fine we're still getting there and good

01:22:01How did I describe it on the issue?

...43Yeah, so this is why only the description of the merge target gets printed, because it's not in the SQL detail. It's up there. But that's fine. We'll get to that in a minute. I think I might have to add it to the... Oh, I didn't... I should have included the issue number. I always forget that. I have to manually do all this cross-referencing. What am I writing, C++? All right, so there's

01:23:48Let's go. I'm actually going to pull up a, I need a story in production that's merged. Yes, I just canceled the deploy. Let's go jump over to prod and grab a story that has a couple of merges.

01:24:19because I should include some screenshots.

...39Did I merge this one? Maybe. Yeah, it's only two. I was really hoping for multiple. Yeah, let's go for more than just two. Oh, not the spiciest things in the world. All right, go release notes it is.

01:25:16All right. So I'm going to screenshot this.

...25And then off screen where you can't see, I'm starting the deploy again. So that's getting started. When that finishes deploying, I'm going to take a screenshot of this again. Don't need that.

...54What are my commit hashes? There was this and this. All right, so with those two,

01:26:55So let's grab that screen image.

01:27:10Oh, so the deploy finished off screen, but I'm still seeing the old version. I opened it in a new tab here just so I can split back and forth. There we go. New version took a second to deploy. to appear. All right, so save that.

...46Add the file. Let's preview.

...55Good. Yeah, this is so much clearer. So like this one, who submitted this one? Oh, it's the guy after everybody else. And now you look at it and it's like, oh, each one of these is a pair and they're consistent so that this thing goes image via username and this one goes via image. Oh, it says via twice. Oh, ugly, ugly. Let's fix that. But that was one of those things that was inconsistent. And we want it to be the first thing on the line. Let's look at that again real quick. Funny how I looked at this 100 times and didn't spot that. Nice. Because when you look at comments, they go avatar username. Yeah.

01:29:18So it's nice, it breathes a little more too. And then this is more consistent with what's on the main list of stories where the domain of the origin is on the end. And honestly, now that this is done, maybe I should shove the domain and the origin down. They're still on the list. On the single, they could be inside. I'll leave it alone for now. All right. Let's comment that.

01:30:00Great.

...06Nice to finish a chunk of these. OK. Actually, you know what? Since I just deployed, that's better. That's much nicer. And I like this little total line at the bottom. There is, when you're logged in, a little summary that says, like, 24 comments, two unread. And if you click the unread, you can click through your unread comments. I wonder if I should move that up into here.

01:31:04Maybe. We'll just go one byte at a time.

...19Yeah, so let's think about this comment box too. I might want to even just split out the display of a merge story from the display of a know what i didn't see i didn't see a single story that's not merged and i'm touching that same code all right so that looks the same and is fine all righty

01:32:15I'm going to need a story that has a bunch of comments on it. Do I have this one locally? If it's a couple of months ago, I might. I don't know the last time I refreshed my devs database. Yeah, not found. That would be nice because 34 is a manageable amount of comments and some of these are over on actually all of these are over on the other threads go one towards released. And maybe it's not a good one, then. So I want. I want a production story that has a few comments on the different let's just ask the database for it.

01:33:44This one has a few.

...57Merge happened pretty fast. One thing about deploying this next part is going through every merge story and splitting the top level comment trees out. That's going to be a chore.

01:34:17And it's such a chore, I better put it on the to-do list.

...39I don't want to say it.

01:35:23Yeah, so this one should be over on the other story.

...32I'm going to have to make a tool for this. So come here.

...52There are 600 top-level merge stories, so that's targets.

01:36:01Not is null. I want is not null. And then 787 stories that are merged into others. So that's not so bad for a chore. Although that's the number of stories rather than...

01:37:23Yeah, that's a little more. So there are 4,000 top-level comments to 4100 to review. That's a pretty good-sized chore.

...47I mean, nothing for it but to go one at a time. So let's work on the view. Not HTTPS on local.

01:38:14Oh good, a new one plus N. Thanks Rails. So the vote summary, this is probably happening because I'm a mod.

...57Yeah.

01:39:04Oh, and I didn't trigger it before because there weren't flags. All right, hang on. Let's rewrite this. This is not informative.

...47Oh, it's because I increased the consistency of these. So previously, mods were just missing the vote summaries. Yeah. So this even calls a findEach.

01:40:24That's got to change.

01:41:11Yeah, it's just been broken. So for users, it's just been that the vote summaries are missing for all these. So let's go find votes. Yeah, all right.

...44So what I want to preload is the vote summary. But I don't need, well, someone submits multiple, which just happened last week where somebody submitted two links about their project at the same time. So if both of those were flagged, they would see vote summaries for both. So there's a one plus N again. I mean, on the other hand, we're like doing 40 queries to build this page. So what's one more, but so that ought to be my one plus N right there and is not because this side is still doing all this, which is kicking off a new query.

01:42:52get rid of that make it just each okay that's fixed and i'm not pulling that up because there's a bunch of metadata for the mod on there that i don't want so that says i should improve the data generation

01:43:23Or I could go and censor those usernames. Just rename the users on my local.

01:44:10This really is more of a flag summary than a vote summary.

...49This calls vote summary. So there's still the one plus n for the submitter. And I'm trying to think about ways to get rid of that. I reused the.

01:45:13So that's only called from single detail.

...36this there's got to be a way to make that a database query all this building a hash what was that story id

01:46:33Thank you.

01:47:28Here we go.

01:48:00That actually gave me exactly what I want. So here, if I said, I'm going to reintroduce the 1 plus n because if I call group and count, it's going to go hit the database once for each story, and then Precipite is going to yell at me for doing the sort of more efficient thing because I can't preload this association on. All right, let's leave it alone. No need to gild the little one.

01:49:42So if that's good and it is, then I didn't run the specs. Let's double check that. Whoa.

01:50:35What's going on here? Brickman is emitting errors. That's a new one on me.

...57Huh.

01:51:03Actually, there isn't going to be one because Breakman is configured so that if there's a newer version, it immediately considers itself failing. That's some kind of... I wonder if this is a reported bug in Breakman.

...33Not reported. Hmm. All right, I'm gonna leave that alone now.

...51Yeah, it's consistent. And it's failing the build, great.

01:52:05I wonder if it dislikes... No, it shouldn't matter about Nokogiri. Brakeman only parses Ruby, not HTML. That's strange.

...28I'm debating whether I should be reporting this to the Brakeman project, because it looks like a bug.

...52So it's six errors, but it's the same two things three times. And these look like they are the names of tests. Guess not.

01:53:23Hmm. That's a weird one. Alright, ..

...52So there's that. Let's go ahead and push that up.

01:54:29Finding the right man to report the bug, because I'm pretty sure that's a bug.

...58I don't see anything right here. Let's check real quick that nobody else is reporting this. Ooh, that's conspicuous. How long ago was that?

01:55:23Couple of months, couple of releases though.

...35Discussions.

...53Looks like I have a novel bug. I'm pretty sure it's a bug, but one of the nice things about being an open source code base is I can just link to it.

01:56:24Brickman version is, so I've got the text of that output off stream. So I'm just going to copy from these.

...39Where is the Ruby version? 341. Oh, how nice. What am I thinking?

...58And where's my

01:57:51let's grab this there we go pewter fights with linux clipboard example 100. all right so yes good good good Good. I don't actually have a trace back, do I? So I'm going to run breakman dash q dash dash debug. Oh my god, that's a lot of output. And yeah, OK. These are actually relevant.

01:58:52All right.

01:59:12It's just the stack trace. Grab all this. And all this. And all this. Oh my god, it just goes forever.

...47so that I am into the second error. I think I'm going to stop there rather than all of these because it looks like they're repeated. So let's go way back up.

02:00:27pushcx https://github.com/presidentbee…
All right. Here we go. Can't click. So let's take that and put it in the stream notes.

02:01:10all right i have done my open source duty for the day by reporting a bug upstream with hopefully useful debugging info all right okay so I guess that's a good time for a bumper that this is Lobster's office hours and you can ask questions about the site or codebase anytime and I'm happy to answer. And then otherwise I work on the codebase. And there is not too much going on. Very quiet last two streams. So...

02:02:23Epic_Ninja_Elephant I'm listening and enjoying, but don't know enough to ask questions.
you know maybe i just want to call the stream this is a very different thing let's segment this out a little ah that's okay i appreciate that you're hanging out so

02:03:05on github all right keep wanting to tab indent here so i guess i can't

02:04:14This is part of this.

...46Epic_Ninja_Elephant What's the most surprising thing you've seen since taking over lobsters? Either in terms of people or technology.
This one, I'm not sure why I put this in the list. I would have to go back and review the office hours stream to refactor user suggestions into draft posts. The most surprising thing since taking over lobsters, either in terms of people or technology. Well, seeing my post on the Online Safety Act mentioned or hearing it mentioned on a podcast I've been listening to was very surprising. I'm still getting over that one. I'm thinking about what's surprising here.

02:05:50it's really hard for me to look back at having been surprised and remember that I was surprised. Cause you know, there's that curse of knowledge thing that once you learn something, it's hard to remember what it's like not having learned it. And so you're asking exactly about that. Hmm. Oh, one of the big surprises was the enumerator that we've talked about on stream once or twice when pulling stats. There's a badly behaved bot that's been hitting the site for years that... I call it the enumerator because it's trying to enumerate user accounts for account takeover. Well, presumably for account takeover. I don't know their motives because I don't know who they are. But they have... Epic_Ninja_Elephant Similar to LLM bots?
They're moderately sophisticated and they hit the site so many times that they account for a significant percentage of site traffic, like 10% of all hits to the site are the enumerator. So the couple of times I've pulled stats, they've had just some nonsense numbers. We did it on stream maybe six weeks ago, maybe a little less. it was ridiculous because it said that there were more people browsing from linux desktops than windows desktops and as much as i like running a linux desktop i just don't believe that we have more people running linux desktops browsing lobsters than windows you know there's been a lot of talk the last week or two about lom bots and I have not really seen any of the posts substantiate that they are actually getting hit by LLM bots as opposed to any other kind of crawler. And it's certainly plausible that these are LLM crawler bots. But I would like to see something that supports that, like we fed this particular bot a bunch of nonsense, and then six months later, it showed up in Anthropix model, or it showed up in the Grok model. And nobody seems to be doing that. But no, the LLM bots, which ones exist, they just want to scrape lots of human text. And presumably they're scraping us, but it's not causing performance issues because of the way we have caching set up. The enumerator is trying to figure out which, what usernames, I mean, it would prefer emails, but you can log in with just a username. pushcx https://haveibeenpwned.com/
It would like to figure out which usernames exist so that when there are leaks of Epic_Ninja_Elephant Oh yeah, credentials stuffing.
usernames and passwords, they can try them on the site. So let's just throw in my email. Actually, let me throw in an older email for mine. Yeah, it's credential stuffing. So I think the enumerator is preparing for credential stuffing by proactively going and finding accounts on different sites, but I don't really know. So, okay, yeah, some various stuff related to my email address. I mean, almost any email address you put in here, you're going to find a dozen.

02:10:18Well, this one's this last one is interesting. gj1118 If I may ask - is the font size on lobste.rs is too small. Is that by design please?
Because the dream with admin Rahaley has written a lot about this on blue sky in the last month or two and it is less a Breach than a the site has been taken over by and given access to the Russian government because live journal is now owned by folks who are linked to The Russian regime is the font size I mean, it's by design, but let me make sure I'm. Yeah, so here's where it's set. It's not really something I've thought about. Epic_Ninja_Elephant @gj1118 I run most sites zoomed in, including lobsters.
TJ, you are asking a question about something I have never touched, so I didn't create the site. I've just been maintaining it and. gj1118 Sorry about that ..
I have an odd monitor and odd glasses, so I'm pretty used to zooming font text all the time, and I have never thought about it.

02:11:44If we had... There's nothing to be sorry about here. Yeah, we have an open issue about this. that we should probably improve that or probably increase that. It's one of those foundational things that is gonna surprise a lot of people. And so I'm real deliberate around changes. Oh yeah, here we go. So this one was created. Oh, and it's still hanging out as a draft PR.

02:12:43gj1118 It looks exceptionally small on monitors with high resolution . I will keep quite now
And it looks like it's been abandoned, I guess. Yeah, I pinged them once a while ago, but nothing happening.

02:13:06You don't have to keep quiet. It sounds like that's... It's something that's bugged a bunch of people. Epic_Ninja_Elephant The best practice on accessibility has changed a bunch since lobste.rs was started.
And I don't know that it's a deeply considered decision.

...28Epic Ninja Elephant, do you have maybe a reference for accessibility on font size? I'm not gonna yes, we have a font size 10 and a half. I'm not gonna YOLO a change in on stream. Epic_Ninja_Elephant I'll try to comment on that GitHub issue later with some references.
gj1118 the default font size is 14 per standards
But you know, it's certainly something folks have asked about a lot over the years.

02:14:03Yeah, that one wasn't actually funny. I'll find something else I said.

...20Epic_Ninja_Elephant 9px is jcs having superior eyes. Or at least used to have.
Yeah, the site has been running for, what, almost 14 years? So we've all got a little bit more middle-aged eyes now. So our default is 10. And then a few things set smaller defaults, like the tags.

...53And then in the inspector, yeah, so the score and then the link.

02:15:08So it looks like most of our text is 10 point, but it certainly could be higher. Epic_Ninja_Elephant @gj1118 I run lobsters zoomed 120% most of the time.
So here, if we look at, I'm going to close that out. We'll just play for a second.

...33You're saying 14 point is kind of the default now. See where that gets us. It feels like a pretty comfortable size. This is a little large. This one will need to get tweaked too. Where's something with some comments on it?

02:16:03Yeah, some of that's a little large. That didn't change. Where is it set? Comment underscore text.

...24Epic_Ninja_Elephant Recent versions of Firefox lets the user be quite brutal about overriding remote font selection and sizes. So I do that.
bobrikoffski not directly font size, but I also find the collapse thread button a bit too small on mobile
So it's a half step down from the regular one, so maybe I'll just make it. Most of the text on the site is comment text, and it is what folks are here to read, so... It does feel pretty better. Hmm. pushcx https://github.com/lobsters/lob…
Yeah, so there's a bug about that specifically.

...57And welcome, Bob. But this issue, the up foot buttons, has been hanging out for a while. And one or two people have started fixes but not completed fixes for it. And I think maybe the best fix would be to make this whole area of the score and the arrow clickable, especially if it included a little bit of this white space.

02:17:33Probably be good to just tuck the voters under the comment folder, honestly. gj1118 Can I please share a link ?
Because vertical, or I'm sorry, horizontal space is a bit at a premium, especially on mobile. I don't know, it could be after. Either way. Yeah, you can paste a link. I mean, as long as it's not a link to the best stream viewers or whatever the spam bots are usually posting. If you have something relevant, please do. gj1118 https://accessibe.com/blog/know…
But that's not bad.

02:18:16ADA compliant fonts. I'm pulling this up here. gj1118 Under this section → Size requirements for font accessibility
We're going to jump over to light mode. I'm going to bring this on stream. So what do we have?

...36Size requirements for font accessibility, OK. 16, wow. That's significantly higher than I would have guessed. Hmm. All right. So let's grab this guy have an anchor. Yes.

02:20:06JG, do you mind if I mention you by name here? I want to add this link to the discussion.

...28gj1118 No worries, thanks for asking first
They say 16. Okay, so maybe... I don't remember what the ref, the suggestion or blah, blah, blah, what the conversion is between PX and PT here for between pixels and points. Let's just quote them directly.

02:21:27It's today, 25.03.24. So one of the things is I make my URLs predictable to me, and I can do them even before I have the archive up. Missed my closing parenthesis.

...52That's interesting. It grabbed the... internal links all right so we'll just add that as a comment and actually let me as long as i'm writing

02:22:29isn't it called like a font size ladder, right?

...42No, there's a shoot, there's a design term for

02:23:26So i'm let's do this, I keep a couple of reference books by my desk, so this is not going to be a very visible part of the stream but. One of my favorite books on typography.

...57pushcx https://bookshop.org/p/books/th…
This one, if you don't know, if you like reading, this is a good book just because it has all of the stuff you would expect about rhythm and proportion. So page 25. Where are we here?

02:24:24Type is normally measured in picas and points. Yes. So it talks about horizontal rhythms. Choose a comfortable measure. I swear, I swear one of these designers has talked about, you know, you pick your standard size, but he's always talking about horizontal first, because this is primarily about books rather than yeah somebody when we write web pages we rarely care about the horizontal widths of things we just kind of yolo it where books tend to do things like fully justify columns of text all right Epic_Ninja_Elephant What if you take out all the font-size instances and lets the user browser rule everything?
Yeah, so it talks about choosing vertical 11-point types. Set solid is described as 11 slash 11. All right, I will have to find that later because I'm not finding immediately the... I can picture it in my head, the...

02:26:05pushcx https://webtypography.net/
Let's see, webpagography.net? Yes. So this is a web book. That is a good question. And this one is riffing a bit on the Bringhurst book.

...33Yeah, The Letting.

...45this is what i'm looking for yes so setting up a font scale that's the term not a ladder a scale

02:27:20and ninja elephant i see your thing well let me finish this comment and i'll do that

02:28:14pushcx https://webtypography.net/3.1.1
Epic_Ninja_Elephant Oooh, that looks like a great site to learn from.
So let's... I didn't throw this one here in the text, did I? Epic_Ninja_Elephant I ended up on the /toc URL
So... It's a really close reinterpretation of the book. So I think... Their goal was to take the book, which is very good. And then just write the couple of chapters and sub chapters for things that we don't really do online or that are specific. Yeah. So that page said 3.1.1. Let me grab that back. And it has the exact image that I was imagining. Do I have a PDF of this on my computer? Where is, let's see. Yes. All right. So let's one second here. I should have memorized that page number before I put that down.

02:29:42So. I'm not so far off on pages.

...54There it is. So this is the start of this is the physical book I was talking about. And it talks about designing a font scale. So when typographers were setting type, which is physical lead objects in rows to be painted with ink and smooshed onto paper, They do not have the CSL calc method. And so when you have physical objects, you can only make them in specific sizes rather than say, oh, I'm going to have a 61.2 just because I want a slightly larger thing. And the screen will scale them, but lots of fonts. That's the actual file on a computer I mean now. have specific hinting for these common sizes. So then if you compare, wrong thing to bring up. This website is very nice, but it is a companion to this very excellent book rather than a standalone thing. so our css should define this all right take these things off so let's answer the question you had for an experiment

02:32:04slash toc url ah yeah so these if this is interesting the actual table of contents has another couple dozen chapters

...45I know there is lots of vim and grep hacks I can do to actually rip these off, but I'm wanting to read some of these selectors as they go by, so I'm manually deleting them. All right. So one of the things that is a useful exercise for typesetting and page design is exactly what we're doing, what you suggested of make everything the same size and then make the smallest variations you can that are meaningful so as an example this byline is a light gray it is also a different font size and one of the suggestions for novice typographers is can you make text that differs by one attribute rather than two so it is probably enough especially in a printed book to differ by size or to differ by being bold rather than having multiple and this is equally true on the screen so i'm opening this as a new tab so we can flip back and forth This is actually quite readable because we have a lot of on-page structure. Did I miss one? This does look a little bit smaller. Yeah, but it doesn't list font size here, so it must not be. So the heading is just a little bold. These are bigger.

02:34:32Yeah, this really doesn't look bad, actually. Let's find a story with more text. Because we're just skimming lorem ipsum, right?

...50So first, let's log out of this so I can throw up more. And then we could say this one.

02:35:08Oh, no. It's not in my local. All right, so here we go. This really doesn't have any. I guess that's just the browser's default size. Yeah, because we're down here into the browser stylings.

...54Epic_Ninja_Elephant I am liking that default.
This looks very comfortable.

02:36:03And there's enough styling with a little bit of color and things that There's a little bit less rhythm to the page because we don't have a good line height here. So like these gaps between paragraphs are not a full line and that just looks ugly. Did we, did I leave a, there could be a, Okay, so there is a line height being set here. I should rip those out too. Because they're why this page looks so oddly spaced. Some of these are fixing page layout issues. Let me just take out the ones that are in text. All right, so this... That's fine. That's not, not, not. That's forms.

02:37:33So now. That's terrible. Way too tight. So let's put something back here.

...52Just kind of picking a number. It's. Better. It's hard to pick these for dark mode. I don't have as much experience. And then the p tag clearly has some kind of odd spacing on it. Some kind of, yeah, the margin is 0.5, so that's comment text p. Let's just drop that. That one can be fine. There we go. Now these paragraphs breathe. So the gap between the paragraphs should be a line, and it was tweaked. It's better. It's pretty reasonable, actually.

02:38:59As long as we're here experimenting for a minute.

02:39:32Yeah, so that's got to get centered.

02:40:04There it is. Save. That's almost right. What are we doing? Border left. Position. Oh, has it got a little funny padding on it? OK. Where's the voter?

02:41:00That's pretty good.

...07You lose the, yeah, not a safe edit there. You just lose the comment on folder.

...20But that does feel improved, especially for a narrow window like I currently have.

...30So if I go back up to a 1080p window. That actually kind of semantically is nice because there's like a minus, which is a like, I don't want to see this. Maybe it's an improvement to just get rid of the thing so that once you put a comment away, you're just done done with it. I'm joking, of course. But yeah, this could use... It could be gray. If this was a little more... Dark gray, I think this would be perfect. It doesn't look like it's centered, but I'm not going to keep tinkering with it. That's an interesting experiment.

02:42:29Hmm.

...37All right. Well, fun idea. Thank you.

...52What was that?

02:43:08Epic_Ninja_Elephant Sure, use my github/lobster name: holsta.
epic ninja elephant would you like to be cited by name so

02:44:06Let me see.

02:46:59it reclaims that's a real fun experiment and epic ninja elephant if you want to play with that some more i mean obviously you don't need to know rails or anything for that but The default browser typography is pretty good. Epic_Ninja_Elephant I'll take a look at that, thanks.
So if you keep looking at the paddings and the margins and the line heights, especially, and just strip stuff out, you probably land at a pretty decent place. This doesn't feel bad to me.

02:47:54You have an account on the site, right? Epic_Ninja_Elephant Perfection is when there is nothing else to take away.
If not, DM me your email address. You can whisper it to me here on stream or email. Well, you know, the more code I delete, the fewer bugs I have. Makes sense that CSS works the same way.

02:48:30Epic_Ninja_Elephant I have an account; jcs invited me years ago.
All right. Okay, great. Because if you didn't, I was going to invite you right now, just making sure. I can never keep track of when people have different usernames here on Twitch and on the site and on IRC and on GitHub. I mean, there are some folks who use four very different names. I can't keep track of all of them. I really can't.

02:49:03All right. So I'm kind of just rereading this, and it just feels good. These have a max width on them that I'm forgetting about.

...26Why are they? So there's something I'm not quite getting. Let's switch over here so I'm not spending width on it. But like this one, it's with this ending here, and this one goes a little wider. So like this, the reply is indented, you know, whatever this is, 2M. And then also the comment goes 2M, but I didn't remember that comments had a max width on them. I'm a little puzzled by that.

...56I guess they do.

02:50:12I would rather see a max width based on EM or REM. I never remember the difference between the two CSS things. I think REM is the one that everybody wants to use. Epic_Ninja_Elephant There's about 17 million size units in CSS. Huge mistake.
Yeah, this becomes a little monotonous without a max width. All right. Well, cool. So I'm coming up on three hours here, which is the usual run on the stream. Epic_Ninja_Elephant Thanks for trying my suggestion.
Well, yeah, I think the 17 different size units in CSS is, that's the pain of backwards compatibility when you have a platform like the web to design for. You kind of can't ever break every site on the web because so many are published and then never edited. Our font size hasn't changed in, what, 14 years? And if the browser changes how it interprets that size, our site changes in a weird and surprising way. So yeah.

02:51:43This honestly does look quite good. What is the... That's fine. All right. Well, thanks for making this suggestion. It's kind of fun to do these experiments. People come up with a lot of stuff on stream, and most of them work out, honestly. Most of them come up with that lead to either... they are improvements or we tinker with them some more and they turn into something that's an improvement to the site. Epic_Ninja_Elephant Moar brains, moar better. As the saying goes.
So play with that one. I'm really curious to see where that goes. All right. More brains, more better. Yeah, yeah. Linus's law by way of the Shiba Inu Doge. Seems legit.

02:52:48pushcx https://github.com/lobsters/lob…
Cool. Oh, and here. Copy link here. You can have a link to the issue that we were just tinkering with.

02:53:05Otherwise, I'm going to wrap up this stream for the day. It's been nice hanging out with you. Epic_Ninja_Elephant Thanks for streaming!
Making some improvements to the story merging UI and small bug fixes. Alrighty. Well, my next scheduled stream is Thursday morning, 9 a.m. Chicago time, different times in other lesser time zones. Epic_Ninja_Elephant I got your iCal link working, btw, and it makes it way easier for me to be here.
And I'm just going to keep up with story merging and keep taking comments and experiments. And you all take care. Thanks for watching.