Arama Sonuçları: "#RealCodeFriday"

15 sonuç
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday Working on improving how locked tasks are shown in arrows.to -- ended up using named groups in Tailwind and a simple component to make a "veil" that shows an overlay message and blurs the content underneath when hovered
matt swanson 😈 tweet mediamatt swanson 😈 tweet media
English
3
0
34
6.2K
Rinas
Rinas@onerinas·
@_swanson Love the #RealCodeFriday. Appreciate you sharing the real code :) Inline Job is the one I couldn’t digest 😁
English
0
0
0
124
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday is back! A bunch of small things in here that I like: - Using `ActionText::Content` for a fallback for an optional rich_text - Callback with descriptive conditions - Small delay to prevent accidentally sending (the UI for locking is a toggle switch so could accidentally flip it on/off) - Inlined Job since it's not called elsewhere so proximity is good What do you love? what do you hate?
matt swanson 😈 tweet media
English
9
5
51
8.5K
Jake Duchesne
Jake Duchesne@nuckdev·
@_swanson Thanks Matt! I ended up exploring this way of doing it and I think it's going to work for my use case. I think I actually saw you share something similar to this on one of your #RealCodeFriday's. Really appreciate the insight!
English
0
0
1
71
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday this week I added some more webhook processing for Postmark -- when your app sends automated emails on people's behalf, they probably want to know if the emails are bouncing or getting flagged as spam!
matt swanson 😈 tweet mediamatt swanson 😈 tweet media
English
4
2
30
3.8K
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday HTML emails are a pain to build so this week we took some Postmark battle-tested templates and sliced them into ViewComponents like `Email::Button` and `Email::Footer` to handle the gross work of building table layouts 🗡️
matt swanson 😈 tweet media
English
9
1
68
8.3K
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday this week I was working on converting some existing LinkAction records to a new, more specific MeetingAction record type Used the ~* postgres operator for the first time!
matt swanson 😈 tweet media
English
5
2
19
4.6K
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday So much of building software is migrating functionality and upgrades as you go. We are moving to process some workflow actions asynchronously, but that requires additional OAuth scopes 🙃 Run both code paths and report customers that are both using the feature and need to upgrade so we can politely nudge them to reauth ✨ I was very happy to see that Rails can do `1.day.iso8601` to create the (new to me!) duration format string of "P1D" Also liked that I was able to keep the logic in the same place and just run one version inline and the other in a background job.
matt swanson 😈 tweet media
English
3
1
42
9.7K
matt swanson 😈
matt swanson 😈@_swanson·
#RealCodeFriday Helper to track events/metrics -- you might be tempted to put this code in, e.g. a plans#show controller but it's not ideal to make DB writes on GET requests (idempotence, read-replica, perf, link scan tools) so instead insert a self-destructing element that makes a PATCH when the page loads (Shamelessly stolen from hey.com source maps) Can use new-ish browser Beacon API as well but I'm lazy
matt swanson 😈 tweet media
English
5
5
80
17.6K
Justin Duke
Justin Duke@jmduke·
Today's #RealCodeFriday: how to implement a checker cron in ~100 lines of code. (Okay, and another hundred lines for emailing/paging me when a checker actually fails.)
Justin Duke tweet media
English
0
0
2
589
Justin Duke
Justin Duke@jmduke·
In honor of #RealCodeFriday: a cron for autoscaling Heroku workers I wrote in 2020, fully expecting for it to crash terribly after three weeks and bill me for $3000. It has remained rock-steady for three years and counting! twitter.com/_swanson/statu…
Justin Duke tweet mediaJustin Duke tweet mediaJustin Duke tweet media
matt swanson 😈@_swanson

Real code Friday! 🪠 So much of software is plumbing code: here we process a webhook, throw it into a background job, and run some SQL to keep our local data in sync with an external system

English
2
0
14
3.2K