Very obvious or very obviously nefarious
Streamed
- Hat request approvals were rejected (bug); manual log + db groveling to recover the records #1371
- CSS nesting is now widely supported in browsers! Learned in PR #1376
- Self-promo prompts motivated reasoning; voting rings; why invites mean we donβt have to be as sophisticated as HN
- SQL query optimization for detecting above-average comments; I love Joe Celkoβs books
- bots.in.space is shutting down so our bot must migrate to a new instance
- My cat knows 2.5 tricks
scratch
topics:
PR review
https://github.com/jbranchaud/til/blob/master/rails/prefer-select-all-over-execute-for-read-queries.md
https://github.com/lobsters/lobsters/pull/1365
https://github.com/lobsters/lobsters/issues/1355
bugs and features; Rails 8
avatars news
self-promo detection: well-received comments
avatars
with_attachmed_ and with_all_variant_records
https://discuss.rubyonrails.org/t/active-storage-in-production-lessons-learned-and-in-depth-look-at-how-it-works/83289
https://justin.searls.co/posts/drive-by-active-storage-advice/
jmiven: I wonder if we should extend the Author checkbox on story submissions to mean "author, contributor or subject of the story"
pushcx: I was thinking of changing the checkbox to something like "I might benefit from this". I like your list, but every time I give a list related to self-promo people somehow discover they are doing some other term that is not exactly in that list. :|
self-promo
IRC authorship checkbox conversation
just SO hard to understand
sketched a date migration; slept on it and changed strategies
tuple:
comment_stats: date, average votes per comment
auxiliary tables; book rec
steps
x rewrite migration
x create model
rewrite query
create job to fill it regularly
test recent_above_average_comments
post-stream
merge autoload PR
title:
I grew ten gray hairs that day
very obvious or very obviously nefarious
Transcripts are generated with whisperx, so they mistranscribe basically every username and technical term. They're OK but not great, advice appreciated.
Recording
01:53Hello.
Happy Monday.
Alright, I'm just getting the last crap moved around on my desk, so pardon if there's a little rustling.
And the cat is figuring out where he wants to sit, so we'll see how that goes.
The
Let's bring up the desktop and the notes.
Let's start on notes.
chamlis_ ahoy!
Hello, hello.
dpk0 sound is choppy
All right, so this is Office Hours for Lobsters, where we talk about the website, Lobsters, or the code base, or I run queries for people.
And when we don't have...
The sound is choppy.
What?
But I...
frici Ahoy and yes it seems to be
Thank you, dpk.
dpk0 okay, itβs better now β¦
I opened up the volume control as the terrible workaround.
I think it should be good now.
And yeah, so it's that buffer under run thing when I don't have the volume control panel open that just I've been avoiding debugging.
And
I got it open just as I was getting through the stream, and the cat decided that he wanted to change his mind three times about whether he was going to be in my lap or on my desk, and I got distracted, and I was just like, all right, let me close out what I'm doing and stream.
So I closed the volume control panel that I meant to leave open.
So one of these months, I'm going to have to debug that properly and actually fix whatever the heck that is, because that's getting a little tiresome.
So if you didn't catch it, because it's choppy, this is office hours for lobsters.
So we talked about the site and the code base, I do pull request review, I do issue review, I am happy to answer any kind of questions about stuff.
And when there aren't any, which you can pop up with at any time when there aren't any, I tend to work on code.
So last Thursday, I did not make the usual scheduled stream just because I was out in the suburbs visiting the in-laws and everybody is fine.
Not any kind of emergency, but I have no idea if you can stream from just an iPad.
It's funny, actually.
Visually, the stream wouldn't change that much, but there just wasn't a quiet place to do it.
So I thought rather than suffer through a bad stream, I would just take a pass until today.
And then on Saturday I was like, all right, I want to put in some coding time.
Cause I try and have two good lobsters coding blocks.
That's what these streams mostly are.
And I fixed one bug and found two more and somebody else found one.
So it was one of those days where I was like, okay, one step forward, three steps back today.
I am a minus two X programmer, I guess.
All right, so let's see.
I was talking about... Oh yeah, it's highlighted here.
So yeah, before I jump into all this self-promo stuff, I wanted to do pull request review and take a look at the bugs and features.
Because there's been a fair amount of activity and I want to make sure I'm moving all this stuff along.
So let's take a look.
And I know this one hasn't been moved.
And this one hasn't been moved since the last stream.
But these couple have.
And this one was weird.
I just saw this because it just came in.
What, an hour or two ago?
Oh, there's been some rewriting here.
This was originally, when I looked at this an hour or so ago, I saw just a commit from this account Charblet, which joined 19 hours ago.
So it's kind of implausible that there is another commit from four days ago.
And their only contribution is to make a pull request to lobsters.
Like this is so strange.
I didn't see this name, Charles.
Yeah.
Or did it, I went to the end.
So persona, is there a, I'm just going to guess at a domain name here.
Is there a AI called persona?
No.
07:19Because this feels like, oh, this is, no, none of this is relevant. This code, this is just such a nonsense change. I peeked at the diff and they threw away a whole bunch of instructions and links in favor of, some broken stuff like there was no there's obviously no thought involved because they took our very general instructions that work on multiple operating systems and threw them away to have a thing that only works on debian derived distributions and then i don't think that's even the correct invocation it's not just that it's called maria db but i believe it should be called maria db dash server i don't know what the debian service is named offhand for sure but this just doesn't look right so this and then there's a bunch of like white space changes i don't understand what someone was thinking and they added the word test so i don't think there was a lot of thinking
09:36frici looks.. bizarre
Trying to be polite about it.
And...
The thing that is weird... Persona ID?
I wonder if this was...
They made their own fork of lobster?
and they meant to pull requests themselves, but instead... Yeah, so they have this here.
The branch name is weird because this isn't the upstream anymore.
So I wonder if they were trying to make their own fork, but then lost track of what they were doing.
pull requested the upstream repo instead of their own thing.
I don't know.
It's just weird and annoying.
I'm having a... No, I'm not seriously, but I'm reminded of how... Yeah.
I don't remember the numbers anymore.
It's on the About page.
But a while ago, a couple years now,
the University of Chicago decided to experiment on maintainers, which I was one of them.
This was really, really crappy, but they opened a garbage, a couple of actually, maybe three pull requests where they ran some automated code tool, and then they experimented on maintainers because they wanted to say, well, if our tool is useful,
the experimenters will merge the prs and it was just these garbage micro optimizations that made the code base really brittle and i tried to talk to them but they wouldn't talk back to me because i guess they were trying to and i hope you can see the most sardonic scare quotes prove that their tool was useful
And it would be better for them if they didn't have to have a human in the loop explaining their bad PR because then, you know, oh, it was accepted on its own merits rather than, you know, them being such convincing writers.
So instead they just, they updated one or two of the PRs along the way.
It was just such shitty behavior to be experimented on.
It still feels bad.
God.
And I contacted their institutional review board because I was like, hey, if you do experiments on people without informing them or them consenting, that's really shitty.
And they were like, well, we're okay with it because they didn't care about you.
It wasn't a test on a human subject because they don't care about you.
They only care about their tool.
And I was like, that's, yes, that's my complaint is that they only care about their tool, not about the human that they're experimenting on.
Like, how would that logic apply if they were like, well, we don't care about you, the test subject.
We just secretly gave you a drug.
We care about the drug.
So then you're not a human test subject.
We're testing the drug.
So anyways, you Chicago can go fuck itself.
And whatever that weird PR is, please don't do that to open source maintainers.
Do not experiment on them.
Don't run bots.
Like, I mean, you can run a bot, but just disclose what it is and don't waste people's time and ask permission instead of experimenting on people.
I feel like this isn't weird and hard, but somehow people feel when they make a tool that it's fine to experiment on them.
All right, so I'm going to jump over to this one, because I did look at this PR and respond to it this morning.
chamlis_ that PR reminds me of the hacktoberfest shenanigans a few years ago
I try and respond to these things on stream, but then, I mean, I actually like programming, so I go and I peek at the pull request, and then I start leaving comments, and then I do all the work before the stream.
Oh, yeah, the Hacktoberfest shenanigans, Shamless?
Yeah, we had... God, what year was that?
It was like 2018?
We got some of those.
So what Shamless is referencing is there was some company that put on an event they called Hacktoberfest where they said, hey, if you can get a pull request merged to an open source code base, we will give you a free T-shirt.
And what some people heard was you can get a free T-shirt as long as you can do any commit.
And so all of a sudden,
was no qualifying there was no volunteering to be involved there was no filtering there was no quality bar and so all of a sudden people started opening just an enormous number of garbage prs against pull requests and the lobsters caught i think i had two or three of those where it was just meaningless copy changes like
adding an adjective to the readme or changing some white space in code just anything that they thought they didn't have to spend time on and they thought someone might commit and they just shotgunned out so like the person who wanted a free t-shirt the typical one would just shotgun out a couple of really crappy busy work prs
in the hopes that one of them would be accepted during October and they would get a free t-shirt or $10 off hosting or whatever the heck the promo was.
And it was just a distributed denial of service attack against open source maintainers.
That one was pretty annoying.
We did eventually, I want to say a year or two later participated and I tagged a bunch of things with Hacktoberfest and we got a,
contribution or two but i definitely haven't done it for the last year or two because just if it's happening i haven't been reminded of it because they're not actually they took some steps to curb the outright abuse but it was clear that
They wanted buzz for whatever their project was for the t-shirt, which is, I do remember which company did this.
I'm just deliberately not mentioning them because the whole thing felt kind of janky and lazy because they don't actually want to dedicate thousands of their own hours to talking to open source maintainers and managing these contributions and trying to make sure it's a really good experience.
They want to spend a dozen hours on a marketing site and a couple hundred bucks on t-shirts.
frici Hacktoberfest is still happening just not as hugely pushed these years iirc
So anyways, history aside, I saw a nice, I think I showed the first version of this on stream.
I saw a nice little, Hacktoberfest is still happening, just not as hugely pushed these years.
Yeah.
So I haven't happened to see it.
I would probably participate again if it looked like it was being well-run, but... Nah.
They just...
They started out really, really rough.
They really dug a hole for themselves with how poorly that first year or two went.
So it's hard for me to want to chase them down and look them up and, you know, sometime in late September start tagging issues and...
promote it to my social feeds or post it on the site.
I don't want to do any of that stuff for someone who dumped busy work on me.
pushcx https://github.com/jbranchaud/t…
So I saw this nice little blog post, which I might as well throw the link in here in the chat, about how
18:12there is a benefit to these nearly equivalent functions where execute it's fine for write queries but for read queries you probably want to call select all because it won't blow a cache and which is the big one and then also i i don't remember if it yeah i believe it returns data in the exact same structure and
There also is some, these are so frustrating.
When I see something like some database connectors, which ones, even if it's not a complete list, if there's just one or two popular ones and you want to mention it, that's a lot more useful.
So there was, all right, a potential memory leak.
We have a couple of places where I call in the code base active record connection execute.
I try not to drop down to raw SQL, but for the stats page and some of the moderator tools, which are things that look over the database in a big analysis way.
I'm not putting the right words here.
sort of roll-ups analysis queries rather than crud operations and active record really just still doesn't have a great way of saying i'm going to select this projection where i'm joining stuff out of several tables let me put some structure on that so you just have to drop down to
run queries by raw sql so a oh first time contributor how wonderful someone named jason moke mock came along and offered a pr to replace the couple which i really appreciated and i asked hey is there any chance you noticed if there are tests on these because i remembered that a lot of these
read only overviews of things especially when they round up a bunch of stuff i was just a little lazy and didn't write tests for them in part because they are doing things that are kind of hard to test so jason seems open to the idea of adding tests so i asked for a couple of smoke tests that would be really wonderful if they want to add more
there is also a this build failure is just a small chore the security tool that we use breakman which looks for things like sql injection noticed that the pr touches a couple of queries that inject values and none of them come from users so it's safe but breakman can't know the source of every variable so anyways fingers crossed that
in the next stream or two, I'll be able to merge that down with even just a smoke test or two would be lovely.
So this one was really interesting.
pushcx https://github.com/lobsters/lob…
I'm going to grab it for the scratch and I will share it here in the chat.
21:55So this is one of those
long-running annoyances i've had where it's easy to slightly misconfig stuff where perhaps we worked around something in rails 4 or perhaps we didn't understand the correct way to do something in rails 4 or it changed between rails 3 2 2 and what are we on 7 2 now so the dozen years that the site has been running we just kind of
accumulate this sort of cruft, and I threw it in the issues earlier this year, but it's been annoying me for at least a year or two.
The code in the extras directory does not get reloaded, so I have to stop and start the Rails server constantly if I tweak things in there.
And it's weird and frustrating, and it's not very Rails-y, so I had the strong suspicion that this was some kind of misconfig.
which is why I wrote a long comment that this is maybe a weird bug in Rails or maybe some kind of subtle accumulated misconfig based on our years of updates from Rails 3.2.
Or maybe I'm staring through some obvious typo in the word extras.
I don't even know after how many times I've lost time kicking this around.
So you can probably pick up on a little bit of frustration and exasperation there.
But I'm very glad I filed that because someone, another first-time contributor,
came by and apparently recognized what the issue was, which... All right, where's my bin?
Come here.
All right.
Bin...
Okay, it is here, yeah.
So we...
add the x-rays directory to autoload however over here in site work we ignore well the old rubocops i think these are deleted now and we manually load these and i think
rebelelder Evening o/
I really do think that Krydos is onto it here that, however, it looks like we also manually require all files in this folder, which probably, I don't know, messes up with the Ruby on Rails reload mechanisms.
frici Evening π
So I strongly, I think they're onto it where even though we are saying, hey, let's auto load this,
Oh, hey, Rebel Elder, welcome.
Oh, and I didn't say it, but hi, Freechi, hi, Shamless, hi, TPK.
It's nice to see all the familiar faces.
But I really suspect that doing this require outside of Zitework or in addition to Zitework wanting to autoload based on constant names, just something in there is, or we're loading it before Zitework starts to come up.
So I'm not going to merge this one on stream, but I think, oh yeah, I want to approve this and run it.
is causing this hassle outside of or the autoloader autoloader liberty ignores changes code or
27:10So what I've said is that this is great and I appreciate, and I'm going to try it out. There's not a lot of, because this is such a, how does rails find and load code is it feels like it has a really big potential to be. Well, to blow up a production deploy because we're changing how the real server boots and how it finds code. And even if it works in development mode, I know that rails loads code a little bit differently in development and in its production modes, let alone between my desktop and the production server. So I'm not going to merge it on stream. I will. And probably not tonight because I have dinner plans, but sometime oh yeah so it's gonna have to be tomorrow i think looking at my schedule for the week but i want to be able to babysit this deploy and really closely watch it i just have a what's that where's that famous quote
28:39albynton Hello!
no cute meme but no oh i have it in my i have it in my fortune file let me grab that so i have a yeah there might be something a little spicy so you know if you have small ears there may be a curse word on stream in a second but
I've collected.
Hey, Elvington, welcome back.
espartapalma I say, you say oohhh!!
I've collected quotes for years and years.
And so I have a bunch of just funny, silly quotes that I run with the fortune.
So I know this.
So we're going to jump by a couple of things here.
What is it?
29:43Ah, yeah, here's the quote I'm thinking of.
All right.
And of course, you must be careful not to overwrite the bounds of memory blocks.
Free a memory block twice.
Forget to free a memory block.
Use a memory block after it's been freed.
Use memory you haven't explicitly allocated, etc.
We C++ programmers have developed
tricks to help us deal with this sort of thing in much the same way that people who suffer severe childhood trauma develop psychological mechanisms to insulate themselves from those experiences i love this quote of and this is a very i want to say this is like a late 90s early 2000s is when this quote came around i'm not going to try and find the original source here live but
that sense of I've been there so many times that I have the scar tissue and the CPTSD or the more, you know, the less flamboyant way of saying it is I just have the intuition and the sense and the gut feeling that certain things are more dangerous than others, or we have to use particular code patterns.
And I think of that quote every time that I make a decision in this way of
albynton It's an other way of saying "C++ is traumatic"
Boy, I know every time I touch the way Rails autoloads codes, I find some difference between the development and production mode or my desktop and the actual production server.
And so when I say I want to babysit that deploy, that means I've just been burned a bunch.
Another way of saying C++ is traumatic.
Perhaps.
I...
I wouldn't want to write new code in C++, but I don't know that I can overstate how influential C++ was in the 90s.
And part of the reason that it was painful to work in was
it was a big grab bag language with lots of new features getting developed at a time of rapid hardware change with lots of experimentation into what could possibly work.
And so the quote I gave is kind of, you know, it's an outpouring of frustration and maybe trauma outright, but it's also
kind of a testament to all of the value there was in C++ in the 90s.
And I really do like the modern style of, hey, let's design these features into this language so that we have fewer foot guns.
I think the whole wave of programming languages like Rust and Zig and others that have made memory safety a
major consideration alongside performance especially for systems language you know they are very obviously and publicly explicit about being responses to c plus plus and finding ways to build them into the language but that reminds me of another bit of good news i saw who was it was kevin c wasn't it kevin c if you are here hello but you submitted
a very nice little story here.
So what's new in Fsharp 9?
Fsharp is Microsoft's functional programming language that runs on the .NET runtime.
albynton It's mostly a play on the message :) "we have scar tissue, just like people who suffered trauma" -> does this mean they too have suffered trauma?
And I just, the neat thing, the reason I like this article is if you read any article that's like what's new in Fsharp this year, you are also reading what's new in Csharp two years from now, roughly.
frici I always absolutely forget F# exists until i see something posted in lobste.rs
because Microsoft, I have a really, it pains me to praise Microsoft, but I have a really high respect for the .NET theme.
That's fair, Albington.
I'm just overthinking it.
The practice I really like about the, from the .NET team is that Fsharp is a creative, innovative,
top quality functional programming language where they are constantly making new features and new ways of expressing things and genuinely it's a really interesting language for following functional programming in part because their docs are
written more to an industry sensibility where languages like Haskell and OCaml that are primarily used in academia, mostly get academic writers writing papers and conference proceedings about them.
And just the style difference of getting a company blog post or a manual is a lot easier for me to read about them.
And then they have the practice that really impresses me where
they have very clearly the last gosh five no more than five years now because i'm old maybe eight or ten years treated f sharp as kind of a proving ground for functional programming concepts and new tools and then after they get some more experience with them in real world programs they find ways to port them over to c sharp which is their
you know i keep wanting to say like imperative or oh but you know it's it's oh in that way that languages nowadays tend to popular languages or multi-paradigm and pretty pretty relaxed about it and so they've made you know
chamlis_ wait is this article from tomorrow?
A bunch of functional programming concepts and tools available and I feel are really advancing the mainstream understanding of these programming concepts that would otherwise be locked away and academic oriented languages by carrying them from F sharp to C sharp so.
Is this article from tomorrow.
1112 no that's a.
Oh, yeah.
I guess it is from tomorrow.
And it's funny because it was posted 26 hours ago.
So yeah, good catch there.
The date is a little odd and implausible.
I don't know what's up with that.
Maybe they just schedule all their releases for Tuesdays or something.
I can't guess.
albynton Even worse, it's from next month!
So in any case, I guess what I'm saying is even though I have never worked in or written a line of F-sharp or C-sharp, I do enjoy reading the F-sharp posts and then seeing these things show up at Albenton right in EU dates or maybe Australian dates.
I really enjoy seeing what's coming and what this work is because I really do think they're doing
frici nah its american date but weirdly tomorrow
just just excellent work.
You know, this is what it looks like to improve the state of the art.
frici F# 8 is dated 11/17
Because or, you know, maybe the term is state of the industry, because it's it's not enough to make these features, you also have to explain them in a way that people can understand.
And some of that is putting these functional programming concepts into
pushcx https://lobste.rs/s/apb7nl/what…
know our standard apl derived creole where all all popular programming languages kind of look like each other and kind of have the same syntax so anyways do check out i didn't share the link did i i would say do check out f sharp or at least the blog post
if you nobody anybody on the team tell them i say hi and please come talk about it on lobsters because i think you're neat all right so finished with this talking about this reload and i will have to merge that tomorrow which let me put it on my
So stream, merge, auto, load, PR.
Oh, I was trying not to show those notes because there's a bunch of stuff I want to talk about in order.
Whatever.
This is not exactly a high class, high performance.
You know, this is more of a putting on a show in the barn than a night at the Ritz.
39:06I don't think that's the right idiom even.
All right, so let's... Oh, no, I was thinking that was hide whitespace.
I don't need to see that this function moved up 10 lines.
That's not actually important to me.
I don't really know why it moved up 10 lines, but it also moved in a layer of indent.
I'll have to check on that.
Doesn't...
look like the code changed at a glance yeah i don't see any semantic differences here okay so what did they change so eduardo here has made many prs to lobsters in the last maybe two three months they've been a lovely contributor
So we're going to say that on the form, we're going to have a... Has CSS added nesting when I wasn't looking?
I don't... CSS nesting module.
chamlis_ last I remember Chrome was looking for feedback on how it should work, I think
without the nesting selector, with the nest, wait, parsed by the browser, similar to the is.
This is new to me.
CSS nesting defines a syntax for nesting selectors, providing the ability to nest one inside another.
Where's the little,
Oh, shoot, usually there's a can I use table down at the bottom.
Maybe it's up on the top level page here.
All right, well.
41:19chamlis_ oh wow
Wow, look at all that green.
For a feature I never heard of.
That's really solid support.
How wonderful.
albynton css nesting is still pretty new
dpk0 oh yeah native CSS Nesting is great
so it looks like it started getting support what a year and a half ago come here chrome and and then firefox picked it up about a year ago okay so as an old fart i feel i am allowed to describe a feature that went solid green
more than a year ago as new.
Because I've been making web pages since 1995.
But that's wonderful news.
I had no idea.
That's great.
dpk0 you still have to make sure all your nested rules start with punctuation for maximum compatibility, but thatβs usually easy (use & before the selector)
I almost wonder if we should, I don't want to, I don't want to take on the churn of
dpk0 i think that should be & button still yeah
adopting it everywhere in our css but that's really neat we have to start with punctuation are you referring to so dpk are you saying that this button on line 416 should start with that ampersand as in that because i saw that here in the mdn description
42:58dpk0 that is no longer a requirement of the spec but some browsers still need it afaik
So with that nesting, with the nesting selector, well, let's ask, can I use?
Because the thing that really caught my eye was there's nothing in the known issues tab.
Does not now.
Yeah, so, okay, so here is the exact thing you were thinking of, DPK, a note that
ampersand is required and i can't actually i can't point at the link without come here can i i don't want to test i just want to click on this link i can't click on this oh it's highlighting it i get it says how often i've recently gone into the weeds so it looks like yeah fixed so that's fixed long ago
And then Safari also had it, but no longer does.
dpk0 hmm maybe you donβt really need that either then
So I don't... You clearly knew a lot more about this feature that I had not heard of, but boy, have I wanted it since what?
CSS1?
Yeah, I think...
So I think...
It was a requirement, but just isn't anymore.
That's great.
So thanks for catching that.
We all learned something today.
All right.
And I suppose they had to use the ampersand on this.
I can see how this would be ambiguous.
of without the ampersand, the pseudo class is implying that it is looking for an element nested under button instead of applying it to the button itself.
Maybe that's what the distinction was, or maybe that was part of what happened in that Chromium issue as they realized they wanted to distinguish those two cases.
This is great.
chamlis_ time for me to golf a few more bytes away on some stylesheets
Let me grab this.
45:55All right.
46:02So I should probably actually read this CSS. The CSS looks good. And not disabled. So when you hover, it kind of highlights. That's fine.
...21Oh, I see what they're doing. So the four reasons... The story disowner form. Where did that class come from? How long is this PR? We've talked about splitting up the story editing forms because there are so many different purposes. This is lovely. So on the previous version, Eduardo had the action on the stories controller using http verbs in a way that didn't match rails standard and i left a comment saying hey you can do it with request.xhr in this way and they have so it should even work without javascript involved and then they're replacing our a with a button and then this css is basically styling it to look like regular text. Display inline, no border, no background, and then highlight when you go over it like a link. This is really tidy.
47:38And so now instead of having an Ahrefs with this hashtag, hashtag the youth, oh man.
I remember five years ago I was talking to one of my nieces, and we were looking at a phone display, and she was like, yeah, it goes, she was, I don't know, seven or eight, and she was like, yeah, one, two, three, four, five, six, seven, eight, nine, star, zero, hashtag.
Not hash or pound or octothorpe, hashtag, because that's the context she had seen it in.
And I grew 10 gray hairs that day.
All right.
We got a little spec.
Lovely.
Oh, this is great.
espartapalma > I grew ten gray hairs that day
espartapalma so quotable XD
I didn't double check if the build has run.
And it has.
Great.
Did Warder have any other comment?
No.
All right.
How great.
Grew 10 gray hairs that day.
Oh, wow.
Here, I will grab that for potential titles.
And I will tell you another story.
This is me typing the title off screen.
The
49:18There are a couple of things that are, are just human universals. And one of them is that at every wedding in every human culture, there is a pile of small children running around chasing each other. And it's like, you know, a pile of cousins that only see each other once or twice a year at weddings. They do this at funerals too, but weddings are more fun to talk about. So. I went to India for my wedding, that second one. We had one in Chicago and then we had another one in Bangalore. And which one counts as the real one depends whether you are the state of Illinois or my in-laws. GitHub. Let's put this up here.
50:17So we went and I was... You know, we had this whole big event and then since everybody in the family from the... there was a whole Indian diaspora in the late 70s and 80s where people were able to emigrate from India and start careers somewhere else. And it's really nice to earn dollars, whether that's Australian dollars or American dollars and spend rupees. And so a lot of people moved overseas to have professional careers and send money back. And then they have kids there, right? So everything's complicated. So when we got married, a whole bunch of people came in from around the globe and so all of these like second cousin kids were running around and at the tail end i was kind of tired from jet lag and all of the stress and everything and i was zonked out sitting in a chair and one of the you know she's related somehow we'll call her a a niece but she was about Four, like the whole pack of cousins ran by giggling and having fun. And then she peeled off from the pack and ran up to me. And well, here we go. For the first time I miss having a camera on screen. Cause I'm holding my hand up about two inches from my face. Cause she got right up close to my face in the way that only pets and little kids with no idea of personal space do. And I kind of like gave her the side eye and I was like, why are you in my space? And she looked at my temple and she was like, you have gray in your hair. Because it's also worth calling out here, like I am also, you know, one of very few white people in the room. And so I'm at least an object of curiosity in that way to a four-year-old. And I looked back at her and I said, yes, it was a wedding gift. And she went, oh, okay. And then ran off screaming with the whole pack of kids because, man, little kids will believe anything. Anyways, getting married was stressful, but it's been super great. So let's see. Let's write a request. Thank you.
53:02And then I'm going to have to click through and make sure the issue is still open because I don't want the pull request to automatically close. There's actually a bunch of these to clean up.
...50So that's really pleasant. I just wanted to, as I wrote here, you did a great job of building out a new pattern for fixing all of these links. I hope you'll take on the others. But even if you don't, you did the hard part by writing the first one. So let's make sure the bug stayed open. And it did. Great. Do I need to write anything there? No.
54:41create pattern for how long these forward to adapt the CSS to the selector over the other links.
55:15Who would call these comment action?
...44yeah I love this that's great what a nice contribution this kind of thing where there's code to clean up I'm really I'm smiling about it because the first one is always the hardest it really is let me grab the link and put it in here so it's in the notes for the stream archive viewers great
Good time to remind that this is Lobster's office hours.
If you have queries you want to run against production, otherwise I work on code like merging pull requests, yay, or talking about issues and trying to get people to whitewash our fence.
So there's been a whole bunch of stuff since the last stream.
And this one, yeah, I assigned myself.
So let's see, where did I want to start?
We can start with new stuff or things we've talked.
Let's start with the, all right.
Oh wait, why is this?
Oh, this isn't open because I haven't clicked merge on the PR.
All right.
chamlis_ yeah sorry for missing the on-site discussion re the mastodon instance
So let's just go in number order.
I don't have any special reason to go through them in any particular order.
57:09Oh, Shamless, no, you got nothing to be sorry for.
I didn't click on yours because I know it pretty well.
pushcx https://github.com/lobsters/lob…
So this one that Shamless is talking about is the one for how we have to migrate away from bots in space.
I actually just got an email from them
I don't know, a half an hour ago, an hour ago, saying, hey, folks, if you have an active account, an active bot, you've got to get migrating.
And they linked to their very nice blog post and all the other stuff.
So that was nice for a reminder.
And I actually opened the issue tracker to file a bug for myself.
And then I remembered that Shamless had already done it.
So I appreciate all these independent reminders.
This is kind of the opposite of Hacktoberfest, where I have lots of warm feelings for bots in space, and all of the independent reminders of the thing are helping as opposed to, you know, it being too easy to forget that this is happening and the chore needs to get done.
dpk0 would it be practical to make Lobsters itself into a (probably read-only) ActivityPub instance? π€
I did post on lobsters that, hey, does anybody know an instance?
And...
chamlis_ I just always feel like I'm throwing peanuts from the gallery :p
Got a couple of responses, but I will probably just go to a big popular one like Mastodon Social.
So DBK, would it be practical to make lobsters itself into a read-only activity pub instance?
pushcx https://github.com/lobsters/lob…
Yes, I think it would.
So Calvin left a comment.
Here, let me throw you the link so you can follow too.
dpk0 ah, too obvious a solution for me to be the first person to think of it :D
And Shamless, I mean, yeah, I am, at least a little bit of what I'm doing when I'm streaming is entertaining, so it's fine to throw peanuts at me.
Especially, I do appreciate that you keep finding links for stuff.
So I've mentioned a couple of deep cut things that you've found, and I've appreciated that.
So yeah, DBK.
rebelelder Keep throwing the peanuts for me to eat
There is an open feature request number 499 that says hey.
And it's funny, your parenthetical probably read only is my second comment on this here, right?
I haven't looked in this.
But yeah, there was my first one.
Maybe a third comment.
Shoot, I know I left it as a comment here somewhere.
Maybe somebody else did.
59:57Or maybe I just totally forgot it and I'm trying i guess i'm trying to claim hunter's strategy because i liked it so much whoops excuse me so what hunter laid out let's give proper credit where it's due was let's start out by having basic support and then slowly build up with more from reading stuff to more writing and i really like that kind of first let's allow people to read things in a way that is convenient for them and then we can think more about what would actual interaction stuff look like and do we want to do it because i'm i'm very very careful about stuff that's going to change core site behavior we talked about that proposal last week to support magnet and ipfs links and i'm real reluctant to add that one because there isn't great browser support. So in that same way, I would be very cautious and deliberate about adding anything that does an incoming right to lobsters the website and the community as 99% of people experience it through their browser rather than their activity pub client. Anyways, so given that we've got what four weeks, five weeks until the bots in space deadline. Realistically, I am not going to, nobody is going to pick up the activity pub feature and hack all of that out in the next couple of days. So I will just pick an instance and get us signed up. And I think the instance is probably going to be, well, actually, does Ruby social permit it? so i was on an instance called octodon and then it announced it's shutting down some time they gave a really long notice period which i appreciated and i moved over here to ruby social which is nice because it has a whole lot of programmers on it and lobsters is written in ruby so if they would permit a bot maybe this is just the easiest place to land Don't see that they have anything about bots in the guidelines, though. So I will have to ask. And I think I would rather... Oh, it says no bots, unless they're cute, funny, or useful. Bots should avoid posting to the public timeline. Well, I guess that's my answer. No. Dang.
01:03:06So I guess I will, head over to mastodon.social and sign up there. Cause, oh yeah, it was GSora who called that one out. Just one of the big instances. That's not super, I don't even know what the next adjective is. I don't just something. That's not going to change out from under us. So I'm skimming their rules and they don't mind if we have a bot, it looks like. Good. No, I don't actually need that. I was thinking it was the second section of rules. Yeah, lately. The last week or two, I've really been appreciating, no, really the last month or so, I've been appreciating Blue Sky a lot more than Mastodon. And I know the big feature of Mastodon is it's distributed, but when I am in the middle of taking on a chore because it's distributed and getting burned by it being distributed in this way, it's especially kind of frustrating. That every time there is a discussion of the two someone pipes up to say blue skies not really distributed and mastodon is that's not. A primary concern for me as an actual user of these micro blogging sites, I want a nice ui I want it to be reliable, I want to have a good community that's active and talking about interesting stuff. The technical questions of it are, I just don't have enough spare energy to have opinions on those and allow my technical opinions to change my user opinions, if that makes sense.
01:05:15All right, so we have a bug report that...
frici wouldn't fosstodon be a better place for the bot if they allow bots? I remember some controversies making many servers limit or defederate mastodon.social π€
They commented on a post, they clicked the wrong comment, but the new comment was deleted.
...40Would Fostodon be a better place for the bot if they allow bots?
I remember some controversies making many servers limited to federate Mastodon social.
Yeah, and there's a pretty good example of
frici then again there are much more than just foss discussions i guess.
second example of where Mastodon being truly distributed is actually kind of frustrating.
I don't want to care about which instances are beefing and federating with each other.
Let's take a look at Fostodon.
And I actually have a mildly negative
01:06:28frici its org yeah
frici I am trying to remember, but i feel there was some negativity about it too yeah
A mildly negative association with Fostodon because the people for whom it is very important that they are doing FOSS are the kind of people who show up in not really related discussions to explain to me about how Mastodon is truly distributed or
the finer points of why everything should be GPL.
And I find that really tedious.
01:07:08But if they are a programming oriented instance, that is probably a better place. Yeah, so they have a rule about this one. Number six, don't use automated tools to toot without participating in the community. It's fine to post with one as long as you're an active member and respond to replies you receive here on monitor accounts that post automatically are not acceptable. That's the lobster spot in a nutshell. So I don't want to land on this one. That's a shame. Because I would prefer an instance that's kind of programmer oriented like fostered on is but I definitely don't want to break their policies and it's really interesting to see this one, because it touches on. A lot of I mean I can just you want the other browser back up, but I have self promo highlighted and we say a very wait let's show the side by side. I have a very similar thing where. It's great to have authors participate in the community, but not to exploit it as a right only tool for product announcements or driving traffic to their work. So I feel like that's quite a close echo of it's fine to use a tool or it's fine to do these things if you're active and normal, but don't just use us this way. So I definitely want to respect that one because it is such an active concern for us. wanted to talk more about that on stream so i don't need to read the code of conduct if i know we don't fit the guidelines so i think it's just going to be mastered on social and you know fritchie to your concern that people may have defrederated or blocked mastered on social Kind of feel like if that was a common problem that someone would have popped up in the mention of it on lobsters to say, whoa, that would be a bad call. So I will just leave that. All right.
01:09:34so next in the issue tracker is i guess this is counts as a feature request although it's more maintenance i should make a maintenance label right i don't know that we get enough of these but i guess i could call it dependencies so there is a new major version of rails out
And we should update to it because, boy, do I not want to fall behind.
dpk0 yeah, my entirely arrogant view is that Mastodon instances which defederate mastodon.social are not worth being on anyway; thatβs usually a sign of a server admin who uses the βserver-wide defederateβ button as a βdisagreeβ button for toots they donβt like
I've actually been thinking, because we've seen some warnings out of RuboCop that I should probably bump the dependencies sometime soon.
The... What is it called?
01:10:28The features that are in Rails 8 are really pretty interesting to me. I think I talked about this on stream a month or two ago, but the way that Rails has this solid cache and solid queue for, as far as I can tell from the naming convention, Solid refers to any time they are using a SQLite database on the web servers.
01:11:07I think this is a really interesting pattern.
I talked about it in the context of Wafris, that blog post from maybe a month or two ago that did well on lobsters and HN, and I know the guys who made it.
about using SQLite in a similar way.
I think this is super interesting for Rails.
And I don't know.
Especially for our miscellaneous caching that we do in Keystore, I think solid.
So that would be real interesting to see if we can replace a bunch of those.
then the other thing is we use the disk caching for caching our views in production and i've had some issues tuning that to work right where we end up with stale entries in the cache and i hacked out a cron job to delete things from the cache and then that cron job is like if we get really swamped with traffic or
It's less about a traffic spike.
If we get a spider that really aggressively goes broad on the site and hits a huge number of pages, that generates a lot of cache entries.
And then the job cleaning up the old cache entries can take so long that then a second job runs because it's just a simple cron job that fires a
find command to locate files with an older m time and remove them and it's it's fine to have two of those running on the same directory at once but it's a sign that it's not super well designed i'm also real curious about kamal2 i've heard a couple of nice things that folks say it's
really taken care of rough edges from the first one.
I'm still looking for more experience reports because I still have no experience with Kamal, no experience with Docker.
But I do think that easier setup for developers would be hugely valuable because I really appreciate the pull requests we get.
And if it can replace Ansible in our production setup, I would really like to not have such a big moving part that has been
kind of difficult to maintain.
Ansible is really overkill for we have three production servers.
We only rarely have to replace one of them.
and we don't have any huge needs for building our own software besides needing a fairly recent version of ruby which isn't always packaged in ubuntu lts so like we're not demanding all of the value of what do you call it we're not really
using ansible in a way where its roi becomes valuable and i spend a lot of time frustrated that ansible acts like it's a declarative tool and it is not it is an imperative one and it you know i have a little bit of that like nerd outrage that ansible acts like
It is declarative, but it isn't.
So, for example, I can make this real concrete.
I need a... Do I know the file name offhand?
Rolls, lobsters, worms?
yeah so we have this list of ubuntu packages that we require in production and node.js is here because in production i believe we minimize things the javascript just a little it's not a big win especially because the javascript is gzipped anyways and rails 8 has kind of said look it's just not worth it
to have a moving part for such a small performance improvement or really such a small bandwidth improvement to be a little more specific.
Let's just drop it.
There's some other stuff going on there that I don't want to jump into because we have such a small use of JavaScript on the site deliberately.
So I would like to drop this dependency because we've had a break in production.
It's out of date in a couple of ways.
I would prefer to maintain only one programming language, Ruby, in production, not two.
And Ansible says, oh, we're a declarative tool for maintaining servers.
But if I delete this line and I deploy, Node.js will still be on our servers.
dpk0 time to switch to Nix
Because this and most Ansible functions are imperative commands to install packages.
They are not, this is the list of custom packages.
Reconcile those two things.
Time to switch to Nix.
Oh, do I not have enough gray in my hair yet?
dpk0 (despite being a Nix user, i know i am weird and would not really recommend it to anyone else)
I have a, I can't believe if it hasn't come up on stream yet.
pushcx https://push.cx/nixos
frici I read that nix blogpost... I could feel the pain in every sentence and also agree
I just put it at slash nix it hasn't come up on stream has it all right so let's go to the can't navigate my own blog ah here we go failing to learn nix so you got to drop down to the second heading because a lot of that is set up for an old vps host that we used to use and then
there is a long very frustrated blog post about how i have repeatedly bounced off of nix both initially trying to use it and then coming back six months later a year later two years later so if you look at these dates 2018 7 2019 12 when was it originally posted 2018 yeah so like
dpk0 itβs the best software with the worst user interface. beats even Git in the discrepancy between quality of idea and quality of implementation
over a year and a half or so of time i tried repeatedly to get nix to work for me and some of this was especially at the time the docs were rough a small amount of this is my interactions with the community went pretty poorly i think this little final update was especially frustrating because
when i couldn't get it to work and i asked for help i got people telling me that you're just wrong and you're using it wrong and i was like yes that's why i'm here i know i'm using it wrong but the errors don't actually tell you anything informative and the docs didn't tell me anything informative and getting told like you're just holding it wrong was
extremely frustrating and it happened repeatedly when i was interacting with the nyx community so at least at the time it seemed to be kind of common kind of the the cultural norm oh man a link to twitter that's been a minute i'm wondering if nick's ever released or luke ever released that
01:19:38I forgot Luke was writing the book and I don't know if it happened.
...55dpk0 the community is terrible, the documentation is terrible, the community is responsible for the documentation and thus the documentation reflects the communityβs terribleness
Looks like something happened.
Oh, something that's even active.
That's promising.
frici When I read "opinionated" on anything something stirs in me and not in a good way...
I'm not going to take another run at Nix, but I think I really enjoyed his writing.
So if someone does want to take on Nix, there you go.
01:20:33dpk0 another fun thing is that the people who maintain Nix the command line tool and the people who maintain Nix the package index are two different groups who do not like talking to one another
yeah so oh so dpk to your points here about all of the things that are kind of rough about nix i think part of my frustration at all of those things which i share pretty much all your criticisms is my deep deep frustration that i also think
Nix is absolutely right about the fundamental paradigm of how to package and manage software as a, you know, kind of the on-disk equivalent of a functional data structure.
I think it is such a clever insight and I think it's just got so many benefits that
It has to be the way OS packaging is going to go.
And so it is so frustrating that the actual experience of trying to use it was so painful for me.
Like it's twice as painful because I feel like it's going to win or something that does its strategy is going to win.
And I, not that it's a contest, maybe that's the wrong metaphor, but
it's great.
It's just such a great insight.
So it's especially just frustrating as a nerd that all of the, you know, it's theoretically pure and correct, but then in practice, I found it unusable.
So it just kind of breaks my heart.
I know there's a couple of re-implementations of Nix and other things, and I've
have all of the same concerns with and more with guics or geeks whatever yeah i talked about that frustrating attitude where i had that little bit of concern about fostered on just because of the free software reference in the name oh man that all of that is on display with geeks where
dpk0 for professional reasons it is inadvisable for me to express an opinion about Guix
An enormous number of packages and basic stuff like wi fi drivers is locked away behind a secret option in a secret repo and you can get banned from the Community spaces for mentioning it.
Which is.
Not free software putting its best foot forward to be approachable.
frici For sanity reasons I'll avoid commenting too LUL
For professional reasons, it's inadvisable for me to express an opinion about geeks.
Yeah.
01:23:32Well, I guess it's nice that I'm unemployed and unemployable because I'm allowed to have opinions about most things.
01:24:01rebelelder I'm an old school Unix person, I agree with what you say about building and packaging, I just really dislike the way they mangle paths and envs, especially nixos
Mangled paths and environments.
Yeah, I think it would have been really nice if someone had had the insight behind NixOS in, say, 1980.
And as it is, there are so many existing packages that you have to do some kind of strange mangling thing, especially at build time, because there's 40 years of cruft to work around.
Nobody wants to use a distribution where you can't use any software that's been written before.
So I think I'm willing to accept that kind of magic and mangling and other stuff because it just kind of has to be that way.
That complexity exists.
We'll see how that goes.
If anybody would like to start a...
Linux distribution, where they, the whole pitch was, where is it?
If their whole pitch was, where is it?
pushcx https://bookshop.org/p/books/ba…
That's not helpful.
There it is.
It's Nix, except we read Kathy Sierra's book, Badass.
I would be like, you know, shut up and take my money.
Because so Kathy Sierra, for anybody who doesn't know, you are missing out if you make software and you care whether or not people use it.
This is hands down like the book.
God, I have slapped so many programmers upside the head with this book, especially in entrepreneurship, because.
Oh, and I will echo.
It is absolutely worth getting a paper copy of this book for the layout, which I agree does play a key role in conveying the author's message.
If you have a big tablet and a PDF, that's fine too, but EPUB or MOBI just don't support the
Kathy Sierra did a lot of stuff with with layout in her book series.
So if you don't recognize her name, she wrote the or started the headfirst line of books over at O'Reilly.
I don't know if she's still involved, but part of the reason that they look and feel very different from other O'Reilly books is her work.
So this excellent book, Badass, that I recommend pretty much universally is about how to listen to users and understand the things that they care about and see your software from their perspective or see your product from their perspective and recognize that
Your product needs to talk to them in their language and think the way they do and make them better at whatever task they're trying to accomplish, not win in the market or be the best technically or all of these other things.
It's about getting past just the code to care about what the actual context of the problem you're trying to solve is.
So I think very, very highly of it.
01:27:52So if somebody made... I don't know. Would you call it Bix? Because, you know, there's the GNU Nix is geeks. G-U-I-X. And we could have a Bix. God, I would... would pay money for i swear we read this book and we took it to heart and we do user testing like so many of the things that were frustrating to me about nix were it was very apparent that no one had ever taken the docs and sat someone down in front of it and said i want to watch you read the docs and try to start using this software because there were a hundred things where obvious questions would come up that every single user are going to run into and they weren't addressed in the manual or the manual would say one thing and then not address it in a way that was clear. There's that joke about man pages is they only make sense if you already know what they're talking about. There's a lot of that in Nix. And I'm bringing this back up because the slightly ridiculous example of it was in the Nix manual when I was trying to go through it.
01:29:26It introduces building packages.
chamlis_ there's the Lix fork, whose homepage says they're interested in improving UX, but I haven't used either it or Nix
And there is a program called GNU Hello that is, as far as I can tell, it just exists to print Hello World and be an example of, do you have a working compiler?
So it's just a nice example.
So they packaged it, which is a very smart way of saying, like, let's take about the simplest possible program and package it.
And it wasn't just that it didn't work, but it left out really key things and
It.
gives an example of how to write a package definition, and part of the definition was missing and just said dot dot dot.
I did a pretty good job of writing this comment politely, but I was stunned by the idea and the mindset that would go into writing
In your manual in your very first example, instead of having a complete example saying dot dot dot just like fill it in here and.
The the term for this is curse of knowledge does Wikipedia have a page for this.
01:30:47pushcx https://en.wikipedia.org/wiki/C…
it's a really common problem in documentation and.
Marketing where.
gtfrvz ironically nix fights the curse of knowledge because you have to put all the steps into your nix code
dpk0 everything in functional programming is like that
once you understand something very well it's hard to put yourself back in the shoes of a beginner and forget the things you know so that you can explain all of the things you had to learn and that's why i was talking about you have to do the user testing where you get someone unfamiliar and you sit them down with the documentation and you watch them try to use it because they will get stuck on things that you have forgotten that you had to learn
Everything in functional programming is like that.
Hey, not F sharp.
rebelelder Readme Driven Development needed
That's why I was just talking about it on stream and think so highly of it.
01:31:42I appreciate the snarky humor here.
And Shamless, yes, I have heard of the Licks Fork, and actually one of the Lobster's moderators, Irene, is actively involved with Licks in some way.
chamlis_ oh nice
rebelelder https://tom.preston-werner.com/…
I don't know much about it because, honestly, I have avoided talking about Licks with her because I bounce so hard off of Nix, I just don't want to deal with it.
Anyway.
I do hope somebody read me driven development.
Oh, yeah, that's actually a great reference there, Rob, or rebel.
Sorry, the font is a little small.
I guess I'm getting due for a I appointment.
I do like that practice of read me different driven development.
And I've been doing it with recheck where I wrote the readme for recheck and showed it to a bunch of experienced programmer friends and then revised it
substantially based on their responses and i even did it as i took the that's funny that we're here on a pull request while i'm rambling i took the readme draft and i made a new repo with a branch and so i put it in a pull request so that they would be in the mindset of reviewing stuff on github when they left comments on it
As opposed to, I think Google Docs kind of puts you in a different mindset, less of a developer one.
So long story long and distractions aside, hopefully someone will come along and help upgrade us to Rails 8, but maybe that'll just be me.
There's a lot of promising stuff in Rails 8 with solid cache and solid queue.
Speaking of promising stuff.
01:33:54And speaking of learning stuff on stream, so I just learned about the CSS nesting module.
We talked a couple of streams ago about cookie licking and how sometimes on lobsters people will pipe up in the comments and say, hey, can I be assigned to this or
start a PR and not finish it.
And I was like, boy, I would really like to not have that kind of frustrating experience, but there's no way in GitHub for me to give the right instructions at the time someone is coming to leave those comments, let alone change the functionality.
And I've been thinking about this and
As with most things, you know, you think about them for a while and then you come around to Soumana's advice.
She has written a lot of very nice stuff about managing open source projects.
And I realized, yeah, the right answer is to just work within GitHub's limitations and say, all right, well, let's set up a chat bot to
post on stale PRs and kind of move them along of say, hey, we're going to close this for inactivity, which feels much less judgy when it comes from a very simple bot than when it comes from a person to say nothing of the repeatability and the reduced maintainer costs by having a bot do it.
And I spent about an hour looking for a bot that's written in Ruby, because as I mentioned earlier, I don't want to have a separate programming language in production.
I would really like to have just Ruby.
And the bots I saw were pretty much all JavaScript.
The Zulip bot was really close, but JavaScript.
pushcx https://github.com/lobsters/lob…
so i i sketched out the all right well what is the core functionality i would like here what is the minimum process i would add and i'm not going to read this aloud to you to fill time i will just paste the link you y'all can read instead of listening to me if you'd like but it's basically trying to think through all right let people assign themselves to issues
and then unassign them if they don't have a PR after a while, or if the PR goes stale and itself gets closed, let's come back and clean up after this stuff.
Because to be real, as a maintainer, the reason I've resisted the whole assigning stuff so much is I'm not going to come back and trawl every old issue and every old PR to see if they're stale.
It's not...
Just that it's a big chore, it also feels pretty bad to shut people's work down like that.
I've closed inactive PRs on lobsters, and on every one I have to find some polite way of saying, like, please don't be discouraged and go away.
I would really love for you to come and finish this instead, but I can't make demands on them.
So anyways.
I...
submitted a bug to Mozilla about 18 months ago.
I'm trying not to do the thing where people give really heated griping about browsers because
It is such intimate software that manages so many things.
We spend so much time in them and we do such personal and important actions that people get really, really wired up when something doesn't work the way they expect or the way they remember.
So I am trying to be chill and neutral about it, because I don't want to be rude to some folks who have been really, really generous, but I reported a data loss bug 18 months ago.
And it's funny, I saw another data loss bug in Firefox where... Actually, it just bit me today.
Wait, hang on, I'm crossing wires.
So the one I reported 18 months ago was
this JavaScript doesn't get implemented correctly.
It wasn't a data loss bug, but it did make some JavaScript code break.
Another one I got ignored on was they misdesigned something and it lost tabs.
And then they were like, okay, well, we've reverted this and feel free to ask questions.
So I asked questions that were like, hey, can you tell us more about why you made this design change?
And then they ignored those questions.
And then the third one,
is there's a data loss bug with syncing tabs between devices.
And I've lost a bunch of tabs.
But at this point, I'm kind of frustrated and burned out by having my bugs ignored.
However, the silver lining of that was that I noticed it was called GitHub-actions, the user that
closed my ignored bug as stale.
And I was like, wait a minute, that sounds kind of official.
Is this actually some functionality?
So a while ago, we switched over to using GitHub Actions for our continuous integration, our build process.
And yeah, it turns out that they actually have
It's more general purpose than I realized.
It doesn't just do CI build kind of stuff.
GitHub Actions can be used to fix our workflow issues.
very specifically they have a i don't know what to call it it is a chat bot and it can leave comments and say hey this is stale and we're gonna close it so instead of and it's funny how close these were so i wrote this three days ago and then
Yesterday evening, I realized, hey, wait a minute, I didn't need to write all this.
I could have just said, we only have to configure this existing tool that does basically the thing we want.
And it took a minute to get it in the docs, but this is free for a public repo, or at least it is free enough that we're unlikely to hit the usage caps.
So this would be much nicer than adding a whole bunch of moving parts to our code because someone else will maintain it for us.
Yay.
And it's not a third-party service.
It is a first-party service from GitHub itself.
And I also don't want to take a dependency on outside services if I don't have to.
So anyways, this is pretty great.
Fingers crossed that someone comes along
and implements it hopefully by just boarding over from a repo they're familiar with god i should go look up the the mozilla one that closed my bug and see if i can just steal it that would be a little ironic so anyways this was one more of those where
It's kind of funny with the lobsters I get to make a lot of mistakes in public and I get to learn a lot of things in public, and so there were two issues on stream here.
I learned.
Based on stream stuff that there is this PR bot that we could install.
And I learned about CSS nesting.
So skipping ahead, let's talk about me having bugs in public.
So DPK, you feature prominently in this one, because I actually thought everything went fine.
So on Lobsters, you can ask for a hat.
A hat goes on your comment and says, hi, I am, you know, the official somebody for this project, and I am speaking on behalf of this project.
And the most common one is me or one of the other moderators speaking on behalf of Lobsters to explain something.
dpk0 yep
And the other ones are we have a bunch of contributors to various programming languages in this instance dpk is the chair of the next version of the scheme standard, if I remember correctly.
I definitely don't remember the acronym for your working group Okay, thank you i'm glad I got that roughly correct.
and
She came along and said, hey, I would like a hat for my position on this next version of Scheme.
And I said, that would be great.
And I approved it because I double checked that she was actually involved.
And then she got a message that was saying, hey, your hat request was rejected.
That sucked.
And I was like, oh, shit, I must have just clicked the wrong button.
so she tried again and i was like oh maybe it's just that i didn't put something in the text area but it just immediately got rejected again because like i actually stopped and slowed down and i was like okay approve is on the left reject is on the right inspect them approve is on the left reject is on the right i clicked approve and i got a message that said hey it's approved and dpk got a message that said nope you're rejected what a i really thank you dpk for like
trying this a bunch of times, that was really nice of you to help me check the bug.
And it is especially frustrating because when I looked and I thought I got a success message, we print these.
They're called flash messages in Rails.
That's the name of the Rails feature because it is a message that flashes up once on the next page load but doesn't hang around for others.
And I got it on the green background of like, yeah, you succeeded, except it realizes it says like, yeah, you told them to fuck off.
And I'm like, no, I clicked approve.
Ah, that hurt.
And I know it's, I knew it was my bug right off the beginning.
I know I've touched this code and I believe I even touched this in one of the first streams where I split out
the hat requests code into their own controller because there was so much going on it was hard to keep track of and the routes were getting kind of hairy so I was like let me clean up and fix this code and of course I didn't add any tests because why would I add tests so anyways this one is totally my bug if anyone would like to fix it it is pretty well narrowed down to being some kind of
issue with the form where either the form is mad because there are two buttons that head to two different routes or which is like we're slightly misusing the rails form builder or there's just a like a copy paste error where the method is getting set wrong but this one is pretty well narrowed down i had to go i don't want to change this but
Oh, yeah, I had a crash.
I don't need that.
Where's my model?
01:46:12Come here.
So a hat request, when it is approved or rejected, but when we are done with it, the model is destroyed.
And I think that's fine.
However,
That meant when I went through these dozen records and clicked approve on the dozen hat requests, they all got deleted out of the database.
And so I had to go back through the logs and say, okay, well, find me every HTTP request that Peter made to the hat request endpoint.
find all of those IDs.
And now let me go through a database backup to find what all of those hat requests are.
rebelelder hmm, maybe could not destroy right away but have a clean up job
Because as you can see from this very real log message, the only thing about it is the ID here, it doesn't reiterate those values of who was the user?
What was the hat named?
Maybe it could not destroy right away, but have a cleanup job.
Yeah, Rebel Elder, I thought about that.
What if we marked them as actioned in some way and then came along six months or a year later?
And I was just like, yeah, I don't actually want to add that many moving parts on top because then there's a bunch of stuff where... All right, now we have to filter the hat requests for...
just the ones that are not actioned.
And then that also needs to show up.
There's a little bit of admin UI where if there are any unactioned hat requests hanging around, I see a user interface element in red.
All the moderators do actually.
anyways after schlepping around in the logs and a database backup to find all of those 12 i went through and i recreated all of those hats manually by copying and pasting from one terminal to the other so that i didn't at least insert typos and hats because i don't need to make more work for myself but that kind of like it was saturday and i i said the clerk's line of i'm not even supposed to be here today
And so I did not immediately go into, oh, thanks, DPK and other folks.
That is nice of you to appreciate that I did the boring work.
But this is only I can schlep around in the production logs like this and fix these hats, recover these hat requests.
So I sent a message to users because everybody got that.
that dm that dpk got saying your hat request is rejected so i sent one that said i think the subject line was oops your hat was actually approved and then i just wrote one generic message that was like hey an hour ago you got a message saying your hat request was rejected that is bug 1371 in the issue tracker your hat is approved you can use it and then i
went through the hats one by one, and I created them, and then I sent everybody that message saying, oops.
When people hit 500s in production, I use the user ID and the username and other stuff that are in the logs so that I can find people and message them and say, hey, you hit a 500.
Sorry about that.
I fixed it.
And as a developer, sometimes I do that just
because I know as a developer that you usually never hear back about bugs, you know, as I whined about Mozilla a few minutes ago.
And it tends to really delight developers to get a message that is like, you saw a bug and it's fixed.
That, you know, especially when they didn't report the bug, it just, I don't know, it's kind of heartwarming to know somebody is paying attention and cares enough to fix bugs.
I had another one of these on Saturday when...
Oh, what's their username?
If you are present and your username starts with a K, no, they don't look like they're present.
So I'm not going to call them out because I'm trying to be deliberate about talking to people before I name them on stream because I generally don't want people to feel like they're under a microscope or that they're getting used for entertainment.
I don't know.
Navigating these social norms is real tricky.
I'm trying to be kind about all of these things.
That's the biggest one.
But anyways, somebody hit a 500 because they were trying to link a Mastodon account to their profile.
So if you see a Mastodon account linked on someone's profile, they have to go through an OAuth flow to confirm that they own it.
So this and GitHub are authenticated.
There used to be Twitter before some rich guy killed it.
And there's also Keybase, which, yeah, they got absorbed by one of those big Bay Area tech companies.
That one may be dead now.
I check in on it every six months or so, and I think I'm about due.
So in any case,
We've talked about how there are lots of things going on in ActivityPub and the Fediverse, and one of them is maybe every two or three months, someone tries to plug in a non-Mastodon ActivityPub slash Fediverse supporting account into this, and someone tried a new one.
What was the name of it?
It's in the Git log.
01:52:24Not going to pronounce it right because of that... Whoa, where did we go?
Because of that... God, I can't click.
Because of that little bar over, I don't know how to say it, but Takahi, which it implemented enough of the OAuth flow that they were able to get fairly deep into the linking flow before they hit a 500.
And I had the Lobster's DM interface up, and I was waiting for the deploy to finish so that I could hit enter and say, hey, you saw this 500.
It shouldn't have worked, but you shouldn't have gotten a 500.
You should have gotten a message saying, no, really, it only works with Mastodon.
And as I was waiting for the deploy to finish so I could hit enter on that message,
Our IRC bot reported the commit in the channel and the user was like, oh, hey, that's the thing I just tried to do.
And so I was able to respond to them in the chat room of like, yeah, actually you, that bug fix is for you.
I saw the email come in and I was already working on other stuff and breaking things.
So I fixed your thing.
Anyways, that part is super rewarding.
the making all of my mistakes in public is, I don't know, I'm getting used to it, but not as much fun.
All right, so there was that.
An ancillary issue from that was I realized the logs are coming in wrong where I tried to shove all the performance stuff into a sub hash and it didn't work right.
And I look at performance stuff so infrequently, I didn't notice it's misconfigured wrong.
If anybody has experience with LogRage is, I believe, the name of our gem that we're using to do this JSON logging in prod.
Oh, there's something I haven't talked about on stream, actually.
I actually really like that.
I've had a little hassles getting it configured, but... All right, now I'm actually looking at this bug.
I was hoping someone would pick it up because it's like...
Some of these things, some of the issues I file are...
They feel like they would be a five minute thing for me, but there are enough of them that, you know, if there are 10 a week, that's a ton of time because realistically they're not actually five minute things.
They're like 15 minute things.
And then they're set up and tear down and switching branches and reading the docs.
And so I file these things because if they're really well contained, I think I can maybe attract new contributors or just spread some of the work out a little.
But I've shifted our logging from the default Rails logging that's very...
It prints over multiple lines to this one line per event.
So this JSON hash, we get one line per HTTP request.
1a2a3a4a5ahahahaha do you work at Stripe?
And that obviously plays a little nicer with grep and jq for filtering.
But... Hello... Huh, it says first time chat, but I recognize your username from somewhere.
Have I seen you in the issue tracker or a pull request?
Do you have a user on the site?
Anyways, welcome to the Twitch chat.
I do not currently work at Stripe.
I worked there for about four and a half years from...
What, late 2018 to the early last year?
So I occasionally mention that.
This is one of the things I saw people do JSON logging at Stripe, and I was like, oh, that's actually pretty darn useful.
Because getting to filter stuff with JQ, obviously, Stripe used something a little bigger than JQ.
But myself getting to filter these with jq is much nicer than hassling to filter them with grep, especially if I want to pull out one value like the timestamp and do a simple time series or something.
So I will refer to Stripe because I learned a lot there.
But nope, it's been, gosh, a year and a half since I left.
Time flies.
01:57:09So anyways, I'm really happy with the results of switching over to JSON logging.
And I have kind of become a, what's that path?
dpk0 you nerdsniped me recently with your oblique reference to cleverness in the Stripe unique id format. i spent far too long thinking about what useful information might be hiding in there
A bit of a proponent of it where I like it a lot.
I was trying to think, did I, oh, maybe I put it in an issue, 1280.
dpk0 i keep meaning to write up a wiki page about it
I saw a talk on it.
earlier this year.
And I thought I cited it, but boy, I don't see a link in here.
So I'm not going to keep hunting it.
...55Oh, DPK.
Well, I'm sorry to nerd snipe you with my reference to cleverness in Stripe unique IDs.
I am really hoping to nerd snipe someone who actually works at Stripe.
because while I have nothing to disclose about Stripe's unique IDs, I hope they would choose to disclose stuff.
I think it would be an excellent engineering blog post that would, in a similar way that Fsharp porting things to Csharp advances the state of the art and the public understanding of how good things can be, Stripe, you have the opportunity to do that with
your api ids please please do it all right god i feel rude i meant to say i meant to say which talk i saw but i don't remember where it was anymore yeah i'm not going to make you watch me
Google for that.
That's no fun.
Shamless, please do not get nerd sniped into that one.
And anyways, DPK, I do hope you write up what you thought of with the unique ID, because I know you know your stuff, and hopefully you have thought of something new and interesting that I haven't seen before.
So I would look forward to reading your page about it.
When you say a wiki page about it, do you...
dpk0 personal wiki thatβs public (and not very well-maintained)
like a personal wiki that's public instead of a blog i was hoping for a homepage url here that was going to link me to your personal key that's public and not well imitated oh come on every every home page every blog every wiki is
dpk0 https://wiki.dpk.io (URL will change soon)
not well maintained.
Don't sweat that part.
If you're okay sharing the URL here on stream, I'd love to see that.
But in any case, please send that to me somewhere, wiki.dpk.io.
All right.
Can't type.
Ah, neat.
I was just talking about org mode over on...
Why Combinator Startup News?
There was a really interesting post where somebody summarized a bunch of long, deep experience they had with org mode and how they used it.
And I was so curious to read more about it, but it was just these snippets, these excerpts, and not the actual interview or whatever they were working from.
02:01:03We'll see. Anyways, I guess I am saying cheers for sharing your notes. So let's see. There are two feature requests I put in the issue tracker since the last stream. This is what happens when I come in on a Saturday, I guess. Lots of churn in the issue tracker. This one I assigned to myself because I want to do it. So I'm not going to spend a lot of time on it, but basically under very rare circumstances with offsite harassment, people have said, Hey, can you remove that? I was invited by this person because boy, I don't want to be associated with them anymore. And I said, I don't have any way to do that. And in one circumstance, the person said, Actually, I don't remember how they resolved it. I sure know they didn't bury the hatchet, but maybe they just decided it didn't care. I'm drawing a blank now because it's been five years. It's been a minute. The other one was in the last year, and I had to say that I don't have a feature for it. But I wanted to finally get that into the issue tracker. So I will do that at some point. What do you call it? The invite tree is super useful for us to avoid all kinds of abuse. And mostly, I mean, I'll talk more about self-promo because that's on my to-do list to talk about today. And to code today, which again, we're doing Lobster's office hours. You can pipe in any time with questions about the site or the code base. See, I should just, I'll get one of those overlays and I'll make that a, like a scrolling overlay in OBS. So I can just click the button on it.
02:03:10One of the hassles with making that more general purpose is that it's really common on social sites that people sign up and come back years later. And so sometimes they sign up and come back years later to do self promo or to promote their startup. And so I don't want any kind of serious compromise of the invite tree because it's super useful. So less serious than that, I just wanted a fun feature. Nobody has asked for this but me, but I want it. If you search for a term, it would be neat. I ran into this mention of the mark tag. Here's one more thing that I hadn't seen before. Do they show a... No. yeah i was hoping they would just link to can i use i don't know when the mark tag was added but it's a oh since july 2015 so i am way behind on this one but it's a nice way of highlighting things especially search matches or other important stuff the the default color is a little bit nuclear and vibrates to me i saw it on a website that had big chunks of text highlighted and it it vibrated in my view because it was so bright and the contrast was so high because it's coming off as like, I don't know what the hex code would be off the top of my head. Anyways, it's kind of a fun one where the core of it of what word did they search for? Can we wrap tags around it is complicated by the fact that there's markup. So if you search for a quoted phrase, like sometimes correctly to find this comment, you might end up with correctly close p tag, close block quote, open p tag sometimes. And so there's a slightly interesting little parsing puzzle that makes this more than a five minute kind of feature. So I really hope I can nerd snipe somebody into helping with this one. There is a whole parser hiding underneath the search engine. I mean, I say hiding, but it's I actually have UI to surface it. So if I search for, let's just run that search correctly sometimes. I don't need the punctuation. I show you the parse tree. Oh, I got different results because I had the punctuation, which should probably have just been ignored. So anyways, I show people the actual parse tree because I was like, ah, this is a site for programmers. Why not show you? There's a whole, what is it? So if you haven't played with parsers much, this feature can be a nice little exposure to them. This is about the simplest parser in the world. You know, it's not much more complicated than, baby's first parser, which is very often make a four function calculator. Cause then, you know, lesson two can be now add parentheses to your four function calculator. I remember my CS classes.
02:07:04All right. So anyways, hopefully someone will want to take on that one. I think it would be a nice little improvement, but it is kind of way down on the priority list. So next topic was going to be avatars. When I worked on the avatars, for anybody who was on that stream a couple of weeks ago, I added a ridiculous hack. I got it wrong, but I actually remembered the name of the branch this time, or the switch command instead of checkout. I'm slowly making that error less.
...56So I had added this has attached image to handle some stuff.
And then where was I had added this bit of metaprogramming for includes to schlep through the several models that are involved with every active record attachment.
And this had been a really painful bit of debugging, trying to avoid N plus one errors where you ask for a user, but then you have to also ask for their avatar attachment.
And then you have to ask for all of the variants and then the blobs on those variants.
And I had been kind of frustrated on stream that I was dealing with this issue at all.
And then also that
frici is it me or is it buffering ? π€
The connection between attachments and blobs and variants was not really spelled out in the active storage docs.
dpk0 is it raining in Chicago or in Vodafone Kabeldeutschlandβs data centre?
dpk0 ah, in Chicago then, i guess
pushcx it's me
espartapalma buffering?
And so is it you or it's buffering?
Oh no, it's me.
rebelelder not just you
No, it's me.
02:09:21Oh, no. It is not actively raining. But it did rain yesterday. I think this is just bad ISP weather. I'm sorry.
...48pushcx Not currently raining, just bad ISP luck. Let's give it a sec.
I should put up a...
02:10:03I put up a note.
...54Hmm. Yeah, the the other thing is, I am home alone today. So I know it is not my spouse firing up five zoom meetings or something. This is just the ISP not exactly delivering on the thing I pay them for.
02:11:39I'm sorry, here I...
02:12:09pushcx I'm sorry here, my "Stream Health" graph is even getting worse.
Hmm.
Green?
Are we getting back to average?
Okay.
rebelelder at least the audio is fine
Maybe let me know if you can hear me and if it seems to be working.
OBS is of the opinion that things are green.
At least the audio is fine.
Oh, that's good.
I didn't know if the audio went to shit.
That's also why I've kind of gone quiet and switched to typing.
Here, I'll switch over terminals.
rebelelder seems less pixelated so getting better
So when it goes bad, is it just you get very far behind and you see a spinner on the video or does it drop to like, you know, 0.1 FPS and the video lags terribly or it drops to 100p and everything is just a big gray blob?
I don't actually know what it looks like when it fails.
It gets less pixelated or more pixelated.
dpk0 yeah itβs okay now. the picture keeps getting randomly blocky and then non-blocky
Okay.
I am sorry for these hassles.
I don't really have any options besides renting an office or something.
The picture gets blocky and then non-blocky.
Okay.
Well, hopefully that wants to chill out.
I was gonna show some things, but they're really just URLs so I can share them.
espartapalma the audio got wonky... but it has been OK the last 2 minutes. timestamp: 2024-11-11 22:13 UTC
So I was talking about how active storage had some immediate pain points like N plus one queries and kind of thin documentation.
rebelelder At first it froze and there was a spinenr, then it got blocky
And I watched a talk, I didn't put it in the list, by Justin Searls, his final talk, which breaks my heart a little, because he's such an engaging speaker.
rebelelder No need to apologise for something out of your control
All right.
Thank you for your reports, DPK, SPART, Rebel.
It's also clear that lag is significantly higher now because your messages are coming 60 seconds after I said something instead of the usual six seconds after I said something.
So I will try and keep that in mind, but it just means that I will get a little bit discombobulated as I say stuff.
And then 60 seconds later, I have to be like, what are we talking about still?
That's fine.
It's survivable.
02:14:57rebelelder ah, I will refresh and see if it catches up
So Searles wrote up a blog post of very useful, hard-earned knowledge about how he worked with ActiveStorage on a project.
02:15:25rebelelder you just said "rebel elder let me know how it goes"
rebel elder let me know how it goes we should maybe do a timing test because i do wonder when lag gets bad like that does twitch ever recover or does it just stay permanently 60 seconds behind because you have to do some you know play things back at 110 speed for however long oh yeah
rebelelder after a refresh
rebelelder nice
Okay, well then you are back up to current or the normal amounts of lag.
So anyone who saw the blockiness and the terribleness, please click reload because apparently that'll clear your lag.
Good deal.
I could kind of see it going either way.
Large distributed systems are tough that way.
All right.
02:16:21frici it does recover.. slowly, I'm 30s behind and have't refreshed yet
so searles wrote a whole bunch of very handy hard-earned advice on oh hi freaky thank you and yes that that did seem to be 30 seconds instead of 60. and he also linked to this other discussion post that had just i really appreciated this of
If you saw me working on avatars on stream, I was running describe table to figure out this kind of basic stuff.
And I was like, what?
Okay, so this field means this, and this field means that.
And if I change this, does this other thing have?
pushcx https://discuss.rubyonrails.org…
And I wish I had found this when I was first using active storage, because boy, they lay out a whole ton of stuff that I struggled to figure out.
And
pushcx https://web.archive.org/web/202…
at least in one instance got wrong not anything huge but and this one is a an archive link because the site was down earlier when i tried to line up these tabs before the stream so anyways i am still working on that avatar's code a little bit in the background but
The N plus one issues, there is a feature not mentioned in the guide called with attached and with all variant records to handle that.
And then these other two blog posts handle a lot of the other stuff that I had hit and was either frustrated by or tried to work around or had to introspect on or just otherwise generally led me to having a little less confidence in active storage than I needed to put it into production.
Sir, sir, do not start typing.
Thank you.
Cat wanted to roll onto the keyboard.
Alrighty.
02:18:35rebelelder "Build with Becky" was such a good talk too
So anyways, that was really great.
I love it when people share their experience.
And I joked about
Build with Becky.
Yes, Rebel Elder, thank you.
That was the exact talk.
And if you have the YouTube link for that, I would appreciate you throwing that in because it was just a nice solid talk that hit on a lot of stuff.
A lot of the same very broad topics that we hit here on stream of how do you use Rails effectively to build and maintain apps?
02:19:16It's certainly a lot more polished than my streams.
Sneeze, excuse me a sec.
Yeah, I touched the cat to keep his feet off of the keyboard and then I immediately touched my face.
So now I'm going to have a little allergic reaction.
Wee!
Thank you for chiming in right then, Raz.
I hope that came through.
rebelelder The actual talk title is "The empowered Programmer" https://www.youtube.com/watch?v…
If you heard that little murr...
02:20:02espartapalma bless you. 2024-11-11 22:19 UTC
So I saw them earlier.
Okay, I'm going to do a little call out to someone who's quiet, but Jay Miven, I saw that you were here earlier, but now we are coming to your part of the, bless me, thanks.
Now we are coming to your section.
So on the stream, the last one last Monday, we talked about the authorship checkbox that's on the story submission page.
jmiven oh yeah, hello btw :)
so it's over on the story form so there is a check box with some help text that says i am in the context of someone submitting a new story i am the author of the story at this url or this text
And it is the, ah, hey, Jim Evan, great, welcome.
So I don't know if you saw the previous stream, but I had talked a little about this checkbox and wanting to improve the text around it because it's kind of freighted with it.
Here, let's put it side by side.
Or I could hit the wrong keystroke.
So the user is author checkbox here that says that gets used by the story model in this function calculated hotness for giving a 25% bonus to a story's ranking if they are the author and
This is trying to get at, hey, if you are the author and you are a normal part of our community and you are contributing, that is wonderful.
We really like to have direct author interaction, the ability to ask questions, to contribute, to add stuff.
That's so great.
And so we give it a score bump.
However, also sometimes we get people who are,
not doing a great job about participating in the community and then we're giving them a score bump to kind of dump links on us because they want to use us for traffic so that part is not huh i don't know if you can hear it but an ice cream truck is going by me it is warm today it's about 50 fahrenheit so what is that like
rebelelder 10c
well over 14 celsius off the top of my head something in that neighborhood but a little late in the season for ice cream god now i want ice cream so we've been talking about ways to tensi thank you
We've been talking about ways to handle authorship better.
espartapalma we can wait you get your ice cream
I would like to continue giving a bonus to authors who participate in the community and not to people who use us inappropriately.
Yeah, I am not going to...
Thank you, Espart Palma, but I am not going to run out into the street with my wallet and flag down the driver.
That's...
And then what, I'm going to eat ice cream on stream?
God, that would just be gross to listen to.
dpk0 there were still some fresh German strawberries in supermarkets and in a strawberry stands at the end of October π€―
frici Oh you would be very surprised to what people are fine listening to LUL
So handling self-promo and people who are not contributing well to the site has been a running conversation for roughly forever.
And, oh, Fritchie, let's not go there.
You know, I joke about starting a hot tub stream.
I am not actually going to start a hot tub stream.
rebelelder awwww
espartapalma you can wait the stream is over and get soup of ice cream too
So instead of talking about inappropriate sexual content, let's talk about IRC where Jay Miven had said, I wonder if we should extend the author checkbox on story submissions to mean author contributor or subject of the story.
And I really appreciate this kind of like kibitzing on site copy.
Is it conveying what we mean it to convey?
And I had said back, I was thinking of changing the checkbox to say something like, I might benefit from this.
And I do like Jay Miven's list, but every time I give a list related to self-promo, people somehow discover that they are doing some other term that is not exactly in that list.
And I think we had this conversation over the weekend, right?
On Saturday when I was coding Jay Miven.
Maybe it was yesterday.
jmiven right maybe saturday
And I was thinking of an interaction I had had with a user on the site that was
I don't know, two weeks ago.
If you dig this out of the mod log, please don't post the link here because I don't want to spotlight them.
It was a little extreme, and I think their heart was in the right place, but it went really poorly, and I don't mean to put them on blast in any way.
But we had a very strange conversation where at first someone told them about the rule for self-promo and then they had a reason they felt it didn't apply to them.
And someone else said, no, it does apply to you.
And then they were like, wait, you're not a moderator.
I don't feel like I need to follow this rule until a moderator explains it.
And I showed up and I left a comment with a hat and I said, no, they're correct.
It really does apply.
And then they said, well, I have this other reason I feel like the rule is vague or doesn't apply.
And I was like, no, it does.
And then I think we total did five rounds of this because like a couple of people tried to explain, no, self-promo, the rule applies to your exact behavior of only submitting links to your site and only commenting on links to your site.
Please participate a little more normally.
And they kept up with, well, a little bit of motivated reasoning.
So I didn't mean to put them on blast, because like I said, they strike me as a very serious programmer, and I hope to get more contributions from them.
And I do actually have pretty good hopes that they will become a normal member of the site.
I have less good hopes about a different person who sent me a message.
So I removed just a couple of days ago, I removed someone's first post who was starting with self promo and they were able to do it because they had signed up and a little time had passed and they were working for a startup that had been posted before.
And I said, Hey, don't just do self promo.
And I got back this message that said, Hey, sorry about that.
This content, bleh, this content being purely about writing SQL queries didn't contain self-promotional information.
What about it made it self-promotional?
Cheers.
So the answer to that is, you wrote it.
It has your name on it.
It is on your blog, your company's commercial blog.
and it contains at the top and bottom advertisements for your company's product.
It is by yourself, and it is promoting your employer.
I don't know what could be less obviously self-promotional than a thing that you even refer to as content because you know you are doing content marketing.
rebelelder I've used lobsters every day for years, and I still don't have an account :-|
Duh.
This one.
This one does not feel like...
A developer whose heart is in the right place.
This one felt like someone whose title is DevRel.
I didn't actually run down their title, but...
Yes, if you link to your company blog that you work for and pay for...
and your post contains advertisements for your product that is about, your product is directly related to the thing that you are talking about doing, that counts as self-promotion.
So Jay Miven, this was, this was the thing I had said of, if we list author, contributor or subject, I can just imagine the,
Gosh, so confused.
Direct message I will get from someone spamming the site saying,
I'm an employee.
I'm not a contributor.
I'm not the subject of the story.
I'm just linking to this wonderful product that you can buy for $39.99 a month or less with an annual subscription.
Oh my God.
rebelelder people will always try to find loopoles
It's not surprising for a forum full of programmers that people will read the guidelines
with an incredible hair-splitting mentality, or yeah, trying to find loopholes, rebel elder as you put it, but nobody goes to it with a vigor like the folks who want to post self-promo.
That is the one where the motivated reasoning really comes out.
It's a little frustrating.
It's also very human.
jmiven hey you get 10% off with this code: LOBSTERS
I understand it.
Like, there is a direct financial incentive to explain why linking to your company blog is not self-promotional.
Get 10% off with this code, lobsters.
No, no, that's a different... That's a... Oh, yeah.
Here, I already have story open.
02:31:28Didn't I put it? Oh, I'm on a branch.
...39Come here. So with promo code lobsters was some other code I recently landed where I caught in the database a bunch of people were adding bits to their URL to try to attribute traffic to the site so that they could i doubt they would give special promos to lobsters but they would definitely go oh look we got a hundred thousand extra people that all had question mark lobsters at the end of their url it sure is worth spamming that site i try and break them when i can so now there is some code to strip those out And also it tattles on it so I can see in the mod log when people try and do it in the future. Because if I see someone who was blocked by the restriction on unseen domains from new users, if the first thing they did 10 seconds after they tried to sign up was link to their company blog, I would like to know that when 70 days later they link to their company blog. And if I also see that they are trying to attribute traffic in this way, it just tells me a little hint about their motivation, you know?
02:33:11So... It's motivated reasoning. That's... David Price- that's also one of the you know I gripe of oh gosh it's so hard to understand, because you know i'm i'm a little exasperated about the guy linking to his company blog and saying it's not self promo. David Price- But there's actually a pretty good contrast to to the other developer I mentioned and don't want to name because. I think they're really just excited about this stuff. They just care about this stuff a lot. They just want to share all of this stuff. And that impulse, I keep saying their heart is in the right place because that impulse of let's share all this cool stuff we know is the heart of the site.
02:34:09So that's why I'm...
talking so, so much about all of the design issues that happen and all of the competing priorities is I am trying to make sure the site threads the needle between celebrating the generosity of people who are writing blog posts and advancing the public understanding
while not getting taken advantage of by the people who are doing it a little bit more cynically.
That is super hard to split the difference on.
And hopefully I can split it in a way that we get the good stuff of people who are motivated by content marketing.
So like I mentioned, that post here, it's probably in the... Like I mentioned this one, and I know Michael from...
from a bunch of stuff, so he won't mind me talking about him like this, but this is content marketing.
This is a blog post they wrote so that developers would learn about their product and adopt it.
However, it also is a useful programming technique that I think is super interesting, that is something that is
know it's we talked earlier in the stream about solid cache and solid queue and this practice of using sqlite alongside what would you call it like a you know maria db or postgresql a database that lives in its own process and on its own host and this difference between an embedded database alongside your web app worker and a standalone database like this is really interesting but i don't want a kid like
Buckbee wrote this as marketing.
So I want the good stuff and not the bad stuff.
And I want the people with good hearts and not the people with bad ones like Anubis.
We'll see how that goes, right?
chamlis_ are you worried about "posting rings" where people get their friends to post their stuff?
Surely I will be able to fix that with just a little bit more SQL.
Oh, look at that transition.
Speaking of SQL.
What did I call this branch?
02:36:40Did I call it stream?
...47WIP Monday. Yep. Thanks, Peter. Great commit message.
...58Let's get this up to... F me.
All right.
They each have a migration.
That's actually okay.
oh so on stream i wrote a migration for the for figuring out am i worried about posting rings where people get their friends to post their stuff yes absolutely that has been a significant issue for us and i talked about
I talked about having to, in rare circumstances, break invite links.
Invite links are a major way that we deal with posting rings.
We call them voting rings.
So if you look through old ModLog messages, you will see mentions of voting rings.
There can be
really the the nasty versions of this are really easy to spot where someone signs up and then they send themselves five more invites to slightly different email addresses and then they create five more accounts because you don't need a lot of upvotes to push your articles to the homepage on lobsters
And then they post a link to their company blog or to their product landing page.
And then they switch into their five accounts and then they've uploaded five times.
This kind of thing stands out in the logs.
It even just stands out to users.
Cause they're like, why is this tripe on the homepage?
It is implausible that this got five upvotes in the first 30 minutes.
We've caught a whole bunch of voting rings just that way because people will look at it and are like, this isn't worth five upvotes.
What the heck?
That happens because we are a community.
We are not just a database with a number.
And the slightly more sophisticated version of this
involves creating accounts over time from different inviters and that can kind of happen naturally when a couple of developers who happen to work together realize that they have been on lobsters for a while and maybe they should promote their startup together i have told one or two people to kind of knock it off
pushcx https://lobste.rs/s/utbyws/miti…
The last real big push on self-promotion
happened four years ago in the wake of a nasty voting ring so this person wanted to do I will say his name Yuval Halevy and Ito Cohen they wanted to promote their startup and they even went to the extent of
coming by the IRC channel with different names from different IP addresses to try to pretend to be new people to sucker existing users into inviting them so that they wouldn't be incredibly obvious in the invite tree as having invited their various sock puppet accounts.
And
The conversation was especially enraging because well-meaning users who got suckered into inviting them even talked about how we don't want to deal with shills and spammers.
And then they manipulated people into
giving them less obvious ways of setting up their voting rate.
That was really frustrating.
That kind of malicious behavior is disheartening.
chamlis_ that log is pretty chilling to read
However, luckily, it's rare.
It's very rare.
Especially this level of putting on a show.
Most people have souls and don't do that.
It is remarkable for its rarity, and it is important to keep in context.
And in the rare case every couple of years where I have to deal with this kind of stuff, when I deal with it on my desktop, I will open up slash newest, and I will keep that tab open, or I will open up slash active,
Or actually, no, comments, because Active didn't exist a couple of years ago.
And I just kind of read the recent comments and, you know, I've just pulled up slash comments live here on stream.
These are the comments that have just most recently been posted to the site.
And there is just a whole bunch of people who are helping each other and sharing knowledge and comparing stuff to 1994.
Like there is a lot of deep cut, excellent, wonderful conversations that happen every day, every minute on the site.
The normal thing is a bunch of kind and generous people sharing interesting information and occasionally quibbling about things.
I'm not going to dig in, but like, it's not, this is maybe someone with a,
old disagreement about BSD or which Linux distro.
It doesn't matter.
That's fine and normal.
It's not mean.
It's not abusive in the way that load mill, startup stash, and gorilla buzz are evil.
This stuff is rare.
so we are developing for the common case and we are trying to nudge people into the common case and then we have tools like the invite tree like those json logs that you saw where every once in a while i have to dig around and be like what is this weird posting how did this get on the home page
The we are small enough that voting rings tend to really stand out.
Oh, actually, let me talk about that one.
So.
02:44:31Hacker News is bigger than lobsters by.
a hundred x to a thousand x based on whatever dimension you want to think of you know number of stories submitted per day number of votes number of comments number of active you know any any metric you can pick they're enormously bigger than lobsters a big part of that is because they have open sign up and anyone can come in and click log in and create an account just that fast
So they see a lot of abuse.
And if I were to log in, especially with Shodad on, you know, probably in every minute of the US workday, they get some kind of spam post.
I am certain that even as a logged in user with Shodad turned on, that there is a level of spam filtering that they do even before things show up on this page.
Because if you read slash newest, you will see some spammy crap, but you will never see really obvious spam like brothels.
Those are popular or cryptocurrency gambling.
I mean, haha, yes, all the cryptocurrency sites are kind of gambling, but like the really bad stuff, the we are just literally a casino.
You don't see that here.
So not only do they have 100x the traffic, but they have 100x the challenges like this.
And one of the ones that I see in entrepreneurship communities that drives me up the wall is entrepreneurs have realized that Hacker News has a lot of defenses against spam.
And so I am just randomly picking literally the first link on the homepage.
if this author wanted to get upvotes from their friends it would be really tempting to say okay let's grab and i have i don't know anything about this guy i don't really know much about z80 i am assuming that they are a good faith user so i'm not meaning to pick on them the tempting thing would be to like pick up this link and carry it over to
their social media accounts, or their private communities.
So there are lots of places that people talk shop as professional developers, right?
You have that private Slack or that private IRC channel where you talk to people from your old job or the 10 people you met at the conference.
It's really tempting to take this link over there and say, hey, would you all come upvote my story?
And the...
HN guidelines explicitly say, where is it?
Don't solicit upvotes, comments, or submissions.
So if Hacker News sees you posting on Mastodon, hey, come upvote my thing, you will get a penalty.
They will kick you off the homepage.
And people are like, well, you know, if I link directly to my story and ask my friends to upvote this, even if I do it in private, they will probably notice this traffic pattern of all of a sudden 20 users dropped in on one random story and clicked upvote.
They will probably know that that's synthetic.
And so I have seen so many times, I have seen people say,
Go to slash...
I clicked ahead.
Go to slash newest and look for my post.
Oh, and I'm not going to actually find that same one again because I didn't even read the title.
But find my post on slash newest and click into it and then upvote it.
Because they think that it will get them around the synthetic detector.
I would like to tell you no.
Hacker News absolutely will detect that.
That behavior pattern of land on slash newest, scroll to a single story, click in and upvote it.
They will absolutely recognize that as synthetic when your 20 friends from a private Slack for DevRel marketers do it.
And for some reason, like it is not, like imagine the, so they have,
if not a proper database they have like a lisp data structure where there is a list somewhere of hits and the tuple looks something like user id page hit timestamp and when they get upvotes they look back in the last five minutes for this exact access pattern that i just described that people think is so clever and they recognize it
not at all more difficult than they recognize you clicking directly to a story and upvoting it and leaving.
And I see entrepreneurs try that and get penalized and kicked off the homepage.
I see it about once a quarter and it drives me up the wall because they're not dumb.
They're really not dumb.
They make lots of decisions that I wouldn't agree with and they have different moderation practices.
And I mean, if you want to have an argument, you will always find someone in the HN comments wanting to have that argument with you.
And you can say all kinds of stuff like that, but they are not dumb.
And you know it because you don't see porn on Slash Newest.
jmiven sad thing is that I've seen OSS maintainers do that
You know that they are serious about dealing with spam and abuse.
Anyway.
I don't often, you know, I come not to praise HN.
Yeah, Jay Miven.
I have also seen OSS maintainers do it.
I've seen lots of people do it and there is something about getting to think that you're clever that shuts off people's reflection.
Because a lot of times people are like, I am doing a clever thing and they don't think.
Is my counterpart in this interaction someone who has seen 10 million clever people already?
Because I guarantee you HN has.
anyway so i sketched out this migration we worked through on the last stream yeah shameless that's so that is a long way of saying yeah voting rings are a thing the invite tree makes them so much less common and so much more obvious and the funny thing is is either they are very obvious
Or they are very obviously nefarious.
Yeah.
02:52:19So what I mean by that is, if they are very obvious, I look at a story that has a weird number of upvotes. and I see that all of them were invited by the same person and that stands out or I look at them and they are nine people who appear in different places in the invite tree and whose email all ends in like plus one two three or plus four five six at coolstartup.com it is obvious that they are trying to split up that they are a voting ring and it is it's sort of useful either way right like either it's obvious what you're doing or even if i have to work a little bit more to spot you it is very obvious you are knowingly breaking the rules
02:53:25chamlis_ thanks for the detailed answer; you also preempted my question about how HN does it as I was typing it
So the unambiguous motivation.
Because it's very hard to get at, why did people do these things?
Yeah, Shamless, I've noticed that you and I keep thinking along the same lines.
Similar to how ARH keeps ending my stories, where he jumps to the moral...
I don't remember a pronoun there.
Where they jump to a moral when I'm two sentences into the story.
So...
02:54:06chamlis_ this is a damning indictment of either you or I or both
So we were getting at these inactive users who start off with self promo.
No, come on.
We got sayings like great minds think alike.
We're going to be good about that one.
Hello, sir.
frici Hi Cat
And the mic is peaking because the cat decided to rub his chin on that.
I hope the compressor worked there.
...44frici speaking of Cats I need to go check on mine brb
Hi, good boy.
Oh, oh no.
Yeah, do go check on your cat.
Cats are great.
Except when they try to bite your finger because they're in a playful mood when you're... Sir.
I am streaming, sir.
We cannot play right now.
02:55:11So we're getting at this idea of...
rebelelder Or when then wake you up in the middle of the night to show you they've brought you a mouse
Have people been leaving comments that are well received and well received is a very temporal notion, because site activity changes so much day to day week to week decade to decade.
rebelelder they*
And to make a query run in a reasonable amount of time.
rebel elder Luckily, there are no maces on the third floor but.
yeah occasionally we get brought a toy in the night this cat does it much less than the previous ones that god so i had a one cat who passed away must be about a year ago now and she had this habit when she caught a toy like her toy mouse or a ribbon or a string
rebelelder so cute!
she would bring it to us but she would have it in her mouth and scream continuously the entire time she brought it to us so the length of the apartment for that 30 seconds or a minute because occasionally she got kind of lost she was not bright she would just scream at the top of her lungs around the toy because she was so excited to have found the toy and brought it to us and this was cute
in the daytime, but less cute at three in the morning.
02:56:50Yeah, she was great. I used a picture of her trying to stand on the keyboard as my profile picture at work for a while. She was an awfully cute cat.
02:57:13frici wonderful hunter with integrated alarm 10/10 excellent cat
frici also back
So I had added this column to extract the date from comments.
Cause that's how like we kicked around.
Should we judge you by comments over the week or that?
yeah.
Fruity, you got it.
Integrated alarm.
That was exactly that.
I would have liked if we could have set the alarm instead of it being fairly arbitrary, but you take what you can get.
So I looked on kind of a day context because traffic changes so much on a daily basis based on weekends, holidays.
Is there a very popular story versus is it just a chill, normal day?
And I don't think I finished this migration on stream.
dpk0 well, you sufficiently motivated me to set up my own little MediaWiki instance to make my personal wiki somewhat more manageable and begin migrating it over to the new domain. however, itβs midnight and iβm going to sleep now. happy hacking
Maybe I sketched it out, but after the stream, I pulled in a recent backup and ran the migration on it, and I kicked it around and played with it a little.
Oh, MediaWiki.
Neat.
Well, have a good sleep.
And if you want to see something fun, come by stream, and I'll show you my...
I've been tinkering with writing a wiki.
Mostly I did it to play with some of these Rails 8 features, like Action Cable and Solid Cache, but then also with Flex, the view component library.
So I've tinkered a little with writing a Rails wiki.
frici single person mediawiki sounds like a nightmare but good night dpk π
I don't think I will ever finish it, but it's a fun project.
frici mind you multiperson mediawiki does too but that is another story
By finish, I just mean get it to a point where I put real data in it with real users as opposed to just play with stuff.
02:59:38MediaWiki is...
really interesting software from a design perspective because it is not, in a lot of ways, it is not the way you would design anything knowing remotely
it was going to end up but instead it started out and it got wildly popular and became you know the eighth wonder of the world so you pick up some interesting legacy baggage that way sort of suffering from success as that one rap album says it
I think there's kind of, you know, it's good problems to have when you become so popular you can't change things.
Like this kind of thing.
I get to write the simple version of this migration, and it's only going to lock the table in prod for 30 seconds, as opposed to it's going to lock the table in prod for six hours, and that's an outage.
NBD.
Much nicer to work at a human scale.
So I thought about this some more.
So I want to have a created at column here.
And I mentioned that really what we care about is the tuple of date and
dpk0 haha, you say all that. i just tried updating my theme settings and now some of my wikiβs UI appears to be in Yoruba
average votes per comment on that date and any query that uses this created at column is only really going to use it to call avg the average function on it
which even though it was a big performance improvement over that, it takes 90 seconds query and the various forms of that we came up with that ran much slower.
dpk0 sigh. thatβs a problem for tomorrow dpk. bye!
I'm redoing that work for average votes per comment for every query that's needless.
And I remembered a technique from my favorite underrated SQL author.
Yoruba.
Okay, I couldn't even tell you where that language is from.
Have a good night, TPK.
Good to see you as usual.
So there's this guy, Joe Selko, and his personal site is no longer online, which is a little concerning given that he's in his late 70s.
So I did actually look for an obit just before the stream, but he seems to be alive, and I hope he is thriving.
Because Joe Selko...
back when there were magazines, used to write a column of, it was like Dear Abby for SQL databases.
And people would write in, you know, less Dear Abby, my husband and sister-in-law got in a fight and more Dear Joe, I have this data modeling problem.
pushcx https://en.wikipedia.org/wiki/J…
And he would write really thoughtful and clever responses.
And he's written, I pulled up his Wikipedia page.
If you use a transactional SQL database, especially if you are modeling one, I think you should read, let's see, data and databases, the latest SQL for Smarties,
maybe the really fun one the one that really hooked me and I just I ran across this at the library I found it on the shelf and I was like sequel puzzles all right it's so great this one one I believe these are mostly extracted from real questions people have sent him and they are
just really fun, a great way of engaging with SQL and finding new ways to look at your problems.
And he wrote one book, speaking of new ways to think of your problems, Thinking in Sets, Auxiliary, Temporal, and Virtual Tables in SQL.
All of these books hold up.
Some of these solutions are written to
problems that happened with limitations of sql databases in the 90s so a lot of this stuff disappears if you have window functions but still these books are just excellent trees and hierarchies in sql i come back to this one almost every year to like think about some problem because
Even with recursive common table expressions, which unfortunately the book predates, trees are hard to model in SQL.
And there is so much good stuff in his books.
So if you use SQL databases, if you want something fun, read the puzzles.
If you have to deal with trees and graphs, grab that.
But otherwise, SQL for Smarties is the big overview one, and I would read it first, but I would read pretty much all of his books.
But yeah, it is a little concerning that his homepage is offline and he hasn't updated a book in 10 years.
I hope he's doing well.
So what he's getting at with... Oh, he's also...
a big proponent of understanding relational algebra, which is the theoretical underpinning for relational databases.
It's very easy to learn SQL and not learn relational algebra, but learning it will, you'll see the tool in a very different way.
Honestly, it's why I keep coming back to Rails isn't great at projections.
If I have a select and I join a bunch of tables, I don't have great first-party support for it.
So I would suspect that
Perhaps an original author of Active Record had not read a Joe Selko book and learned relational algebra.
03:06:51So instead of fixing this migration, I am going to add an auxiliary table. And honestly, it's going to be
03:07:11Yeah, let's call it daily comment stats.
And I'll just have these two columns.
chamlis_ that looks fantastic, I've never felt like I had a good intuition for anything beyond basic SQL so I'll definitely look into those
And I will write the background job to fill this in on a daily basis because it'll fix the perf stuff.
It'll be very clear.
It'll save extra work.
Yeah.
Ah, Shamus, I'm glad.
Yeah, he's...
know i hesitate to call him underground because he was real popular in the 90s but he's not well known anymore and with the caveat that he doesn't talk about recent stuff like window functions which yeah they're well supported enough that it it is a little bit of a limitation but just the puzzles were so good for forcing me to look at
rebelelder he used to answer SQL questions on a stackoverflow like site too back in the day, I'm racking my brain trying to remember
chamlis_ I can just about hold the definitions of the first few normal forms in my head whilst reading them
what sql actually is yeah god i mean now i want to stop streaming and just reread all of his books oh i'm at three hours but it's only five he used to answer sql questions on a stack overflow like site back in the day yeah i don't know what site that would be but i remember his magazine column
you can just about hold the definitions of the first few normal forms in your head.
Well, if I pull up, I'm pulling up a off stream thing.
Give me one sec.
There we go.
So I wanted to to make sure I was citing the correct book, you know I showed you the the thinking and sets that's the one i'm thinking of but I couldn't find the.
table of contents for this book and in a ridiculous sign of what the Internet is like it was easier to pirate a copy of this book than find the publishers table of contents.
03:09:37So.
I just remember seeing, you can just about hold the definitions of the first few normal forms in your head.
That is literally chapter four, chapter five here, where if I recall correctly, so like number one, this is where I learned the definitions of the normal forms, but I believe he takes one example and then
through all the permutations of it in the different normal forms and usually third normal form is plenty and you can get by with a gut feeling for it but it is nice to see it all worked out and it is not a lot of pages as you can see here
espartapalma can you post the link for the PDF?
And having the whole thing of the different normal forms span, what, 12 pages?
Means you have a nice go-to reference.
And then I guess the other thing that I would plug here is make Anki cards for this.
espartapalma or is a paid ebook? ... ohh I see
Anki is so good for hanging on to those topics that you know you've had to look up a couple of times.
Can you post the link for the PDF?
I mean, obviously I'm a little cavalier by casually referencing.
Yeah, it was easier to find it on a pirate site, and I don't know what Twitch's rules are.
rebelelder there's a genesis library *cough*
I'm assuming I can refer to the fact that people pirate PDFs online.
I think I'm going to draw the line at not directly linking to it.
Yeah, Rebel, please don't get me in trouble.
frici yeah directly lijnking to it sounds like a bad idea HahaSweat
I don't have to censor stuff out of the chat history and stuff.
I don't know.
I am sure you can yo-ho-ho matey to it.
If not, I mean, speaking of forums, there are forums where you can find all kinds of things on the... Oh, my God.
Forums where you can find all kinds of things on the interwebs and discuss all kinds of topics.
So I'm going to take a page out of...
espartapalma it's OK... for a minute I though it was a free PDF
one of Joe Salka's many wonderful books and make an auxiliary table for these comment stats.
03:12:11Oh, you thought it was a free PDF.
Yeah, I wish, honestly.
He's just been such a rewarding author to read that
rebelelder can't you do change, instead up up/down methods in migrations now?
I don't know.
I wish more people knew about his stuff.
I guess that's why I'm talking him up so much.
I don't want it unmerged.
All right.
I'm just going to take the head version of this because I'm going to drop and recreate this.
03:13:02rebel yes you can do change but change can't handle this kind of comment update all it doesn't know how to reverse what is i mean you can see it's just a string and so this is opaque to active record wanting to reverse things for you it would handle the rest of this just fine
...38rebelelder right, makes sense
So let's rename this.
...49There it is, capital R. I knew it was a plugin. The fact that I couldn't tab complete migrate told me that I must be calling the command wrong. So we're going to just keep this ID number and change the name to say add. What did I call the table over there? Comment stats.
03:14:29Daily comment stats. I don't think I need to say daily. We'll just say comment stats. Oh, look at that. Some Rails plugin did the right thing for me there because I sure didn't type that.
...56So we'll give it a date, which is a date. And it's not null. We'll give it a average. which is an integer, which is not null.
03:15:18I almost want to say tiny int, but that is not a serious improvement, and I don't want to think about the type of this too much. Timestamps. Oh, no, I don't want timestamps, which means I just leave that out. Great. And down here, we'll say drop table comment stats. And I'm going to keep the up and down because I want to fill the table here. So how do I want to fill it? I think I just want to drop down to raw SQL.
03:16:09And we'll say insert, we'll spell it right, insert into comments. Why am I even drafting? I know I'm going to have to revise this at the command line. All right, so I'm going to, what are you mad about? Oh, Vim is a little mad because it sees that rebase touched the file too.
...40can never remember the order of these args. So this is t.integer that takes the name. Sometimes the Ruby syntax is so flexible, I forget this stuff. Funny that tdate worked out just fine though. Okay. So now let's restore that or I forget it. Easier to just make the other edit again, then wind back and forth. Yes. I have a, the undo tree, right? Yeah. But it's not worth grabbing a one word change out of that. So gotta quote that. date, average, values.
03:18:15That might even be correct. I don't think I have to name that column. That's fine. You have an error in your syntax. Can I not just do a subquery like that? Does it need an? This isn't a syntax thing, or at least it's not as simple as parents, right? Oh, it's not votes, it's score. Operand should contain one column. Yeah, I don't know what that one means.
03:19:03This is one of those I always have to look up. I guess I should make an Anki card for it.
...19insert into here we go all right insert into comment stats name the field and then i don't say values i just say that hey thank you docs 44, 53. That sounds about right. Let's read line.
03:20:20Let's grab this query before I get too far from it, because I believe that's basically what we want. I just want to put my eyes on the data in the table.
...54So yeah, first couple of days of the site.
Average should not be an integer.
Well, I guess I'm going to round it off anyways, because you can only have a whole number of points on your own.
chamlis_ ooh we have to know the highest average day now
So we're going to be comparing in an integer context anyways.
yeah oh we have to know the highest average day honestly it's probably day one here look at that eight i gotta quote these
03:21:54Whoa, 10 recently. Man, what happened on 8.29? Either we had a couple of comments that really leapt off the charts, or there were so few comments that the outliers stand out, but that's more likely the case for something early in the site's history like this. than something recent. Yeah, I don't know. I'm tempted to add comment count to this table because I'm kind of curious about it, but I guess it doesn't... Yeah, I'm going to yag me that. Because I wrote a pretty simple query that worked on the first try, I am not going to drop and redo this migration just to see the added, but I didn't see this code. All right, let's roll it back. I always, like I don't want to waste time, but I've caught enough of these things, like whatever this is, what are we mad about? We're not. So it thinks I want to roll back the commit I made or the migration I made on the master branch. Oh, I mentioned on Saturday that I went into the code base on Saturday to fix a bug. Well, fixed a couple of bugs actually in origin code that was written on stream so yay public mistakes where there was some code that created duplicate origins both because you could create multiple so one of the design goals for origin was to say github.com who and who.github.io should both be recognized as github.com of some kind of stable identifier that shows that they're from a shared author and the code was not correct it created it was kind of using the domain as part of the primary key for the origin and so we ended up with two of these origin records one that was under github.com and one that was under github.io so i had to write a migration to clean those up in the database which looks like find all the dupes pick the oldest one to be the primary because for boring reasons when we were showing the page we were always grabbing the first one or the earlier one and then Let's update any stories so they have the single ID and drop the dupe. But I did that after starting this migration that I just reused. So I am just going to reverse the migration by hand.
03:25:48First, we're going to tell Rails we never ran it. And then we're going to effectively run its down. And now let's run it again.
03:26:05Didn't need the console. I meant to run the migration. And I guess it's good that I did that because we got a syntax error. Oh, it's not a do block.
...33Okay.
You know, that instinct of, you know, I didn't see the code run.
I just have to see it run once.
I am glad to do that right away while all the code is in my head and just came out of my fingers.
than three days from now when I have a minute to deploy.
All right.
Oh, speaking of three days from now, I am gonna miss Thursday because I will be at RubyConf because it's here in Chicago.
And if they're bringing a whole conference to my hometown,
I'm going to hop on the round line and get down there.
espartapalma ohh nice!
So.
03:27:31Yeah, I saw RubyConf here in Chicago in a while ago, or maybe it was RailsConf. I want to say the first or second RailsConf was here in Chicago in Like 2007? Good time. I think the same venue too. No, that can't be right. It must be bigger now, right? Anyway.
03:28:06Right, so this query over in recent above average comments In the user model. Wants to be. Better.
...34So we want to say instead of this sub query. We want to join to.
...51I'm probably going to have to create a model for this, aren't I? Yeah, that would be good. Let me finish this thought and then I'll create the model. Hold on. So let's see, what were my steps?
03:29:16Rewrite migration, rewrite query. create a model, create a job to fill it regularly.
...32Yeah. So we want to join against comment stats and we are saying where the score is greater than. I do this join
...56No, I'm just doing a... I'm almost wondering if I should left join because the current day's number won't be present. Let me make the model and come back to that. So made the migration. roughly rewrote the query.
03:31:01all right so we have the i need to make a new model let's generate a model called commit stats i almost wonder if doing the join is going to be oh it's going to be weird and i don't think i can lean on active record for this because once again i'm joining on not created at but a projection of it where i extract the date that might blow up performance too let's see how it goes i would rather not make the comment table wider
03:32:06Speaking of, did I leave behind what was filling graded at date on an ongoing basis? Nothing, because there are no references remaining. Fine.
...27I said I wanted a model, and it gave me a model too. or migration as well, and I already have a migration. And I said comment Rails. So once again, I'm getting bit by Rails pluralization, where it wants to call it a comment stat, which I guess feels like I spent a little too much time hassling between singular and plural in Rails. One of these days, I will fork.
03:33:15I think that's about it. Yeah, I don't think it's gonna be an improvement to try and validate the format. There's not gonna be a lot of code here. It's not gonna be user visible.
...40So it's this part of, I wonder if I can Specify the join, because there isn't a shared ID. The join key is this projection, the output of the function. Let's check docs.
03:34:34Yeah. Actually, let me check the. So aside from this, there's the guide about hasMany.
...58And I'm wondering if there is a way to specify that the join
03:35:07is going to be based on this function instead of by some shared key directly. Here's my guides. You want. Associations.
...35This almost might be composite primary keys. I suspect we might end up or a four not found rails. What if I get rid of the edge? No. That's very unfortunate.
03:36:28Author index true.
...39At least I get this API. Name scope. But I think that is just there. I think the scope is just there for me to put on defaults like order. And I try not to use that because it's kind of a global.
03:37:14So then where are we here?
...47I don't think I can say the scopes to retrieve a specific set of records when you access the associated collection.
03:38:07Extension for new finders or other factory type methods. That's also not what I want.
...22I probably want to define this from the comment side rather than the stat side. I'm going to definitely be comparing these two, so let's get them both open.
03:39:01On this side, we're going to say it has one comment stat. And I guess if I have to. But I want to say it like this, like I'm defining a scope and I say where. The date of my created. There's no way this doesn't just blow up the moment I. So my concern is this whenever I write a string. It won't compose because it doesn't have a table name in the front. And I don't want to drop to Errol.
...55So I think it's just going to stay looking like this. Where?
03:40:32Let's see if it wants to run that.
...45I call it recent above average comments.
...54Can't join to comment stat. Yeah, because it wants an association, not a but I don't have an association because I can't really define it. And if I make a has one, it's gonna try and find a comment stat.id and compare, yeah, that's, that's probably not great. If I say a string, will Rails just let me, I gotta reload. Or else just let me name the table. Yes. So inner joins stories. But it didn't include a comma. That's an interesting bit of limitation. So what if I say joins on a separate line? Because I really don't want to. teach this string that it's part of something else oh appealing baby must be getting time to end the stream because the cat is being obnoxious about his dinner time which is in 19 minutes sir Sir, you have to be good. He was not well treated by his first owners. He had a lot of bad behavior. We had to kind of train out of him when he wanted attention. And this behavior where in front of mealtimes he gets extra appealing and bumps me and brushes me and loves me It's so much better than his early behavior where when it got to dinner time, he would bite me. But even though the being appealing is a little bit annoying, it is so much better than the bad behavior he came with.
03:43:26Yeah.
He was, unfortunately, both abused and neglected before we got him.
And there is a...
I'm not religious, but there is a very hot part of hell for people who abuse pets.
frici very sad, glad he has a much better home to be with now.
So... Ah, thanks.
Yeah, we've done...
I want to see what Rails comes up with if I leave out this other join.
We've done a lot of retraining and trying to redirect his frustration and anxiety into good behaviors.
So he actually, he knows a couple of tricks.
He can sit up and shake paws.
He can play dead and roll back and forth.
There's one more trick.
It was the other cat we taught fetch.
And yes, she did scream the whole time she fetched something.
And then... Oh, that was the other trick.
We've started teaching him to jump through a hoop.
chamlis_ blimey, I didn't think cats were that amenable to training
But we just honestly don't have a sewing hoop or a crochet hoop around often enough.
And so we started teaching him to kind of jump over our arm.
And that one, we have stalled on that one lately.
We gotta get back to it.
Boy, if I give it a string, it really is just like, all right, buddy, you know what you're doing.
03:45:18Oh no, it's even worse. So in this case, It's not including the word join. It's just slapping the string in there. And so SQL will let you do this to alias. That's why we're getting comments.userId is unknown because it aliased comment. So if I'm going to say joins comment stats, I have to say join comments. Why do I keep getting this? Yes, it's fine.
...55All right, so that's valid. Join comment stats where... All right. Is it plausible that I have left 53 comments that were above average for their day? I would believe that. I comment a lot on this site. And especially when I'm leaving a... mod hatted comment of yes please obey the rules people tend to upvote it oh shameless yeah yeah you can absolutely train cats into stuff i haven't yet seen i know that there are like professional circus people or cat trainers who clicker train a cat if you know what that is for dogs we tried a little bit with him but that abstraction between a clicker and the treat was just a little too much. So to say something uncontroversial, everyone knows that cats are better than dogs. However, I will admit that dogs are a little bit smarter than cats. And so he's got those tricks, those two and a half tricks right now. But, you know, dogs, even a kind of dumb dog can pick up like seven or eight tricks real easy and it's been interesting as a contrast because this cat we've had him god i don't know at least a half a dozen years yeah we got him before the pandemic but after that move somewhere somewhere like seven years And he's learned, like, let's round up, okay? We're doing all these averages. Let's round up and call it three tricks. And a friend of mine got an anxiety dog maybe a year ago. And she is, bless her heart, not the brightest dog. But even so, even having been held back at doggy training, a number of times. I think she's got like six tricks now. And I'm including in that stuff like walking on a leash, because that's a thing dogs have to learn how to do in the city of, you know, when you're on the leash, you can't lunge at other dogs or toddlers who are on the sidewalk, even if you are lunging to love them. And this dog is very, very sweet, but that's what she did a lot.
03:48:56but you absolutely can train cats. And it's pretty great. People love seeing a cat that does tricks. We had friends over for dinner the other day and he did all of his tricks and was very well appreciated. That's odd. So 30, this implies that 30 of the comments I have made in the last six months were on meta threads? I mean, they must have been like meta or announced threads. Have I even made that many in the last six months?
03:49:52What do I want? Just give me the sequel. Remove the extra quote. I want to do this in... I am absolutely certain that I could do this through the Active Record interface, but I can write it in SQL faster, and it's a one-off.
03:50:22chamlis_ I'm getting tired but I think that's stories rather than comments?
What did I do?
Oh, don't know what I pushed.
Bumped the keyboard.
Yeah.
I'm joining against.
...39Oh my God. You lost Maria DB. Why do you do that?
...49frici readlib says no apparently
All right.
Where'd my query go?
So I'm joining against story because the thing that popped out at me was in my two runs.
Yeah, ReadLine fights me a lot.
frici or readline rather yeah its getting late π
You know, it's even been fighting me lately when I haven't been running a terminal inside of Vim, which I can accept might be a less well-tested path or slightly misconfigured way.
chamlis_ no ACID guarantees from the mysql CLI, sadly
I am going to wrap up in the next couple of minutes for the tired folks.
And when I say next couple, I mean really the next 10, because I want to feed the cat on time.
So to your question, Shamless, I asked for comments that I've made in the last six months that were above average, and I got 53.
And then I added back the story join that says, ignore the ones where the user is author, you know, and the user's author is not true.
And that knocked out more than half, you know, called 60%.
And that just surprises me.
chamlis_ ahh right
And so I was like, well, how many stories have I submitted in the last six months?
03:52:20Come here.
Where's my in the last six months?
chamlis_ my tired brain read the user_is_author as "did this user post the story to lobsters"
Yonk.
...35And I don't need star. I want a word ID and title. Yeah. You know, if user is author had been, do I post the story to lobster? We've only done four. So this one, I didn't comment in.
03:53:04This one, I think I only wrote one or two comments. And then I wrote 30 comments in these three. I mean, I know I left a couple in the cloud and it won, but that just doesn't add up.
...53Got to qualify everything in this database.
03:54:07Well, I sure didn't write that join right. Did not leave 2,200 comments in every story.
...21Oh, it's just joining. It is possible I have written 2200 comments in the life of the site. But we also want to say that where... Yeah, let's filter this down. Where... It is not enough that they be my comments, they have to be actually on the story. I guess I'm getting tired and making silly mistakes too. So that has to be that. And...
...58Why is there one fewer? Because I didn't comment in the hiring thread. That's fine. So that's 16. 16 is noticeably less than 30. So what is wrong with this query?
03:55:26I bet, well, I bet joining against stories, because the whole thing is aggregated, is probably telling me the number of unique stories that I have left any comments on, as opposed to the number of comments. That's a little hinky. My usual thing when I see a join and I see odd data is I accidentally have a cross join and the numbers explode, like that thing that said I had 2251 comments.
03:56:24But if I am counting from comments, inner join stories. And then I'm doing a left join on comment stats.
...49espartapalma thanks folks, need to catch the bus back home... commute time it is :)
I wonder if I grab this.
03:57:01You split in a funny place. Yeah. All right. Let's see if I have to fight a read line about this one. Please don't fight me. Read line. So this ought to give me 23. All right. Now, what if I rewrite this to say instead of join stories?
...33You're going to say and comments.storyId is not in. I know it's bad to use select not in because of null values, but you can't have a null for storyId.
03:58:03also 23 that's equivalent so I was just saying like and the comment story ID is not in the ones where that's you know if I had only seen 23 I would be like okay fine if I had only seen 53 I would be like okay fine but I saw both and I don't
get it one of these joins is wrong which one is different and does not belong no one is old enough to get that all right all right it is coming up on the alarm clock for cat food o'clock because
I guess that could be his extra fourth trick, is he knows that when a particular alarm clock rings, that it is time for dinner.
That was a really big part of getting him to behave in front of mealtimes, was training him that the alarm clock means it's dinner time, not hassling the human is what gets you dinner time, even if the human does it.
And I don't want to mess with that training, because, woof, it was a lot.
So I am going to grovel around and just select out all of these comments and look at them and determine whether they're above average for the day myself off stream.
I think it is enough to have done pull request review and big talks about self promo and all of this other stuff.
I've created a model, still rewriting the query.
This is good progress.
I am going to roll out.
chamlis_ thanks!
I hope you and your cats all have an excellent time.
If you are at RubyConf, drop me a line and I will meet up with you.
And then otherwise, I will see you back here next Monday, the 18th.
Thanks for hanging out.
frici Catch you next week hopefully π Take care everyone
Thanks for joining the discussion about all these
Subtle topics and tricky topics and gosh, so hard to understand topics.
Yeah, I will see you next week.
Shameless Fruity, if you can make it.
Take care.