Back in 2018, I wrote about a password reset method illustrating how to do a password reset without storing a reset code in the database. This has worked well for a few of my apps, but recently some good friends, we’ll call them Pedro and Rosco, came up with a much better solution.
I’m asked all the time “How can I learn all this stuff?". The simple answer is ‘build an app’
That’s right. You want to take your skills from beginner, bypassing intermediate, and land on advanced. You may have just started coding a year or two ago, but you’re determined to be the best developer on your team. It’s going to take hard work, no getting around that, but we like hard work. You’re going to feel dumb at times, no problem, you’ve fully embraced that feeling dumb means you’re learning and that’s the name of the game. Say ‘good-bye’ to your comfort zone, and hello to boot camp life.
Paige Niedringhaus writes a nice blog post called Password Reset Emails In Your React App Made Easy with Nodemailer, where she outlines how to use Nodemailer + ReactJS + Node.js + MySQL + Sequelize to build a simple password reset flow. Everyone reading these words has doubtless gone through the familiar password reset song and dance. Enter your email into a form field, receive an email with a link, click the link, reset your password, voilà!
It’s 2018 and file upload is still an involved process
I’ll admit, this process is not straight forward, but once set up, it works like a charm. What’s the goal? We want the client (browser) to upload a file directly to S3 and then store the uploaded information in our server/database.
I’ve been using Knex for a long time, closing in on two years. Just to clarify, Knex is NOT an ORM (Object Relation Model). ORM’s try to model your database into neat and logic classes, but I agree with Laurie Voss, and ORM is an anti-pattern. I’ve used Sequelize, Doctrine ORM, and others. Every. Single. Time. ORM’s will let you down and keep you from leveraging your database to its fullest potential. Developers like them because you can encapsulate all the logic in the code and treat your database as just a dumb data store. This is a mistake.
Leveraging Reflux (flux) with React like a pro
My latest project for a well known clothing retailer has involved writing a React based web app. It has a staggering amount of data that needs to update different parts of the app. To accomplish this, we are using React (of course) and Reflux.