I don't think the data model forbids it, but it should
Streamed
Fixed a bunch of my bugs, like:
- comment stats from last stream
- my git misconfig that was checking gpg signatures
- accidentally-committed
if true
Some puzzles around PRs, then building out an admin feature for reparenting.
scratch
topics
x improving comment stats copy - fix "others'", explain use better
x peter's git misconfig
x how about that brave browser
x PR oddities
https://www.sbnation.com/a/17776-football
https://github.com/lobsters/lobsters/issues/1370
title:
and this game sucks
I don't think the data model forbids it, but it _should_
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
48Opening the volume control as a workaround for the buffer under run in the microphone so at least that part is working okay.
01:06I lost track of time this morning.
The exciting meta thread.
There's not a heck of a lot to say about it that I didn't say on the last stream.
But if folks have questions, we can, of course, jump into it because this is the lobsters office hours where we talk about lobsters, the site, lobsters, the code base.
Lobster now, that's a Chicago joke.
Lobster's the running process.
There's a... God, it's been ages since I went, but there's a really cute theater production in Chicago that they describe as the ongoing attempt to perform 30 plays in 60 minutes.
And it's really cute.
if you are ever in Chicago, this is one of my go-to tourist suggestions.
Cause it's just weird and lovely.
So I was going to make a joke that, you know, this is my ongoing attempt to perform Lobster's office hours in roughly three hours, but nobody would get it.
pushcx https://neofuturists.org/events…
Cause I don't know that many people are on the, on the stream and from Chicago.
anyways if you are visit it's great it's the performers write these short plays and every week they swap out some so it's just always new and interesting and weird i like it a bunch yay art so otherwise god i barely even remember to post tweets this morning i i got one on
One each on Blue Sky and Mastodon.
Alright.
Twitch really wants me to pay attention to some ad.
I'm not doing an ad, Twitch.
Thanks.
There we go.
So, last stream... Yeah, if you saw that flash, that was my browser from
the pagination attempt we did on stream like two months ago.
I still got it open to keep working on that.
But nobody was really interested in talking about that one, so I'm not going to get back into the weeds on stream.
And I burned a whole bunch of developer time this week dealing with dumb nonsense from bad actors instead of fixing things.
That's not so fun.
So on, let me turn on the server here and put back in the debugging.
So the last stream ended with a bunch of us kind of hacking on this copy for some stats that I've been using for recognizing self promo.
And I wanted to pick up right there.
The, since the stream, app page user show, caught one bug where a user pointed out that the numbers were just, yeah, Tig, yeah, Vim.
05:10Oh, that's really frustrating. Just trying to show the diff.
...26So somebody pointed out that their numbers were not really plausible.
And I think this was voiced by Patard in the IRC chat room.
Same username on the site, but I'm sorry if I'm misremembering who.
I didn't remember to stick a thank you in the commit message like I usually try to.
But this said that it was about users' stories on
others but this clause written that was up on the stream for i don't know 90 minutes so a bunch of people missed out on becoming vips by noting it was limiting to any story where the submitter had not checked the checkbox not necessarily
where the commenter was also the submitter.
So what we're getting at here is if blog author Bob had submitted a story, comment author Carol who responded to it would not have had her comment counted because it just cared that the submitter, Bob, had checked the box.
Not this slightly more complex thing of
Was Carol actually also the submitter?
This took a minute to hassle ActiveRecord into.
Some of the query composition is heavenly, and every once in a while it's just weird and complicated, and I find myself in the Rails console iterating on a query and calling toSQL on the end of it so that I can see the
output SQL to judge if I made the active record call correct, which feels a little bit backwards.
spartangtr you should be able to add SQL debugging for all sql queries in your rails config
I don't know.
I've only spent a little bit of time with the SQL, S-E-Q-U-E-L Ruby gem, but I kind of like it.
Yeah, I do actually have this logging on.
It's when I was working on this query, and also, hi, welcome.
Or not welcome, you've been here before, I think.
But when I was working on this query, I wanted to be able to iterate faster than tab over to the browser, click reload, view the console output,
And then especially because I use Vim as the terminal multiplexer, that usually means like switch Vim tabs.
So if I just had it up in the console, I can just, you know, hit up, edit it, hit enter.
I also have some IRBRC so that it prints SQL queries to the console as I'm running code, which is pretty darn handy.
Is there anything in there that I don't want to show on stream?
Oh, I say IRBRC because I'm old, but it's actually now a PryRC.
So I don't remember where I got this, but it's a snippet for if Rails is logged, recreate the logger to print to console.
And then also, if ActiveRecord is loaded, recreate its logger to print console.
Super handy.
09:34So even after this bug fix, I was talking with DPK0 when she's on stream here. and the numbers didn't seem to add up for her and i spent a second looking at it and what i realized was this description is not totally accurate so this part Comments posted in the last six months. Simple enough that it's dead on right. This posted on other stories is not correct. And Daphne had posted some stuff on stories submitted by other authors and very few of her own stuff. And so she immediately caught the discrepancy. Just the number didn't pass the smell test for her. And I realize this description is wrong. It's not just posted on other stories. It's posted on stories you didn't author.
10:44Which means like that. I was thinking about that copy, but it didn't click until I was in the sentence. And so then this name is wrong too on the clause. So let's fix that. And it's in model comment. So it's not just on other stories. It's on stories, not authored by getting a little long, but that's okay. And it also, it fits this variable a lot better. So that's kind of automatically it's, I was looking at this on other stories. And I was like, well, I'm passing in kind of by implication, who is the person that users are being considered other from, but it's kind of clunky writing. This reads a lot more naturally. So, okay, there's, let's reload, make sure I didn't make any typos. Nice. And I want to add back that and.
12:03No, I don't. Because then I kind of want to add it to the one before. I have a thing where sometimes this is one of those personal writing quirks where you write enough and you catch that you do things. Like I'm prone to using the word just. So if you see just in a comment, you know that I didn't reread it like I should have before I posted it. Another one is I'm really tempted to make these like sentence fragmenty lists, but then also make a grammatically correct sentence that's just broken across sections.
...42So I try and avoid that one. And as soon as I realized I wanted to write a bunch of ands in there, I realized what I was doing. It's a quirky thing that only makes sense to me. The other part is I realized because some folks in the chat room noticed this stats because they saw the commits go by and then I suppose clicked into their own profile.
13:10I can actually say how we're using this.
...21And part of it is just It's not so much about any kind of ratio, and I like presenting it this way so it doesn't look like it's a, you know, oh, this fraction. It's literally just, are these numbers zero? Because if they're like zero or one, it's been a really strong signal that people are only on the site because they want to link to their thing and try and get some traffic out of it. And I feel like just to kind of lower the temperature and make sure that folks aren't jumping to conclusions to say something like that. And I'm trying to think of like a way to say, yeah, primarily we're using this for like, just are these numbers not zero?
14:41Mostly mods want to see. What a phrase. If you have a better phrase, please feel free to pipe up. I'm trying to think of a way to say I care that these two aren't zero. But I don't want to say that's the only thing we get out of it. Because, frankly, if someone leaves one comment on someone else's story that's well received, that doesn't necessarily absolve them of using the site in an exploitative way. You know, it's a, oh, there's a science term for this, like it's a positive signal, but it's not a dispositive signal. There are certainly false negatives here.
15:42All right, so this is also made slightly more clunky by setting up the subject moderators and you, and then going back to just moderators. So maybe I just wanna say
16:18use it to evaluate use it as part of evaluating whether and then that gets back into this snippet whether we're using it for self promo
...45See, there's just my first draft always includes just let's just leave it in and come back for it.
...56So clunky.
17:05Yeah, so like, there's my shitty first draft, where it has my particular vocab quirks and You have to read back and be like the ladder to okay so there's former and ladder and ladder means later and ladder to come on. Not a good variable reference there. it's hard to write this stuff, especially while talking aloud to kind of maintain the stream.
...48answer doesn't post well received comments outside of their own
18:18their own links. That's not bad. How does that look rendered? There's something about going from monospace to in-browser Chrome that allows me to reread things and see new errors. Sections only visible to you and moderators. Mods use it as part of evaluating as there's a typo.
...50when evaluating whether users are participating in the community or exploiting the site for self promo. It's a red flag when someone doesn't post well received comments outside of their own links.
19:09Doesn't. Let's change doesn't to never.
...19That's really what that's getting at. Yeah, that seems pretty approachable, pretty readable. Okay. So let me, I know she's DPK zero on, okay, but she's no zero on the site. I just want to thank her in the commit message here. That's pretty reasonable. So let's add that. Come here. Fix. Copy comment stats. Copy improve explanation of mod use. There we go. And as long as I'm just hanging out, I'm going to fire that off. Go on. Watch me remember to actually run the test suite before I push commits up. Renaming one commit that's used on one page, I feel pretty good that this is going to be a green suite, but it's that habit. And it's so embarrassing. Oh, speaking of embarrassing, let's look at an embarrassing couple of commits I made. Let's see, yesterday. Yeah, so I'm going to kick off a deploy. Great. And then let's, oh man, my tabs are all out of order. Move that up here. Where's the terminal? Things that happen when I don't have five minutes in front of the stream to prep. Window manager.
21:36So, Spartangler, you were talking about things I could fix in my config. Har har. So...
...51I was working with the repo on my local machine, and I saw a really obnoxious set of issues... errors and warnings out of the git log where I was doing a you know the git log one line with the tree so that I could see the structure of stuff that's here I could just put it up it's my go-to alias for the git log just gl and all of these commits had big red warnings on them complaining that Git was not properly configured to check GPG signatures on it. You have to set, what was it? GPG.allowed signers file, like it was long. All of these broke onto two lines. It was really ugly. The GitHub UI didn't show me that Gabriel signed his commits. Gabriel did nothing wrong here. Let me start there. Gabriel, who contributed several PRs out of the goodness of his heart, is a wonderful human being who surely has done nothing wrong in his life. And, not but, and has configured his Git client to sign his commits, which is fine for, I guess, everyone in the world but me, because nobody else was seeing this log message. So I wrote this big spec with a big grumpy comment of, hey, we don't use GPG signatures. So this is a test that says run Git, ask it to show signatures. And this was the ninth commit after GMEM's contribution. And so like making this commit made the test pass because it pushed his commit down one more line. And so I checked like, does it have one of these error messages or messages indicating a signature and then saying, hey, I'm sorry, this is a big pain in the ass, but the log messages get cluttered up with errors about verifying signatures. And I don't want to require that every potential contributor take on the chore of integrating GPG there's this whole thing you have to do where you set up a file of allowed signers and then download signatures to it and i have wrestled with gpg before and i understand what it wants and why it wants because of the whole web of trust thing i don't even want to deal with that having all of the prep i don't want to explain that to contributors and have them see You know, because otherwise they see these big red error messages in their log. And so then I wrote the explanation of, all right, well, here's how to please not sign commits in our repo. And if you have already made signed commits, this, and I said, I'm sorry for the hassle. If Git didn't print spurious GPG warnings, I'd love to delete it. Prophetic, right?
25:22This was doubly exasperating because contributors are precious and I don't want to turn them off. And saying, hey, you have something in your config that you have to change extra special just for us. Oh, it hurt to write. I don't, I really don't want that. I even, so like one example of that that I don't want. Where is it? It was a small one. Here in gitignore, I added a comment that said, If you find yourself ignoring temporary files generated by your editor or operating system, you probably want to add a global ignore instead. Want to add? I should have said like to add to a global ignore. I guess it makes sense. People figured it out. So a thing that was happening was we were getting pull requests where people were adding, you know, the pull request would be fixing a bug in comment rendering. And then also editing gitignore to ignore like .VSCodeScratch or just like .tilde files generated by Vim or I don't even remember them, but there were a bunch of them. And I kept having this distraction on pull requests where I had to say to people like, hey, I don't want your editor config in your PR. It's unrelated. And also there is a proper mechanism for doing this so that I don't have to, you know, every project does not have to keep track of every editor in the world and ignore their temporary files. This was real successful because I added this and then people open the file. What is, how old is this? It's a couple of years, right? blame.
27:22Prior to this.
Oh, it's old.
Yeah.
Oh, actually, I didn't add this.
I did something to enforce it, didn't I?
arh68 so what about a file like .git / config , is that bad or what
Maybe I'm just misremembering somehow, but I distinctly remember there was a whole hassle with seeing a bunch of these in pull requests and then coming back and
I did something to this message.
All right, I'm not finding the commit.
I'm misremembering something.
I guess I'm remembering this commit, but... What about a file like .git slash config?
Is that bad or what?
No, I think that's totally fine.
I don't think it really matters.
No.
So anyways, the end, the embarrassing part, the mistake was, hey, you know how I said I would love to delete this?
Oh look, like 12 hours later, I got to delete this.
So on Mastodon, GMEM asked me like, hey, is it SSH signatures or just GPG specific signatures?
And I really didn't want to dissuade someone who has done
not just the very generous and handsome work of contributing a fix, but also G-Man went out of his way to break up his work into two parts so that I could merge it separately and keep some other stuff moving, which is like a double level of generosity.
And so like when he asked,
I was like, Peter, you better go look at it again one more time, just one more time.
And I was so reluctant to do this because I felt like I had already wasted half an hour, 45 minutes in the morning on it.
And I wondered, well, what happens if I rename my git config?
So I took my home directory, tilde slash dot git config, and I just renamed it away.
And then I ran the git log command again, and I didn't see the warnings.
i went oh no oh no even though i spent a whole bunch of time with git log making sure i had the exact reproduction for this you know these are the sets of switches to generate
arh68 ohh wth it was your own ~ config , is that what you're sayin
the error i'm seeing and i looked for the words gpg or sign or verify to make sure that my config didn't say anything about turning on gpg what i didn't realize was in the format.pretty setting that is used by the log command somewhere in there either i wrote this code
Yeah, it was my own config.
It was just a me thing.
It was not reproducible because it was just a me thing or other people who have opted in to turning on HeyGPGVerify signatures.
I accidentally had with this slightly inscrutable little code and I didn't realize it.
So I got all frustrated and I wrote that whole test.
And then, you know, it was a bit of rubber duck debugging of GMAM asked a question and I wanted to be extra, extra thorough.
Like I was thorough before I pushed this up because I was, yeah, all these commits are public.
Anybody can see them.
But it was that extra, extra bit of what if I threw away my whole config by renaming it away?
And then it disappeared.
So there's an embarrassing mistake by me.
That was frustrating.
I'm glad I remembered the technique of, you know, so I just did like.
And then I ran the Git log one more time.
And then I didn't see the bug and I was like, what, what could it be?
And I just went down the Git man page until I or Git log man page until I realized what was going on.
I am happier having deleted it, though.
That's really nice.
32:09So there's Peter's git misconfig.
...18So there's a good point for a bumper.
This is Lobster's office hours.
If you have any questions about the site or the code base or anything about the stream, really, feel free to pipe up.
This is an especially good time to answer questions, kind of changing topics, but you can ask questions anytime because I like you.
batman9459 whats up with the brave controversy
Just may take me a minute if I'm in the middle of juggling some code around because when people don't have stuff to talk about,
I work on code.
And then you get to watch me making the mistakes in real time.
33:07So the next thing I kind of had on my list was an odd PR, but it's not one odd PR.
arh68 what is that username cmonBruh
So this one was opened.
arh68 i guess i shouldn't talk lol
batman9459 im batman
pushcx https://github.com/lobsters/lob…
With the name... Of the bug as the title.
Right, that username is like...
I'll share this here.
No, no, no.
Please do talk.
Like... That is the point.
arh68 my username ain't much better is what i mean LUL
Ah, hey Batman.
Congrats on being Batman.
..
There's not a lot of controversy.
We're just, ..
Where is it?
Oh, it's fallen off a newest, hasn't it?
pushcx https://lobste.rs/s/iopw1d/what…
So here is a lobster story with that exact title that you just asked.
But the basic gist of it is explained in all of these links, especially this guy of
This comment I wrote, what, five years ago?
Of, yeah, here's where they did fraud.
And lied about it.
And then made a condescending BS non-apology and kind of backtracked on it.
And five years ago...
they started targeting lobsters and they were like, ah, we should lie to this site specifically about our user agent because we don't want them to block us in response to our actual actions and statements.
That sounds like a consequence.
batman9459 not cool, i guess it's time to switch browsers
So that was pretty annoying and I didn't really put any more time or thought into it.
If you look at these two issues, like nothing happened on them for five years.
This one was
me noticing like a month later that they had done this month later a couple weeks and saying like oh look they've targeted us isn't that delightful now we have to do extra work but then i mostly just left this alone like we got a comment or two and then it was like
Like the start of that one Marvel movie where it was like five years later.
Yeah.
So we jumped from not very long after.
Oh, there was one in 2020.
To five years later.
Where someone said, oh, I have an idea for how to block it.
And the same weekend I started...
translating that into nginx config, the block started working again, but in a really weird way, because I hadn't actually deployed the nginx config.
And so either coincidentally, they stopped spoofing their user agent to us literally the same day I was sketching this out, or the new attempt worked
And Nginx accidentally picked up its config file live.
That was a weird one.
So that whole thing was strange.
And then it was complicated by there was a bug.
So users of brave saw a blank screen instead of the error message that said, well, this error message that said, Hey,
that was mostly written five years ago.
And then I added this sentence of, hey, here's our two bugs from five years ago where we blocked the scam.
And then thanks to help from the chat room, I fixed the bug.
It was the error message had the wrong content type and NGINX is real fiddly about when you're allowed to add headers.
Not interesting, but I burned another, like, 45 minutes on that to get it fixed.
And I keep saying these things because unambiguously, like, Lobsters has one fewer bug fix or small feature this week because of the time I had to spend dealing with Brave.
there's more more comments here if you want to jump into it if there's anything like more specific you want to ask about here you go it goes up to like literally the stream started a minute late because i was leaving a comment addressing the guy who keeps asking like 10 questions and i i just
don't take those questions very seriously anymore because I answered his questions and then he re-asked them as if he hadn't asked them and then he said he was leaving and then he was complaining that after having announced he was leaving that he didn't get to keep discussing it it was so strange I just yeah and he keeps talking about anything
except the actual things that have happened.
So that's why I threw in a link to Wikipedia's page about whataboutism, which is the rhetorical technique of saying, well, what about this other distracting thing?
mr_affen Any options about which browser we should switch to?
All right, so having no follow-up questions, speaking of other distracting things, there was this pull request that was odd in a couple ways.
mr_affen sorry, opinions
any do you mean options or opinions like options you got the whole world if you want another chromium based browser there's well chrome chromium de-googled yeah i figured you meant opinions i use firefox as you can tell by the stream it's all fine if i did more like
pushing browser engine 3D kind of stuff.
Chrome is a little bit ahead of that in
arh68 i'm a safari/firefox man VoHiYo no strong opinions
graphics-y kind of stuff but I've been using Firefox forever and I'm comfortable in Firefox I mean like every browser has been exasperating to me at one point or another I've worked around weird bugs and limitations or I mean in Firefox they had a bug I say bug they had a misdesign where mobile Firefox lost a bunch of tabs on purpose I don't know
I don't really have a lot of strong opinions.
Honestly, just try them out and see what you like.
They're all really high quality these days.
arh68 i mean i used IE6 forever at work LUL
It is nothing like the late 90s, early 2000s, where there were huge differences between them.
They have really similar feature sets with things like integrated password managers and plugins.
Oh, I guess one thing that has changed in the last couple of months is Firefox and Safari now have better ad blocking than Chrome because Chrome is turning off the plugin API that uBlock Origin uses.
You can read...
Chrome's justification of this, I definitely cannot charitably summarize it off the top of my head, but they say it's not about ad blocking.
It just so happens that the one plugin that's most prominently limited by their removal of the manifest V2 API is effective ad blockers like uBlock Origin.
And Google
is an advertising company that makes its money.
I mentioned on stream the other day, but I haven't looked at their 10K in a minute, but I want to say something like 90% of their revenue comes from ads.
Maybe it's gone down if Google Cloud is picked up, but yeah, yeah.
An advertising company broke ad blocking plugins.
I'm sure there's a strong technical reason for that that I just don't recall right now.
42:31God, IE6.
mr_affen Sounds like it's time to jump back to Firefox
You know, ARH, I actually, I deleted it because it was specific enough that it became kind of a distraction from that last comment I left just before stream.
But I had written something to the effect of
I have lost so much time to IE6 that you wouldn't believe it unless you had also lost time to IE6 and Microsoft never apologized for it.
Although, and like not only was that a way too specific little aside when I was making a broad point about how in 30 years of coding I've never blocked a browser before Brave.
There was a marketing stunt where they were like, oh, sorry about IE attendees of whatever this conference is.
Please feel free to have a drink on us at happy hour.
And it was kind of this jokey thing.
And I didn't want to get into the weeds of whether I was going to count that as a real serious apology.
Where was it?
was a god i hate these ideal reviews yeah this guy this was the blog post i found it like i was looking at the sentence and i knew it was an aside i should delete and then it also it tickled the memory and so they made these little flyers i guess it was in the conference booklet or something just based on the image
And I really didn't want to rabbit hole in that comment on whether or not to count this ad for IE9 as a serious apology.
44:50arh68 i hope it was open bar
Yeah.
So Mr. Affen, let us know where you land on browsers.
open bar yeah i don't know the a drink on us sounds like you're getting one drink ticket but i sure didn't go to that conference i couldn't tell you so happy to take more follow-up questions but otherwise i can go back to explaining this weird pr which arh noticed that this username is kind of weird
it looks like a keyboard smash oh this is all new when i looked like yesterday they didn't really have any contributions either i missed it because i saw like open their first pull request created one repo i wonder if this is they turned on the show activity for private stuff
Yeah, so updated six hours, updated last week.
Don't know why I didn't see this.
What did they do here?
46:10All they did was clone the repo, I guess.
And then this is probably cloning the repo with no activity.
Yeah.
It's an odd selection of languages.
TypeScript, Java, Ruby, Python.
arh68 thier name looks like a youtube video id
And it's mostly odd because the code here and their comment below kind of sounds junior develop-y.
Their name looks like a YouTube video ID.
Oh, you should look it up.
Let us know if there is one.
arh68 (it's deleted)
I could look it up here.
Won't play with audio.
Come on, let me select it.
It's deleted.
How funny.
It did not occur to me that it might actually be an ID for something.
47:21So a second thing that was odd about this, besides the title that just is the number of the bug that they are addressing or feature requests that they are addressing, the second odd thing was we already have a pull request open for this. That's this one by Ashwin.
...52And this is the one where I wrote a bunch of stuff on stream about how to kind of factor this particular thing into the search class so it wasn't noticed. Oh, eagle-eyed viewers may remember that there was another PR from Ashwin to fix slash stats. Some of my feedback got confusing because I was also confused about the code and he closed the PR because he didn't have more time for it and I closed out the bug I don't know Tuesday. Maybe Wednesday morning, but I think Tuesday. So it's weird to have a pull request that. does something that already has a pull request open for it it says that at the least this user didn't look at the open pulls which is pretty common for you know when you see four maybe look when you see 400 it makes sense that you're not going to go through all of those but the next weird thing was YouTube ID here is merging from Ryzen 114, which is the guy who opened, which is the person who opened this other PR. That's weird. I don't think I have ever seen someone make a pull request out of someone else's repo like this before. Like, I'm sure it does happen when There are projects with lots of active forks. But that was so strange. And then the next strange thing was this code is almost exactly the other PR. So I'm not going to try and get them side-by-side because I just don't want to fight, you know, turning off the side-by-side view and turning it back on, but there's application helper, highlight search terms that takes the text and search terms, loops over them, making regex.escape, and then G subs in the mark tags, which is, basically what this same one does of it loops over the terms it g subs it turns them into escapes it g subs in the mark oh that's that's a new thing i didn't even notice this comment because i was so weirded out by this function having it the same shape and a very slightly different name and a very slightly different loop And then, you know, I'm not going to beat it to death, but all of the rest of the implementation is basically the same down here of you have to funnel it through the various locals. And then it had also three tests. Where is it? And then this guy had, I think he had four, one, two, three, four, but like they are the same tests pretty much. This one was a little more comprehensive, but this reads like a stripped-down version of the other one. That's weird as hell. And the new weird thing I noticed is... This comment is bullshit. That is the opposite of what calling HTML safe does. So... When Action View... outputs a string, like the one that this function produces, by default it considers strings to be not HTML, to be kind of tainted. And to say, okay, if I have this string and I don't know where it came from, I am going to default to escaping all the special characters in it so that we don't accidentally open a XSS injection vulnerability. HTML safe is the API for saying, hey, Action View, I produced this string, I am aware of the problems of XSS vulnerabilities, and I have determined that it is safe. That is the opposite of saying that calling HTML safe ensures that it's rendered safely. That's not what it does. It is saying you can trust me that the HTML was produced safely and you can directly rendering it without full escaping. So offhand, does this open an XSS vulnerability?
53:24Yeah, yeah, it does, because it takes these terms.
...34And it so search queue I know gets populated directly from parents, it is not escaped like the output of strip operators that we looked at on stream when reviewing the other PR. So that takes user input plugs it into rejects escape and then plops it back here between the mark tags so you could search for. A script tag. and run away with somebody's cookies. So there's one more thing not to like about this PR that I already had my eyebrows up about. And there was another pull request. Blaster. Where'd it go?
54:28This one.
The the misunderstanding one where there was this complicated thing with the merge story data model where they did a thing that didn't make sense, where they didn't understand what it was.
And I debated like should I close this well I don't want to discourage a contributor.
And I did notice that they were committing out of Ryzen's repo, but both of them kind of felt like junior dev code and it wasn't the thing I really wanted to talk about in this pull request.
So I just kind of ignored it.
And then this one is also submitting out of Ryzen's repo, which was just so fucking weird.
So I was like, what's going on that a bunch of new accounts are contributing from the same repo?
arh68 is this the 3 Names 1 Guy thing again
I also wondered if maybe they're young.
Because Blaster...
I don't actually know Pokemon, but this sounds like a Pokemon name.
Yeah, I wondered if this was a three guys, one account thing.
Or...
I don't...
I wondered if it was sock puppeting, but it was...
So weird, because...
If you were sock puppeting, wouldn't you have to make, wouldn't you know you need to make three repos?
mr_affen Googled it and Bloster is a HunterXHunter thing, the image matches the avatar
Like when you open the pull request in the interface, you have to like jump through a hoop to say that I want to merge from somebody else's repo.
You don't get the nice like banner on it, on like your target repo, I don't think.
Blaster is a Hunter X Hunter thing.
mr_affen Yeah anime
That's an anime, right?
Like, this looked like anime drawing?
mr_affen https://hunterxhunter.fandom.co…
If it's not... Oh, HXH, so that's the name of the anime?
Yeah, there you go.
Alright, thank you, Mr. Afta.
So that seemed weird, but, like, seeing an anime avatar, and I was thinking Pokemon, because it's, like, you know, the most famous anime, but seeing a...
Pokemon avatar I thought and a Very new account like all of these signs kind of point to This is a student developer.
These are junior developers Maybe they are in like a high school or a college class that would also explain why they like didn't write a title on their PR and
57:19I don't know. And this one... So there is a new game that open source maintainers get to play. And I don't like this game, but it's a quiz show. And the new quiz show for open source maintainers is... Is this a junior developer who speaks English as a second language or LLM slop?
...58And this game sucks. There's a title.
58:12Because it's just, it's weird to get the exact same code out Especially this regex.escape. I almost never see that one used. Like, it's the correct tool, but... And the fact that it produced almost exactly the same code and a bullshit comment that's dead wrong, it made me wonder also if this... I've lost it now, but... If this was also LLM? I don't know. I'm not trying to accuse somebody. It's just like when gauging how seriously to reply, like should I be trying to coach this person and encouraging them to improve their thing? Or am I just using an LLM tool with the removal of I am talking to someone else who's actually using the tool and they're copying and pasting my comments into Cursor or Windsor for AIDR? Like if I wanted to use those tools, I could do so directly.
59:30So I left a comment saying like, just what's going on? And they said, hello, this is an academic project in which we have to contribute to an open source project.
...51So you can spot right off, they got an email notification and they replied to the email because
accidentally replied indented this is this is email style quoting and and weird inexperienced email style quoting that points to junior developer again but it's not really an answer that explains a lot like this is an academic project
the most likely kind of academic project is, hey, to get course credit, find an open source repo, excuse me, find an open source repo, contribute to it.
It's good practice on how to collaborate as a developer.
I would be totally fine with that if they had disclosed that in their opening message, because then I have the right expectation going in of,
I am talking to a very junior developer who doesn't know basic industry practices.
And the difference between, like, I am happy to act as an informal tutor and welcome someone into the profession, and I feel like I'm being used as a crash test dummy, is whether they actually say so upfront.
And none of these three did.
But the second thing with an academic project is this could be like those shitbags at the University of Chicago who experimented on me.
So a couple of years ago, shitbags, and that's the technical term, the academic term actually is shitbags.
They made some tool to supposedly improve active record queries that would detect
inefficient queries and improve them.
And to gather evidence that their tool was good, they decided to do an unethical, undisclosed experiment on open source maintainers to see if we would accept their pull requests from their tool.
And they decided that it was a better experiment if they didn't disclose to us
who they were and what they were doing and where this pull request came from and give us the option of informed consent.
chamlis_ hi, just came in, just checking you've seen on the IRC that folks can see everyone's recent comments stats on their profiles? you committed `true ||` in the view conditional
And so I had a big time burning back and forth with them on a couple of pull requests they opened against the Lobster's repo where they didn't
their their pull requests were bad they were just bad and they would have been a maintenance burden they would have been brittle as they were the wrong optimization their tool was not good they were not good people and i even contacted the university of chicago irb that's the i think it's institutional review board or inquiry review board but basically they oversee when
universities do experiments on people.
And the IRB explained to me that they didn't feel that the shitbags had done anything wrong because... Ah, fuck.
Thank you, Shamless.
No, I hadn't seen.
I will come back to the shitbag story in a second.
Let's fix that so I don't do this again.
There is a fix for this that involves monads.
01:04:15You know, I joked earlier on the stream, like, you can just hang out on the stream and watch me insert mistakes. There we go, there's another one. Thank you, Shamless. So the end of the University of Chicago story was that their ethics review board that was supposed to be overseeing experiments on humans, like the shitbags experimented on me and other open source developers, said that it's fine because they didn't care about me and i wasn't a human subject because they didn't care about me they only cared about the tool and they were only using it to prove efficacy of the tool which is the actual thing i wrote in to complain about so like if they were doing an experiment where they just randomly gave people a drug without telling them that and then supervised what happened to those people, I guess that would be fine with the University of Chicago Ethics Review Board because they didn't care about their unwitting, unconsenting human subjects. They cared about the efficacy of the drug. University of Chicago. All right.
01:05:45So I don't usually watch IRC because I only have so much desktop space when I'm streaming, and I can only follow so much conversations. The Twitch chat is plenty. So I do appreciate that you highlighted that. Thank you. And having looked at this, that's probably reasonable. So I left a quick note in IRC, but thank you. I do appreciate when folks point out my mistakes, whether that is clicking flag on comments or leaving comments on GitHub or messaging me or emailing me or DMing me or, or, or lots of options. They're all appreciated.
01:07:01So I said politely that I had had some odd experiences from academic projects rather than explain the University of Chicago shitbags. And I have some follow-up questions like, what's your academic project? What do you think you're doing? And I asked, would you please email me with all of you cc'd? And the same link goes to my email address. I have not gotten an email from them in the last 17 hours. We will see if I get one at any point.
...41And then I noted like, boy, this looks an awful lot like the other pull request.
I don't know.
Whole thing is weird.
I do not like the open source maintainer game where I get to guess if I'm just reading LLM slop and using an LLM tool with some other person who is trying to build up their reputation or get a good grade as like my human Waldo.
And it makes me real curious what kind of changes I'm going to get on this pull request where
They added some indexes and I asked why.
And they had an odd variable and I asked for it to be renamed.
So they still have not responded here.
My hope is dwindling a little bit on this one.
arh68 you almost need your own llama to sniff out & captcha the wild llamas out there
I don't know if it's a like in class.
Hey, high school students, let's work on something.
Maybe it's like a weekly class or like a Monday, Wednesday, Friday kind of class.
And I will get an answer in a couple of days.
arh68 ya who knows what time zone they're in
I'm just going to leave that alone and see what happens.
That took longer than I expected.
I didn't expect it.
Excuse me one sec.
01:09:20Took longer than I expected because I didn't expect to tell the...
University of Chicago story.
But it's one of those couple of days where I'm dealing with a bunch of irritating things, so it came out.
As for needing my own LLM to sniff out and capture theirs... Yeah, I don't know.
arh68 man i wanna watch Blade Runner now lol
There was just... Where is it?
It was under the security tag, wasn't it?
pushcx https://lobste.rs/s/zydyoo/new_…
Yeah, there was just this article
like a day and a half ago.
And basically saying that bug bounties are seeing a whole bunch of spammy LLM slob fake reports.
01:10:31And unsurprisingly, LLM tools are not capable of doing security investigations and finding non-trivial security bugs. But all the incentives are, you know, if you pour 100 LLM slops in, maybe you will get credit for finding one real bug. Hmm.
01:11:07epic_ninja_elephant I've seen the curl author talk about how many LLM reports he has to deal with.
it's it's kind of rough oh yeah yeah daniel what's his name daniel hacks his name is or his domain is hacks.se right or i guess not maybe i'm crossing
...41mr_affen This one? https://daniel.haxx.se/blog/202…
epic_ninja_elephant Stenberg
Oh, yeah, it is hacks.sd.
That's why I was thinking of it.
Ah, thank you.
And yes, Mr. Affen, that is the exact blog post I am thinking of.
And I bet it's the one that Epic Ninja is thinking of, right?
01:12:01Are you named Epic Ninja Elephant because you do PHP?
I know Elephant is their logo.
pushcx https://lobste.rs/s/3f69tm/i_ll…
Yeah, here it is.
This one did show up on the site.
epic_ninja_elephant I'm named this because elephants rule, I do martial arts and .. well, I'm epic.
I remembered it.
...39mr_affen Such a good title
That sounds like a pretty legit way.
My handle is just because I like x86 assembly.
mr_affen on that article
I am not a martial artist, epic, or an elephant.
Pretty great.
01:13:00Yeah, I feel like I feel like we're in for another six months or a year of
Basically spam until social norms solidify around no, don't give other people LLM output.
That is just considered abuse.
arh68 LUL i think of that "do not speak the holy tongue" meme
On the other hand, these people are already kind of obviously violating social norms by giving people slop.
So maybe I'm being too optimistic.
...42Yeah, ARH, that's a great one. I think of that often, actually. I think I've even pulled that up on stream. I get a kick out of that one.
01:14:10So...
...20I mentioned on Twitter that my, my topic list, my plan topic list for this stream was pretty short that there was fixing that copy that, you know, I immediately introduced a bug with, and then there were some PR oddities. And then otherwise that was pretty much my topic list. I thought I'd go quicker, but kind of took my time and mentioned this misconfig thing. Because we're talking about mistakes. And if you have questions you want to ask about the site or the code base or other related stuff, now is a great time to pop up with that. Because otherwise, I am going to poke around and figure out some code to write, which I could try and bore people to death and go back to pagination. Or I could just look at if we have open bugs that are unaddressed. Yeah, we have a couple of my feature requests that I added. And I guess I could pick up the one that... Let's bring that up. So there's a couple of feature requests that I threw in. And then there's the one that I assigned to myself. Oh, you know what? It's December 5th. Maybe I ought to get on... migrating our Fediverse bot to another instance. Got about 10 days on that one. Still don't have a compelling instance to move to because the obvious candidates don't want bots, which is fair.
01:16:22I guess I better get to that like this weekend. It'd be nice to have, you know, a couple of days so I'm not up against the deadline. I just don't think about it. Maybe a month ago, three weeks ago, a giant migration pushed a whole ton of people from X over to Blue Sky, and it's been super alive, and I just like Blue Sky more than Mastodon. The client isn't full of bugs and accessibility issues. And basically all the features work better. And there's more conversation that does not involve getting scolded over the definitions of the word distributed or particular terms in free software foundation licenses. So don't really read Mastodon anymore. So let's work on this issue instead.
01:17:33pushcx https://github.com/lobsters/lob…
This one's kind of fun because it's a it's a moderation issue that has shown up rarely, but a couple of times.
And it touches
on how site transparency works.
And it is compromising on that data record of who invited who, which is also very useful for dealing with lots of different kinds of abuse.
And yet, there have been a couple of times, exactly two actually, where someone asked me to remove the name of the person who invited them from their profile because they faced significant abuse offsite.
So this is Alice invites Bob.
Whether or not Alice continues being an active user of the site, Bob does.
Alice abuses Bob offsite and I am not the cop of the entire internet and cannot really, if I tried to take action on offsite behavior, it would just open an infinite hell can of worms.
And so
mr_affen Do you want to parent to themselves, or parent to the grandparent? (should I just add this comment to the issue instead?)
But, like, I can't ignore this stuff.
And if Bob is really unhappy because now their profile forever says Alice... Yeah.
So your question, do I want to parent to themselves?
mr_affen You keep some of the history that way
You can't parent to yourself.
Well, I don't think the data model forbids it, but it should.
Oh, yeah, actually...
01:20:02The other thing you can do is the data model does permit removing someone's parent entirely. And a bunch of the sister sites have this in effect because they have open signups. The code base actually has all the functionality for open signups. And it's a toggle that you can just turn on. I lobsters. has only used it once briefly during an April Fool's gag. But I leave it in there because it's not a lot of code and it never changes and it never breaks. So there's not really any maintenance burden for us. And, you know, almost all of the sister sites want it to start
...53Oh, and to answer your meta question, I am really happy to take feedback however is most convenient to give it.
On this one, I feel pretty good about an admin action to reparent a user to themself.
And I guess that could be ambiguous, but when I say themself, I mean the admin.
Oh, yeah, I see why you're asking, because if you thought I was saying
mr_affen Ahh I gotcha
reparent the user to the user.
Alright, let's... Yeah.
Alright.
So anyways, thank you for asking.
I'm glad to improve the description.
01:21:45So this one is just super rare.
It's just one of those things of...
Trying to make the site kind.
dr3ig Would "hiding" the parent on the user profile for non moderators suffice?
Because getting abused online sucks.
And I want to be kind to the folks who have been.
And I would hiding the parent on a user profile for non-mod suffice.
01:22:16The reason I wrote the issue as reparent the user is
mr_affen Say Alice -> Bob -> Chris. We update to Admin -> Chris. But what if Alice's invites were an issue? Have we lost a valuable link?
because that kind of adding a Boolean is the kind of pain we have with like the deleted and removed stories are constantly sneaking back into the site where like it used to be for a while that if you looked at a domain page, you could see all deleted stories.
right so mr affen that was another part of the compromise here of if it has to be the admin we can make notes in the mod logs as to what happened because those are comfortably private not the mod log that's the public one the mod notes i spoke wrong and then also
if this happened literally twice in seven years, it's rare enough that it's going to stick in the memory so that if Alice's invites were also an issue, that information is still going to be there because when something happens twice in seven years, it sticks out in the memory.
It is in the mod notes.
Yeah.
But that's why I said
This should be a thing the admin has to do so that it is rare and exceptional rather than, hey, here's a button on your settings page that you can just click to do this because then it becomes common and that injures a whole lot of detection of voting rings and other kinds of abuse.
01:24:27So one thing is I want to make an admin action. And the obvious place to put it is users controller, which already has a whole bunch of extra actions hanging off it. And what immediately catches my eye is ban, unban, disable and enable invitations. And similarly, it was an improvement to the stories controller to split out a bunch of the, come here, cyclo tab bar. Well, a bunch, split out any of these, or no, it was the domains controller, I'm sorry. How do I, this tag bar thing, It's not refreshing properly. I don't use it a lot, but that's annoying. Yeah, domain's got a lot easier to work with when all the admin stuff moved off to another controller. I like being able to say a before action of require logged in moderator and just have it be universal across the controller so that future edits can't accidentally forget to include it on actions. In the same way, it's very easy for me to accidentally commit an OR true, as I have done on the last two streams.
01:26:08So maybe I want to split out a... Honestly, maybe I should split out a whole mod directory and start moving controller actions into them. That's not a terrible idea. I don't want to do a giant refactor. to make this into a yak shaving exercise, but I could start that pattern. Let's look at the controllers.
...37Yeah, so write off domains, bands, the edit stuff here.
Not this one.
But then the mod stuff here, like there's mod stuff sprinkled throughout.
And it makes our routes pretty complicated because none of that stuff is following the Rails Resty crud model.
Let's give it an experiment.
epic_ninja_elephant Do the sister sites remove the parent data entirely? Or just hide it from the user?
I don't know if I can create a mod directory without
messing up this mod controller that i use for dashboards the sister sites don't remove the parent data entirely but here let me give you an example oh i hope this is still up okay good so this one i think they had open signups yeah they had open signups at some point so you can see that
Like this user, Luke, they just created in the database has no parent.
This is like the equivalent of their JCS.
And then this one they also created in the database.
The tree doesn't mind that this doesn't have a parent on it.
And I thought maybe they had some more.
Guess not.
I'd have to go to archive.org for another one that I know off the top of my head.
01:28:17so before i became the lobsters admin i ran a sister site that never quite got past the chicken and egg stage it never developed enough of a community but this one had some open signups i thought for a while oh yeah and then i got some bots but like with open signups a lot of these accounts you see they just don't have parents
...48Probably most of those are bots, unfortunately. And then a few of them up here have invites. You can see where I turned on open signups, really.
01:29:08So I haven't ever seen a sister site remove the parenting data, remove the user tree, remove the note on the profile. is certainly possible they've done it and i haven't seen it but lobsters is significantly larger than any of the sister sites i'm aware of so a thing that happens for us twice in seven years might never happen for them i don't know
01:30:02I'm not making a resource, I'm just making a controller.
...24Alright.
...31So let's see if I make a mod slash... See, I'm really... I'm hesitating because in Rails, I'm skeptical of creating directories. And maybe this is just some of the pains that rails two and three had about this creeping in will probably be okay let's see if this creates a moderator controller or just complains that i haven't made one oh no just implied one and then didn't create it, I guess. Why don't I just call it mod slash users controller? Yeah, so let's go ahead and create.
01:31:52It's not going to be. Yeah, let's put it in the namespace.
01:32:03And I'm really only creating this parent class so that I can put the bit about, really, so that I can put this before action here. And then it can be universal. Yes, it's fine. The file's been changed. If RuboCop linters were easier to write, I would write a linter that all controllers in this directory need to inherit from moderator controller. But yeah, the activation energy for that is just not there. Let's throw it as an issue. It's the kind of... I've talked about trying to figure out what kinds of feature requests will get good attention. Maybe this one, because these ones that feel very plumbing shaped sometimes do.
01:33:56You know, I write mod and I haven't yet seen if I'm about to get bit by the dashboard being there, but I am happy to move the dashboard into its own controller, you know, into this directory immediately. So yeah, that's fine.
01:34:29dr3ig Why is the invitation history public at all? (other than I guess curiosity)
The invitation history is, it's public for transparency.
I would say half of the voting rings that I have dealt with on the site have been caught because a user in the chat room or in a comment or in an email to me said, hey, this is hinky.
I look at this guy and then I look at the three people he invited and I see that he invited three people and they all have a bio that kind of sounds like they work at the same company.
And the story he submitted from his company blog has exactly four upvotes that showed up like 10 minutes after the blog post.
That just doesn't feel like a good set of facts.
dr3ig It's useful to moderators, I understand
So having the information history public and just generally defaulting to transparency has been a really good value for the site.
It's really a, it's not just to moderators.
It's also for people to understand the site and feel like
I understand where people are coming from and what kind of clusters of like topic interests there are in the user base.
Yeah.
I can't speak for JCS because I didn't ask him directly about this, but
epic_ninja_elephant I like that if I do something bad on the site, jcs gets in trouble for inviting me back in the day.
He wrote a blog post about how he was shadow banned from Hacker News by Paul Graham.
And so I think that he defaulted to making things public and transparent as often as he could in response for that.
01:36:39And like I said, I can't speak authoritatively for him, but I think that's probably the thought that went into it.
01:37:06Is there a... Great, there is a doc.
01:38:03How's that look?
...12I have previously written. So before we move to standard, I had a custom copper two. And then at some point moving over to standard or just otherwise shoving code around, they quietly stopped running. and by root caught that in the last month or so and submitted pull requests to remove them and i just removed them because we kind of one of them was handled by standard rb and the other one i am giving up on the nil propagation operator and accepting it i don't like it but i'll deal
01:39:04All right, so fingers crossed somebody comes along on that one. So let me, I think I want to do just the relevant actions here of just the reparenting. I don't want to try and make this like a mod slash user slash reparent controller and then map it to rest verbs that just doesn't seem quite useful.
...39And so few things require it that I have to check the name of it. I'll set in application controller itself. And here we go. Require logged in admin.
01:40:07Yeah, it really doesn't seem worth it to create an admin controller. There are not a lot of things on the site that the admin can do only and moderators can't. I think this, let's see it. I have to check for this, right? So there's creating categories. Banning users. And I guess editing tags. That's about it.
01:41:00All right, so let's just find them.
...15Do I need a... Maybe I do want a controller so that I can have a form where the admin has to give a reason. I mean, the reason has so far always been the same. All right. That almost calls for a mod reparent controller. Alright, let's start there then. Let's do it in the Rails-y map-everything-to-verbs model. Yassify it, as I've said on stream.
01:42:16And I can immediately tell this is going to be reused.
...30And then this one becomes showing user, because if I made it at user, it would overwrite the admin session object. That would not be helpful. We call it showing user over in the user's controller.
...50Yeah, call it reparent user. So the thing we are actually going to do is parent user dot, let's put it in a transaction.
01:43:17So we'll do that. Before we do that, we will create a mod note about it.
...41And we will do it, and then we will have to create a mod log entry. So that's mod log. I never remember.
...57It's moderation, singular.
01:44:12I add new message types to the moderation logs so infrequently. And there's kind of a bit of a lava layer thing happening here. And I'm not sure about it. But this needs parens, so it's not a block, where on mod note i forced the i kind of created the pattern where the mod note how it knows how to create mod notes and it has class methods for all of these but moderation just random models create moderation from callbacks all the time rather than it being even centralized to the moderation class, it would be nice to clean that up, but it's not super urgent.
01:45:24Be parented. And to be invited by.
...36I don't think that, this is, Mr. Affen, you just avoided a confusing thing here because you caught the ambiguity in themself. So I am going to do the redundant thing of, even though it'll show up in the mod log as like push CX, reparented them to be invited by push CX. Then let's get rid of the vague pronouns. be specific.
01:46:22That pretty much does it. And then we want to say flash redirect to, what is it? users path. Hold on. I can just steal it from here.
...50Probably won't say this message, though.
01:47:03dr3ig Do you want to keep info on original parent?
Yeah, I'm going to put that in the mod note.
So I don't think I've ever shown them on screen, but there is a mod note table in the database.
I don't show them on stream because they're just full of spicy stuff and internal deliberation about stuff.
Let me finish this thought here.
...50Huh. Two different styles. I wonder which one of them doesn't work. Like, one of them says the key is success, one says the key is flash, and then error or flash success. Let's go pull that out. Actually, where's zeal? This is a zeal kind of question.
01:48:20so redirect to response options and flash so it expects a sub key named flash or also wow no both of them work because it loops the the flash types and then fine all right so i'm gonna do the man rails ruby is By Matz's decision, like mildly averse to pythons, there should be one good way to do things. And Ruby is just like, welcome to the garden. You have 20 ways to do everything. And that ethos carries over into especially popular libraries like Rails.
01:49:17All right. Oh, I was going to show the... So, Dre, the mod notes are a really basic table that has the moderator that left it, the user ID it's on, and a note that gets rendered by Markdown. And if you look at the mod notes class, I don't know if you've got the code base up, but app models mod note, you'll see a whole bunch of these methods for creating mod notes. This is what I was talking about when I was like, the style is different here, where ModNote, I centralized all of them here. And moderation is just kind of, everybody does it.
01:50:15These tattle methods are things that users do that are useful for moderators to see. Honestly, like 90% of them are new users trying to use unseen domains very often for self-promo. And a very recent one is Tatalon traffic attribution, where if a user tries to submit a URL with like a... a URL shortener like t.co or bit.ly, or they have things like ampersand refer equals lobsters. We pick that up and we go, hey, they are trying to measure how much traffic they're getting from submitting something to lobsters. That's hinky marketer behavior. They're probably acting exploitatively. And mod notes show up on a user's profile Or there also is a dashboard that is just... I'll show you the controller. In the mod controller... Is it not here? You know, I autocomplete these URLs in my browser, and then I stop remembering them, because I just type, like, slash mod, and I land on it. so the mod notes controller you can filter it down to a username but then just by default it gives the last isn't there a limit i don't know what the default limit is i think it gives you like the last two weeks or something i don't know i oh yeah it uses the period thing and then that period function defaults to two weeks that's why i'm thinking that i look at it often enough that i'm just reading the last 10 down to oh i recognize i saw this one already and then there's a a free text entry of if i saw something weird or I saw odd behavior, I will sometimes leave a note on a user that was like, hey, you should remember this comment. Because if you see this person say, I don't know, I'm trying to give an example that's not too spicy and that's not an actual real example, but it's stuff like if there's a comment that's not so wrong, I remove it. but it just doesn't sit right. Or I think there is a pattern developing like on certain technical topics or when responding to a particular person, this person goes off the rails. That's the kind of stuff that goes in ModNotes. It helps us build context. Oh, the other big thing that ModNotes are for is There is some amount of users who try the But Dad, Mom Said I Could game, where, like, they message two moderators, and they say, But Peter, Irene said that I could post ten links to my company blog. Well, if I don't see that in the mod notes, I don't believe you. And if I see something like that, I can write a mod note that said, this user told me some nonsense and Irene said it was nonsense. The, but dad, mom said I could game is a real quick, just real strong red flag of this person is full of it and trying to manipulate the site. All right, so I renamed that. I don't know that new is going to have anything, because it just presents the form. Yeah.
01:55:06All right, let's toss this helper.
Let's toss a spec for this helper we don't have.
And let's rename this one, because I will at least write a smoke test for mod actions most of the time.
dr3ig Cool. So what does `Moderation` do then?
This one, I have competing impulses where
On the one hand, I want to not write tests because it's barely ever going to get used if this is a thing that comes up once every three or four years.
It is definitely not critical site functionality that needs to take up space and time in the test suite forever.
And then on the flip side is it's so infrequently used.
If I don't have a test, it's going to be broken just by a bit rot every time I come back and try and use it.
And that'll be annoying.
Oh, capital M moderation.
That is an entry that appears in the public mod log.
So here's my, how did my browser get out of order again?
So if you go to...
These are capital M moderation models.
01:56:55And it's just kind of a... like I said, lava layer thing going on that this one knows a lot about the moderation model because that's the style.
01:57:13So let me go ahead and add that form, I guess, right?
...24I didn't rename the directory because Git doesn't show directories in status unless they have files in them is there a form i can just crib from yes this is very similar to like user bands so if i just hop over to what page do i even see that on user profile
01:58:06We can yoink this to make app views mod two levels deep on view directories.
...26So this one wants to be Let's ask routes.
...49Did it add my controller automatically here? I can ask it. It did not. So where's the rest of the mod dashboard?
01:59:09Yeah, this is what I'm worried is going to break when I make a namespace. It's called namespace, right?
...31Control your namespaces. Yes.
...52It's gonna wanna... Rails, it's gonna wanna call this REPARENTS plural, isn't it? Because if I put the user ID on the end of the URL, or the username on the end of the URL, yeah, it's going to... Oh, Rails. Hold on, I have a...
02:00:28And then I have to move the directory to... This is not gonna be params username, it's ID by default. So resources, parents, plural, but only... new and create. Let's see. Why are you mad about that? Let's see what errors I get out of routes.
02:01:20That looks okay. So it didn't blow up these existing routes, which I half expected. And I put Reparents here in the namespace. And because this is an admin action, I'm not really going to bother with the nice URL of let me put ID in the URL. It's just not worth jumping through that hoop. I'm happy with whatever it gives me for this. So this is a form with... Not with the URL. So this is the... yeah i guess i want to say that parents path for this repair user because we just couple things by name in views i'm I don't know, flex2 is getting real close, and I'm increasingly tempted to be like, what if we rewrote all our views to flex2?
02:02:39So this doesn't have a Boolean.
...50This has a public reason, size is size 80. You know, actually, as long as I'm here, what are you mad about? Oh, you're mad that I renamed the directory.
02:03:09Yeah, you can't delete it because it doesn't. She did the thing. All right.
...36Let me make it a little easier for me to write these reasons. Might break on the phone, but that's OK. Mon tools are allowed to be a little janky. And since this is going to be rare, we want to explain it.
02:04:28I think I just call them notes generally.
...48Okay. And then I will put this, into the view user show so that it can be there's something else that's admin only in here isn't there huh why is that is admin only oh if you're not the admin huh i guess my my karma is hidden on my profile never noticed I don't know the value of that. If you are an admin or, yeah, that's not it. Here we go. This is the one I'm thinking of, the admin information section. So in case you're curious, as the admin, I can see, I should make that moderator I can see what someone has recently voted on which is nice for voting ring detection or i'm mad at you and i'm going to flag you across five stories. And then there's the form for banning. And we will add a new thing at the bottom that says.
02:06:34This goes to the, what did I call it? The new mod repair, singular? I can never predict these with Rails.
...55Okay, and I am going to, because I want to work on a mod feature here on stream, add some fake data so that I can edit a fake user and not worry that I'm going to throw somebody's real email address up on stream. So I will give that a minute to run. It also means I have plenty of users that I can zap as opposed to thinking up new real usernames and all that kind of stuff. So we've got this, this, this. We've got everything but tests. Typically with this kind of thing, I like to see that they... Should this bust the cache? Probably. So the user tree is cached. And it would be... I mean, not just would, will be... Yeah, not a question mark on that one. So on the off chance I use this soon, if you go look at Bob, because you see a moderation log entry that says Peter reparented Bob to Peter, and you click over to the user tree, because you want to see what that looks like, it would almost certainly be cached, because we cached the user tree for a couple of minutes at least, maybe an hour. And then you would see Bob as invited by Alice rather than Peter so that does have to happen. To do.
02:08:51You know there's another one of those kind of.
grungy plumbing tasks.
It would be really neat if.
The fake data script better reflected the actual site, so if we took some stats like.
How many users are there.
How many categories are there and then fed them in here, and when you ran rails fake data, maybe you could give it a parameter like.
dr3ig Are there any stats that get invalidated by reparenting?
10% if you wanted it to instead of generating 100,000 users generate 10,000 users right, so we have like 100 in production.
Are there any stats that invalid get invalidated by parenting no.
No it's solely used by people.
If you look at invited by, which is the name of the attribute and the relationship it gets used in the tree.
The fake data it shows on user profiles.
This is invite code.
There's the new Repairance Controller I'm working on right now.
I don't immediately recognize this code, but that's about it.
And then there's some migrations creating this stuff.
It doesn't get used for really anything, but people look at it.
And just on the tree and the profile.
02:10:40so i'm gonna log into my localhost i'm gonna do that off stream because i'm not sure what page it'll land me on and i don't want there to be a bunch of user info up on screen all right yeah good so this is And let's bring it back up. This is all some of that nice fake data. So let's pick a victim, like Schmidt for Tracy.
02:11:28Cool, we got an exception. Undefined method, it's a new method, parent, path. You asked about the... moderation model this is the there's also a view of it for moderators that shows hey here's some interactions that you just had with people oh and here's what the mod notes form looked like i could say i could leave a note that said you know this user asked me if it was okay to promote their new cryptocurrency they offered me or lambos i said no ban if they promote a crypto you get it so i click mod note so there's a statistic that appears on this page to moderators that makes profiles load real slow So here's what a mod note entry looks like, where it says, what mod did it? What user did they put it on? When you're looking at the user profile, it's always going to say this. And then in the case of a human written note, it says this. Or you saw all those tattle methods on the mod note model. Here they are. This is exactly what they look like. And then, oh yeah, I mentioned here's that recent vote view. So this user in the test data flagged someone with, flagged us, wait, what is the A? I never see A.
02:13:48Where are the, oh, it's in, vote model oh already posted yeah super uncommon one yeah so the the recent votes for you doesn't even port from this over to the others because as a moderator you learn real quick of which one is which and it's fine to just see, because it's, again, it's like the comment stats that I added on the last stream. You get used to looking at this stuff and stuff pops out. So if I look at recent votes, like, oh, they flagged one of Deanna's stories as already posted, fine. If they had posted, if this said that Schmidt here The last five votes they made were to flag diana's comments across three different stories as off topic, I would be like Okay, you are prosecuting some kind of grudge match against this user I don't want to deal with this, this is not what flagging is for, and then I would tell Schmidt hey don't do that. And so far. think there was only one user who was like, no, I just want to punish them. And I will use flags to punish this person that I disagree with. And you can't stop me. And I was like, there's, well, it's here on stream, but there is a button that will stop you from doing that. And I think only once have I had to click that button.
02:15:45Make the window bigger so I can see the URL I'm getting. Why is it just tagging it on here instead of like this?
02:16:17Because what I'm wanting here is like slash new question mark ID equals. Yeah, there we go. And I guess because the resource isn't, no, it doesn't actually care what the name of the resource is. I thought I could just pass the user model in and it would be like, oh, you gave me an active record model. Therefore, I will call to param on it and give you an ID attribute Maybe it's because the resource route doesn't include it. I don't want to debug. I got the route I wanted. The apparent action could not be found for the require logged in admin callback, but it's listed in the only. So I wrote this before I split this out, so that's fine. Everything on the parent controller should require a logged in admin. So this is I actually really love this message. Raising for the missing callback actions is a new default in 7.1. It was really easy for those before actions to slip out of sync with the actual list of actions in your controller. So I love that kind of checking. So now it's not reparent path, it's mod underscore reparents.
02:17:54And then it's probably going to be the same. Well, let's see what form width does for it. I'll check the form action and target.
02:18:07OK, so reasonable copy. Let's add an h1.
...23This will repair and. No, I want here I want repairing user username. I should just insert that in the help copy to to make it clear.
...52Create a mod node on the user with their old inviter and put an entry in the modern iteration log with this reason. OK. All right, let's check. This is, I immediately know I'm going to need the big window. So this form goes to not the right thing. so i'm going to just make the same tweak i made to the other one and hope it's right mod repairance id equals great all right so Let's go ahead and... This part's fine. This part's fine. The mod node. We didn't make the message. So I'm trying to keep some of these files. I do a better job of keeping in roughly alphabetical order. Some are kind of a lost cause for organization. And a big chunk of that is they're so big. There's just models that have kind of too many methods on them, especially the models. So we're going to record the reparent. Let's have it bang. And then the moderator is
02:21:02mod the user is the parent user it is now which that's redundant the note is parented from parent user dot invited by that username but i want that to be a link
...33And we are immediately running into maybe my biggest pet peeve here, which is Rails, I can't conveniently call the URL generation methods from outside of the views, outside of the templates. It's a web app. URLs are a primary thing that the app does all over the place. I have jobs and logging and I just want to be able to say users path, but I can't because it's not in scope unless I pulled the helper in here. So how have I dealt with this before? Because I know other ones do.
02:22:37say redeemer i delegate to the model so now the model knows how to generate the url that's or no it's happening up here there we go all right yeah this is i don't like this
02:23:30Let's include that. Mod nodes can be a little more complete.
02:24:04And then I guess I want to say, I think the transaction raises if these things fail, because I have a whole bunch of create banks. So I will say rescue render new with the errors.
...33That's what I want to do. There's just one way for this to be invalid. There probably is only just the one way.
02:25:11Yeah, there's no reason not to move it down to a rescue, though.
...18I don't actually need to restate what it is. I can just say whatever the reason was. I'm just assuming the reason, though.
...58And then where's that go? View mod.
02:26:11No, it's in user show.
...27There we go. So I've been coding for, oh man, like an hour or so. Good time for a bumper and mention that this is the Lobster's office hours. You are welcome to pipe up anytime with sites about the questions about the site or the code base or the community. I am happy to answer stuff. And when folks don't have questions, I code like I am now, building out a admin feature that, I mean, ideally will never get used again. But if we can keep it to the rate of once every three or four years, I'll be pretty happy.
02:27:09All right, looks good. So let's go look at this form again.
...43Is there language I can borrow here?
02:28:04Cause.
...24I don't think I have written a let me explain stuff to the mod thing before, and definitely not in the first person. But if something is going to get used only every three or four years, worth trying to reload some context.
02:30:22hard just do it do or do not there is no mod log all right that's fine enough to keep moving i guess so let's see what that looks like oh sorry i wrote all that off stream y'all are a little bit quiet right now and so i'm forgetting
...55So coming back here, I added the mod no. That'll record the reason. Yeah, so that all looks pretty good. Let's give it a run and see what throws an exception. Reason, test one. Bam, there's an exception. So that's the rescue block here.
02:31:34that's i don't know that's not the syntax for a rescue block i need the hash rocket and then usually they just get named e hmm
02:32:13Offscreen hassles.
...26So if there's my rescue, let's see what message that's trying to say. Can't find a user where the username is null. So the form did not correctly pass the ID, even though I distinctly requested the opposite of that.
...54So we said form action mod reparents with the ID of that. And that didn't show up in there. Why not? Let's look at the Rails output. Rails says, we got a post. with this ID.
02:33:22But then we tried to load the user without a username. That's strange. So right here,
...53And let's change that to test2. Let's see the Rails output. Load Rails output said. Oh, this is strong params, isn't it?
02:34:27Isn't it? So wait. How is params... How does it have an ID and a reason up here, but when load user fires, it's empty?
...51This is some kind of Rails... Gotcha. And I'm not recognizing it.
02:35:47might be strong params params is missing or the value is empty or invalid all right so who knows rails on the stream there's something obvious i'm missing here it's not jumping out at me but when The params gets loaded. I'm trying to require an ID and permit a reason. And then ID is missing, even though it was there when the log fired. Although,
02:36:50This one, so this is a get.
...59Am I seeing a redirect happening? And that's what's confusing it is there's two things. I'm going to reload the form submission. But it actually reloaded a get.
02:37:22It's this. The redirect to on the exception is wrong. So let's grab this guy again. Schmidt helps if I don't have typos. What did I typo? Undefined method permit for an instance of string.
...53That's the permit line. Let's hide that for a second, because that's me flailing at strong params for a sec. So test three. Well, it's not an immediate exception. That's promising, right?
02:38:28kick me back to the form without setting the flash so what do we think happened the method happened it loaded the user the user saw the params reason is missing but we can think about that in a second And then it went into the key stores. Well, it's definitely trying to save the user if it's touching these things. It did find the user, and then somewhere in here it threw an exception, but the exception got swallowed by that rescue. So let's get rid of the oh-so-clever rescue and go back to the other method.
02:39:42And now at least when I write test for and submit, undefined method invited by. It's invited by user. So where did invited by happen? Probably at the mod node.
02:40:02invited by user and then i did it again in the note invited by user username and then it redirected to the user path but it's going to be called like users path isn't it
...42No, it's called userPath. It's just, oh, this one isn't this annoying, apparent one.
02:41:02All right, just thinking about it. Hey, so I didn't get my flash notice.
...17And I didn't get my reparenting. Which means we went down the exception path, right?
...37jmiven hello!
where's this i'm gonna drag this over oh hey jay miven you are showing up at a little bit of a lull i am debugging a new admin method and i am about to stand up for a bio break i will be back in two three minutes
02:44:58frici Hello 👀
All righty.
Sorry about that rough timing there, Jay Mimmon.
Oh, hey, Fruity.
Good to see you too.
pushcx https://github.com/lobsters/lob…
jmiven oh no worries :-D
So I'm working on a new endpoint for the admin for a rare situation, and it's
Kind of a thing only I can do and I'm doing it for myself, even though it only comes up every couple of years, but I wanted to clear it out of the issue tracker because it's on the first page and nothing's really come up on stream.
So already covered this stream are fixing up the copy that the last stream ended with because there were some better explanation available.
A funny story in the commit log.
And then getting weird PRs.
frici Git misconfig?
And there's been a, oh, this can be in there.
How about that brave browser?
Yeah, so the, it's here in the commits.
02:46:27jmiven I saw the if-true mishap yeah ^^
This one, I added a test because I saw some, yeah, not the if true mishap, that was a different mistake.
I saw some really frustrating GPG Git chores set up complaining about being unable to verify signatures.
And I thought it was because I accidentally, not accidentally, unknowingly committed a couple of signed commits
And in the process of discussing it with the person who had signed the commits, I checked one more thing it could have been and found it.
It was my default format for logs had snuck in this percent code, %gs, that
tries to verify Git signatures, I guess, or GPG signatures, I guess, is what it stands for.
Yeah, not great.
But as soon as I found that, I could just pull that out.
And then I don't need a silly let's break the build kind of test.
I can go back to being unaware of GPG, at least in terms of the repo.
02:48:00frici Ah, yes gpg, breaks when you use it breaks when you don't
So I'm hassling around with, yeah, that's pretty much it for G. It's very frustrating that way.
...24All right.
...30So the thing I am hacking away at is if you all have questions about the site or community, of course, you all know that you're very welcome to pipe up and ask them. I should just mention that since this is Lobster's Hour and I just came back from a small break there. But otherwise, the code I'm hacking on is... or rare use by admins to kind of remove someone from their place in the moderator tree and move them under the admin. So at least things stay reasonable and there's some amount of auditing. And I am currently dicking around with how Rails is wiring up the form. And it occurred to me, this might be a form with hassle. Okay, so it's form with, but I don't, pass a model, do I? So let's go back and edit that. So this is the mod, reparent, new.
02:49:39But if I don't say, I can never remember these.
02:50:01So you want form width.
...11We can go to a specific URL or with a model.
...29that's not quite appropriate because i'm not yeah it'll go to the action is automatically filled if you are updating yeah so that's not no i do want a url
02:51:00And then the hassle with the Rails form is that I didn't get my flash that I expected.
...21So let's see if I can't get that working, because then at least I would have a nice error. So if I am reparenting Schmidt, We'll say test five because this is going on for a minute. It's going to redirect me back to Schmidt either way. But I didn't get any flash message which says we didn't go into this, which also should have redirected back to the form. It thinks we did all of this. Didn't call parent user.save. So it probably did create the mod log entries for it. And it probably, yup. Okay, so it's actually been working. The actual problem is we didn't see The success message. Even though it looked like the Redirect 2 helper liked it either way, I guess it only wanted it this way. There's a Backstreet Boys song that documents that, I believe.
02:52:49Test 6.
02:53:05frici You likely answered it when you started working, but what is the reasoning behind reparenting invitees?
user has should be has been reparented to you and now it says push cx and if i look at their mod note it's there and the feature basically works so the last thing the only two to do's well we can get rid of this
get rid of this because if it works i don't want to keep thinking about strong params and oh it's so fritchie it's in the issue that i just pasted the link into chat for the logic is basically that under rare circumstances we have had issues where like alice invites bob
And then off-site, Alice is an asshole to Bob.
And I am not the cop of the internet, so I can't really ban Alice for stuff she did on sites that aren't lobsters.
That opens just an infinite can of worms and encourages doxing other users and
has all kinds of problems with how do I know what actually happened on the other site is really what it looks like because I don't know that site or that community and maybe Alice runs or maybe Bob runs that other site and has faked the stuff from Alice like it gets awful so if Bob really really hates seeing Alice's username still on Bob's profile
Well, it would be good to do something.
And if we keep it very rare and it makes internal notes for the moderators and a reasonable note in the moderation log, hopefully it is not too painful and confusing.
And so it's kind of,
frici Oh I see. and the modnote lets you see it was Alice that was inviter so if things go south further with alice or alice invitees you know where things go. yeah fair.
Juggling a whole bunch of conflicting interests with the invite tree is extremely useful for finding sock puppets and voting rings.
So we don't want to make it real easy to break.
Yep.
Oh, you know, it should probably...
So the mod note...
The way you asked that question made me realize something.
So ModNotes are, just to show it because I talked about it on stream earlier, but they are an internal system for moderators.
And so here is an example of what it's leaving right now on the user who was reparented.
And then also here's a demo of what I typed for, oh, the user asked me a question and I wanted to record what the question was and the answer.
And I came up with a silly thing where, you know, supposedly Schmidt offered me Lambos for cryptocurrency.
And these are only seen by admins and moderators and they are invaluable because I cannot memorize every interaction with every user.
And sometimes there is a like.
iffy thing a user does and I leave myself a note where it's like, I'm not sure what's going on here, but this is weird or this is bad.
And I said something to them, but let me make sure I have this context the next time I deal with them.
And your question makes me realize that this record reparent should also note on the invited user
02:57:27I just make a bad at it. Oh, it worked because I. Good thing I came over here anyways. Got to make a variable. And then got to actually interpolate that variable.
02:58:08arh68 is there a reeason to not include that `url_helpers` thing
And this is the gyration I have to go through to generate a route outside of a view, because why would you generate URLs all over the place in a web app?
So this one, the second one will go on the reparent user.invitedByUser.
Is there a reason not to include that URLs helper thing?
...44Not really. I guess having to include the host is so irritating, and is going to break this up onto multiple lines that I've never really thought about including this module. So I could just call user URL. Because it's going to break onto multiple lines anyways. I don't have a strong feeling on this one.
02:59:22So what should the notes say? Apparently. This becomes username.
...48Let's organize this better because this top one only uses the one and the bottom one only uses the other.
And I want it to be one method because this is
one logical chunk you either want both or none all right here admin reparented their invitee with the reason reason okay little cleanup
What's my.
No other issues okay that's a good improvement, thank you for jam glad you asked because the way you asked that made me realize Oh, you know if Alice.
If I have to suspect that Alice did something off site, I should probably also record that I broke a user off of their invite tree.
The only other one of these that works this way is.
dr3ig You forgot the string interpolation for url
frici ^
if you try to redeem an invite while you are logged in it shows up on the person who sent the invite and the person who was logged in and tried to redeem the invite and there's a couple of cases for that like did i yes i did thank you good eye
03:01:34So this one logs both... Because the cases that come up are... The happy case is like Carol sent an invite to Dave. Dave tried to redeem it while already logged in. Most of the time... What's happening here is Dave has an account and has forgotten it, or Carol never asked and was just like, oh, I like this site, Dave, have an invite. But Dave already had one and Dave clicked the link in their email. The naughty case is Carol sends an invite to Carol 2 and then opens it in the wrong browser. And so when I see both of these of tried to redeem and sent, It's like, hey, hey, Carol, are you setting up a voting ring? You setting up a sock puppet?
03:02:38But this one of reparenting someone, yeah, I should generate notes on both sides. All right, so the last thing then, well, next to last thing is busting the cache on the user tree, which I don't remember if that's actually I don't think we have any view level caching. No, there isn't one here. I may change that with solid cache. We basically don't use the whole nested Russian doll caching system. And we do some controller level caching. And in part, we just predate it. So the tree here.
03:03:42So if you are the newest user is the last one.
...54Huh, pulling 10K users?
I think this is a little bit of an old comment.
So I'm pulling up a production console.
Because I want to say, count?
Yeah, we are at, oh, that is a hilariously fortuitous number.
So we are at 1776, 17,776, which is also, let's paste that into Google.
pushcx https://www.sbnation.com/a/1777…
That is also the name of a wonderful bit of web writing.
Yeah.
It's a utopian,
bit of science fiction in a post-singularity setting where people are playing football because they have kind of nothing else to do because they've solved all otherworldly concerns.
How funny to land on it.
Anyways, I really like the story.
It's got a lot of humor, warmth.
It's hard to tell a post-scarcity story.
03:05:33Yeah, so this lasts for 20, oh man, speaking of old values, 10K is way out of touch. This idea that the user tree that the site won't see a new user for perhaps 24 hours is also very, very old and probably has never been revisited. Also, I think I can just say 24.hours, something called 2i on it, you'd get the right number. So let's just say, honestly, three hours. It's going to get busted all the time anyways.
03:06:32So it kind of doesn't matter what value I put here. But the thing I want access to is this. string so there's a naughty thing i have to figure out how to do which is how do i carry this cache key gotta include that link between these two controllers. I can make a helper for it, I guess.
03:07:27Rails caches. Yeah. Doing it this way is kind of a low level attribute. Actually, there are enough
...48kind of spooky action at a distance to know this cache key and fetch it. I was wondering if maybe the user signup flow should just bust this, and then this whole thing can not care about newest user, which only cares about it for cache keys.
03:08:17So if I dropped that, oh yeah, there's a real clear sign that we predate the whole Russian doll caching of we rendered a string and cached that rather than doing caching in the view layer.
...56I don't think I want to help her because it's going to have to be an application helper.
03:09:31That's the method. Destroy? Delete? Flush? Oh it's flush isn't it? Nope. It's delete.
03:10:07I think I'm just gonna slop it. Yeah. And then the last thing to do is to put a smoke test or two on this, because if it's only getting used every three or four years, it's worth a little test.
...31So many typos.
...38Thank you.
03:11:10Let's match the name to make it easy. And then we say we want to get, this is spec request. We use, no, we re-implement.
...59I have a helper for this, don't I? What the heck kind of edit mode am I in? I'm trapped.
03:12:29I guess I shouldn't have focused that window.
...36I think I'm OK with just a like, does the basic functionality work? I'm not going to make a test for each branch of this, especially because this is a very moderately heavy outside in test because i'm hitting the database to create these things i've got to stub the login as a user that's going to be or as a moderator that's going to be an issue
03:13:26So this is going to change to... I don't know what's going on with the Rails server that's taken so long to start.
...48It's a good placeholder reason that I can... I don't want to be flippant in this one.
03:14:04Yeah, I want a unique string that's easy to search for. And I a lot of these tests, I put something slightly silly in there because it's easier to pick out of the logs. But I guess I don't want to be flippant about a rare kind of situation. So let's just say abuse. So we expect to be PA redirect.
...43Like this.
...58To redirect to And then we want to say that the
03:15:26they're going to need an inviting user.
...59There's an interesting one. Munmap chunk invalid pointer. Did I accidentally code an infinite loop and it tried to allocate the world and then crashed? That's a weird one. Let's see what happens when I run in the regular terminal instead of that test alias I never remember to use.
03:16:42Probably the important stuff covered. If that works, we're pretty good. Yeah, it's doing it again. What's happening here?
03:17:15The one thing is pinning a CPU, so it's thinking about something. Its memory usage isn't climbing. It just fell, in fact. Rails, what are we doing, Rails?
03:18:14We can actually use the object, so let's just do this.
...34Oh, this thing is wrong. I forgot to update it from when it got renamed. I think since it's a string, that's fine.
...52It doesn't include the word controller in its name, but that's how it was generated before I renamed it. Let's make it, let's add the S.
03:19:21So let's check an existing spec runs, because if that runs and it does, that also gives us the amount of time to expect this thing to take to run of six seconds.
...44And that's more than six seconds. So what is, What is different about these specs that instead of running, we're missing Rails helper. No, we have it. It's the typed falses. missing what else unable to resolve that's well it starts rspec describe instead of just describe one two three four five six
03:20:35What are we doing here?
...44This one on the right doesn't even say it's a request spec. Did I knock off the wrong request type?
03:21:26dr3ig Try running only one spec?
Do you want to see the word context instead of describe?
I think RSpec uses them interchangeably.
dr3ig I meant to comment one of the two
Something is different between the spec on the right that runs and the spec on the left that just pins a processor for a minute or two and then exits.
Try running only one spec.
Sure.
let's i guess let's comment out this one two oh wow good idea we changed the behavior so what do these two do different well you know let's not think too hard about it let's
Get rid of this and just minimize the test.
03:22:37Oh, there's a typo I can fix.
03:23:01All right, so parent base URL for mod note. Parent must have a typo in the mod note class.
...14Yep. Because I was missing that string interpolation, standard was like, hey, that's an unused variable. I can delete that, and did.
...37So we got one green dot, and we got one failure. Undefined method delete for module Rails. It's rails.cache.delete.
...58So that's a useful failure. Smoke test failed.
03:24:08Two green dots. Long. But it's just reload. It's reload bang in the console to reload everything. I always cross those two. But that's back to a test failure. And I expect the test to go green. And it does. All right. So this should go fine. Oh, that's a... Oh, because the next line doesn't use it. Yeah, there's Sorbet helping me with my unused variable. Which is not unused, but is about to be. Alright, so I'll put that back. Let's have the get. If anybody's going to fail, it's this step, right? Like, as it goes into the controller, it falls off the end of the world? Nope, stays green.
03:25:23so asking the request if it's a success is what's failing so it's not be success it's be successful and god only knows what very similarly named api i was hitting on accident that was churning for so long but that's exactly what it is thank you drake you helped solve that one all right so let's let's take a look we've got a bunch of new files so in the routes we said this new stuff In the view, oh yeah, I added a link and nudged those forms to be bigger. Here's the mod note that picked up the new method. User controller. I added a comment. And then these new ones. Is there a nice way here to see the diff?
03:26:51A new file? No. What if I say A? No, I just added it. You can see it down here, though. That's fine.
03:27:06Look at them up here. Just want to take a look through the code. Let's have the controller. The controller is nice and short. It's reasonably well factored. Split out the did the work section. Good. And then there's the new parent controller. Good. I added the GitHub issue for that one. And then their last thing is the form. And I'm happy with this copy because I wrote it and then I wrote a reasonably good version.
...57So what was that number? All right, let's grab this for this Rails.
03:28:13This is the issue I was just implementing, so.
...30There is a new feature in Rails. And after the last couple of days, it is super nice to spend like two hours hacking out a small feature for Rails instead of burning it dealing with abuse.
...56And if you're not sure what I'm referring to, that's back at the beginning of the stream where we were talking about the meta thread that's probably on the home page by now. All righty. So I'm going to push that. And this ought to reload in a moment to show that it's done because I mentioned the issue. Yes. There it goes. I didn't run the full test suite.
03:29:36jmiven oh yeah that annoying meta-thread... :)
Should make VAPs for catching that I forgot to run the full test suite.
So I'm going to come up on the end of the stream here, unless folks have something they want to talk about.
So if you do JMIV and you weren't around before when we were talking about that meta thread,
If you have thoughts or questions,
now is a great time to do it because I guess I'm going to just deploy that.
And that's about the end of the stream.
Yeah.
03:30:55jmiven nope, I'm all good
Nice.
Oh, I should have hit the with comment button.
And then I have to reload to get the plain close button, don't I?
There we go.
I suspect GitHub does the right thing and doesn't make a blank comment, but it always gets me that the button doesn't change back.
But boy, have I learned about...
value of reporting bugs to microsoft so cool all right folks this has been the thursday lobsters office hours thanks for hanging out especially for help with the coding or chatting about stuff always happy to get into this stuff i hope you all have a nice couple of days i will see you again for
the next Monday stream as usual.
jmiven have a good evening
Take care.
Don't get scammed by your browser.