Then I'm allowed to ship my foot into production

Streamed

Label bolding CSS fixes PR #1753. Herb template fixes PR #1754. Ruby 3.4.7 upgrade PR #1746. Gemfile.lock checksums for supply chain security PR #1747. Speculation rules for browser performance PR #1756. Mod comment deletion PR #1742. Username backfill migration. Battling Rails caching bugs. Colorblind-friendly UI considerations. Healthy community growth vs. hockey stick growth.

scratch


topics
  merged
    label bolding https://github.com/lobsters/lobsters/pull/1753
    herb fixes https://github.com/lobsters/lobsters/pull/1754
    ruby 3.4.7 https://github.com/lobsters/lobsters/pull/1746
    checksums https://github.com/lobsters/lobsters/pull/1747
  open PRs
    speculation rules https://github.com/lobsters/lobsters/pull/1756
    inbox mentions https://github.com/lobsters/lobsters/pull/1711
    mod comment deletion https://github.com/lobsters/lobsters/pull/1742
  username backfill
  username timeout
  story merging UI?

title
  foot in production

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



03:16Oh, let's get the site up. Howdy. This is Lobster's office hours. Let's put the message in the chat. Epic_Ninja_Elephant Happy Thursday.
pushcx Drop questions in chat anytime!
This is Lobster's up on the screen. I'm Peter. I run the site.

...35Yeah. Yeah. It's nice to rebuild the usual streaming schedule here. after the disruptions of August and September. Nice to see you again too. So yeah, anybody can ask questions about the site anytime here or otherwise just hang out and look over my shoulders and I maintain the site.

04:04So I actually have a pretty good to-do list today.

...16Between streams, I merged a couple of things that I looked at on Monday's stream. And then... Yeah, this is just about ready to merge. Which order should I do things in? I think if I... I don't know how long this last thing is. There's like one more bug on the username backfill. So that's going to be a second. So let's just kind of run through these PRs because I try and work through all the pull requests and issues.

05:09Yeah. So I'll come back here. I wanted to hit the stuff that I merged between streams. There was this one about removing the bold styling. We figured out on stream on Monday that it could get simplified. It did get simplified. So I merged that down. And also, one of the nice things about it being simpler is it should be less brittle. There's so much, I spend a lot of time in code thinking about the ways something is going to break. And if you are editing that thing over there, will you know you are breaking this thing over here? CSS is real hard for that. We'll see if those scopes ever make it in. It's a big spec change.

06:09So then had another PR from Marco Roth. I posted on the socials about this one that he's been using lobsters as a test bed because, you know, we're a real world Rails code base. he keeps catching these things where we're missing closing tags or we have odd nesting where it's not invalid but this is a pretty brittle way to do it we really should just close the a tag at the same level of scope where we opened it and pushcx https://github.com/lobsters/lob…
These individual fixes are nice and more and more drive me to want... Here, we'll just copy this link because this one's a little longer. I feel like over the last year, I've just gotten... The more I've touched ERB, the less I like it because it's just all strings. And he's doing some really interesting stuff with Herb and links to a blog post that's quite good. if you watch if you read the blog post and the images load for you because they didn't on my phone you don't need to watch the two three talks it links to you can just get it all from the blog post but basically his herb engine can replace the araby that's already there And it knows HTML structure. So that's really positive, although has the potential to outperform since we can optimize the templates more strategically. I don't know what the performance overhead of it is today. It's not terribly far behind from some of the stuff he says in his blog post.

08:28I don't know. I tried to write up my kind of like everything that frustrates me about herb. And what I left off is I don't actually like ERB syntax. I've been doing this kind of like angle brackets, embedded string things since PHP in the late nineties. And I still don't like it. Hmm.

09:09The neat features of ReactionView are just, I think, pull in a ton of JavaScript that I don't want. This was a very strange conversation in part because I was like, I don't want to take a dependency on any JavaScript tools. And he's like, OK, well, then just take a dependency on a JavaScript tool. I don't, like, I don't even, NPX is, okay yeah it's an npm tool so i don't want npm so just put in npm i don't understand why this always happens with javascript where i say very clearly over and over i don't want a dependency on javascript and people are like oh well you should just take a dependency on javascript it seems unthinkable now 1746 so this one was nice just a little bump to the current version of ruby now that that's available and then one more along those lines also from caius was to start using checksums in gemfile.lock it's a not a complete solution but it helps to mitigate the risks of a bad gem source that changes gems which well ruby central created a lot of fears about supply chain attacks while supposedly protecting from some All the Ruby stuff of the last couple months has been real rough. Maybe I'll write my own programming language.

11:11So that's the stuff I merged between streams, and I have peeked at this stuff. We should work through, yeah, we should work through these, get them merged, or at least responded to.

...30Yeah, speculation rules, that's a nice performance. Vote hydration hasn't moved. I peeked at that this morning.

...46Comment deletion. The countercache, I think, also hasn't moved. Inbox mentions, I think it's just stalled up. one i wanted to touch because it's been so long i'm worried about it just getting hit by stale bots i think i'll try and get that one over the line and then everything else is just kind of hanging out for the minute So let's jump into those. We've got story domain prefetching, comment deletion, and inbox mentions.

12:45Which one is this? This one is the one that's stalled right now. Yep.

13:01Look at these. Open issues, because I think there's stuff worth talking about over here. Just have to fix the default sort, which is always wrong on GitHub. So speculation rules. This one is a feature I asked for. It's a This is Firefox. It keeps opening tabs weird. pushcx https://github.com/lobsters/lob…
Oh god, stop it. So we've got a nice article about speculation rules, which are a way for the site to hint back to the browser, hey, since everyone has abused get semantics for so long, and I suppose technically even we are, you can go ahead, let me tell you what you can speculatively fetch safely. And so for logged out users, FPSVocal has done the work here to say in Chrome, well, we're going to have this policy in here. Then if you are on the home page.

14:44Yeah. And you are looking at a get.

...53So I think href is if you are on the page now. then the where is the link you are looking at okay so it's just saying oh if you are on any part of the site going anywhere yeah that's fine okay let's just

16:00I believe Felipe usually lets me. Yes, great.

...12And of course, the spacing is wrong. Whatever. It's ERB.

...25So yeah, this is a nice little feature. Hopefully it'll make things a little faster.

...38that merge down. Let's go ahead and add this right now. So we'll make a, well, let's fetch the thing I just merged. Jjnew on top of main at GitHub. Actually, if I can do the... 1720 is my other one. Yeah. Maybe I should knock this out too.

17:53So we wanted to use the constant and then mark the thing as red. And then, so let's go look at this.

18:07Can I just.

...24So now the message. I'm going to call it markdowner username mention.

19:11use the constant and then the other change I wanted was

...47Mark the notification as red. If it's not, should display.

20:00I think that's got to be a. I don't like it, but I think that's got to be a before save hook.

...24And I can't leave a comment because it's not an edited line, so I can't. No. OK, I can. All right. So what I want here is. Or say, right. Yeah.

21:20Is it on create? Yeah. Let's do this before validation, spend less time.

22:19I think that's really it. Yeah.

...51right and then i'm gonna wait for the test suite on that one that's funny the google or that microsoft does all that spa stuff and then i'm seeing my own refresh you're outdated and then it's forcibly doing a full page reload and scrolling down instead of being able to do an inline thing for all that they keep breaking the site to be an spa Seeing those kinds of things where it's not an SPA, it's a little tacky.

23:27How did I create conflicts? Just the for the required thing.

...48There we go.

...54This button bugs me every time because it's not when it says commit merge. I'm like, am I merging the whole PR every time? But no, it's just a calls resolving the conflicts emerge. Because I'm merging main in. All right. Why? Why didn't you run the build? Is this still marked as a draft? No. So where's my build?

24:39OK, just reload the page and now. All right. That's so well, there's this stream's new GitHub UI bug, and I'm not going to count the full page reload for my own edit as a bug. That one's just a clunky. But this one where it was just literally missing till I reloaded and then I clicked the button and then the UI for it entirely disappeared for. What was that, a second and a half, and then it came back. That's a bug. That's maybe two bugs. All right, where's... I'm going to watch this little run. Because I tweaked enough code that maybe I broke the build. But if not, we'll get this merged down.

25:37so this on ci usually takes about three minutes those intermediate times are killer because you know i can't just sit and watch nothing for three minutes all right so the build The build is green, but there's like a third of the dots there should have been. What? I don't know if that's a horizontal scrolling issue, because these lines are wrapped. Did half the test suite disappear? 3 quarters of the test suite disappear? Yeah, this is just the slow spec to make sure that fake data runs.

26:34I should put the slow spec off in its own suite just so the overall time drops.

...50phamezan hey so im cs student and i have never used a github workflow on my personal project would you recommend doing that just to learn it?
I'm going to wait for that to go green because I'm a little paranoid about it now.

27:06Amazon, yeah. Is your personal project Ruby, Rails, Python? phamezan no my personal projects are in .NET
The docs for GitHub workflows are okay, but the actual process of creating a workflow, no, .NET. All right, so I don't know .NET except to read. But I would go find an open source code base and copy their workflow because writing a workflow is super fiddly.

28:03I have to duplicate so much stuff to run the slow specs as their own check. just don't want to do that because i would have to copy basically all of this and i know i think github now supports that rails hack where you can like have a named anchor and then repeat and modify things that's That's not something I'm going to do. That's so hard to maintain. All right. I got burned by that one repeatedly on Ansible. Great. Give them a mention.

30:12Yeah. The value of momentum is it would have saved me. What was that? 10 minutes or so. If we had kept up momentum and the contributor had been more active, that one's on me. All right. So with that merged inbox controller, I want to do this right now.

...45No, this one is small and it is actually a good first issue because it's just creating a migration and deleting a bunch of code.

31:15So next up, and then I think this one I have to approve I have peeked at this code so i'm okay with that.

...26pushcx https://github.com/lobsters/lob…
Good good, so this one 1582 this is not one I expected someone would pick up. But.

...45The codebase has historically overloaded stuff, user actions, to include mod permissions. So if you are a user, you're allowed to delete your own comment for the first however many hours. If you are a mod, you are always allowed to delete comments, but that was one code path. And for mods, it was supposed to say, okay, you have to give me a reason, and... Then we'll log it to the moderation log. But the way all that tied together, because the action was overloaded, created repeated bugs around things mods could do that users could also do, like editing stories, editing comments for a time, deleting comments, deleting stories. And so I've been splitting the mod actions out to their own actions. And that's what this one has been, because... one of the bugs was moderators could always delete their own comments even after the window and it didn't go in the moderation log because that would check are you deleting your own comment so or no it was the reverse mods can't delete their own comments they always end up down the mod delete path yeah it's i can't keep track of them that sometimes the edits So that's why there is now a mod controller and a mod path and separate buttons, and it's getting better all the time. So this one is going to say, let's create a destroy. Ooh, delete by moderator. I think that's a new method.

33:50I kind of want to split these two.

34:00What is isDeletableByUser? I think this is just copied. Comment isDeletableByUser. Yeah.

...16Yeah, the only thing would be can't find the code. so it's redundant but i guess it's a security check i don't know our our authorization policy is just smeared everywhere i haven't wanted quite to add something like can can can or action policy or that other one that showed up in conference talks this year but it might make sense to split out as its own layer

35:03What is xlocation?

...31It's one of Chamelis' intermediate 302s. Add a custom. It's working around a JavaScript limitation. So that's fine to maintain. All this code is just copied up, which is fine. We won't hit this code path.

36:07So I'm going to just comment on two lines. Yes.

...48So we find.

...55The user is always exists. Actually, we can delete all of this. Because. We're not presenting it. Can I? Yeah. So I can't change what lines I'm, no.

37:53It's the whole method because Ruby has the implicit return.

38:15That's not the...

...59Right. Except this is the comment moderator. Where's the view? Whoa. Why are you setting that?

39:34toastyykodes Hellos
OK, that's not actually added. It's just the diff is wrong. Hey, Toasty, welcome.

...49toastyykodes what are you working at ?
All right, so why do we save twice? I don't understand. pushcx https://github.com/lobsters/lob… https://lobste.rs
this edit oh it's a second method toasty i'm working on lobsters which is here you go there's the repo and the website if you are a rails dev it is an open source project and you are welcome to help fix bugs or add features toastyykodes do you work as full time here ?
I get it. So they duplicated this.

40:41Lobsters is not a business. No one has paid for it. It is a all volunteer project.

41:00Why did we have to add an ID? No, I don't want to add an ID. Absolutely not.

...35toastyykodes if i am alloweed to ask, do you work as full time else where ?
Oh, if I'm a full-time developer, I have been, I am not currently. pushcx https://recheck.dev/
pushcx https://push.cx
Aside from lobsters taking up about a business day of my time each week, I am currently working on this. And if you're curious more about me, you can poke around my personal blog that has some of my career stuff so I have been a full-time developer. God, when did I get my first full-time developer job? 25 years ago. And I am currently starting Recheck as a software product. toastyykodes I am trying to find one, and its been like hell :)
So much work to do. Yeah. Are you a new developer? toastyykodes I am fresher
Do you have an academic credential, a bootcamp? Ah, so college freshmen?

42:55toastyykodes yes, i have done Bachelors in IT
Why did they even want to add ID?

43:06toastyykodes https://github.com/toastsandwic…
toastyykodes this is my github
Yeah, no. This has got to go back to being short ID.

...19Because that's what fetch uses.

...29So toastyykodes yes
Wait so is fresher slang that means a recent graduate. it's not a term I know. How did this. camel_doctor @toastyykodes if you're in india, try applying to our company?
yeah the spec didn't work because they didn't have one that was end and all right.

...58Okay.

44:03mikuwayo Heya thanks for your work!
toastyykodes what is it ?
Oh, Camel Doctor, thank you for making that connection. camel_doctor freshworks
Hi, Miku, welcome.

45:15toastyykodes @camel_doctor can you share a link please
camel_doctor search for freshworks careers in google please
cool so that was real easy to review and let's put it in the notes for this all right it's already in the notes yes i did that in the other order all right great so there's a couple of things all the open pull requests looked at and then is there any issues open so this is the one Thought I just clicked Close on this as a duplicate. Yeah, should have clicked Close.

...59toastyykodes are you guys hiring freshers ?
And then otherwise, I saw this activity, right? Toasty Codes, you're asking kind of some obvious question. It's like they would have just read that you said you were a fresher. Before they said try applying. So you're kind of. Asking some pretty obvious stuff here like. toastyykodes Might take this on a private chat, sorry
Where's your website when they gave you the name of their company?

46:34toastyykodes :D
So. There's no.

...44So there's no open issues that need more attention. The pull requests are hanging out. Wait, Felipe opened a PR while I was reviewing his other PR. So let's take a look. Oh, this one is great. Oh, he is picking off some great bugs and issues.

47:44pushcx https://lobste.rs/stats
toastyykodes btw how good is ruby, i have never worked with it
let's take a look at the code so this one is if you go to lobster slash stats man i filed this and i figured nobody would ever take it on ah we are actually at a great point in the month so this graph of new users by months last month oh the little pop-up is missing that's that's a bug

48:18I wonder if it's all these CSP warnings or if that's unrelated. All right. Well, I'll have to file that. Ruby is a mostly lovely language. It's mostly popular with Rails, but we'll see where Hanami goes. Okay, so this last bullet point is the current month, and the title is missing, which is irritating. But because we are on the 16th of the month, this number is around half of what it should be. chamlis_ hi-ho! I tune in to see CSP errors, arggh
So especially on the first couple days of the month, every chart looks like it's falling off a cliff, or there's this weird discontinuity. Oh, we are going to be big this month on active users. Story submitted. Yeah, we're right about in line. Yeah, cham list that one. I think that's these missing titles. I didn't think there was an inline script on this page. Are there more arriving as I hover? No. So it just happened on page load. marcoroth_ @toastyykodes one of the most underrated ones, it's beautiful
But yeah, these used to have a title with the month and the exact number. If that's something you want to take on, I'm not going to mention it to Felipe, but because he's already in there. camel_doctor thanks for sharing. never knew the stats were public. tbh i expected more :(. but happy that the community is growing!
Hey Marco, I was just, you'll have to dig back into the archive in a couple hours when I posted it if you're real curious, but I just was going through the merged PRs and I had merged your herb You know, Campbell doctor. Yeah. So the stats are public. I'm happy to make more stats public if you think there's something useful to add, but we're not a business. We're not a startup. We don't need hockey stick growth and actually community norms cannot survive hockey stick growth. There's there's only so fast we can acculturate people. I've actually wondered if our growth rate is starting to get too high because you look at that new users per month, that's pretty steady. But then active users per month is going up. I worry about this graph getting too high because it takes a while to kind of digest those people and have them because nobody reads the guidelines when they join. To help them understand what's topical here and that we're not trying to be the snarkiest comment section on the Internet that kind of thing. toastyykodes @camel_doctor can you dm me on wisphers (i cannot dm you), i want to get some more info.
yeah see this is going way up we're getting more active every month this last year or so. In that we're basically hitting records every month.

51:24All right, so Linux used. All right, so he indented some stuff and changed the bullet. So it's still going to show up. That's fine. Fine. I'm a little surprised. Usually, he splits these things out, like doc fixes. camel_doctor right. makes sense. i was just an avid reader of HN. but i like lobste.rs more and want it to succeed. godspeed. will try to contribute sometime
chamlis_ the part of me that loves getting nerd-sniped wonders if there's some better extrapolation process (something Poisson-like?) for active users
He has done that once, unless I'm confusing him with another recent new contributor. But I don't think so copy and paste in. Yeah, grammar. Yeah, so Camel, I think we are succeeding and we are at a very healthy, stable place. And I say it over and over, but we don't need to eclipse Hacker News or our programming on Reddit or something. We can be a healthy, active, sustainable community without them failing. There is a lot of room for different social communities on the web. camel_doctor SeemsGood
It is not any kind of zero sum game. In fact, it's positive sum because... That's fine. It's a positive sum because we get to link to their good comments and stuff. I've wondered if we should do more of that. CamelDoc2D, CodeRails, can I give you a feature request? I have an ideas and to-do list, and I try and take things and put them in the issues every now and again. rather than just dump 300 things as features in the issue list because it just kind of looks bad to see 300 open issues even if it's 300 feature requests.

53:51camel_doctor yup. i know RoR, share a link may be
camel_doctor i'll take a stab at it
chamlis_ oh yeah, absolutely
so so to channels to your comment i want to do the real simple obvious things but yes it is probably poison-like and if you did clever stats with the pace of change over the month you could be accurate but i really just wanted the one-liner of divide by how many days are left in the month and multiply by that percentage just i wanted to see something Totally obvious. So Camel Doctor. The feature set that's pretty broad, but it sounds like you're a regular reader of the site and kind of fuzzily defined that I think would be neat is. We have these story URLs.

54:49So it's not really sync surface to users. but we have a link model and the link records all of the links that show up in stories or comments. So if I go look in and I have a, I don't know, a couple of days old dump of the production database and I say, select star from link order by created at desk limit 20 link, plural rails, Oh, do we not have a, right? They don't have a created app because they're ephemeral. That's fine. I'm trying to get out of the habit of ordering things by ID all the time. Let's just limit it to 10. So it fits. So here is someone included this link in a comment or Like this one was probably submitted as a top level story, so we have all of these links, we also have them normalized for our version of normalized but you can't really use that elsewhere. I think it would be really cool if we had. A background job. that fired every time someone submitted a comment or a story that took these link objects and said, hey, can I see them over on a couple of different subreddits like our programming or the language specific ones? And can I see them over on HN? And the job should run immediately on submit. And then again, I don't know, six hours later, a week later, six hours, a couple of days, maybe a week later, like, you know, run it four or five times with some kind of little schedule. And then we would have a external links table and say, in the same way, if a story has been submitted multiple times, Where's one that's been submitted multiple times? Do I know a URL off the top of my head? Yes, it's JVNS.ca. I think one of hers was Julia Evans was recently resubmitted, right?

57:38No. Maybe I'm just thinking about her because we had the vim and the helix thing. When a story is resubmitted. And I'm trying to think of how to find one real fast. let's say title 2020 because there's probably a story that has been submitted a couple of times from 2020 no oh you know what there's an issue about it because there's a bug

58:49pushcx https://github.com/lobsters/lob…
Here we go so alright so camel doctor if you're still listening, this would be a great warm up, there is a bug that if you submit a story. It is possible to have a duplicate we have a bunch of logic around duplicates that they can't be resubmitted for a month. And then we use that link model to say oh hey. We saw this story once also six months ago. So this one was three years ago and then also six months ago. And when this was resubmitted, oh, by Chamlus, small world, there is supposed to be a flow someone goes through where they both see that it's been submitted before and have to leave a comment to restart discussion. The bug is that that didn't fire. The other bug is this one does not say, oh, That link was also submitted over here. So like somehow, even though this should be bi-directional, that's broken. There is a great bug to start with. And then what I was trying to explain with all of those external links is if we go fazji I've been lurking on Lobsters for a few months now, and I've been really enjoying the blogs and reading the comments. I used to lurk on HackerNews before, but I like it better here now Really appreciate all the work you guys do!
camel_doctor gotcha
look on just HN and Reddit to start, it would be great to find external discussions of the same story and include it at the bottom of the page. And you know, version one of that is, can we find those and link to them at all? Version two is, Can we include some metadata, like how many comments they have? Because that tells you if it's worth clicking through. Version, I don't know, four or five, if you want kind of the woolly-eyed one is, it would be neat if we looked at all of their comments and let our users pick their best comments and highlight them. So down at the bottom of the page, there would be something that's like, just to grab a username here well pushcx liked this comment on hacker news and then select you know i pushcx would select i don't know 20 words out of the comment that i thought were really interesting or the key point of why i'm linking to it because i you know i want to give people a reason to click through i want to not do a copyright infringement. But there's a lot of good stuff that's out there on the web. I just submitted a story a couple of weeks ago about UUIDs, and it had an excellent discussion on HN where people talked through some of the other options and how the thing worked. And the first thing I did when I submitted this story is I left a comment saying, hey, these comments are great. Go look at them. think that should be a feature on the site that we link to the best stuff that's available elsewhere on the web because it's really it's not a competition in the sense of a football game where one team wins and one team loses but it is a little bit like a competition where we're in a foot race chamlis_ stand on the shoulders of giants?
and you know or maybe an ultra marathon and we can go farther or a little bit faster or climb that peak a little bit higher there's no there's no tearing each other down but there is spurring each other on to do good and i feel like if we linked to the best stuff that's available elsewhere we would be celebrating those things yeah that's one way to put it too is we're taking their discussions and building on them because I really fundamentally believe that these things are not competitions. That in the sense of destructive competition, there's a whole thing in board games of whether you have direct competition or indirect competition. So in a game like Risk or Monopoly, you are like beating the other players down. In a game like Ticket to Ride, you are trying to build your own thing with the other players, and you interact with them a little, and maybe you cut their route off a little. In Settlers of Catan, maybe you can steal one resource from them, but you're kind of playing your own game. You're not directly competing. You're not trying to put other people down. Or maybe a better example would be something like Bridge, where you are trying to take the tricks So you're competing for a resource, but you're not actually punishing each other. There are probably proper game design terms for those things that I'm not remembering off the top of my head. But Star Camel Doctor, it would be great if you want to, you know, you don't actually have to do this bug as a warm up, but I would bet it's going to have a pretty small fix and it'll give you a reason to poke around in the code base. And then I've given you kind of a wooly feature request. You can swing by the stream to ask questions about it or just talk to me. camel_doctor yeah will check this issue first.
Email, IRC, any of those things. I don't think we have ever seen private class method. What is that?

01:04:54Wow, it's been in since 2.5? Or it's been in since 2.1? Wow, that's going back a ways. I don't think I have ever seen this.

01:05:16I think Felipe works in a much, much bigger code base than Lobsters. We kind of... have never bothered making anything private because when you have under 15,000 lines of code, and that includes our templates, you just don't need that level of code hiding.

...53I could add single comment didn't I? Yeah.

01:08:51where's the actual all right so this is the boy do i not like that coupling i understand why it's like that that's rough all right channels before i mention the the title thing because i'm about to write that comment did you solve it in the two seconds while i was chamlis_ I've had a look, two secs to type it out
reading and commenting.

01:09:33Okay. I mean, if you know the fix, you don't have to explain it. You could just PR it. I trust your code at this point.

...49Ah, that is an improvement.

...57I love the way these are coupled. but I don't think we can put a class on them. And then...

01:10:22chamlis_ yeah it's inline JS making the popups, we could either disable the CSP on /stats (assuming there's not gonna be UGC there in future) or reimplement the JS ourselves either in JS or CSS, which would make the popups work but you'd still have the warning
It's inline.js. I didn't even realize it was inline.js. Huh, I thought it was like a...

...39chamlis_ there's onmouseover and onmouseleave on the SVG elements
I don't see any JS. Oh, is the SVG chart library doing it? Yeah, OK. Then it's the SVG doing it. All right. Either disable the CSP or re-implement. also this might also be like the markdown bug that you just fixed upstream i think two projects upstream because common marker went to comrack this svg charting library we're using i don't even remember its name off the top of my head but it's been a while since we've updated SVG dash graph.

01:11:51Oh, there's an SVG graph, too. chamlis_ good point, might be able to upstream a pure CSS solution
That sounds like SVG graph went unmaintained.

01:12:01Yeah, a couple of years out of date, we. Are we at the current?

...14222, yes, we are at the current version. And this one's gotten a commit in the last 162. That's actually, that is a significant amount of code. So Chambliss, if this is something you wanna investigate, yeah, especially because I wanna say browsers now universally will give you a pop-up for the title attribute. So if you wanna take a look at, should we bump over to SVG Graph 2? Should we try to upstream a fix? Should we patch it ourselves? Or if you want to just punt and throw it as an issue in the tracker with your brain dump, any approach there would be useful. Thanks for figuring out what was wrong with this though. So I am not going to mention it to this guy. Yeah. chamlis_ I'll open an issue, and try and get to it myself at some point if nobody beats me
So, well, I'm going to have to mention it. Yeah. Okay.

01:14:20say i don't remember the names of the kind of color blindness yeah

01:15:12fpsvogel Hello
chamlis_ new github bug here - PR #1696 in the autocomplete dropdown shows as a draft despite having been merged
Oh, a new GitHub bug. Did you load? I get the impression that they cache that list the first time you start auto-completing. Is it possible you had that open before I merged 1696? Did I just merge now? No. Oh, God, that's been merged. Yeah, this is the one that was merged a while back. Yeah, that should show as merged.

...54There's really no excuse for that one. Because I saw earlier here that I started typing the name of a PR or an issue that I had merged or closed. earlier in the stream, but I didn't call it out as a bug because I was like, yeah, whatever you cache when I loaded the page. Oh, hey, Felipe, I'm just leaving a comment for you because I saw that you just opened a PR while I was coding.

01:17:33fpsvogel Oh, the PR I just put up. Yeah, I somehow didn't think of accessibility with the red and green…
Yeah, so we can talk through it at FPS, but I just submitted the review. If you want to take a second to look at that, and then I'm happy to chat about anything there. Those are two pretty small changes, so if you want to knock those out right now because you're free, great. If not, it can hang out a minute. I've been trying to get PRs merged promptly because... I'm a little slow, but I get there. But I figured out that most contributors like ChamLess and you really prefer to have only one PR open at a time. And I guess that's just because it's easiest to have one branch going. There's hassles with branches sharing a database. with Git being okay at branching. It's not jujitsu. Anyways, yeah, that's why we do code review and why it's so nice to work in public is we can catch each other's oversights. fpsvogel ❀️
God knows the history of commits in the repo is just people catching my oversights every day. Every week, we're not that active in development. It's not that I don't make that many. It's just that We don't have that pace all right. cool. felipe also you you've submitted a bunch of PR to that point, I want to say you're up to least six or seven and they've all been really high quality, so I wanted to say thanks and Oh, do I have the.

01:19:19fpsvogel yw!
Can I do that. I can't add another so I was trying to add a. Add you as a VIP here on twitch just to put the little icon next to your names people know it, but I can't add VIP is because twitch has a irritating limitation. So I can just say thanks right now, but then also. I have, aside from the fact that we have 176 issues and some of them are. How many are features. 65, so a third of them are features. you ever get to the point where you are considering contributing and these bugs are not particularly interesting or these feature requests are not particularly interesting i have an ideas page with like a hundred more things on it and i am happy to reach into that list if you have a general area of i would really like to refactor something or no i want to work on a user visible feature or I would like to make mods lives easier. I'm always happy to dig back into my to do list for anybody who submitted a PR or two. Or I guess I was just trying to pitch Campbell doctor on something off of my to do list. So I'll do it to anybody. Anybody can help whitewash this fence. fpsvogel Cool, I will keep that in mind
It's great.

01:20:56camel_doctor SeemsGood
Yeah, in any case, thank you. I've really appreciated that you've made so many contributions. That's the big thing. More than I have more for you to do, it's thank you.

01:21:17All right, so where's my to-do list for this stream? We've done the PRs, we've looked at issues. I don't think I actually did anything an issue so i'm not going to bother adding it oh last stream I started on backfilling the username data and then I mostly finished it off stream, because there was some tedious mucking around with real data. And then I caught a bug just before I was merging it, so we can take a look at this code see we've been going an hour 20 so I should do my bumper that. pushcx This is open door time for Lobsters, drop questions about the community or codebase in chat anytime!
this is open for lobsters drama questions about the community or food base in chat in chat anytime great so where was i with this migration

01:22:29Yeah, I added that. I think I had just gotten the specs running again because I'd had a hassle. Yeah, I fixed the spec I was working on, but there were bugs in the test suite related to creating users.

01:23:01something in the test suite is interfering with the callback so let's just pick one of these let's do the home spec maybe newest by user yeah oh the migration i'll show it off

...37migration changed. Instead of doing insert all, I realized there were a bunch of corner cases with correctly handling users who have never renamed, have renamed once, have renamed back to the thing that they were before. And so I just wrote the simplest imperative code I could of let's loop through all the users and for each one. So we're just one plus ending the heck out of this. We will go select all of their renames out of the database. And if they have had zero renames, we will insert one. If they have any renames, we will track their previous rename and then zip the renames against themselves. So if you haven't seen this one, it's a nice little functional programming habit when you have an array. And if we have an array 1, 2, 3, it's really nice to have the tuples 1, 2, 2, 3, and 3, 0. And so that's what we're doing by zipping results against itself with this offset. And so then it loops through the renames, and it goes, OK, well, I know when you started. So first time through the loop, that's created at. And then after that, we're just going to insert a username record that shows the completed rename because we can look at the before and the after. And then the after being nil the last time through fits in nicely with this nil in when you renamed away. So this works smoothly. Then I added a... after create for user to create the initial record for new users. And that seems to have broken some random specs. So let's go look at home spec.

01:25:54It runs on its own. All right, so then this is some kind of test data polluting I'm not getting cleared between runs. Great. That's going to be a fun one to run down. So let's rebase this guy up onto me just to get current. Yay, no conflicts.

01:26:23Trying to think of what's the smallest number of specs I can run that will recreate this bug. OK. I wonder if this is the factory.

...46No, it's creating unique usernames.

...55I reuse this username a lot.

01:27:09So one of these tests is not cleaning up after itself, maybe? Well, there we go. That's probably even the cause. Why would you call destroy?

...39And search spec line 63.

...53Why wouldn't the usual setup and tear down take care of this?

01:28:06feels like it should. camel_doctor gtg. see ya pushcx. will take a stab at some issues sometime
Ah, Campbell Doctor, great. Hope to see you around on another stream or just around the site.

...36Yeah, I guess we do need that in this.

01:29:06We don't. So this is a limitation of ActiveRecord that bugs the heck out of me. When we have many to some other record, I have to put in these dependent destroys for the test stuff. But in production, we never delete user objects and we should be running, we should be raising exceptions if you try to delete a user model. We do a soft delete for users. And so it feels like I have to load the gun and cock it and point it at my foot. And then I'm allowed to ship my foot into production. And at some point it's going to go off and we're going to lose a lot of data.

01:30:05All right, I think that's. Yeah, not the first time I've seen this.

...18More fails. Maybe I should do something really evil and I should have a dependent destroy that only runs in the test environment and then everywhere else it's restrict with exception. I'm sure that wouldn't be more pain to debug than it's worth. All right, so what's this failure? Why are you printing the whole page in your failure message? Because you looked for two words on the page?

...59Okay, so this, there must be a bug in updating settings. Because you change your username, it's all one form. So this is going to be, yeah, I don't know what these are. And I don't want to try and scroll all the way back up to them. Well, maybe I can search up to them.

01:31:32No, there's so much scroll back, it's all right. Let's stand up the local server and go find this.

01:32:06Who am I going to log in as? I can log in as me, I guess. Let's do that off screen. I don't remember what the. OK, so we've got that. And let's try changing my home page to something else and save. And you succeeded. Hmm. I thought that was going to fail. All right, so put it back. Let's toggle the. That worked. All right, so it's just a test failure then.

...55I was really hoping it was something I tweaked here.

01:33:41There's just a title missing. This is a weird set of features to fail.

01:34:19This is the wrong spec.

...31I mean, yes, this should be in there. But also, the hat request thing should be lining up.

01:35:39So it has the title one true. It's persisted. So if I set story.reload, you're still valid. This is weird because I didn't touch the story model.

01:36:10Right? I did not pitch the story model. So this is something about the test data.

...29So it generates titles. And the titles are in the page, but they're not.

...44One sec here. Sir.

...56Sir. You knocked yourself off the desk. So the cat was starting to play for attention and he rolled himself off the desk and knocked my house off on the way. Little monster. making it harder to isolate the test failure. The test failure is not in the cat's belly, even though that was very prominently displayed during that test failure.

01:37:28Maybe it's the cache.

...53Didn't even, it's the, it's the other foot gun. Had cache on to test the admin caching on the last stream. No, no, no, I'm still getting a cached page. Where's the cache? There it is.

01:39:05Why am I not seeing my debugging? It has to call that method.

...41And yet, if I go to localhost, oh, it's not failing. Why did all of my data get replaced with lorem ipsum? fpsvogel Gotta go. Thanks for the PR feedback! I'll push up changes today or tomorrow.
Disabled the cache. Is it still serving full page caches? Is that what it is?

01:40:59Yeah, see, this is test data is somehow polluting my local development instance. But it's the cache that's polluting it. Oh, and now the assets are broken? This is... Something real irritating is happening with the cache. Oh, but it's... Because I didn't reload the dev server, it maintained that setting about using the cache that was getting filled by the test. But then why is it still broken? Why is my CSS missing? Why is my CSS back? If I shift reload, it goes away. If I regular reload, something very bucky is happening here.

01:42:41Yeah, so I should not be seeing test data locally. Why is my Rails server giving me test data?

01:43:10So it's a toggle. It is disabled.

...29You are starting in development mode. You are giving me lorem ipsum.

01:44:08See, all these generated names. What the heck? Is it the key store? Because we do the We have that homebrewed cache.

...51No, that just goes in the regular Rails cache. It doesn't go in the key store.

01:45:21I'm really confused here.

...52So the full pages. So that's a cache that should have been written.

01:46:53You don't have anything in the cache.

01:47:42Where do you think you're trying to find the users table? I promise you it exists.

...55It exists.

01:48:10It's trying to run the seeds against the cache database.

...21Oh, Rails.

...58Do you have a seed per database?

01:49:16That's not helpful.

...37But now you actually have the right schema to have impossible data. And I don't know what that reload or shift reload thing is.

01:50:00What the shit? You know, when the magic breaks down, it breaks down pretty hard. berkandev Lmao just saw this pr https://github.com/lobsters/lob…
And the test database is just missing.

...42I could use a distraction. Ah, 1733. Yeah, that was Chalmers' suggestion a week or so ago.

01:51:07We'll see if that works.

...25We'll see if I just struggled with rails being reliable for the next hour and 15 that sounds like a pretty painful office hours stream. hmm but that's the exciting thrilling maintenance of running. A discussion Community.

01:52:27okay so the only story in the database is this story title one and in test it is from some cache i can't identify finding all this lorem ipsum stuff so this is some kind of caching problem and i don't know where the cache is

...57And it's not in the repo.

01:53:11So it's not a file named cache.

...21But it's something about its public index. It's the full page cache. The way the... I bet... I bet it's been in there this whole time. Yes, it has, and I didn't notice it. There's our test. So now I shouldn't see it. Yep, I get my rays. Now the specs should see that rays. Don't love the way the full page cache works sometimes. This is why I want to shove that thing into a SQLite database. But I don't really know go. And now these should all be green because now we're not pulling that page out of the cache anymore. Oh, that was painful. This is not the first time I've even seen that bug. Yep. There's my putses. All my green dots. Everyone is happy. Where'd that puts go?

01:54:46All right. So the tests are in a good, let's run the hole. Now I'm going to rerun the migration just because I want to see it run. The way it handles dev caching.

01:55:24Good.

...34So this just takes, locally, takes like two, three minutes to run. I had it printing some debugging stuff along the way, but then I just deleted all of that.

01:56:01And who was that user? I can dig it out of the moderations table. So there is one user and I'm probably going to have to manually add them to the migration or just do it in prod.

...24I think I'll add it to the migration just so I remember it so I don't have to find them again because I'm going to care. There is one user who rename themselves to like fuck off when they were flouncing and actually I didn't know at the time and I still don't whether it's they were flouncing because they weren't allowed to abuse people and they were renaming as one last middle finger or if they were renaming because they didn't want it associated to the username they used elsewhere so if we go look in the database

01:57:08And we go look at, say, JCS. He has never had another username. And if we go select user ID from moderations where action is like, we set username. There's this one guy.

...45That is not the username I'm thinking of. Who is this? Hang on, let's look at that whole moderation. Oh, this is that person. I thought their username started with an A.

01:58:49This is that user. Yes. It started with asthma, but I created a username field. That's wrong. It's my, my loop must be wrong. It must be leaking between loops. No.

01:59:19Yeah, okay, so that's correct, but it's wrong in the username table. So we have a bug. No, I queried wrong. I queried by the PK instead of by the user ID. All right, there we go. That part is correct. That was a weird one. So this one, this guy is missing. So why isn't his rename picked up? because this one should have been picked up and created a record

02:00:31And if it's bugged here, it's probably others are bugged as well. So let's rename this to YAML, just to have something. I'll inspect.

...59Okay, so it did find the moderation with the rename. And then does it go into the zip correctly? Yes.

02:01:21Old and new.

...38Why did it sit this item against itself? No, it didn't. It's yeah. I printed all of them and then it goes in the loop once and then it's things are old and new. All right.

02:02:03Okay. So puts old username is username. username is new username.

...39So created one username, it thinks, but then it's not there. All right, so what's wrong with this logic?

02:03:31First time through the leg. Should create asthma. Oh, that's what's wrong.

...56OK, yeah, so it's. It's that the...

02:04:19So let's just say... No matter what, we'll create them a username.

...49Maybe if I had properly written this as a fold, it would have just never done this. So each time through, we kind of want, we have to touch that first username. So this will create I really don't want to have to mess with the records.

02:07:11I'm in for each rename. We're actually creating for.

...35Actually, I have to do this. It runs from when the old one, which is the started using, to, so instead of calling these old and new, we'll call these rename, and next rename, because that's how I confused myself.

02:08:33That looks correct. So if we pull this guy out of the database. Yes, he was asthma until then. And then I'll just have to create. It didn't create the next one. Why?

02:09:26Because I'm ignoring the last one. So then do I need to say

02:10:09I feel like I am missing an obvious abstraction here, because this should not be a big hassle. This setup feels right. I'm comparing each rename to its next. But if there's one rename, I am comparing it to nil. And then I think I have to have one for that last one.

02:11:36AnakimLuke rebelnaBlep
It's kind of a fence post thing where I have an off-by-one. Hey, Anakin. AnakimLuke smixelBusiness
Is that a dog emoji? Reeb in a blep. Okay.

02:12:21AnakimLuke i think i have a worm too
AnakimLuke emmagr1WormTwerk
AnakimLuke ah and a cow
AnakimLuke dooderPatty
AnakimLuke okarooDance
AnakimLuke duck
It's a little funny that I'm debugging this using someone I expect to be wrong. There we go. So this is the one where, all right,

02:13:29AnakimLuke indelaPiggO pig that has seen things
AnakimLuke sgeeeWilla2 moar dogo sgeeeRaina sgeeeJammies
I think all of these are missing in the archives because I didn't scrape the emojis. I wonder if they have predictable URLs, and I could. They absolutely do not. They just have big hashes. Too bad.

02:14:16How do I find this stuff for the database? I can actually know the IDs, but not of the one I just created. So yeah, username. Let's find that. The reset is moderation.find.

02:15:17final one it's going to run it's going to have the username it's going to be back to ast h and a it's going to be created at the reset and it's going to be renamed away at nil okay So that should fix up literally this one jerk.

...57Validation failed because the username has already been taken. Usernames, oh, this is concern username. The uniqueness should not be here on this attribute that's shared. should be over on the user. graefchen Heya limesHi
So this one validates username with uniqueness.

02:16:40Hey, Gravechen. This is the thing failed in an inconsistent state in the middle of the migration. This is a comma. So now it failed in the middle of the migration again.

02:17:24There we go. Now we have a valid record, even for that troll. So with that corrected, are you yellow?

...46You're just confused. All right.

02:18:00So this migration takes 60 or 70 seconds. It may take a hair longer because I'm now actually creating that final record that I wasn't before. You know what? I actually have a username. I have a rename method. but it doesn't have an at, it just uses time current. So if I lifted this up, then down here, I could go find that user find the reset and say username dot rename user is you from is now we will say we will say by that user at reset created at and then Instead of from, take it. Now I have to lift it. From you can fuck off to A-S-T-H-M-A. And that's a lot more expressive. But of course, I have to run this again because now tweaked the code could i have been using my rename method in these yes but i don't want to edit all of them because i'm ready to be done with this commit that is hung around longer than i wanted all right so in 68 seconds that should be done

02:20:48I'm going to throw on the last call banner and make this a fairly short stream because I spent a bunch of time on this stuff in PRs yesterday. And I'm missing things like hassling with the cache. That's a known foot gun of how the Rails cache works. And struggle busing with the migration. I think I'm going to call this one a little early. So as usual for office hours, anybody can ask questions anytime. This is last call, and we can talk about anything on the site before I roll out. Unknown keyword at, oh good, I'll get to do it again. Just what I wanted. I didn't save the file on the right.

02:21:51This one's not a redo now. That error is the exception the previous one creates if you try and duplicate things. I'm recognizing it, having seen it a whole bunch.

02:22:10Let me just review the rest of this diff while this runs. So what have we done? In the settings controller, we don't need to do all this special casing for the field because we can use the active model dirty stuff that I don't think was there when the site launched. And then we can rename this fixed bug if this happened to get touched on a new model.

...44Not a new model, an invalid model. It's playing around in the console. All right, this is the shared stuff between user and username. There's the association. This is just me sorting things. This is the one that's over here. There's the shared code lifted out. The after create. A new model that has a rename. New use of the regex. The big migration that I've been in. Really? Why is this always flipping back and forth?

02:24:06OK. Oh, we've got a bug. What's the bug? Moderation should be linked to only one object. Why did you try and create? Because it's not self, it's user.

...50People already exists because it failed. I wonder if I didn't sleep while I'm missing this stuff. I should be sharper.

02:25:11All right. Yeah, so this stuff, that's going to punt. Not getting the story merging UI. I said something about my foot.

...30Alrighty.

...38Quiet stream today. Though it's always nice to see contributors.

02:26:02All righty. Yeah, if I'd used rename here, this stuff would be simpler. And then I could have called rename again here. I don't want to refactor that and clean it up. I really don't.

...35Oh, this thing is, all right, we'll put it back. This thing is expecting to do, I was trying to make this like a service method. So it was trying to create the moderation. But it shouldn't.

02:27:08chamlis_ got SVG graph working with no JS, hope to open that PR upstream soonish
Alright, so... Hmm... Yeah. chamlis_ we were already using svg graph 2
This whole, .. Oh, yeah? Chamos, that's great. I kind of assumed you wandered off, because otherwise you probably would have been... Would have nerd sniped me by finding that caching bug. Gem file. We were? chamlis_ that repo is under the rubygems "svg-graph"
Oh yeah, I mention it here, but I say SVG graph here. chamlis_ I think there was a friendly takeover?
Is SVG graph 2, did it replace it then? And the repo name just doesn't match?

02:28:03Ah. Ah, OK, so then that makes a lot of sense.

...16That's a nice little fix. Well, fingers crossed that they accept it. It ran correctly. Please be right in the database. I'm ready to stop running this. That's correct. Do I know someone who's renamed off the top of my head?

...43I don't, Oh, you know, everything in social software is, no, I want it to throw up on screen. Everything in software is, long distributed where. chamlis_ you should get the seven second delay to cut the stream lol
username from usernames, star, where am I here?

02:29:29You know, I don't actually recognize that I've put up something I didn't mean to within seven seconds. Can't group on, no, I wanna group on

...46I just group by user ID. Yeah, there is.

02:30:08There are a handful of users that has renamed a lot.

...29Yeah, I actually want to see these dates from users. Username, let's join users on usernames.userid, folder by usernames, created at ascending. That's not what I wanted. Where user, username.

02:31:07that yeah so this person renamed through a bunch of hashes and then went back this is some kind of weird behavior and they did all of it in one day so they were playing around with something But that's why one of the items on my to-do list is to have a timeout on this stuff. There was somebody else who's done it 11 times, and they just kind of cycled through a bunch of usernames, and it was over the course of a few days. I think they were being real indecisive. But I'm going to add a timeout that if you have a username that's less than three months old, you can't rename something like that just to put a floor under this. I don't know.

02:32:13chamlis_ steam used to show your last N usernames with no option to clear, so if you wanted to make things slightly harder to link back you'd rename through N different random names or something
I lost the public cache git key. I don't think I wanted to lose that. Steam. I thought on Steam you just couldn't change your username. Is that something they've added? Because I thought there was like a whole meme around like, you know, you're 40 and now you have a Steam username. chamlis_ there's the login name that you can't change but I don't think that shows publicly anywhere
That's something you thought was cool at 13, like, xx chamless 420 underscore xx. chamlis_ I told you not to leak that!
The login name you can't change. Ah, I didn't realize that username was separate from login name over there. Well, we're slowly lurching our way to that level of complexity. That's a cute note to end on. That's a better joke than I could come up with here. All right. So yeah, so that's good. Let's push it.

02:33:33God, I have a whole bunch of old usernames. Back when the web got started, I used Malaprop, and then a bunch of people thought of that same one. And then I used variations on my name, but my name was not unique, Peter Harkins. There are a bunch of others. There's even like two other guys with that name in the Chicago area, in addition to Commander Peter Harkins from Star Trek Voyager. He's got a tiny role in like four episodes, but kind of funny to have a Star Trek character named after myself. And then I settled on PushCX because I had picked up the domain forever ago as a blog, just because I did assembly language as my second programming language. And I thought it was funny that there was CX, which is one of the x86 assembly registers. And then I've been using that pretty much everywhere for chamlis_ thanks for the stream
i don't know 10 or 15 years something up there all right well this has been the lobsters office hours stream the next one is scheduled as usual for monday afternoon at 2 pm so i will hope to see folks then yeah thanks for swinging by and figuring out that csp bug jamless in addition to all your other contributions and yeah that's all i got i'm not gonna why is this one so slow we must have touched oh it's the i'm i'm deploying the thing with the checksums in the bundler lock file, and that bumped the version of bundler, so that means reinstalling all gems, and so we end up with like a 90-second deploy instead of our usual 25-second deploy. On the other hand, that's so much better than the 11-minute deploy we had with Ansible that I'll take it. All right. Well, I hope to see folks on Monday. Take care.