The default pizza topping is Italian sausage
Streamed
Mention markdown PR for user references. Upvoted comments PR for comment vote summaries. Removing replying_comments in favor of notifications. Filed apply_current_vote refactor to reduce code duplication. Finishing the code to prevent both flagging and replying to a comment. CSP false alarms. Cleanup from renaming master branch to main. Chicago pizza and other regionalisms.
scratch
topics
PRs
mention markdown https://github.com/lobsters/lobsters/pull/1689
upvoted comments https://github.com/lobsters/lobsters/pull/1688
removed replying_comments https://github.com/lobsters/lobsters/issues/1649
upvoted.json https://github.com/lobsters/lobsters/issues/1694
filed apply_current_vote refactor https://github.com/lobsters/lobsters/issues/1694
issue commenting
flagging + replying
x comment needs a validation to prevent
x flag needs a validation to prevent
x load current_reply; Comment#has_reply_from
client-side: handle reply then flag flow
slop guideline
title
post-stream
Transcripts are generated with whisperx, so they mistranscribe basically every username and technical term. They're OK but not great, advice appreciated.
Recording
02:00pushcx This is Lobsters office hours, ask a question anytime!
oh okay cool i got a shout out neat all righty so let's throw in the chat this is lobster's office hours ask a question anytime cool and unusually well the usual thing for lobster's office hours is people can ask a question anytime and then when there aren't questions
work on stuff related to the site so fix post stream i know there's prs to review and i know there's an issue about commenting and i have what was the other one flagging and replying to work on
And then unusually there's going to be a little downtime because I realized that I have completely messed up my eating schedule and i'm going to need to eat a bite of pizza that's coming out of the reheat in a minute so.
let's see how that goes.
yeah so folks don't have questions.
Why did I see a connecting to the chat please let me know if my.
connection is unstable all my little indicators are green but twitch was weird all right so yeah we hang out we work on the site talk about anything that there is and that's about that so let's grab these prs because there's one about
Mention markdown.
And there's one about uploaded comments.
Don't know what this one is.
Oh, and then maybe working on the slop guideline.
So there's a bunch of meta stuff to talk about.
Yeah.
So this first one is about the syntax for referring to users and adding help for it.
And because I renamed the master branch to main and there was some hassle getting that sorted out, all those changes are mixed in here.
So I did that over the weekend because this is
The last repo I have that uses master, nobody ever advocated for renaming to main, but that's been the default for GitHub and Git for what?
Almost 10 years now, something in that neighborhood.
And so it's getting irksome that I can't control RMA history.
This was actually not too bad.
GitHub has a way to rename the branch so that folks who have PRs open against master, those were all just quietly renamed to main.
In Hatchbox, I just had to change the name of what branch to deploy and then delete the bookmark on Jujutsu and create a main one and something in there I bobbled and I had to force push, but it got sorted out.
shouldn't be too bad.
And GitHub actually is fairly smart about this.
So like, I can't show it on stream, because it's already cleared.
But it has a little reminder to contributors, where I think it's if somebody has a fork of the repo on GitHub, it shows them a little pop up that's like, hey, they just renamed the master branch domain.
Here's your git commands for doing that in the terminal.
So hopefully, this isn't too painful.
easeout cheers :) s/tidle/tilde in that diff there
So this change that the user has given is pretty small.
06:29twitchtd hi pushcx
Oh, good eye.
I wanted to double check.
Oh, hey, Thomas.
Do you see your PR?
I don't know what it is, but it's already in my public list.
Where's...
So let's go to local host and log in.
What have I done?
Oh, this is the stuff that's in progress.
So I ended the last stream working on this thing.
jesseractly What kind of pizza do you have?
I guess it's in a broken state comment.
flagger hasn't replied no this is in model mode you need to supply at least one validation oh so this isn't a it is some kind of nice sausage pizza oh hey jess directly so for
I know on last stream I talked a bunch about a couple of Chicago Easter eggs.
One of my favorite Chicago facts, one of the regionalisms is most everywhere the default pizza topping is pepperoni.
In sausage, the default pepper topping is Italian sausage.
And it wasn't until I left Chicago that I realized that that was not the default everywhere.
I don't know how local it is, but I really think it's just like the Chicago metro area.
The other wonderful regional...
09:02twitchtd I think your mic just cut out
Ah, sorry.
I was just looking for the custom validation here.
jesseractly Ah, how I miss Chicago-style pizza
So you can validate with a method.
Okay, is it just singular validate?
Is that what it wants?
Yeah, and then I did the same thing on comment.
Oh yeah, on top of Chicago style pizza.
Validates.
...36so when you miss chicago style pizza are you saying you miss deep dish kind of pizza or you miss tavern cut pizza because there are everybody knows deep dish but there are the two kinds of chicago pizza so if i said let's see i need a username let's just use this guy so if I set mention rv e or is that a w rv rv man time for me to get my glasses updated rv rv actually it probably is time for me to get them updated do both work boy does that not work that's That's the validation failing. All right, let's get off of this branch.
10:55jesseractly Deep dish! Thin crust is a travesty
Yeah, I didn't think the tilde actually worked.
11:03so the incust is a travesty i don't know the nice the cracker crust goes great with like a pilsner or a lager so did i have an issue open about tool day mentioning users
jesseractly Also, you can get thin crust anywhere, but a good deep dish is rare
If not, I've been just meaning to do it for ages.
...43Yeah, okay. So let's... Yeah, very true. The fun fact there is Chicago-style deep dish requires a special pizza oven. And since that is such an investment, you almost never see it outside of the Chicago area. I think it just runs hotter. All right, so this really isn't an approve, and it isn't a deny. And at the same time, I was bobbling the master to main branch rename. So those changes are mixed in here. Be sure.
13:21Now that's not a reasonable number. What's the recent open pull request for the chamless?
...35I should know this number off the top of my head by now. 1627.
...50Oh, thanks, Big Beast. Yeah, sit on the mouse. That helps. Alright.
14:26Where?
Ezout, did you want to leave a comment with that typo about tilde?
easeout can do
I don't know if it's just GitHub being an SPA.
Thanks.
...48All right, and then the other one is the one that Thomas opened.
pushcx https://github.com/lobsters/lob…
Oh, and if there's a net 37 lines of diff, then I can go grab that pizza that just dinged and eat it while I read.
So be right back.
15:59Okay, I'm here, but I'm going to be muted for a minute because nobody needs to hear me chew.
17:24So. Thomas, this is really parallel to what the stories controller does when it renders a tree of comments right of. Applying votes.
...46Or at least for the current user right.
...57twitchtd I think so
comment vote summaries yeah so i'm thinking of how do i get to it with one hand all right
18:33yeah so here the load user votes is very parallel to what you've written i wonder if there's a way we can do this i mean this kind of yeah So there's kind of a Rails-ism, sort of a primitive obsession with the models, and it's hard to express something like I'm talking about a hydrated thread. We see this same kind of logic in replies controller, right? Yeah, apply current vote. That's where you took the name from. And then it's also in comments controller, isn't it?
19:41Yeah. Actually, I've got my my cursor right on it. That's just lucky. Hmm.
...59But Since the comments are just an array, we don't really want a monkey patch array with the idea of adding votes to comments. I'm going to take a couple more bytes and think about code duplication for a second.
20:54buzztronic what does "please look at an archived transcript to see how chat shows up alongside" mean?
pushcx https://push.cx/stream
know the the parallel structure actually extends out of these methods buzztronic it means if you take a look at if you pick any of these archived episodes it will show you how your chat comments show up alongside the transcript which
i called it out on the little twitch chat because usually streams are ephemeral and if you don't see your chat on the stream you know you are kind of shouting into the board you can expect it to disappear but i decided to archive streams because i thought it would be a neat little project
22:01All right, and if the cat doesn't see a pizza crust i'm going to just i'm going to merge this and then just write an issue about removing the duplication, since there isn't.
An instantly compelling way to handle these.
yeah.
The common ideas to vote summaries.
That is a.
patotato03 where do you store the files for the past streams
that is one of the older method names here in ruby or in this code base right so let's say groove and so this should fix 1076 that was the issue i was going to look at or fix the
buzztronic tbh I also don't understand the sentence "Lofi vim hop beats to relax/code to." :)
yeah let's see pato tato it is on my blog is a service called
dreamhost.com for my personal blog and they have just ridiculous storage limits don't think like boy let me upload it copyrighted stuff because they absolutely scan for that but if it is your own stuff their definition of unlimited is
honestly thought i would hit it with the stream archives but i haven't i guess because the pace of uploading files is pretty slow and the traffic to them is real low but i figure at some point they'll hassle me and i'll have to figure something else out as for the lo-fi vim hop beats that's a reference to a famous youtube channel
pushcx https://www.youtube.com/watch?v…
lo-fi hip-hop radio beats to study too oh okay cat thank you don't click all right so we got that let's just go ahead and kick off a deploy for this
24:55Where'd you pick up some diffs?
25:33all right notifications plus plus huh thomas all right so let's let's write up the issue this one is in notifications controller right yeah are these all called apply current vote no not in comments
26:08GitHub, womp, womp, another SPA failed from GitHub. There is, you know, these have accelerated and now there's one of these weird SPA failures on almost every stream. It was like I saw one a week and now they've become so common that controls stop working. I mean, you saw I clicked over to the issue list and it was wrong and out of date till I reloaded. Just what are you doing, GitHub?
27:14What is it? In storage controller. Applies controller. Disappear. Let's see. Applies. Leave.
...43notifications notifications controller in in
28:35veqqio Hey everyone
Maybe.
I'll head back.
30:05so we've got i guess this is a feature request i don't know that it's a good first issue though this one is a little hairy i usually tag stuff as good first issue if it doesn't require understanding site norms community norms participating
...41pushcx https://github.com/lobsters/lob…
Okay, so we got that as 1694 there's the link for anybody who's curious and I will throw it in the notes.
31:09Is that unless Yeah, I was gonna say unless someone has been in here, and I see that Thomas is editing stuff live here on the stream, which is kind of great.
...25Oh, I didn't connect your username there ease out. Thank you.
...34Still gonna make that a Maybe I should just start with a spreadsheet to keep track of folks.
...47What's changed here? GitHub.
32:03Yeah, I can imagine here, Thomas. knowing so keeping this PR Thank you for doing it. I'm sorry, this has been hanging out so long.
...31Okay, let's take a look at issues because I want to say
Yeah, there's at least one bug that's filed since the last stream.
Oh, somebody commented on our refactor I requested.
Yeah, so that one I can talk a little about.
That one's the new one.
That's a feature request.
That's a bug.
twitchtd did you have any idea of when you'd like to merge removing the replying comments?
That one, hopefully Chamlus is around and has an idea.
Okay.
So here's.
33:16I think the answer for notifications is. Two or three days after we're done making big changes to notifications and we removed those placeholders and then we gave it a day or two and now we just fixed that bug. I guess we don't need to wait after a bug fix. That one is pretty minor.
...45Yeah, I don't have a strict list of acceptance criteria for that PR, which is bad. Let me think about that for a second.
35:07twitchtd btw, I think github was being too smart and closed https://github.com/lobsters/lob… (I can't reopen)
Yeah, I actually thought you had the magic comment syntax different enough, but I guess it saw the word fix near the name of the PR.
So, all right.
I think the answer is it's time to replace replying comments with notifications.
Because I don't have any reason not to, that's not just FUD at this point.
People have had a lot of opportunity now to see it coming.
twitchtd we could also wait till thursday as well
And it's been in the sub nav for at least a week with a note about what it is and what's about to happen.
So I should stop dragging my feet.
36:08twitchtd I'm not in a rush I was just curious is all
yeah i thought about that but then i thought what's going to be different on thursday yeah it's not about being in a rush it's you're having churn like for the conflicts you just settled the longer we leave the pr the less likely it gets merged right that's through of all and there isn't
i don't know that there's really a benefit to waiting besides people maybe check it out and get a little more familiar with the new ui and i think now more than it's got to be what a week past since you know that experimentation is going to have a real strong fall off
So if I, what's the sub nav for it called?
37:29Yeah, 724. So we gave it more than a week. I think that's about as good as we're going to get. And I'm just dragging my feet because of the same thing that I've already been worried about and beat to death is worrying about churning core UI. Yeah.
38:04Did you also update this to pull out my addition to the sub nav?
twitchtd I think so
twitchtd oh no
The little help text.
39:06graefchen Hello limesHi
Hey, great.
Welcome back.
...38All right, and that also should be the last of my weird mutes because I've eaten the pizza. I am done with the hump thing. Let's see.
40:15ghost_user_1984 ah yes, the last of my rails changes finally out of the code base.
Oh no yeah actually folks ghost user 1984 here is hunter who wrote the replies view originally.
Thomas as long as you're in the file you want to swap notifications ahead of messages.
...39and actually. Maybe they should just be. inbox and unread for the link text.
41:22twitchtd ok so rename all -> inbox, unread notifications -> unread, and then swap with messages?
just just the words all notifications and unread notifications why don't i come here let's just so this one would say i can make this unambiguous right because i'm not suggesting a change to the actual routes i really like the url structure you've come up with and then this one would just be unread
...57twitchtd that works
I think what's happened here in my head is that notification is absolutely the right word for the database object, but I don't see the need to show it in the UI anywhere because people don't think of them as notifications.
They think of being notified of a message or comment.
And so there is an inbox, but it's just like a generic inbox.
42:38Can I just submit? There we go. All right, so you've got those. You need to leave a comment. Oh, okay.
43:09So if you've got that and tell me if you want to do that and swap the order and get the help text, I'll come back in a sec and merge this and roll it out.
...28So let's see. Over in issues, there's a couple of things that I've filed in case anyone would like to make contributions. I saw a nice blog post about improving test speed by stubbing the login cookie directly. And we have a couple of helpers that work by automating the login form. And since you use a password there, the actual hash is a bunch of work.
44:19People are being silly over in the Lobster's IRC channel. All right. The other one I'm looking for help with is 1693. This... Chamlus, this might be a bug downstream of the cookie. Actually, was that... Oh, it wasn't Chamlus. It was Jacqueline, and I'm misremembering who. Never mind. Don't mean to call out. I should just mentioned Jacqueline. So we caught a race condition in the cookie code on stream where. we're trying to delete unused cookies and make sure that people who are not attempting to become users don't have sessions, but I have seen like one or two a day of these where. Deep in the session middle where it's throwing exceptions. And I'm guessing this is because we're deleting the session and something in the middle where it does not expect people to get rid of sessions. Because that's a pretty unfamiliar, uncommon thing to have happen. Usually if you don't want to use the session, you just ignore it. So maybe somebody will dig in on that one. This is the bug. The other feature I required I added this morning was from discussion in the chat room where someone mentioned that they searched for their domain name, but they just searched for example dot com rather than including the domain colon. And so they didn't turn off links from their blog, which would have been neat. so if you are curious about how the search engine works which includes a parse tree there's some very neat cs stuff there this one i think i talked about it on the last stream But someone can't set filters while logged out. It is a feature of the site that you can filter out tags you don't want to see. And as a double feature, you don't even have to be a registered user. It'll save them to a cookie in your browser. So this is almost certainly downstream of the cookie code.
47:16But I don't have strong ideas about it. Oh, this is the one channel is if you're present if you want to throw up your hand. We had a little interaction on. So.
...44chamlis_ hi! I've been paying half-attention
i caught that an extension i have privacy badger which is a i don't know moderately common privacy extension yeah so i have in a personal browser errors around csp and the errors are totally correct but boy do we not need to see these in telebugs and i was thinking about
how you mentioned we don't really care about fonts and mdn says oh yeah fonts are an attack vector and i'm guessing that's just that historically you know there's some buffer overflow associated with font parsing or something because they are big complex binary blobs and i was wondering if you had any thoughts about
just turning off reporting of CSP because there doesn't seem to be any way to filter out all these false alarms.
And if there's realistically something like dozens or hundreds of false alarms on a weekly or monthly basis,
chamlis_ yeah, that one you posted that was a script violation with an inline looked just like I'd expect a real injection to
we're not going to catch a real XSS injection so that we can start the mitigation process earlier.
I think we should just... Yeah.
You're saying the one that I linked here or...
This one with the relative URL.
49:53chamlis_ two before my last reply there
I think the relative URL one, two before your last reply.
Two.
50:09Yeah.
...24But I haven't gotten the impression we are under attack.
And I didn't check the IP and such for it.
Maybe this is the mini profiler that only appears to mods.
Or maybe this is just an extension.
And not just an extension.
The other thing that it could be is bookmarklets.
I have seen bookmarklets use the strategy of adding a script tag to the page, which is basically someone's browser XSSing the page on the user's behalf.
chamlis_ that issue you sent was useful, I tracked down uBO talking about it and they switched how they injected JS to get around the CSP (they didn't like the idea of patching the CSP itself)
So it's not technically an attack, but it is the exact form of inserting a script tag into the page.
51:32That's good. Yeah, the thing that I mostly shared the issue for was there is a reasonably popular extension from a reasonably competent set of maintainers, and they have let the CSP thing be so low priority that the bug is hanging out there five or six years later. at which point I go, oh, well, we're just never ever gonna stop seeing false alarms.
52:15chamlis_ right
And this one, like if this is the shape of a real injection,
I don't know what I'm supposed to do with this, because I can't even tell, it didn't send back what the inline source is.
If this had said, oh, I saw a script with an SRC set to evil.com slash inject test 19.js, I would be like, oh boy, does that look bad?
Let me go fetch that URL and look at it.
But this, I don't know what I'm supposed to do with this.
Like, this is not...
actionable, even if it's real.
chamlis_ there was a firefox issue where it sounded like they would love to be able to exactly trace that a user-chosen extension injected this code and ignore it, but that's just not how things are set up
I could try hitting the BRB of, oh, maybe we actually have an attack, and we should spend 100 hours attempting to recreate the attack, or groveling through the logs.
But, hmm, that's an interesting one.
53:25and that one that one's even harder because there are malicious extensions and Mozilla does significant work trying to keep them out of the store but they're not perfect especially given takeovers whether that's they attacked an extension maintainer and stole their account or they paid them a couple of grand and took over their account and so I can't even say that it shouldn't be considered XSS, in which case, when we filter out everything that says it's from Moz extension, we could be filtering out entirely real attacks. But there are attacks that we can't do anything about because the attack is that the user's browser is effectively compromised.
54:23chamlis_ can telebugs be made to just count reports rather than store them, so we'd get an idea of trends if nothing else?
So I guess the only thing for it, I'm kind of thinking aloud and chewing on this one, but there's so many false alarms and the real alarms don't have enough detail to do anything with them.
If we leave CSP enabled, we get the benefit of making most XSS harder.
..
55:01chamlis_ I'm thinking a spike of reports on one particular page is a useful signal
If we changed the fingerprint so they all had an identical fingerprint, they would roll up into one page.
All right, not one page.
I was reading your comment at the same time.
They would roll up into one single error report that we could just kind of learn to tune out because we'd always see that there were a couple hundred instance of it.
But if we did that, we wouldn't be able to see that all of a sudden, like the DM page is having a spike.
No.
...52Yeah, I think it's just,
56:01like it's been interesting and i've learned things about browser security through this but the the lack of action ability on these plus the false alarms i think i'm talking myself into just disabling the reporting is it open read only
...34chamlis_ right, I've never enabled reports before and didn't expect this level of noise, turning that off is fair enough
must have another vim hanging out somewhere where i was tinkering with this
57:02chamlis_ and I guess this means we're taking a punt if we start enforcing the policy that we didn't miss any actual issues in this trial phase
Where is the CSP header set?
twitchtd sounds like csp reporting needs additional tooling to be useful to separate the noise from signal, and given current state disabling seems reasonable to keep noise low
Is that in the caddy stuff?
Yeah.
Yeah, that is true.
chamlis_ I think it's in config, and then the fallback for guests is in the caddyfile
I feel like CSP has been active for a couple of weeks, and we haven't had any kind of reports that have felt related to it.
I guess it is actually a little bit concerning.
I expected we would get bug reports along the lines of...
...47I thought we would get bug reports along the lines of, my weird browser extension stopped working.
chamlis_ well the csp isn't blocking anything yet
Or I inject, actually the font one I expected of, I inject that I want to see this whole page in my particular font and it broke and you did something.
And we didn't get any of those.
So either.
chamlis_ it's in report only mode
Oh.
Hmm.
It's in report only mode.
All right.
58:31I have been going through the issues to see if there are new kind of shapes of signatures and I'm not seeing things that look legitimate in the sense of activity or some You know, like the mini profiler I mentioned, where only mods see the mini profiler. I do not see exceptions about the mini profiler showing up in the telebugs. Although, again, it's noisy enough I could have missed it.
59:31chamlis_ you'll see the violations in your browser console still, I think
Chamlus, can I talk you into opening a PR to switch from report mode to block mode?
This doesn't look like it's a one-liner.
And I guess we can remove the CSP report and controller.
The controller and route, sorry, not report.
01:00:02See violations.
Yeah, I do see.
chamlis_ by all means, but that probably won't be in time for this stream (I'm not at my usual machine)
Go double check in my personal browser.
Yeah, so.
Another part of it is like.
Even the reports in the.
Oh, that's totally fine.
There's no rush.
Even the reports in my browser console are not actionable, you know?
They're like, the page's settings would block a JavaScript eval from being executed because it violates the following directive, script, source, self.
And then there's a nonce, missing, unsafe eval, source.
And it's like some bit of library code, HTML element, prototype focus.
And if I click on it, it just takes me nowhere.
01:01:07twitchtd double checking for the remove replying comments pr, the order of the subnav should be: Inbox, Unread, Messages, Sent?
So I don't get anything from it.
...31Oh, it absolutely is mini profiler, though.
...45Yeah, I actually see it in the mini profiler source that it works by injecting a script tag.
...59Thomas, yeah, that's exactly what I'm asking for.
01:02:13twitchtd ok
So I'm looking at miniprofiler.com to see if anybody has raised it in one of their repos.
Oh yeah.
Okay.
There's something about a CSP nonce and so it knows something about CSP.
It's just not doing too much.
01:03:10chamlis_ I'll look at that, I could swear I was running clean on my development version which I think uses the profiler
I'm going to trust they've sorted it out.
I would rather let it just break in prod for a minute.
...29All right. Okay. Oh, four. Hey, that's an interesting date.
...40yeah so next week is going to be one year of streaming lobsters office hours that's kind of neat so i did a a test stream and then on the 12th which i am Not available on the 12th. Yeah, so I'm going to miss a bunch of streams next week. I will be present for Monday, but then not for the 14th, 18th, and 21st. Got some travel.
01:05:24Yeah.
...58twitchtd alright, updated the remove replying comments pr
Thanks, Thomas.
Let's head over to that in a second then here.
01:06:47All right, there we go. Yeah, this one, this is tough to have confidence around. I guess that's the theme of this stream. So that's my two little tweaks.
01:07:18It thinks of it as moving the top ones down rather than moving the down ones up. Got it. Okay. Hi, Ohivo.
...35Thanks, Thomas. So I'm going to fetch that back here and deploy.
01:08:02twitchtd PokPikachu
Yeah, it's a big milestone.
pushcx https://github.com/lobsters/lob…
So speaking of milestones, Thomas, we had talked about how this was related to 1076, right?
...26And this was me wanting a bunch of features And part of it was removing this replying comments view, which the deploy just finished. And I'm hoping lobsters is still up. Okay, good. Yeah, we seem fine. And I'm peeking off stream at telebugs and the number of exception reports. It's not leaping up on sort by last seen. This whole thing actually is running slow because there's so many. All right, we got one. All right, this bug looks like it was someone loaded the page as the code was deploying. So we have an exception about undefined method touch all for nil. And I can't show this on stream because it's going to have PII in it, but it's in update read app. So we're in.
01:10:00So this is complaining that notifications is nil.
...24Which means the notifications didn't load. How was this supposed to work. yeah update was supposed to come after what URL are they loading.
...50Sure, would be great to know they were loading slash inbox. So if you load inbox which is mapped to all. would you get into an after actions with notifications being nil i guess well no set page the pagination stuff would return an empty array.
01:11:47Yeah, so there's no more repeats of the one about the view.
01:12:00But there are 60 instances of undefined method touchall for nil.
So how is someone loading the notifications page with it set to nil instead of an empty relation?
twitchtd I don't know how @notifications can be nil, maybe preload returns nil if the relation is empty?
I hate the way Rails controllers couple by instance variable.
...31Hmm. Sure shouldn't.
...44It's not a typo, right? No.
01:13:06thinking of a hotfix here just to stop throwing exceptions in prod.
...29twitchtd &.touch_all ?
twitchtd oh but then ya
Yeah, but look at the next line.
That's going to I mean,
It's going to just immediately run into this thing.
I'm staring at it and I'm very puzzled.
So the URL is here.
chamlis_ isn't it in inbox_controller, not notifications_controller?
Can I collapse the sections that have user data?
Not without getting rid of all of the useful debug info.
chamlis_ just looking at the route for /inbox
I guess the relevant thing is that it's on slash inbox.
Yes, it is an inbox controller.
Why do I still have a notifications controller?
Oh, maybe that's what that big BIM warning was about.
Hang on.
01:14:40I am in a weird state, aren't I? I'm on an old one, because I should be on master. I also renamed my remote from origin, which I dislike and gives a lot of, because it's not actually the origin. And I renamed it to get hub and I guess that put me into a state so alright let's go look at inbox. box controller. Alright. So yes, it is a no method error in inbox controller I just saw the word notifications and I mentally auto completed. Since I was way out of date. let's double check the spelling. No.
01:15:49chamlis_ it's the first index method, no?
Oh, this update read at is firing on the index.
TheYagich π
So when someone loads this, it's this first inbox method.
This doesn't have notifications.
twitchtd ah
So this should say only all hand unread.
Oh, hey, I bet you can't load your notifications page.
Is that what brings you by?
01:16:48TheYagich haha no, i'm not cool enough to be on lobsters :D
twitchtd sorry about that, that was me resolving some conflicts due to the controller move to inbox
twitchtd and not catching that
Lobsters does not have invites because we are the cool kids treehouse of especially elite coders.
No worries.
Do you have any concerns about the fix I made, Thomas?
twitchtd no, that makes sense
Does this... Because this looks right to me.
Okay.
veqqio @TheYagich if you pm me on IRC I can invite you
So in this shell, this has to change to say main.
This has to say main.
No remote named origin.
01:17:35Why are you pushing to origin?
...45I don't know why this repo still thinks I want a remote named origin. It's going to be somewhere deep in the .git directory.
01:18:24I know i'm paying down tech debt, but this whole thing is a little irritating you know I should actually deploy that fix right so just sitting here looking at it feeling good that I fixed it.
01:19:07chamlis_ it might be `git branch --set-upstream github`
chamlis_ I've been doing that a bunch recently with git-annex so it's on the tips of my fingers
Oh, that could be.
...23Yeah, you know, I've had the Git repo co-located here. And at this point, I'm comfortable enough in jujitsu that maybe I don't even want to bother with that anymore.
...53Could not set. Yeah, OK, so git doesn't know. So let's git switch to main. Yeah, Git is in a confused state.
01:20:29mini tron get fetch the requested upstream branch well no the name of the upstream branch is main it's the origin that you're confused about yeah i'm just gonna leave git and it's like that hint i do not exactly feel like i got the great hint to a puzzle i feel like i got
chamlis_ yeah I had none of that lol
one of those technically accurate but not actually useful messages.
01:21:16chamlis_ it might be github/main
I'm going to go on ignoring it and see where it gets me.
So, Thomas, I got super distracted by the exception, which
has stopped coming in as of a couple of minutes ago.
pgronkievitz `git branch --set-upstream-to github main` should do the job (with a space)
And I was going to ask.
I didn't get the impression that you wanted to.
Let's give it a shot.
I didn't get the impression you wanted to do the rest of the
requested upstream branch does not exist.
01:22:14Yeah, so set upstream only takes a branch name. It doesn't take the name of the remote.
...30and somehow that's different than track and i don't want to learn that difference because i really don't want to learn more git ui at this point anyways so thomas part of this redesign notifications was removing that view and you were just doing that one part of that as a blocker for
twitchtd yup
The SQLite migration, correct?
I didn't get the impression you wanted to do the rest of these notification redesign things.
If you want to, cool.
Then we are on the same page.
If it is something you would like to take over, that would be great.
But if not, no worries at all.
twitchtd ya, I wasn't planning on doing the rest of the redesign, I mainly just wanted to get rid of that view
Did I remember to mention GitHub?
Oh yeah, 22 comments GitHub.
Who could load 22 comments?
Cool.
01:24:00So all these things happened. Wow, I click a single checkbox and it all turns gray for 500 milliseconds. Did the actually did the migration remove the key stores? I should look at this list before.
...33pgronkievitz praise the React \o/ (and bad UI design)
twitchtd it should have
Yes, great.
That's done.
That's done.
That's done.
That's done.
OK, yeah, that really is everything.
01:25:35Once again, I want, you know, Thomas, if you have a second, please do knock out that JJ hub because this whole thing of this one feature, like I would love to be able to take all of these comments and this whole discussion and all of the bugs and the tweaks and everything and just be like, yep, all of that is resolved, but I don't want to lose it. I want it to still be readable. It's sort of a branch in the issue. All right.
01:26:16noticed was the name of it.
...23So let me grab this.
01:27:32So put that in there. Let me go ahead and say,
01:28:10Is it 1635? I don't think it's 1635 because it didn't have the merged icon. But I guess that UI is just wrong. So here I have the purple. Look, it's merged.
...30And here I have the gray. No, it's not.
...37so that's that's two bugs today on github not just the usual one and apparently someone is attempting to hack my apple account what apple account all right whatever that scam is
01:29:13Let's add the date.
...40So we don't actually need that anymore. But I can't really cross out a code block. I guess I can just delete it.
01:30:30twitchtd thanks for merging, removing that view has removed a ton of complexity :)
yeah i mean from our database too you know i'm actually going to take good first issue off of this one because you do have to know something about the community to understand stuff and notifications i think
It was a mistake to have added it in the first place because things like there are a whole bunch of notifications that you don't see and why is a very fiddly thing that we want people to have some comfort with.
All right, so off screen, I'm reloading Telebugs just to double check that the...
Exceptions have stopped trickling in about the inbox.
And it's taking its time because it has a whole heck of a lot of issues to sort through.
Well, nobody is complaining in the issues.
So, all right.
Or in the chat room.
01:31:56So let's just mention that this was PR 1630.
01:32:09All right.
...49So if somebody goes to slash replies, oh, ho, well, they're not going to be doing that anymore, right?
01:33:33Did you see that? I typed 1639. Is that not the one I just merged? Remove applying comments 1649. Okay, I misremembered. I thought GitHub was literally showing me the wrong message.
01:34:34TheYagich github would never lie to you like that
Sights up, right?
Yeah.
The.
...44Oh, yeah.
Twice on this stream, GitHub has told me things that aren't true.
veqqio Off topic and random, but have there been points where the codebase could have froze and been "done"? I know it's living with constant changes, like one of Christpher Alexander's multigenerational building but :thinking-emoji:
Mostly around failures to update state because GitHub is very clearly now just one big single page app and struggles to keep track of things.
01:35:09i mean at any point we could call the code base done right and questions are welcome anytime so you don't need to preface that they're off topic this is what office hours is for i
gtfrvz @TheYagich lies make baby jesus cry
I don't think software that runs a social community can ever be done because some of our changes are.
reacting to.
evolving norms.
...55So. I mean like the I guess i'm giving you two answers, because the trivial answer is, you know it works pretty well at any point, you could kind of be like. There are a few and minor enough bugs that we can just live with them, and you could call it done, but at the same time, no social software is never done and and cannot be because of its nature as. Human communities which are ever changing.
01:36:37All right.
...43Oh, and a pull request has been opened while we were doing that last one.
TheYagich so the extreme version of that is lobsters needs to become just a code editor so that everyone adapts it to what they need
pushcx https://github.com/lobsters/lob…
So this one I discussed in I'll throw it in here.
I discussed in the chat room.
01:37:06yeah and emacs is done right i discussed in the chat room with this user they have a bit of personal code where they take all of their upvoted i think stories and comments and they do something with them in a little bot And I had deleted this. That shouldn't be needed. Okay. And then I guess they want the JSON. I'm puzzled that this isn't just a reversion of the other code because this is different. I only remember deleting this, deleting a JSON line.
01:38:45Let's go look at this history.
...59Yeah, so here's the commit where I dropped it. And all I did was remove that one JSON. Why did they add that section about RSS?
01:39:21They fix.
...30Rails Route Helper. Yes, you did. You were inspired by to redirect back to itself. But there literally isn't a redirect.
...50Okay.
01:40:00Thank you.
...51Let me see if I can grab this author if they are in the chat room.
01:41:07I just took a look up here.
...26HTV.
...44Cat, you are so wide. How are you so wide?
01:42:42I think this is probably fine to merge.
...50Just wanted to see if I could get Unlobido to drop by to answer the question.
01:43:14All righty.
...28Did that little mer come through? Anybody heard the cat? He occasionally talks a bit. All right, so we talked through the issues and oh, I don't want to generate the whole list of issues to link.
01:44:11What did we say that was? 1649? 1649, yes. Good.
...24Right, so flagging and replying.
...33When are we on time? So I've been going for about an hour 45 to say good time to remind that this is Lobster's office hours. And if you have any questions about the site, speak up anytime. When I'm not answering questions or we're not discussing meta topics or running queries that users write, I maintain the site. So you can look over my shoulder on that kind of stuff. And one of the things I started last stream, what did I call it? Flagging replies. So let's get rebase. Well, I want to edit flagging replies. I am nowhere near where I want to be. I want to be. Can I just delete those bookmarks? Bookmark delete main origin. No, because it's not a bookmark. So JJ thinks I have a. JJ get remote remove origin. remote room blue origin yeah no you don't think i have it so i have it but i don't have it that's that's totally sensical yeah so this is like everyone that's contributed in the last year or two where i've wanted to grab their code
01:46:48Okay. Well, the mysteries of Jujutsu aside, we'll get
01:47:18on to main at github okay after main at github there we go still getting a hang of that there are kind of two ways to use jj rebase which is
twitchtd looks at git rebase >.>
whole there are two ways to do it is one of those big sins of the git cli interface this tool does two things that are kind of the same thing and so with jj there are two ways to specify how much stuff should get moved do you say branch or do you say source yeah it's not nearly get rebase and i think it's
branch.
And then there are three ways of specifying your destination.
And I think branch requires using destination after or before and source requires using revision or the reverse, I can never keep track of it.
So this is like the one jujitsu command I struggle with, because it's pretty arbitrary.
01:48:53Alright, so let's kind of review what we did last stream because I've jumped through a whole lot of stuff. I sure don't remember everything. Right. So if you have flagged a comment, we use pointer events none to disable the link, which is pretty great. And we make it just black instead of blue and we strike it out. And then. Here's that pattern we just talked about through Thomas' PR at the top of the stream of hydrating a collection of comments with a little bit of metadata based on the current user. And in this case, it's not current vote, it's current reply to track whether the user has left a reply to that comment.
01:49:59And so then we to call this has reply from and that needs to exist so that wants comment has reply from and then i don't remember the rest of my cx What is it? Is it a it's not an asset, it's a. And include. The stream dated twenty twenty five oh seven thirty one. There we go. There's that other scratch file. Little behind the scenes there.
01:50:55All right, so I added that already. I added that already client side handle the reply and then flow flag flow. Which is much less common but worth handling.
01:51:29Just finding the right spot.
...50This wanted to be based on current reply. but we had to figure out how to load that data.
01:52:44Just double chuck and tell about because we had a couple of big deploys here. All right. So, you know, this is almost it wants the refactoring that I just filed as an issue. because it's every place that comments appear, they need to be correctly hydrated with whether the currently logged in user has responded to them. I guess let's start from comments controller. This is, I don't know, this is reply. This logic must be repeated a couple of places then. So it's really anywhere we set currentVoe, which has several.
01:54:21Do I not want to do a big refactor?
...27I'm not as effective coding on stream because I'm kind of keeping up the line of patter, but it makes it harder to get things right. I mean, you've probably heard how many times I've been obviously reading something off of the screen at the same time I'm talking and putting the wrong word in the sentence. do the exact same thing writing code here on stream and more very creative bugs sometimes can we punt on this not really because it works now on client side but there's no round trip so if you reload the page you can do it which is not great.
01:55:38Yeah, so we really have this idea of a collection of comments or whatever that particular view is. And then we hydrate it with stuff about the current user.
01:56:08I'm going to duplicate code rather than try and refactor here because I don't have a real good feeling for what that should get refactor to you know it's kind of sketched it out in the issue but. yeah.
...52scope i put it out all right so replies is what do i want i just want the replies from the current user so we'll call it current user replies is i want the comments where
01:57:27on the current user reply parents that's an awful name and we'll say comment where no user comments yeah see we're right into empty array and then if user
01:58:07starnt_xyz no syntax highlighting?
hey start yeah there's a fact i have very little syntax highlighting if you look at it there is kind of a cursive italic font that is a syntax highlighting for literals but and actually now that i'm in the middle of a sentence you can kind of see there's an error here and
A little flag for that shows color but, otherwise I don't really like color very much on the screen it doesn't help me.
So we want to say where it is.
In the.
comment ids.
Where the parent comment ID.
Is that let's.
select because we don't need to hydrate a whole comment object parent comment id and that'll give back is that going to give back let's check the docs i can't remember if it's if i want pluck or select yeah select gives me the object look gives me just no this is
starnt_xyz so what even is lobste.rs? it looks like a hacker news clone.
Just the attributes that's what I want there's a special version of pluck for the first thing and I don't remember.
pushcx https://lobste.rs/about
yeah so if you check out.
Here i'll throw you the link.
upstairs about our about page has all this kind of stuff, but yes, it is a.
pushcx https://github.com/lobsters/lob…
clone slash fork of Hacker News that started about 13 years ago and for the last year I've been running office hours here on Twitch where I talk about the code base and if nobody's asking questions I work on maintenance issues so if you pull up there you go this GitHub repo you can browse all of the code for the site
02:00:44So I want a hash, don't I?
02:01:04starnt_xyz oh you block brave browser? let me open it in firefox
Maybe you're wondering about.
This should be my scratch file.
...17Oh yeah, that just came up actually today.
So the short version on that one is that every time we deal with the Brave browser, they...
pushcx https://lobste.rs/s/iopw1d/what…
Trying not to say something libelous off the top of my head.
Let me link to a comment.
...51There you go. Here's from the last time this came up. So if we have the list of IDs and we have all of the comments,
02:02:19So really prefer. That's part of the. What didn't make it into the refactor?
02:03:50The other hand, you know, because rails is not super expressive. The I can't say, give me back the contents of this query as a set, I get back an array, and then I have to loop it to turn it into a set or something else. So
02:04:19So if I have a set, and I'm saying set because I'm thinking about it. So if I have an array that's one, two, four, and then I call, let's say s equals set.new with the array, and I can say set to? No, I thought I could access set elements directly. I guess it's just hash keys. I'm just trying to do an order one lookup instead of an order n, because that's the thing that's annoying to let slip in.
02:05:04Yes, you've heard the front door, cat. You can leave. The other human is back. All right.
...30I really hate that I can't transform an array into a set of hash keys in Ruby conveniently. I have to loop it just to give it to the hash in the format it expects. Right? Yeah.
02:06:21So let's double check.
02:07:18chamlis_ do I see that to_h can take a block to give the value in the hash?
Yep.
twitchtd alright I'm going to grab early dinner and log off, have a good rest of your day, thanks for merging
If you're looking at default value, though, I believe it does run that every time it's accessed.
So you can do clever things like use it to memoize like a third party API.
...57chamlis_ so could you do `comment_id.to_h { |_| 1 }`?
yeah and so then this is i constantly run into this inability to express this and then i have to do an inefficient thing of i have an array not an array of two element arrays not an array of even numbers alternating keys and value just an array of keys and i want to say initialize all of them with the same value
Because I want that constant time lookup.
But to get constant time lookup, I have to loop the thing like nine times.
And I guess it's fine because, you know, users only leave 10 or 20 comments at most.
You know, like how many replies does somebody put in one thread?
Not that many.
But it just irks me in a theoretical sense.
02:08:56And if, where'd it go? If set, let me look things up.
02:09:08But I can't.
...29Yeah, and the docs don't make any guarantees about how it's stored internally. You know it's got to be some kind of hash table, but without a seek lookup, I don't really know that for sure. There isn't a to hash on it, right? Yeah.
02:10:21We don't need to pass that anywhere. This is the worst version of it. It's the shortest version, but it's going to do a scan of the array.
...51for every comment on the page, which is, it would be less bad if I could do it the other direction, but comments is an array rather than a hash.
02:11:44All right, things like that, h equals hash dot new, false. And then if I said h three, yeah. let's actually double check that it works the way i want and then if i said h4 is true h3 is still false and h4 is great i guess i've spent so much time with functional programming that i'm irked that i have to iterate and say things about individual elements instead of saying this is what i want to have happen to Could I do comment ID dot 2H?
02:12:47You mean the parent comment IDs?
...55I'm not sure what part you're referring to.
02:13:17Because comment IDs is all of the comments on the page. I really only want to. touch the hash for the ones that the user has replied to. What it says it has key. yeah. And then, if I said.
...48taimouraaa hey hey
Right, because it's returning for everything.
So H dot has key SDF.
02:14:00I must have accidentally overwritten the hash.
...23So that's the pattern I want, but that's a lot of... So I guess this one could become the nil propagation operator, and I can drop that at least.
...43Oh, standard RB. Oh, you've caught... That's so ugly, having to do that. I guess it's less ugly to say if user on the end, right now, standard RB doesn't like that one.
02:15:06Well, I'm sure not copying and pasting this eight lines of code around, but where would it live? I guess on the user.
...29This is ugly. So I can get rid of this has reply from because that just becomes accessing the current reply.
02:16:19Let's drop over to user. So what am I doing? I'm taking in a list of comments and I'm returning a hash of the IDs that tells you whether the user has replied. So if I said, like, user dot comment replies hash for comments, there isn't a way to get, yeah. So I'm doing h is hash dot new false. and here i'm saying this it wants comment ids not comments and then it returns the hash so then this becomes
02:17:53user dot comment replies i hate comment replies hash ids with replies ids replied to
02:18:30taimouraaa are you an OOP guy.
Or you just have a hash that always returns false.
And now this is down to two lines of code.
I think you are seeing right now that I am not especially an OOP guy.
...53Sure have spent most of my career in it, though.
02:19:01yeah and i've got to have that over there because ruby really doesn't have great support for the null object pattern because you can't short circuit ifs all right let's see if this works on one page by works i mean loads without crashing oh okay
...45taimouraaa hmm I just listened to this talk. Have you heard this? I found it really interesting and thought provoking .https://www.youtube.com/watch?v…
Good.
If I want it here, no, if I want to slash comments, well, it loads.
So if I set reply, well, let's debug first.
Oh, it's in the CSS, actually.
That's already set up.
02:20:27taimouraaa I am listening to that one too. but this is an. old one
without clicking the link is that the kc moritari talk the oops 35 year mistake that's new oh that's the the vote stuff i just touched oh no it's brian will why
Oh, it was bad, I think.
Yeah, this talk is older.
It rings a bell, but I couldn't tell you that I recall what it's about.
I mean, you know, I can read the description, obviously, but.
02:21:39Lobsters had a thread on the Muratori talk, which is why I assumed that's the one you were referring to. Why do I know the name Brian Will? What is he famous for? Was he like a big early Python guy, maybe? On the other hand, I see the Java logo in the video thumbnail, so I don't know.
02:22:12So it just exists.
...33Let's double check the dock here because I don't want to have to do this twice.
...58Do it by hand.
02:23:37exists exists plural okay so then this one's fine now but comment is wrong let's try that again okay why are you so wide
02:24:11Why can't you find the solid Q jobs table in local?
...27Is this because I've switched branches a bunch? Should I just?
...42Alright, so it did create the reply because we're down another code path when I reload.
02:25:05So this one should have The class indicating that I have replied to it and it does. So if I have applied it's fucking it's eight days old, so that. The window for flagging comments is. Just a couple of days.
...58graefchen Brian Will, from my short "research" either someone who produced content against (certain) OOP or a politician from georgia limesHmm Bit I assume the against OOP - guy is the one you rmember. limesHmm
There we go.
02:26:04Yeah, I guess I know him from this talk or something similar.
But the name rings a bell.
Can't really watch on stream.
So what I want is to display this crossed out with a title that says you've replied to this.
But we know that this functionality to fill the replied works.
So I can copy that everywhere.
taimouraaa It talks about why OOP was a bad idea and weβve spent decades building abstractions to make OOP tolerable like design patterns, solid principles etc. Also talks about why it's bad when object has to deal with a shared variable. Additionally he says things like how it increases Cognitive Load by creating too many files, entities etc. And that a system built on OOP principles doesn't scale well.
So do I want to do that everywhere?
taimouraaa etc
I think so.
...52Hmm. Well, certainly sounds like he's swinging for the fences and. Can't say I immediately disagree. so now if we have a comment with the class replied then on the is it called a flagger i want to say yeah and flagger gets well it gets this style so let's just reuse that
02:28:03Color. Color is the one difference because it's in the byline.
...18I don't remember the name of that variable. Let's just inspect for it.
...31That's not right. I guess it was a couple lines up. All right, so it doesn't have the title.
02:29:12You know, there's a very different UI verb happening here. Like when you can no longer flag something, as in this comment from Alex below, we just remove the flag. But now I'm adding this strikethrough to say, No, you can't. And I guess I'm mostly adding it to have a place to put that title.
02:30:01PuercoPop taimouraa: OOP doesn't have a common definition, but some of your facts are wrong
graefchen It should be able to be seen
so there's a work oh pop i think you are maybe arguing with brian whale not timora so if you scroll up to the the youtube link a minute ago actually if you're just joining you may not be able to see it timor can you repost that link maybe
...34taimouraaa sure. https://www.youtube.com/watch?v…
So there's a CSS expressiveness that I want to add a title in this strikethrough case.
Thank you, Grave.
But in CSS, I can't add and remove a title.
I can have a pseudo element and add an before or after, which would let me add an inline word.
02:31:09I guess the alternate thing I could do would be create a second element for flags for this control that is a flagger that says, oh, you replied.
graefchen Also the line to the left of the page is a bug, or? Because I have also seen it on the search of lobste.rs limesLurk
Let me hide the existing one and show you one that has the strikethrough styling and the title.
Putting both controls would let me toggle between them with CSS.
The line to the left of the page.
Oh, yeah, that's absolutely a bug.
That's going to be one of the parent folder lines, isn't it?
02:32:10graefchen Yes. At least it was on "search".
PuercoPop Like, the patterns one. Not all OOP languages have the implementations. The original pattern proponent, Ward Cunningham, thought that by publishing the patterns book it would result in people thinking, look how horrible we have to contort C++ to achieve something that is straightforward in Smalltalk. Lets all write our applications in Smalltalk instaed
yeah i think we have a an open issue about that if i can talk you into trying it on do you have grave chen do you have two devices because twitch chat has a little
crossed out I next to your username that says you're doing audio only, but you just referred to something visually on screen.
So I know you can see.
No.
...47No, I don't think we opened an issue about it.
02:33:11PuercoPop There is nothing about OOP that require creating files
moussx_ on twitch you need to manually update those badges (video/audio only), and they're set by the user
graefchen No. It was just a global Badge beside the Username that Twitch uses.
moussx_ So usually I never trust it
So the the tree lines got messed up when we rebuilt the comments page with.
PuercoPop Solid principles is ineed snakoil
Ah they're set by the user I didn't know.
Thank you for explaining.
...42Sorry, don't type. Sometimes he stretches out and starts whacking keys on the keyboard. That's really not helpful, right? I think I'm going to go with the two lag controls. And I'll hide one and show the other, because it's the only way I can change the title. So let's get rid of that.
02:34:27I'm getting a couple steps away from replicating this query to find the suppliers. let's go ahead and do that and then fix this thing because we do at least use the same comment template everywhere.
02:35:20swap that around would be votes and then vote summaries and then reply parents hmm
02:36:10Well, setting and resetting, but I do have to have a user object, so I guess I could change this to say. If user.
...27And then.
...38This is, but it has to be a comment for this to be coherent. Otherwise I'm checking story IDs against.
...53This needs to become a top level.
I'm not repeating that.
That's too bad.
So here's for story.
Here's for comments.
taimouraaa @PuercoPop well OOP requires you to hide implementation details thus by creating lot of classes and separating into different files like PaymentService.rb etc. What I meant was that functionality is fractured across many micro-methods and classes. we have to jump between files and symbols to mentally reassemble the logic. Also class and method names can be misleading, they gesture at some functionality but donβt contain it. etc
So that goes away instead of R.
02:37:42That's funny. None of those things are my criticisms of OOP, which is it couples your data structures to your code in a way that's not particularly useful and extensible.
02:38:14Why not? Let's just bring this up here. And then this in here. And this becomes an Elsa if.
...34Why are you indented? Did I miss a do end or something? OK, the linter is telling me something is missing here.
...56Is it just Elsif? No, it's... I don't want to fight with that Rubyism.
02:39:15OK.
...30yeah see this one goes votes and then summary, so it was out of order with the others.
02:40:05story we don't want to touch story at this level yet this is I'm going to use controller what are we even at apply probably create so that's fine so is that where are we now we're into reply no get back there
02:41:05I'm going to update.
...31I didn't double check that it was called comment IDs and all the other call sites. It's almost certainly not.
...42How far? Only 62% of the way through the list.
...50I just got to slog through it again. Double check. Go back. Do it on this side.
02:43:20taimouraaa Hey pushcx, I had been working as an ROR dev for 2 years until recently when I got laid off. Now the city where I live in doesn't have a lot of ROR jobs and remote ones need a lot 3-5 YOE. I was thinking of switching tech stack. I was leaning in towards Node. what do you thing. is that a good idea. It has a lot of saturation but jobs are also abundunt.
you don't have comment ids well yeah node is certainly more popular than rails
the other thing I would say is lots of jobs say they need three to five years of experience.
That is the kind of thing I would apply even without that.
Especially if you have a resume that is reasonably well written to say what you did and how you did it.
And it looks like you know what you're doing.
Because when somebody writes a job listing that says three to five years of experience, they just mean we don't want to train a totally green developer.
taimouraaa That
And if you give them the impression that you are not one, they're not actually going to like subtract the months and years on your resume to figure it out.
02:44:45And more generally, a lot of job ads have requirements.
And as programmers, we're like, ah, requirements, they are the things you are required to have.
But realistically, some of them are wants and you only have to have about 70, 80% of the requirements to be seriously considered.
Accepting
taimouraaa That's not an issue. I know it pretty well for 3-5 YOE. I actually replaced a dev with 5 YOE in my previous job.
dumb bot filters so like if they're like you have to have experience with microsoft sql server and your resume says sql server instead of microsoft sql server or you know one of these other trivial variations that step you know has no mercy and it doesn't work but
yeah i mean if you feel like you were able to replace a dev with five years of experience and work competently then don't worry about seeing a job that says you've got to have six months more experience than you do that that's not a meaningful restriction
02:46:15Here's my cursor. I will also say good luck. Applying for jobs sucks a lot. It is an enormous slog. Good luck. Keep your chin up.
...48taimouraaa Thanks. Why do companies nowadays don't start new projects with ROR.
I think it is less popular for no good reason.
So I would say now is a fine time to start a new project with Rails.
And I couldn't tell you why they make that mistake.
But they sure do make it sometimes.
02:47:30graefchen Because React has the Bigger Market, probably. limesHmm
Huh, have I just lost my stream?
The little Twitch preview just showed my generic going live for a second.
That was weird.
Well, great, but folks aren't really well React.
I'm getting hung up on splitting the hair of React isn't quite a framework in the way Rails is.
So I would say, you know, node has the bigger market, but I don't know.
I'm not actually saying anything useful.
I'm just doing the nerd nitpicking thing.
Ignore me.
Okay, we wrapped around.
That's all of the places.
So with that,
I can stop thinking about the fact that that's hanging out and just look at the comment comment.
02:48:43And say, let's go find the flagger.
What is
taimouraaa I guess nowadays you can't be a purely backend or purely frontend. Now with AI, companies usually want you to know react/angular etc too.
Grant black that's whether the user has flagged it already.
02:49:28You know, I think even if you don't use one of the LLMs to write code, they make it easier to be a backend developer who does some frontend or vice versa, because you can get it to explain stuff to you very fast.
...58Hey, where's my open brace?
Why do I have a close brace on this line that doesn't have a matching open brace?
How is this not some kind of weird bug?
Oh, God, it is a weird bug.
So this closing brace is closing this and then open to this.
So this becomes the else for the outside.
So this should be dented like that.
That can't be right.
The optional curly braces in JavaScript, I keep getting tempted to use it.
And I mean, it's here.
I don't want to remove that one, but it is such a bug factory.
taimouraaa Have you worked with JS a lot.
that's probably been lurking for years that people have looked over that we rewrote most of this javascript maybe two and a half three years ago yeah i have been writing javascript from before i started my professional career so god when did javascript come out was that 96
And then I got into it either later that year or the next year.
Because I was making websites by then.
02:51:54Now I'm curious. So I have mostly been a backend developer, but I am actually a full stack developer. So it came out in December of 95. So yeah, I would have started using it somewhere in 96 and I really can't be more specific because the family computer had a hard drive crash and all of my early programs are gone.
02:52:25I guess by 96 I had my own computer? Yeah. So then it's just my failure to keep files. Yeah, that family hard drive crash was epochal for family history. Separated things into a before and after.
...57Yeah, see here it's right.
02:53:06All right, hold on, let's think. If I leave off the title, I don't have to touch any of this, do I? What does flagger underscore stub? I think it's just there.
...32Yeah, so that the JS doesn't have to have a bunch of else's about the element not being there. Yeah, so I'm coming up on 30 years of JavaScript. Sneaks up on you. I'm sure one of these days they'll deprecate the with keyword.
02:54:14taimouraaa haha You must have seen a lot, everyday new JS frameworks coming up, it branching into every aspect of modern web/mobile desktop apps. :)
Yeah.
Yeah, I really don't want to replicate all of these.
You know, it's in a weird way, it's been
I know as an old developer, I'm supposed to be mad at Electron, but it's kind of convenient because I know JavaScript.
And so even when I'm like, why is this chat client taking up half a gig of RAM?
Back in my day, when we were fighting the Kaiser, your IRC client would fit into two megabytes of RAM.
That's the way we liked it.
But the ability to open the JavaScript console in these apps and mess around with them is kind of great.
02:55:16So what do I really need? I really need, if you flagged it, or if you reply, the flag control is disabled. And we have that. Like it works might even be able to load without a woo. So I fixed a JavaScript syntax error and the whole page gets messed up. I broke something else. What did I break?
...46Let's just check in app views.
...54TheYagich the power of using the same language on both ends is also undeniable
Really the only difference in app views is that indent and the addition of the class, but the class doesn't touch it.
You know, I have actually barely touched JavaScript on the server side.
There was a little bit of that when I was a consultant and I edited once or twice, but they definitely didn't have,
What's that clever name for when you can use the same models on the client as your server side?
Isomorphic maybe?
It's one of those things where it's like, well, that's not the right word for that, but I get what you're trying to say.
So after that,
just as that was starting to become popular i moved over to stripe and then i was there for a couple of years and stripe is a ruby on the back end so i wouldn't say i've seriously worked with js on the back end if you've had a lot of experience with it yeah i get you all you know more than me i wouldn't mind having ruby on the front end as long as you know
value is having the same language on both ends not so much i want to ship a ruby interpreter in wasm why did i break here did this break something up here in the because this is repeated this whole page is maybe i just did something weird in the console
And it's getting preserved across reloads?
No.
This isn't prod, right?
Prod's not doing this.
OK.
So what do we think is wrong here?
02:58:19TheYagich i have not worked with it much either! i just talk with a lot of programmers, and that's the feeling i get.
Well, it sure looks like everything's in the header.
...28Inside.
...36Footer. So why is the inside 3800? Oh, it's not that it's nested wrong. It's just ridiculously wide. What's What's happened that it's ridiculously wide? Okay, so maybe it's just that I broke the CSS. I could have introduced a syntax error to the CSS to cause this, right?
02:59:19Yes, I did introduce a syntax error to the CSS. Here we go. So this was supposed to be a comma. And then that's all the changes.
...42There we go. All right, so that's back to normal. That one is flagged. I don't love that I'm introducing UI and it's changing this without explaining why. But this is good enough to ship, I think. And if people are real confused by it, we can come back. Yeah.
03:00:17That's a pretty good sized diff.
...26So, where is my... I'm going to put up the little last call banner that I am going to wind the stream down in a couple of minutes. So now is a great time to ask any last questions you have about the site. So I'm going to review this diff. Oh, I should actually run the specs at some point, right? Just to make sure I haven't made obvious errors. And then I'll ship this up.
03:01:05taimouraaa I am also trying to learn JS more, one of the reasons being that I recently read an article that where the person was doing some LLM benchmarking and He concluded that b/c There is a certain way we do things in rails, like we have to names files certain way, follow conventions etc, so LLMs are really great at it. and LLMs are also very good at statically typed languages but not so far dynamically types like JS.
NoGoodNick_ are troll questions ok?
So we swapped that around and added the parents, yeah.
...27Yeah, no good, Nick.
They're fine.
Yeah, Taimur, we just had actually two articles today on LLMs and statically typed languages.
They were an interesting read because the impression I got from both of them was not that LLMs are particularly good at statically typed languages.
It's just that statically typed, they make the kinds of mistakes that statically typed languages are good at throwing compile time exceptions about.
Now all of the editors have evolved into kind of agentic loops where they write the code, they paste it into your file, and then they see if they can compile.
NoGoodNick_ I was just going to ask when you were going to get chatgpt rewrite the site in ts but I changed my mind and I don't think it's that funny anymore
taimouraaa hmm makes sense.
And if they get compiler errors, they automatically feed that into the LLM and reapply.
And so it's kind of funny.
It's not that LLMs are good at statically typed languages.
It's the workflow for getting feedback.
Yeah.
You know, no good, Nick.
I think that would actually be kind of a fun project to, especially with one of the, like, what are the recent ones?
Like Kiro, AgentOS, Conductor.
There are a bunch of these that are about managing longer workflows with the agents so that you can be higher level and you can say like,
I want to add a messaging feature to the site rather than write me a function that does X and they will keep the agent busy for hours.
Maybe even multiple agents in parallel.
I think taking a site and porting it to another language is actually a pretty good benchmark.
imgajeed76 hello there! good evening
And Lobster's is not huge, so.
I don't know.
It's not something I'm going to spend any time on, but it's not a terrible idea.
imgajeed76 almost ye
Hi, Imgudjit.
All right, welcome.
You're coming in at the end of the stream.
I'm reviewing this diff before I ship it up.
All right, so let's run the build.
One of these years, I'll make a proper build script for this.
Not today.
imgajeed76 i got something for you speaning of build scripts
taimouraaa I joined late. I was gonna say why was stream so short today.
you know part of the reason i haven't done it is because we have the build in the github workflow and i'm less bothered by having this repeated on now i've been going for the full like three hours i'm less bothered by having this repeated in my command line history than a script
03:04:31Okay, so this is just going to be track story reads. All right. So it must be calling load user votes. This doesn't have a comments ID variable.
03:05:00I caught this in the other controller.
And I guess I missed it here.
PuercoPop @taimouraaa It doesn't require that, You put multiple classes in the same file. Your language may not even use files (Smalltalk). Classes in your language might be only structs and the metnods belong to functions instead of classes (like CLOS and Flavours, where the term mixin originated)
So that's probably like half of those test failures.
...14If not more, that's nice.
...26So undefined method C. See, this is one, these, both of these failures, like they're not bad, but they are very conspicuously the kinds of errors you get when you copy and paste code around instead of making proper abstractions, like the refactoring that I didn't want to do on stream because I would just make errors.
...58line was that to 10 you know it's called comment and.
imgajeed76 you wrote "ccomment"
And now I bet there's just going to be this one failure in the vote test or in the notification test.
03:06:45taimouraaa what's your background. @PuercoPop What kind of languages have you worked with.
Yeah, mdg8, you got it at the same time as me.
All right.
03:07:06Communication spec 87.
...15imgajeed76 after you are finished with that, am i allowed to show you something
So this is reusing the user, isn't it?
...26So this one is actually a code change.
Imgur, you can show me something right now.
PuercoPop Worked, Python, JS, Ruby, some go. Used, CL (mostly), Rust, Smalltalk, APL
And now is better than in a minute, because I'm going to go pretty fast once I get this sorted.
...55imgajeed76 alright, so you just need to google "axogen typescript"
imgajeed76 thats what i build in the last days
imgajeed76 im wondering what you think about it
This just cares that it has a flag.
It doesn't care who did it.
So it was just reusing objects in a way that happened to trick this behavior change.
03:08:14You don't have a link?
...31imgajeed76 https://axonotes.github.io/axog…
OK. All right, so I got a green build.
And I have a description.
03:09:00I wonder if I remove this remote. The cat is pushing the mouse around. All right. TypeScript native config system for any project, any language.
...25I don't understand what it is.
...33I don't know what Zod schemas are.
...50imgajeed76 its about keeping your configuration at one source of trouth
imgajeed76 thats the core idea
Yeah, I think this, but what config?
Like my vimrc?
imgajeed76 idk how practially it is for you but it is for other stuff, like microservices
that's the cat locking the screen thanks cat that's cat don't okay buddy you gotta go oh so like dot end and okay
Yeah, I try and avoid microservices.
So far, I've pretty much ducked that one my whole career.
I mean, I say my whole career, but it's only been around for 10 years or so.
03:10:52Yeah, I guess the only thing I would say here about your page and your project is
would be really useful if somewhere high up on this page it showed me what's the before what do i have right now and then show me what axogen or axonotes turns it into like what's the after
imgajeed76 https://dev.to/imgajeed76/i-bui…
And if I know the before, especially if you also tell me, here's what's wrong with the before, because I'm so used to the before, I have stopped seeing the painful things.
And then you show me the after, then I can be like, oh yeah, exogen solves a real problem I have.
03:11:48I can't read this because I don't have a dev2 login.
imgajeed76 you dont need one
But just from the URL, it sounds like it gave me like a login screen.
I don't know.
Maybe I clicked in an empty spot on the page and it wasn't empty and it thought I was upvoting or something.
I'll come back to it.
I try not to drag on light mode things because people are so particular about
dark mode and all right.
Why do you think there's a git remote named origin?
I'm not going to keep fighting that.
Let's deploy.
And that'll be the end of the stream.
imgajeed76 also you said a valid point, i know i currently dont frame it perfectly. its not easy to quickly tell people whats it about. tldr's ar ehard XD
So that'll take about 26 seconds total, which is, oh, I'm still, it's been a couple of months and I'm still loving how quick Hatchbox deploys are.
Yeah, they are brutal.
And the more you can do to echo the language and the concepts that your readers already have, the easier it'll be for people to understand your project and what problem it solves.
imgajeed76 ye im working on it but thatnks for the feedback
But good luck with it.
And speaking of good luck, I hope everybody has good luck, we are gonna didn't even get to the slot guideline thing.
All right.
Alrighty.
Well, the next scheduled office hours is Thursday.
And then I will make
imgajeed76 have a good evening
TheYagich thanks for the stream!
next monday but then after that i'm going to be off for basically two weeks so do make sure you come back on thursday at 9 00 a.m chicago time i appreciate folks who turned in and chatted tuned in and chatted everybody else take care