It was kind of great how ugly the early web was

Streamed

One-year anniversary of Lobsters Office Hours. PR review for extracting to_html_label. SQLite progress. A ModActivity model based on the new Notifications to combine notes and moderations into a single activity stream. Reminiscing about early web development: debugging CSS, how terminal colors grew into the 216 web-safe colors.

scratch


topics
  PR review
    extract to_html_label https://github.com/lobsters/lobsters/pull/1700
    peek at sqlite progress
  idea: ModActivity model
  x Notification combines Message and Comment
  x use the Notification model to combine Notes + Moderations
  x would let me combine tables on user profiles, easier to see history
  x /mod have activity stream
    also the single-story modlog table could include notes
  mod work queue


title

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:50ChaelCodes Hello! Happy Stream Anniversary!!
Frici PartyHat it's an anniversary woot.
Ah, hey, Chael. Yeah. So I looked back at your six-year streamiversary. You are way more professional and produced than this, where, like, you know, the biggest fact is you don't have syntax highlighting. Anyways, fun stream. So let's see I don't actually have a giant to do list or special everything to do this is just going to be one more the usual. that's a. that's Community sites in a nutshell nutshell every day is another day. ChaelCodes The biggest part is the story and the audio and you've got both! โœจ
So let's take a look. Because when i'm not chatting about stuff on stream. I work on the site. Yeah, you know, most times I have audio. chamlis_ congrats on the anniversary!
Sometimes the stream starts with Fruity or one of the other regulars pointing out that I've forgotten to do the work around and my audio is terrible. So this is Lobster's office hours. pushcx This is Lobsters office hours, feel free to ask about the site anytime!
Hey, Chandler, speaking of regulars, nice to see you.

04:18Epic_Ninja_Elephant Happy 1st birthday, Office Hours! You can basically walk now.
pushcx https://github.com/lobsters/lob…
yeah i saw you opened a pr we should go look at those i mean if anybody has questions about the site just throw them in chat anytime we kind of bounce around that's why i have the the scratch list so i don't too bad lose track of what i'm talking about but we've got a couple of yeah two prs open and i already peeked at this one so i'll just catch you up on it real quick this one is extract to HTML label. It's a refactoring. We had a place in the hat model that generated HTML. And in this sentence, I didn't mention So the PR here is pretty straightforward. It lifts up the code and it puts it in a class named helper, but it would also really benefit from getting rid of all of this low-level HTML manipulation because I can read this code and have reasonable certainty that it's not introducing cross-site scripting attacks. Or we could use the tools that Rails has for doing that and It's not going to break if somebody makes a quick edit. Hats are one of my favorite features on the site.

05:51WhiskyFueled42 hey, hope you all are doing well
So, yeah, I asked for more refactoring on that one. pushcx https://github.com/lobsters/lob…
Hopefully they are feeling more generous. This other one is Chandler's. All right, welcome. so let's see whiskey fueled the actual conversion of forms i so jamless i i really like your idea of one day getting rid of floats all across the site i think especially for our Pretty straightforward layout needs. Between Flexbox and Grid, we get pretty much everything we want.

06:53Yeah. Floats are so hard to build intuition around. And it was so painful before Firebug. mutation request page. Frici Having hats off until you need to have a more official voice and then off again is such a good way to handle affiliation def a fav feature.
Oh, nice. Let's.

07:23chamlis_ I show my age, but I can't imagine what web dev was like before decent layout debugging
Yeah, and I mostly like it as a reader. Hats are so useful for understanding the context of A comment so there's a thread I don't think it's web dev before late it was it was painful like the two biggest pain points were. layout debugging issues and. debugging javascript because every time you would call how was it window prompt window dot alert Epic_Ninja_Elephant @chamlis_ First, there was no HTML. Later, we had tables.
If you passed a JavaScript object, you would just get square bracket, object, object, close bracket. Like, come on, what am I supposed to do with that? A lot of the layout stuff, because the way margins collapse into each other is it takes a while to learn all of those rules. And then the way margin and padding are kind of different And so the go-to debugging technique was you would grab one of your CSS rules and you would make the background color green or orange because the pure CSS green and the pure CSS orange are kind of wonderfully obnoxious colors here. chamlis_ @Epic_Ninja_Elephant this made a lot of people angry and has widely been regarded as a bad move?
So let's, we can say that the byline has the background. Background color green. And you always use background color because it's a dash, isn't it? ChaelCodes LUL
You always used background color because it didn't change the layout. Yeah. Isn't that a I can't even imagine a layout that this color green would have worked in because this comes from back when there was a 216 color web safe palette era or that was weird. Angie. Yeah. So I would go between green and orange to figure out like what are the borders of these things, so we would say green. I mean I guess it's fitting for a stream anniversary that I just ramble about being an old fart but yeah and then you'd say like background color green. Why is this one overridden because it's up here to maybe no. yeah so then. And it's funny because I'm doing this, I'm demoing this technique here in in the inspector where it's so fast it used to be a no you'd have your editor and you do it all in your editor and then you come back here and you'd reload and then you do it in your editor and maybe you like hit ctrl d instead of ctrl s and then you'd reload and you wouldn't see your change and then you come back here and you change it again and then you come back and you'd see two changes yeah let me save color palette as long as we're Yeah, there it is. I knew somebody still had it. So back when, you know, a high resolution monitor was 800 by 600 pixels. Epic_Ninja_Elephant @chamlis_ Oh yes. Big anger. Much upset.
Now, of course, that's the monitor, not an icon on the monitor. This is not useful. There was a pushcx https://en.wikipedia.org/wiki/W…
Actually tables were great tables were so great they were so much easier to do for layout then float most of the time yeah. So these web colors the first 16 and green is in there are riffing on. The old terminal colors so if you're like oh hey there's like 16 colors here and they're all like hundred percent intensity in one of the channels or 50% intensity in the channel. isn't my doesn't my terminal have terrible colors that look just like this and it's really only in the last like five years that terminals have said hey what if we gave you a nicer set of colors than this like hundred percent 50% stuff.

11:54And then because HTML originally was written for people to write, instead of saying color and then a hex code, it shipped with a bunch of names. I always liked the salmons.

12:17chamlis_ when I was ~11 I made a website for a school project where my aesthetic sensibilities were "the more different colours the better"
Yeah, dark green. Such a terrible color. And then... Early on in low resolution. A lot of monitors were 256 colors but because the operating system would return some and there were some cross platform differences, I think there was only 216 and I don't know why I keep coming back to that number doesn't even appear in here or am I miss remembering. Maybe it wasn't oh no here it is 216. Yeah, I haven't thought about that in 20 years. Chambliss, I think that is an excellent sensibility. The other very important early web sensibility was as many fonts as possible and as many gifs as you could download. Oh man. It was kind of great how ugly the early web was.

13:30ChaelCodes Ruby Gems
ChaelCodes Marty and David
wasn't there all the way from the start i just heard an interview with who is it so there's the ruby central podcast they just started a a podcast so ruby central is the non-profit that there it is or no wait this is rails the ruby gems podcast i think that's it yeah i don't want apple's page don't they have a This is just some random site. ChaelCodes I didn't see a website
I guess it's so new they don't yet have a homepage for it.

14:14Ooh, I don't know who this is. No, this is nothing about that.

...27Yeah. So they interviewed pushcx https://www.buzzsprout.com/2509…
ChaelCodes Me too!
sarah may i just listened to it this morning while oh this looks very home page shaped all right i'm gonna assume this is official because you know i looked at it for three seconds but it has you know the folks it has an about tab right if it has an about tab it must be official oh god stop making noise But one of the things, yeah, she shared memories of the early internet as before the internet had cats. ChaelCodes They are releasing it on Buzzsprout... so kind of?
Because she was online before web browsers even had images in support. Frici the dark times of the Internet
I remember early on, you could visit a web page and then if it had a JPEG, that would open in a new window because it had to run an external program to help with that file format. Epic_Ninja_Elephant Images would load .. progressively.
I mean, it was dark in the sense that you used a terminal and a lot of that was what we now call dark mode, but it was a very human scale kind of thing where if you wanted to register a domain name, well, that's a bad example because there was only one company you could do that with. But a lot of the stuff that you wanted to have happen was you just find the guy or the small team on a mailing list responsible and you email them. And then in their free time, they would set it up for you. That was how infrastructure happened. It feels very small town. So yeah, I'm not going to be streaming on Thursday because I'm traveling, and I am traveling to... I worked this out. The metro area of the city we are going to is the size of... Where are they? Chicago community areas. I want to say this is a Wikipedia page. Yeah. So Chicago is broken up into 77 community areas. This is mostly but not entirely the same as... neighborhoods these are a little bit bigger than neighborhoods and the neighborhoods or if you ask someone what neighborhood they live in that constantly shifts every couple of years based on like real estate desirability so like one here is lakeview That is an expensive neighborhood and so every neighboring neighborhood would be like oh yeah we're like few and then lakeview started calling itself lakeview East and then they had another name for it, just a couple years ago, so that kind of dances, but the Community areas stay the same. Long story short. We are going to a city where the entire metro area is the size of our Community area and the next one like that's the population is two neighborhoods. So it's kind of funny it and it has that feel like all of the web design feels very early 2000s and.

18:07So channels I didn't see that this was marked as a. Draft and at this point. These are becoming pretty formulaic is this ready to go. yeah, this is a short one.

...30chamlis_ it should be, everything looked good on my end
What was the typo.

...44Why remove the size attribute from this password field?

...53I guess we, I mean, this is the 2FA page. I'm pretty sure all TOTP codes are six characters, period.

19:21chamlis_ I've done that in most of them as they're getting sized by the CSS grid
Oh, right, it's not limit.

...30Oh, this is the typo? Yeah. All right.

...45Well, then I guess let's get this merged.

20:00Wait, that's not the, I never remember in the UI, there are so many types of comments here.

...20You split up your comments.

...28chamlis_ just checked MDN and yeah size determines the visual size not the size of the value
All right. And then I think that's it for pull requests that need attention right now yeah.

...40And then issues. and fix the sorting. Was there a. issue I closed between streams. yeah this one. I got check this out on stream right. That was a nice one to get solved. pushcx https://github.com/lobsters/lob…
Oh, so there's this big one about number 539 is our big one about moving to SQLite, and Thomas was active in here. So if you want to check it out, there's some interesting comments about... Ah, great. Yeah, it's like colon limit to limit the number of characters, I want to say. But in any case, he's getting down to some fairly fiddly stuff. Seeing that he wrote some user-defined functions for things made me wonder about the validity of the shopify benchmark based on the lobster source code because some of that is that's a little puzzling whether they're really running all of the queries because i don't know i don't remember where we use regex in a sql query twitchtd hi pushcx
standard deviation is used in one background job so maybe they just didn't turn that on anyways nice progress happening there ah hey thomas i was just looking at your pro request and talking about how there's great progress And I was talking about variable colors back in the old days.

23:16Epic_Ninja_Elephant Is there a switch in the codebase to only allow logged-in users to view posts?
No, no, there is not a switch in the code base to only allow logged in users to view posts. the closest thing we have to that is the direct message where if you message another user that's private to the two of you but there hasn't really been a perceived value to that and a lot of the times folks look at our invite system and assume that it's about like Epic_Ninja_Elephant I'm being asked to run a closed site for a group of people who are often harassed, so debating my options.
holding the clubhouse of the cool kids and it's really mostly just spam control it has some other nice knock-on effects but mostly it's spam and I don't know we're we're discussing a set of topics there's not a lot of secret stuff happening on lobsters the one place I've considered something like that would be And this is kind of close to what chill codes is making is. A tool for lobsters folks to say that they're going to go to an event. Ah. That kind of thing you could run that with our code base our code base is very link centric you know every discussion almost starts with the link so you'd have to touch that if you're not but the. The other part of it would be the authentication. authenticatable. yeah so.

25:07there's this method require logged in user. And if you went through the controllers, pretty much everything but login controller, and added, you know, before action require logged in user, there you go, there's your basically private site. Actually, I would probably invert that and do it up in the application controller and then in the login controller, I would say skip before action require logged in user. That way you don't have to remember to add it to every new controller.

...57Epic_Ninja_Elephant I'll take a look, thanks.
Anyways, I was just talking to someone about starting a community site, not specifically with the Lobster's code base, but One of the things I tell everybody who wants to start a community site is it takes quite a while to get the flywheel turning. With lobsters, I spent 18 months submitting 12 links a day. That is the kind of thing that gets somebody to come back every day. And once people come back every day, they realize other people are coming back every day after a while. And then they feel it's worth their time to leave a comment. If you start a new site that has nothing on it, even if people show up they'll bounce off or they'll go well yeah I could write a comment I could say something but. it's going to take a while or but it's just not worth my time, you know i'd just be shouting into the void.

26:57So really nothing there with issues, I must still be on the branch here. ChaelCodes Well, and sometimes people take time to warm up to a community and add it to their routine.
no where was the branch mod activity so this started on the last stream but mod activity is trying to clean up ChaelCodes I'm still lurking on lobsters and liking stuff.
for moderators, a bunch of internal displays of things. Yeah, yeah, Chill, that is a great point. Epic_Ninja_Elephant In this case, the community is there, they just don't have anywhere safe to meet online.
And because it's social software, Epic_Ninja_Elephant Err, in my case, that is.
The only cadence that works is daily, is you have to get people to create a daily routine where they look at the site before they'll decide to participate. Ah.

28:16Well, thanks to a lot of the code changes that have happened this year, it has never been easier to start a site with the Lobster's codebase. And I just touched up the README recently to break out development setup and then what it takes to run in production. So if you want to drop by the kind of development-ish Zuluk chat room, which is very quiet, but you can feel free to ask me questions as you run through this because I wrote this based on how we set up with Hatchbox, but without, it was all written like two months after the migration rather than written as we were migrating. And so this probably, you know, I know it has all of the settings, but it is almost certainly missing a step or doesn't explain something particularly clearly.

29:38Oh, look, and I've broken things.

...53I want to say I got to look at the diff here, but I want to say I was kind of mid refactor. to have this big join.

30:14And I've refilled all the items.

...29OK. yeah and then we backfilled and then there's the running the migration fake data why don't i see oh yeah there's the two hooks i added that i don't love but they are the effective way to do that make sure that the record is created every time a mod note or moderation log entry is created. Alright.

31:29So we're pretty much going to replicate the notification view. So the new inbox view. Oh, Thomas, still no bug reports about the inbox view. Still no feature requests for the inbox view. People are very comfortable with it. Thank you for being thorough in your pull request and working through so many issues. It was a very, very calm deploy and What last two weeks or so since making it the. Since migrating to it.

32:09All right. They're done.

...58So let's... This is going to be a... I never remember this magic comment. For the partial variables. Locals. I can't remember if it was locals or partials. So we'll say that. And the locals for this are just... Oh, hello cat. Cat just piled into my lap.

33:44Activities. Table, it should be. You know, I say. Table, but I think I'm actually going to make this. An unordered list because the current display is a table and it's a little painful. So we're just going to say. Let's model activities. Just have something here on the template. non keyword argument. missing a colon.

34:41This one's odd. I'm not getting a

35:02Okay, so it'll render here. Yeah, this is not the user who had some activity. Were they like a Wendy? Weber Mandy? I must have deleted the old ones already.

...54So that worked. I guess it's not length or it's count. It's not length. Because I thought it was both. Yeah, all right, it's both. What did I do on that other page? Hmm. Does it only work on some users?

36:23I must have had a typo or something. All right. Speaking of things that disappear when you reload if you don't save properly.

...59You know, Chambliss, you've spent a lot of time on the front end. So this is just me dangling project ideas. But there's the new herb tooling from Marco Roth. Oh, this is, I need the homepage, not just the stuff that's my fault.

37:35And the interesting thing here is the linter is available now, so we could start linting because he's even run this on our code base already. And if that catches issues, that would be pretty great. Why is this JavaScript? I thought the whole point of this thing was they wrote it in Ruby and C.

38:08chamlis_ oh nice, I'm sure that's gonna be much better than my ad-hoc awking
I thought this was going to be a command line tool.

...16Yeah, I'm sure. And then there's also the upcoming herb formatter. And my again, why is this JavaScript? I'm so puzzled. One of the things that was attractive to this was it's a Ruby project. ChaelCodes Can you look at the cli?
ChaelCodes See what the options are?
Well, I don't think Ruby Toolbox. ChaelCodes Are you using GitHub Actions?
search for is there anything here for herb and ruby gems we do use GitHub actions actually it is one of the most reused bits of code in the code base every couple of months I hear about someone who has used our workflow to set up their rails app with a build it's so weird why would they write this tool in javascript if it's a for formatting ruby templates i feel like i'm missing something very obvious about herb like the rb in erb is short for ruby the e is short for embedded but you can use herb programmatically in ruby as well as JavaScript for your node assembly. This is going to take me to the page I was already on, yeah. Well, I guess stream occasional viewer Marco Roth is not watching, otherwise he would have popped up to explain. why he made these choices anyways i really don't want to add a javascript i don't have it's not as bad as python was before uv but i really hate trying to keep a javascript development environment running on my machine

41:35I heard his talk at RailsConf 2025 was really good. Haven't watched it yet. All right. Anyways, I was going to say setting that up might be a fun project, but I don't know that I want to set up JavaScript tooling. It was actually a major accomplishment to get JavaScript out of our build. ChaelCodes The parsing is definitely in Ruby - https://herb-tools.dev/bindings…
Sped everything up, made the site a lot more easy to develop and reliable to develop.

42:15Yeah, that's why I'm so puzzled. And I don't know that I would get the feeling that someone would be like, yes, you know what the best language to develop command line applications is? JavaScript. like i don't i don't know how you get there it's not that ruby is you know the absolute best in the world it's just it's totally fine and you're making a ruby 204 ruby program so i think this just needs to be an if

43:13guess i'm saying i'm switching on if item.class all right not moderation mod no this is a an ERB weird thing. I saw this the other day, that you can't have a case without starting the first when. If you try and split those up by tag, it doesn't parse correctly. Yeah, so standard says syntax errors found, and the error that comes out is inscrutable like most of those from ERB syntax issues.

45:01just get something up on the screen here that's that seems good you know so one thing i have wanted for a while i think i even filed an issue about it maybe we can kind of nudge into this It was a design issue. I think that's closed.

46:01pushcx https://github.com/lobsters/lob…
Epic_Ninja_Elephant @pushcx Did you mean to push the 'jj st' file in the root of the lobsters repo?
I was thinking of this one for separating out the moderator UI. So you've probably seen logged in as a moderator here with this fake data. A bunch of this stuff is only visible because I'm moderator. And that's like this email, these activities, this box about flag stuff, this box. and notes, admin stuff. I think it would be really good if they had just something that set them aside because some of it is like all of those things are fairly clear, but here I'm seeing these things because I'm a moderator and this is just a different state stories can be in. Did I mean to push the JJ stat file in the root of the lobster's repo? That sounds like I accidentally typed something into a file and managed to commit it. Yep. That's just a bug. Thanks for catching that, Epic Ninja Elephant.

47:30It's not master, it's main. I finally did rename it. And I sorted out my branch issue off stream. I just deleted the remotes and did it again. All right.

48:01justmark84 today i learned ninja elephants should be doing code reviews
mostly did it so i can auto complete this command are you saying origin i guess i didn't totally sort things out all right yeah i mean everyone is welcome to catch my bugs and mistakes on stream i really appreciate it

...28must have oh i merged channels pr so i'm behind so i want to rebase this commit i just landed and on to main and github There we go. Isn't that nice? There's none of this attached head and tried to push but you're behind. There's this repeated warning that because I just bumped the jujitsu package a couple days ago. But otherwise, it doesn't get freaked out that I tried to push while I was out of sync with remote.

49:30Good. Let's jump back to mod activity. And let me figure out what this config, jujitsu config, what is this warning about? I think it's just fsmonitor. So it's not core fsmonitor. Now it's fsmonitor backend. that's they renamed an option i did the obvious rename that is suggested by that message it's fine now cool oh yeah god i totally lost the plot that i was going to do this Story merge for factoring. I'll have to come back to this.

51:03It's not this. I want a barber pole. One sec. I only want part of it.

...39So what I want is something like this repeating linear gradient. Just for background size, maybe. Because what I'm thinking is maybe I could just make like that red and white stripe like I was talking about and put it along the left or along the bottom. Well, I guess maybe if I with a before or after pseudo-element? chamlis_ can you use that function in a border?
Yeah, I don't want a rabbit hole on this.

52:28Possibly, but I was looking for things that don't affect the element size.

...44yeah because if I do, then the elements sort of has two different sizes, based on whether the user is a moderator or not, which is it's kind of a lot. Whereas. If I put in.

53:06yeah maybe this is old scar tissue showing that i'm less willing to resize an element and more willing to add an element with its own size this might just be scar tissue around magic margin and padding all right i'm gonna i'm gonna punt on this i don't want to dive into css and fight it because that's that's a lot let's just do this so we'll give these a byline. And oh, you know, I can grab. So I have a table up here, and I want to get away from this style, because it doesn't use the space well. then it occurred to me like oh well what if i did like a comment style where there was a one-liner top and then this main text because these these generated ones are very short but often a moderator note will be significantly longer yeah So looking at that, what are my nouns that I care about? I care about having a time, which let's just grab that off the comment.

54:55Set time.

55:03Oh, I bet it calls that time ago, a long ago label. Yeah.

...24I just wanted to see the markup it's going to use. I guess I should have just flipped one over there.

56:10A lot of the reason to print this detailed timestamp was just because these are split up into multiple tables. I'm okay using the relative times if they're all going to be together.

...52In which case, why don't I just call this Hilgr? Because I'm just recreating it.

57:35good where's my title though i said how long ago not how long ago there we go graefchen Hello limesHi
then i want the moderator who did it which the moderation is the ma the item the i think it's just moderator hey griff How is this name? Shouldn't be able to be nil. So this has a, let's just say MA attributes for a better view of this. So I don't actually need all the.

59:18So.

...46define how is it how is that I can print the moderator and get a user object but if I print the username I get an exception it does make sense so user object okay i feel like i'm not firing on all cylinders this stream I'm missing something I guess here. Let's play in the console, I guess.

01:01:03Oh, and the console, you're totally fine with it.

...11Huh. So this is a great chance to become a channel VIP by pointing out the bug that I can't spot because I'm very puzzled right now. Why would number four be nil if it's a moderator? or a moderation.

01:02:06let's see if the debugger is set up properly i bet it's i bet it's fine this time in the loop and then this next object that isn't printing one is the one that's throwing the exceptions So we went through around once now we're on two 29 moderate four and we have an invalid. Oh no, it's not invalid. I get it. This is all right. Some types in SQL.

01:03:10so if we look at like the mod notes table we have this kind of thing that's the notes for a moderation we'll say it was or actually

...43Yeah, we do this.

01:04:05Need to debugger. It's not mod dot, it's ma dot item.

...26better.

01:05:15I'm just supposed to be up in the byline. It's separated, and I'm not going to get nice and dense from standard RV, so I have to pay attention.

...49Here yeah i'm just gonna. guess i'm going to replicate this logic. Because if I don't. it's going to get reused and break in a weird way somewhere, even though everything should be about. Well, most things should be about the user.

01:06:50This is going to be a one plus center because we're walking to another set of associated objects. As much pain as it was.

01:07:09It's just going to have to be that way.

...34Let me expand. It's got to get closed.

01:08:10Here we go. Need a paragraph break, but that's about it. Oh, the reasons generated by the fake data are pretty blah instead of putting stuff in, right? no it's i didn't put the didn't access the right field i thought the fake data just generated there we go that's better okay this is pretty reasonable and then if we go to the mod note table Let's grab this general setup.

01:10:00graefchen I must say I kind of like the erb syntax. limesLurk
so you can say when which will be the created ad i mean i i started web programming with php and like late 90s so it's fairly comfortable for me but I don't like it I actually it's not so much the syntax as it is the whole way it works is I kind of call it string soup because I can do things like this like this is not going to produce valid markup even if i you know so there we go that's that is valid erb what am i going to get out of that not not anything good this is a web framework why would i want to make invalid html why is it like so easy to get invalid html out of erb i would like it to be hard

01:11:34And it's not that I often inject ERB into the middle of my, the words of the tags, but I do have them in the various attributes, like the list of classes, and that's very easy to get wrong. So let's just grab this.

01:12:02So if there is The note are white. So some of these notes come from the system itself. I guess we better know what that is. So let's say first word here is mod log. Moderation. Let's keep using the term. Could say public moderation. And mod log.

...40And then this one should start with no. It's going to be hard to read if they're all if they start with the same three letter prefix. So we'll say no and public log.

01:13:03I guess I'm trying to make sure it's going to be clear to mods what's public and what's not. so we'll save that oh yeah so there's kind of the way notes get used for an activity or a thing a moderator leads but then also a moderator can note a dm conversation has made this code kind of painful let's just see where i get here

...49it's not no at this point it's ma item that's pretty good actually like i guess i could add the zebra stripes or strip the numbers out just kind of Compared to this, it's a little easier to scan this, but that's very close.

01:14:3750, 25. All right. So let's style this a little. No, I don't. Do I have any styling around notes? No.

...59Mod dashboard. Alright, so I guess we're in the neighborhood of what I want. Oh, big sir. I don't know if the mic picked that up, but the cat gave a big sigh. He has a incredibly busy schedule of bothering me in the morning, and then hanging around all day. She's taking a big sleep on my desk. We're gonna call it activities, plural.

01:15:57speaking of things i'm getting tired of this tab indent on css could go we serve it gzipped anyway so the difference between tab and spaces is after compression so i feel like these could use graefchen Sleep, Eat, Repeat. limesGiggle One of ours is currently sleeping in a warm and comfy bed in my room. limesComfy
something if I put back and I made these a dot instead of a number because the number is just not useful there we go that's I'm kind of thinking of like as I'm coming and scanning I want to be able to scan across these sleepy repeat yeah Are you riffing on the Emily Blunt Tom Cruise movie? What was that, Day After Tomorrow? Surprisingly not bad. Especially for a sci-fi movie with time travel in it.

01:17:23All right.

...34graefchen Not willingly. limesGiggle
This actually seems really clean. So if I come over here, the the tagline and I think the original title for the movie was like live, die, repeat, something like that. Live, kill, repeat. Yeah, see, here's just a classic N plus one.

01:18:09And it's only for moderators, but it's still not great. Let's look at making things harder for Thomas by adding more preloads.

01:19:02really okay so let's let's lift the mod activities up out of the view yeah that's why i don't see it right now view user show

...38so that's let's get this working and then i'll make it pretty well let's get this working and then i'll cut my teeth on the next part of it right what are we mad about the comma is at the end. Defend method each for nil. It shouldn't be possible for it to be nil because the partial should demand it.

01:20:48Yeah, like this table does that table does. Doing the same syntax. It's a weird one. Anyways, the fix is easy.

01:21:39And then and then the fight of model So it's not just that I want it with item, it's that I want to eager load all this nonsense. Let's see if we can. That's what I want to say is, well, I want to have, no, this is not going to work. I'm going to get the failure about You can't eager load when it's a polymorphic join, right?

01:22:38Because here, how would it know that the item is going to go look at the moderations table rather than anything else? So if I said like includes item and then through item includes the moderator. Just to get one of those fields. What's my syntax error?

01:23:46Not an exception. This includes ignore that part.

01:24:03See, look at this, we're grabbing all of these different objects together. Then we're doing it again down here. I guess they're cached. So it's fine.

...25Where if I said I want to eager load all of these things, cannot eagerly load the polymorph. And why? It must have ignored this. It's the only thing that makes sense, right?

01:25:23Sure looks like it loaded the stories.

...30Oh, but that's later in the view. That's down here, it's loading stories for up here and mod activities. It's if I said we took her story. And we're going to mod edit it, add that to the title, and hit save because.

01:26:04Reload. I literally don't see the moderation. But it was by Weber Mandy. OK, so two bugs. We failed to create a mod activity for that moderation. But I added it to the model.

01:27:05It has already been taken.

...26Yes, we we did get a moderation. It just didn't appear here. did get an activity object it just didn't appear here because we're not selecting correctly i guess yeah because we don't want just the ones that are about the user we also want where the moderated item, like the story or the comment was created by the user.

01:28:26Okay.

01:29:07That just gets me an error. Say plural. Is that going to rewrite my... Say reload. And then I said on activity user is user slash webber mandy. To SQL.

...45Snap. Pick on.

01:30:13taimouraaa hey hey
something about can't inspect the object huh ah hey timers time model raw there's no s at the end hmm

...46taimouraaa haha just added random a at the end lol :)
so mod activity is kind of denormalizing i almost want to denormalize further and make it about a specific user at insert time to avoid this kind of thing ah well we also have a user here whose username is twitch td i suppose because he's on twitch and td was already taken

01:31:18Only hash symbol and array are allowed. So I think it's this.

...38Yeah. So that's basically and items left outer join. Oh, it's I need the text there because that's just a error. Does that run? Yes. Can I say where? Comments. user id is this cannot eagerly load it's funny like i can eagerly load unless it notices i'm eagerly loading and then i get an error i swear some types in sql and this is row level rather than column level.

01:32:51But if I don't tell it that I didn't taimouraaa I was just checking out some opensource project. i did setup lobsters locally. I can look at some issues
I'm selecting the wrong direction. Oh, great. You want to talk through any of the issues in the repo? I'm just busy beating my head on things.

01:33:48pushcx https://github.com/lobsters/lob…
And I guess the question is, what's your familiarity with Rails? taimouraaa I mean i haven't checked them yet but can pick up something interesting.
And are there any particular areas that you're interested in or disinterested in?

01:34:20Okay. taimouraaa Can start with some bugs.
I mean, I can leave it to your judgment, but if there's anything you want to talk through, let me know. We can click in.

...39Oh, well, I have made lots of those for you.

01:35:06taimouraaa haha great.
Yeah, this really does have to be down here. Trying to figure out all the things that could get joined here. And so it's like going to do stories.

...51graefchen Bugs are like the breadcrumbs left in Hรคnsel and Gretel. Left on purpose. limesGiggle
That ought to get me the moderation item I was missing. It did not. That's painful. Because what I expected to see was that one where I just edited the story title.

01:36:21So here's my big query. Really, there's no store user ID or the stories. Are you a string? Think that's fine.

...56yeah so why didn't we turn that up because the user id is null because i special cased that one so wait let's bring that down so i'm going to go in the order of moderations things yep here we go

01:37:24So change that title did not actually change that description, but okay.

...35it's a little annoying.

01:38:24yeah it's just this pattern moderation the user id is null or moderation's user id is this user and then on this one wants to be mod nodes this is sort of the opposite of coalesce or I guess I would say I'm coalescing with the user's ID. It's a little strange. All right, so now, okay, so now here's everything I expected. Except also, We're not saying one of these things has to be true.

01:39:30So got to do the join. And then I think there's a way. to replace that question mark with a variable name. there we go named bind variables all right so so this becomes user id then this becomes user id is that

01:40:48Because so the reason I'm doing this is one of these things has to be matching, as opposed to they could all be false. And that was implicit when I had two conditions. Not so much. So it's this or no, but that's always going to be

01:41:24So what am I trying to say? I want to say where it's a mod, no, it's user ID is user ID, or, right, like it's about that user, or if it's a moderation, yeah let's actually say that in parallel so we'll say this

01:42:23Things we're doing to avoid... Well, this one is an endless one. This one's filtering. But this is sprawling.

...46Either moderation is about them, or... comment is about them is by them or story is by them and of course i want to swap these so i have to do that and that's all of those rows and then we have some kind of basic syntax error

01:43:33don't like cure doc oh is it the one that wants to be till day or is it mad because yeah doing cure doc followed by a comma is there's some cork to that i never remember it all right good enough

01:44:13yeah that query is getting kind of large will it run no it will not oh boy what's the error it's this because that's a bad edit all right so that one runs okay so we have a shorter page which is good have the stuff about the user we have stuff about them ah we have a deleted a comment we have changed a story why is this reason like in brackets

01:45:13It's a weird one. Let's delete another comment and see if it happens again.

...30Did not. Huh. I wonder if that's fake data then.

...55yes because of this paragraphs so instead of paragraphs we'll say so we don't say write sentences or paragraphs we don't delete those sentence and then is there can i pass this a range

01:46:42All right, so where does that get us?

01:47:01Gets us kind of a big query with a lot of string interpolation.

...17I love it. And that's certainly causing one plus ends, right?

...32Yeah, look at these. Because it's going through the join, it's just hammering the shit out of that. Any chance I can add another includes? Probably not.

01:48:02Because even if I had it, I would have it through a polymorphic join. Yeah, it's just going to error on me.

...15Oh, I didn't think of this when I started on this refactor. So do I want to throw this whole branch away or accept that it has a big n plus 1 until Thomas moves us to SQLite?

...47really do want the nicer combined display like here if it's a moderation and it's a comment i'd like to say

01:49:26I do this in the same order, don't I? Story can't be a tag, can't be a category, can be a user, can't be a domain, can't be an origin.

01:50:51So if we grab a render of this detail, we have our flag stories.

01:52:02missing partial common comment is it plural it's plural missing local comment except i provided a I have to do locals.

...45up here. There we go.

01:53:06so now it shows the comment that the moderator deleted in line which is a little ugly but very useful because very often when i see like deleted comment and then i'll have a reason like don't insult people because they disagree on tabs for spaces That one's fairly clear, but sometimes I'll just write, don't insult people. And then I'm like, what did they do? Because some insults are worse than others. Some are like, you're dumb. And some are, I deny your fundamental humanity. Yeah, and then it's always going to render the current version of the comment, which is fine. It's pretty rare we undelete comments. We don't need to show this, right? Because we already see that Emily did this.

01:54:38let's put the ma item moderator why do i have to pass to oh i'm passing at user because users can turn those off

01:55:14It's nicer. Down in the mod notes, I want to do the same thing, right?

...44Yeah, I do. A little bit funny. Oh, this... Li... Because stories expects to get rendered in a tree.

01:56:41yeah i'm coming back around to wanting those zebra stripes back especially for these longer comments so it's got to be a table data huh what if it

01:57:46That is a very subtle difference. Maybe too subtle. We don't need this arrow.

01:58:23I don't want the ma that gets me the notes created at that's better.

01:59:13peek in a rendered template on the live site.

02:00:14It doesn't need to repeat the recipient's username because they're always going to be on Webber Mandy. And I was comparing against that, so all right.

...45put them in a detail. And what if I could turn that off? Sure, that's an option for the comment. So

02:01:49Let's look at the story. No args. All right. So this guy is outdented. I don't like that.

02:02:25why is that up at the top level it must be invalid markup getting shoved out or something so if i said give me a ul yeah

02:03:07That's nudging all the way out. Not what I want. I'd rather have it indented. Just got to get rid of that extra padding.

...45Thank you.

02:04:22Why do you have a bullet when I say you shouldn't? Because I'm missing a semicolon.

...43Okay.

...57all right this this actually feels pretty good except for this bug what the hell is this bug that shoved everything Because I did not actually edit that story text. Let's go find it and cause it again.

02:05:42So on this one, change two to three. Scroll down without changing. Go two to three. Save. Reload. Maybe I typoed in it or something. Okay. I must have just accidentally nudged the field and I really don't want to go through it bite by bite trying to figure out the difference because we just smash it down to a string. We don't store this as like a list of attributes. God, that would be a nice thing for when we have JSON.

02:06:57So the thing that's annoying because this is here is I want to look at this and say, oh, this is what it looked like at the time. But this is the live version.

02:07:15And that gets kind of confusing down here. Where it says.

...28Oh, you change the title from blah to blah too. And if we look at the rendered story, it says three.

...46So I've been thinking about event sourcing. Because otherwise you have to manually one off everything.

02:08:06Let's bring this over to the story view because the story view has. Mod activity. But it has additional activity where it's not just the submitter. So is there an example in here? Yeah, so.

...35This comment was deleted and then later undeleted, it looks like. And this is just a thing that happened on this story rather than about the submitter.

02:09:25Let's grab this.

...33Then hop over to story show.

...41If you are the moderator.

02:10:08So instead of doing that, then that. So what's happening here is this shows everything from the last couple of months. Then this shows older stuff.

...52Because sometimes. Sometimes you want to see everything that's happened around there, but it's like with the submitter of have I had to tell this submitter to cut down on self promo. But honestly, I guess I just click over to the profile for that. Yeah, I'm not sure how much. value there is to doing this change. Leave that alone for the moment.

02:12:08Alright, that's pretty good.

...38Now sections I deleted are going to want to come back. Right now, if I want to put this on a moderator dashboard. Yeah, this needs to be general purpose. And that username I deleted on the note is to come back, doesn't it?

02:13:20All right.

02:14:36all right so there's all that yeah

02:15:18Thinking through whether to just ship this and call it pretty good. Or if I want to carry this over to the mod dashboard. Because this dashboard verse notes is this exact same distinction. And if I can collapse the two together, it becomes a lot more useful.

...58That's worth a new commit.

02:16:22So the root of you goes to there. Yeah.

...55Nobody uses that, do they? There isn't UI for that. That's dead code.

02:17:52Don't love it, but it's in the namespace, right? No, no, namespace will automatically be fixed, I think.

02:18:38That's, that's fine. So that's done. That's done. That's done. That's passed for now.

02:19:13Let's do that in a minute.

02:20:03twitchtd how long will you be out for starting next thursday? I just remember hearing you're going on vacation?
Oh, yeah, so I will be out... Let's double check. Through... So, out tomorrow and through next Thursday. So I will not be streaming on Thursday the 21st. correct and then so the next time I will stream is two weeks from now Monday August 25 which can I put that on the Twitch calendar before I forget oh who the hell knows where that is right I look at which TV which CX you get an Ouroboros where I'm seeing what I wrote a minute ago How do I get into the calendar?

02:21:10Or is it called schedule? Nope.

...28OK. Can I edit my schedule?

...40So I'm getting the schedule set. Oh, man, this control. That is rough UI. All right. I will be gone the 21st. We'll just say through the 22nd, starting tomorrow. So this is not a vacation where I'll be hard offline. It's just I will be busy on other stuff and less active than normal.

02:22:56Oh no, this is that post route I deleted. And I think the user page posts directly to it, doesn't it? Yeah. I got to put that route back.

02:23:28This goes away though.

02:24:32it's a little bit shorter i mean one kind of a period on it well actually never go back that far so i just where created

02:25:34Let me just say. Then we will create a new. So in users know. I had just this. Hi, buddy. I don't know if you can hear the cat. He's all wound up. He must see a bug. Be good. Be good, sir.

02:26:10Alright.

...30graefchen he scared me for a bit. limesD
So this becomes activity HLB. Yeah, he's very fierce. I'm a big fierce baby. Well, you're a baby. You all worked up.

02:27:19All right. The cat is appeased. And I'm just going to, I guess, drop that stuff about having a period.

...54Let's see if that works.

02:28:01OK. Flagged. Oh, it's got to be, I put it in the mod directory and it needs to be under flagged. Although at this point, it's just kind of the top level. Yes, let's make a controller. This doesn't have anything in common.

...45I guess it wants to be plural. Yeah. Let's remove this and the directory I just made.

02:29:18So this becomes app controllers mod activities controller of RB.

02:30:07okay did that route not save route did not save better and instead of add activity it's mod activities created at is ambiguous that's Wow, how did I not get this query error before.

...57You want to show me the query you're showing me that because I said just give me all the activities from the last three months. I should have said mod activities because it's a new query. That's why I didn't see it before. OK. These are not ordered correctly. So we want to say with item where. Ah, the cat has finally worked it out. He wants to play fetch. So he is chomping away at his snake. You're probably going to hear some chair noises as I shift to that. These mod notes... Yeah.

02:32:07Okay. I mean, you know, redundant title, but look at that. So let's let's get rid of that.

...39So it really, really would love to have an incremental search. So I could search by like the user or the text changed or the reason given. or the story title, but that's a big project and we don't have any of the infrastructure like that.

02:33:30All right, so this is a big pair of changes, but it's also a safe one because All we've done is add a model and worst case scenario, even if this is unusable and everybody hates it, although we've talked about combining these things. I can just delete it and revert and nobody cares. Because the notes and the moderations are still saved to two different tables. All right, so I think I'm going to review these. diffs and then probably ship it.

02:34:15In which case, I'm probably gonna put up the last call notice here. Cool, one sec. Okay, sir. The cat thinks he's taught me to play fetch. And so if I don't play fetch, he gets all worked up because I've forgotten my trick. All right, so... Oh, and I guess I didn't talk about it too much, but I'm okay being a lot looser with code quality in the mod section because... It really only affects the couple of us. The stakes are just so much lower for a read-only feature where there's like five users of it.

02:35:39And this needs to be a separate commit.

02:36:05And then.

...24I was going to read that comment in my activity. This is about the scope.

02:37:15What's the word I want here? Is it obsolete?

02:38:21Why is the controller still showing that data? I thought I deleted that. I guess I didn't. What else do we have? And then the notes controller lost that view. Good.

02:39:07Yeah, actually, I'm kind of tempted to make a whole search parser from just an extra search engine for mod notes. So if anybody's curious, the Lobster's search engine has a whole bunch of operators. You can search for somebody who commented by a domain, by a tag, by title, by URL. I don't remember what user transforms into. It must be like commenter when you're searching comments and stories when you're searching stories. Yeah.

02:40:08And so if I had that, then I would have a search engine for these mod activities.

...28This is good enough for now. OK.

...36I'll think about that one.

...48I don't actually have any tests for this thing.

02:41:01let's think about tests for a second i guess really i could use a smoke test for does the mod activity page load but that requires a whole bunch of data in the database there's already one for viewing users

...34And it's kind of an implementation detail that having a notification or having a... Oh, these are fun.

...52Where are there three? I expected one comment and one story.

02:42:09the user show is now rendering let's take a look 46 146.

...53Did I have obsolete warnings? Why was this not triggered before? There were none?

02:43:28so this is this is rendered oh it's because it's because brakeman cares about the chain that got you to that model attribute it's not enough that that one call site is considered acceptable it's a fingerprint of the whole chain through and now that mod activity can go through both The MOD view and the user profile view. yeah so I know i've written this note before.

02:44:24Okay.

...45Let's see the whole suite run clean. Yeah, I don't think I actually want to test that an activity gets created. I think I'll just test the mod stuff if it breaks. Let's just have a smoke test for the controller and call it good.

02:45:16Yeah, don't even have one on the flight controller.

02:46:06let's

...37All right, and then we'll say story title equals replaced title and story dot, what is it, editor? Yeah, equals the mod, story dot save.

02:47:41I just had to save in the right spec requests activities and then store spec requests stories because I just messed with that.

02:48:18Green dot. If there's a hassle, it's gonna be about funny RSpec syntax around B6S. Or it's just gonna hang on me? That was unexpected. Why are we hanging? Oh, this other stuff doesn't need to be here anymore.

...48Didn't I just have a hassle where the test suite was hanging strangely? And I don't remember what that fix was.

02:49:11Is it even running this?

...24OK, so it is running now.

...46So it's hanging after the assertion? Or it's something about the response?

02:50:05Okay, it was something about that B success. B-E success.

...40what's this big error you expected to see replace title which was the reason what page am i looking at so it says mon activity the last few months shows the category i created But if this is newest first, something about that story didn't generate a mod log object.

02:51:40Set the syntax and change spec. Yeah.

02:52:07Get rid of that giant dash beat, can't I? Yeah, that's the back trace. All right, so it didn't create a mod activity, didn't create a moderation, right? Let's go and be reminded why.

...39I don't like after saved callbacks.

...49So we have a story title, we have an editor.

02:53:20Oh, buddy. We're not going into log moderation.

...41Hmm.

...51OK, so we did go in. We're not editing from suggestions.

02:54:32my kingdom for a rules engine, I would let you know which of these things was the case.

...58It did not set the editor. Did I? I said story equals mod, not story dot editor equals mod. Man, I'm tired. It is time to wind down the screen. Please go green. Yeah.

02:55:51OK. All right, that's that's reasonable.

02:56:16So let's grab. just this one commit onto main at GitHub. And let's go fetch everything to make sure we're up to date, which we should be. And then I'll push main. Yep.

...59And kick off a deploy. All right, so this has been Lobster's office hours. This has been the one year anniversary of Lobster's office hours. I don't know, seems kind of fitting to finish by showing off a very unglamorous part of moderation and maintenance that's just tinkering with things to make UI better, make things clearer. There's not a lot of like big bang, you do X, you get a giant improvement. There's just a lot of every day you take one step kind of things. It's sort of, I've likened being a moderator to like being the janitor, being the gardener. And this kind of code is very similar where it's not exciting. It's not super urgent. It's just one little improvement. That migration is going to take a minute to run. All right, well, I'm going to wind down the stream and I will be back in two weeks. I did set up the Twitch calendar. So if you follow that ICS feed, you should be all set. And Otherwise, I do hope you'll join me again in two weeks and I will see you around the site. Take care.