Back
Nathan Wailes
Nathan Wailes
PRO
PRO
@nathanwailes
Full-stack dev, 180 on the LSAT. Work habit goal: tinyurl.com/mr32bdjt i.imgur.com/e9b6bqw.png Productivity thoughts: shorturl.at/grcs8
57
Joined October 2020
Load previous page…
studied basic algos again for the first time in months, gotta do this daily
Learn about a potentially-really-smart way of a middle-ground between subscriptions and one-time payments: paying $4/mo for the latest build of something, but retaining access to the builds you've already paid for. www.wepc.com/news/how-to-down…
Continue reading the IntelliJ tutorial on debugging Go; was told I needed to install the ARM version of Go so I did that; trying to resolve other errors when I try to run the debugger.
Opened up my IDE just before the deadline for the day to log a TODO; got my frontend storing the auth token returned by the backend;
Felt great upon waking up after taking 300mcg melatonin last night before bed; today getting login working: figured out how to translate the email/password validators used in Let's Go Further to Huma's way of doing input validation so the API will return an error if the email/password don't pass basic sanity checks; figured out how to return a 404 error with Huma if the user isn't found in the database; got the code working that checks the supplied password against the hashed password in the db and returns a 401 error if they don't match; pushed pass my normal 2-hour daily work limit to get the endpoint working (returning a token) so I can move on to something else because this sucks. Next up (tomorrow): get the front-end to receive/save the auth token and send it when signing in / etc.
#govuetifytemplate
Make an iced cocoa (20g of pure cocoa, so as much caffeine as a cup of tea) by myself for the first time in my life; spent a ridiculous amount of time trying to figure out how to get Go to store my user password hashed; ran into an issue using the 'air' live reloader where it wasn't working after I redid the project structure, and it didn't have useful error messages or documentation to help me figure out what setting I needed to set to get it to work again; got past the air issue, it turns out I had to specify the directories to watch and without any leading "./"; created a user via the Vuetify app and confirmed that the password is hashed on the backend; created a Stack Overflow Q&A explaining how I fixed the issue for future newbies; committed my code. Set a goal for tomorrow: implement the authenticationHandler.
Hit a 1000-day streak studying Spanish for 3-4 minutes per day. I absolutely love this model for learning things.
Go: Bought "Let's Go Further" b/c it has a section on authentication for API backends; read that section; notice he has the code in his project set up differently than mine; rearrange my project directory structure to match the book's recommendation; spent some time looking at how he does authentication in the book; decided that I should maybe instead try to follow the Huma guide to doing OAuth 2.0: huma.rocks/how-to/oauth2-jwt/
Go: Switched my existing 'hello world' route/handler to use huma as a way of familiarizing myself with huma; checked out the huma-auto-generated /docs endpoint; spent ~90 minutes debugging an issue w/ how I defined a handler b/c the error message was not at all helpful; got POST /api/users (new user registration endpoint) working with the new setup (chi/huma).
bought IntelliJ Ultimate All Products Pack annual subscription b/c I want to use GoLand and paying for that and PyCharm is close to the same price as getting all the rest of the IDEs/tools as well; installed GoLand and WebStorm (for Vue dev work); learned I seem to need to open my 'backend' subdirectory as a root project in GoLand to avoid 'unknown dependency' errors; switch from using the gorilla/mux router to chi b/c apparently it's more actively developed(?) and more popular(?); look into using the Huma REST API framework; got the Huma "Hello World" example working in my code
today was my first day actually doing Go development instead of just tutorials: took a magnesium tablet b/c I felt anxious last night, I think from the caffeine in the cocoa I had been drinking; copied my frontend code from my flask/vuetify template repo to my go/vuetify template repo; confirmed I can serve the frontend code locally; installed Go; drank an iced cocoa; successfully started my 'Hello World' main.go backend file as a web app server; asked ChatGPT for help converting my "POST /users/" request to use Go; created a Go module; installed Postman macOS; took a 15min break after an hour; got my frontend app "talking to" my Go backend (successfully returned "Hello World" and had it on-screen in my frontend app); added Go middleware to log every request to the console so I can see what is happening; renamed my (default) branch from 'master' to 'main'; got live reloading for my Go backend (it automatically reloads the backend when I make changes to the code); confirmed my "POST /users/" returns 201 when I use the frontend registration form; came up with a task for tomorrow: get "POST /api/session" working; set up PyCharm to be able to explore my SQLite db from within the DB toolbar; confirmed that my user registration created a new user record in the db
Got HTTPS working on my new DO droplet with nginx and cloudflare, it turned out I had to switch a Cloudflare SSL setting from "Flexible" to "Strict".
got my personal website (nathanwailes.com/, just an index.html) working on a new $4/mo DO droplet that I intend to move everything over to while switching backends from Python to Go, nginx is way easier than Apache so far. Switched my personal site to use GitHub version control.
Tried melatonin for the first time last night after drinking a lot of cocoa and feeling like I wasn't going to feel tired soon, it was amazing how well it worked, but I woke up after ~4-5hrs, so I played some PC games, ate some food, then fell asleep for another ~4hrs. Very strange.
Able to ssh into my new Digital Ocean droplet with my new 'nathan' user; installed nginx; updated my Cloudflare DNS records for my domains to point to my new droplet; deleted unused subdomains and old MX/TXT/CNAME records; confirmed a 'Hello World' index.html site served by nginx is working.
Removed DO droplet I wasn't using; created a new $4/mo droplet with the latest version of Ubuntu (24.04); cloned my flask-vuetify-template repo to my MacBook.
Somehow managed to figure out how to get access to my personal Jira again
client work; ~45mins from waking up to starting to work (went to work outside, some social media)