Back
Similar todos
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 the GoLand debugger working with my web app backend, it was super easy, I just had to switch the configuration "Run kind" from Package to Directory and point it at /cmd/api/
Started looking into how to debug Go code: blog.jetbrains.com/go/2019/02… #govuetifytemplate
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.
Only got ~5hrs of sleep after two double espressos yesterday, so I took a Lycopene capsule...signed up for a LinkedIn Premium free trial so I could send a message to a Kasikorn backend engineer to ask why users can't export their transaction history in CSV format...removed the 'Blog' link on nw.com b/c I don't have the WordPress blog up and I never really used the blog that much, added a link to my email address instead so people can contact me...started going through the Kasikorn API "Slip Verification" challenges...got the first one done...the second one requires I have SSL set up on my domain and not through Cloudflare...discovered while doing that that my whatdo site is returning a 404 if I try to sign in...got GoLand's db tool connecting to the digital ocean postgres db b/c I noticed that wasn't set up yet...install postgres on my macbook b/c something got messed up and somehow it seemed to not be installed...got all the db problems fixed, don't know how that happened...now having a CORS issue when running locally, all this stuff was working, IDK how it all broke...ok I remember now, I YOLO'd the backend code and disabled the existing router to get the Line echo bot working...sent an email to another local YouTuber to ask if I can be in a video with him...installed cursor and tried using it for a simple refactor task to get a sense of how it works...figured out a way (thanks to ChatGPT) to get the Line callback handler working while also not breaking the existing routes...went for a massage to give my brain cells some time to recover...used cursor some more and I get the hype, this is really cool, I'm surprised Jetbrains hasn't copied it yet...after a long while I finally got my whatdo backend working properly again (auth + user middleware working), it was a good learning experience with cursor and Go...got a GitHub Action set up so my DO dokku VPS will update when I push to main, so now both frontend and backend will update automatically when I push to GitHub...ending the day on this banger set: www.youtube.com/watch?v=d2340… Tomorrow: I need to bill hours to my client to make $, I want to try to finish the KBank API challenge to see if I can do the Slip Verification, I want to email another YouTuber, if I have any time left over I want to keep going with that Line/ChatGPT bot and try to make a frontend interface for it.
Kept exploring AI-assisted code tools and switched from Cursor back to VS Code and subscribed to GitHub Copilot Chat #chores
Spent time learning about using Go for a web app back-end to see if it would be better than using Python.
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).
Give VS code a try after years with Sublime
Spent an hour reading some of [the backend code][1] for a Go / Vue chat app I saw posted to Reddit, as a way of trying to build familiarity with how my Go / Vue projects should be structured / work.
[1]: github.com/wizzldev/backend/
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.
Gradually learning to use the git UI in Jetbrains
#life Buy JetBrains all Products Pack because I get it at 40% discount now
cross post dev.to/golangch/what-i-develo… #altafino
Started going through the "Let's Go" ebook, started my first Go web app.
upgrade to heroku hobby dev #tba
Struggled to incorporate the Line "echo bot" code into my existing Huma Go backend framework code, so I just YOLO'd it and copied the example code into my `main.go` for the purpose of seeing if I can get it working...ran into an error when pushing to Dokku, it seems to be because I didn't set the Line-related env variables before pushing...set those vars on my Dokku server...clicked the Line 'Verify' button for the callback URL and got a 404, so I now need to look into what happened...I think the issue is that the echo bot code assumes I'll use the DefaultServeMux, but I'm actually using a chi Mux. The key line difference is `log.Fatal(http.ListenAndServe(":"+port, r))`, where the example has `nil` instead of `r`...YOLO'd it again by just disabling the router I had gotten working, just to see if the webhook will work, and got a Success when I clicked the Verify button...next up is to either clean up this mess I've made in my code or keep pushing forwards and try to get the ChatGPT part working.