David

David

@dcyoung.dev

πŸš€ Web/Software/Ruby on Rails Developer | πŸ₯ƒ Turning whisky into code in the scenic North East of Scotland 🏴󠁧󠁒󠁳󠁣󠁴󠁿 | Collector of domain names https://dcyoung.dev https://braw.software

96 followers374 following53 posts

Pinned

Looking for fellow Rails devs - extra points if they're in the North East of Scotland 🀞🏴󠁧󠁒󠁳󠁣󠁴󠁿

has_secure_password isn't just for passwords. Pass it a custom attribute and it'll hash a pin code just fine. Built a passwordless auth system using that and generates_token_for. Magic links and pin codes from one model. dcyoung.dev/shorts/authe...

dcyoung.devπŸ’‘ Authentication Tokens in Rails Without DeviseMagic links are great. You click a link, you're signed in. No password to remember, no password to leak. For most sign-in flows they're probably the ideal solution. ...

Just wrote up how I set up SQLite backups for a Rails app using Litestream and Cloudflare R2 Litestream streams your database changes to S3-compatible storage in near real-time, and the litestream-ruby gem handles the Puma integration nicely dcyoung.dev/shorts/setti... #rubyonrails #webdevelopment

Reading Roundup is live. Prototyping in code, Rails view performance, custom elements, vanilla CSS, and building elegant Ruby API clients. Quick reads worth your time. Full issue here: dcyoungdev.substack.com/p/reading-ro... #RubyOnRails #WebDevelopment #SoftwareDesign

dcyoungdev.substack.comReading Roundup: Prototyping, Rails Views, Custom Elements, and Elegant APIsHere’s a short roundup of articles I read this week. Quick takeaways below so you can scan fast and dive deeper where it helps.

API token code got you spooked? All that SHA256 hashing and secret key management scattered everywhere? I found a cleaner way using `has_secure_password`, `authenticate_by` and `authenticate_or_request_with_http_token` in Rails. Full writeup: dcyoung.dev/shorts/api-t...

Example: You add a new column to your database and you want to fill it with some computed value. You calculate a score for each post based on interactions. You have a service `PostScorer.score_post(post)` that returns a number that you want to store in your new `posts.score` column.

Enjoyed this talk about the Shape of Service Objects. I like the separation of work explained and the visual representation of a Service Object is great 😍 - off to find some code to analyse + refactor 🧐 www.rubyvideo.dev/talks/the-cu... #RubyOnRails

rubyvideo.devThe Curse of Service ObjectsService Objects were a mistake. It has nothing to do with OOP. It has little to do with ideas of Fowler, Evans and Martin. I analyzed a plenty of open repositories, videos and articles, and in this ta...

Not a new #AppIdea for me but, an Instagram like clone for specific events like weddings. Guests share photos and videos to an event's timeline. Could also handle RSVPs. #RubyOnRails #webdevelopment #buildinpublic

Meal Planner app finally got it's meal planning functionality Allows us to add recipes to a day of the week. Already using this to plan this week's meals πŸ˜‹ #RubyOnRails #webdevelopment #buildinpublic bsky.app/profile/dcyo...

David@dcyoung.dev

Meal Planning app coming along nicely πŸ‘Œ #RubyOnRails #webdevelopment #buildinpublic

Most of these places use Facebook to keep their customers up to date, however the feedback is rubbish and it tends to show up days later than needed.

Cafes, restaurants and takeaways in my area often have inconsistent opening times, and sometimes different locations (food vans)

Implemented a <dialog> powered by HOTWire - not quite as smooth as I want it to be but pretty good start πŸ‘Œ #rubyonrails #hotwire #webdevelopment

plant_db - a plant database app built for my wife to help manage our garden planting. Allowing us to create collections of plants for different areas of the garden, also includes a gardener's diary

meal_planner - Meal planning app being used by my wife and I to gather recipes and create shopping lists based on recipe ingredients 🍝

We're in the very early stages of a new #startup idea. An online storefront for your company branded merch, that only your team have access to. Would your startup find this useful? #buildinginpublic

Have your hoodies, t-shirts, mugs and other goodies, made to order when your team wants them. Onboard new team mates and offer an allowance to spend in your store. No more welcome packs filled with crap no-one uses, or t-shirts that are too small.

You are up to date.