Golang HTTP Fundementals: Cookies, Sessions, & Content
Personal Context
This all got started when I wanted to render a navbar based on the type of user. Guests are users who aren’t signed in, perhaps have no account. Registered users, who are not active-paying members, and members.
Non-paying members & members are fairly easy to distinguish. Between those and guests? Oh, and how do we do this so we’re not querying the database multiple times whenever a handler is called?
Weekly Dev Update 7
More Game-Dev | Vacation | Focus
Game Dev
Since beginning to work on my game, I haven’t made many posts on the blog. I have been engrossed in the project from head to toe. I haven’t ever found any project quite so fun to build and the challenges have been enlightening.
Part of what convinced me to make a game, was watching a video by Jonathan Blow, discussing that, when you get good at one kind of programming, it creates a plateau. You tend to overcome the same similar problem over and over again. Even if there are a hundred problems you might be solving, there are a hundred thousand problems that exist, but you’ll never run into the other 99.9% of problems if you only ever program in one narrow industry.
Weekly Dev Update 6
GoGameDevDiscord
This week I made a Discord Server for Game Developers using Golang:
GoGameDevProgress
My own game written in Go is coming along. I plan to make a full post about my experiences so far. I have had a ton of trouble with it, however, I am really proud of what it is and has accomplished so far. I still have many hurdles to overcome, so just one hurdle at a time…
Weekly Dev Update 5
Professional API Research
At work, I had been given the opportunity to do a ton of research into what API we plan to use for a service. Never have I been required to go this deep on the documentation of several different API’s, their pricing plans. Going back and forth with our analytics team to see what exactly we needed. It forced me to flex my brain in a very different way. Whiile I wouldn’t say I want to do something like that all the time, I found it crucial experience, and I certainly hope I made the right decisions. One of the many harms of not having a more senior developer to rely on, is that the weight of responsibility falls square on my own shoulders.
Weekly Dev Update 4
Templating Blog Post / Completed Templating/Golang/Postgres Work Project / GameBoy Color Development
Templating Blog Post
As I struggled with a work project that required some midly complex Golang templating, I came up against the reality that I simply wasn’t going to be able to get a fix to my issue without either abusing ChatGPT, or learning it thoroughly myself. Of course the first is the quick and easy option, however, it leaves that come impossible to maintain, and not to mention, I am left no better of a developer. So I hit the books, read half a dozen articles on the topic, twice over in some cases, then spent hours sifting through Go’s documentation in the text/template package. It was a great experience. I feel every time I decide to roll up my sleeves and write and blog post on a topic, I become painfully competent on the topic. This is only the second major roadblock I have found to justify this level of throroughness, but as I thought, I am walking away feeling very confident. After going through this with the http/net package in Golang, I still have a scary-good memory on the precise documentation, even though I’ve only programmed through it a couple times on my own. There’s a very big difference between feeling like I can absolutely solve a problem with time, and another version where I have, beyond a memorized understanding, but a comprehensive knowledge on the subject, enough that I could write it out on a whiteboard. It is a fantastic feeling, to the point where I am looking more and more for an excuse to start studying something in a way where I can start writing a blog post on it. Right now, I think I may consider an advanced tutorial on templating, since I didn’t get to go too deeply into the Template type and its fields, or the context type within the Template type.
Weekly Dev Update 3
Weekly Dev Update 3
Conference / RAG AI Presentation / Developing New Web Server at Work / Closing thoughts
Conference
This week I went to a local conference. It was a conference that I would assertain is best suited for C-Suite positions. Most of the presentations were done by people with decades of experience in IT, and the main focus was, as almost all tech events have been somewhere hovering around, AI. I thought it was interesting to see the interests, and focuses of C-Suite level individuals. What AI services companies are building, what apps crashed, what apps lost money, what apps are succeeding, and what differenciates them. There was a lot of level-headedness. Almost all of the presenters warned people about the AI-Hype cycle, as a reminder of the recent Cloud & blockchain hype cycles. It was the first time I had heard that there was a cultural shift in the C-Suite world where many reputable leaders lost their jobs, and seriously damaged a lot of companies, and thereby people’s lives, by migrating to the cloud before running the numbers. Many of the leaders are finding it very difficult to see the benefit of creating AI data & developer teams to save possibly shallow amounts of costs after that, especially if these services need maintained. Many of them are becoming far more interested in open source projects like Llama3 and beyond. There was a lot of praise for RAG (retreival augmented Generation) AI services. Where this pattern has been serving companies, and clients best, by being the most minimal approach, with the least overhead on development time to build.
Making Sense of Golangs Templating
In this article, I want to discuss a flexible approach to templating in Golang. By keeping a flexible approach, I mean my aim is to avoid complicated explanations, in favor of explaining the surface level of the main approaches I see myself, and others take when templating. One of the great parts of Golang is that it strives towards simplicity, and in that pursuit, there should generally be one straightforward way of doing things. When reading many articles, and skimming through other Golang tutorials, I found many ways to approach the same problem of templating correctly in a way I could understand. Thus, this is aimed to take someone who has no experience messing with templating, to a point where they feel confident building any templating with any approach they think is best.
Weekly Dev Update 2
Weekly Dev Update
Creating Content & Developing User Registration
Registration Form
This week, what I spent the most time building was the continued work on my registration form. Returning to a sort of mid-level phase, adding sessions to a database, not stored locally in a map. This is nearly complete, but I hope to get that complete, and begin adding tests. I haven’t made database unit testing in Golang, so that’s something that really excites me. I am finding that I really enjoy, as a developer, the experience of dealing with, and navigating through the processing, manipulating of data. Working with a database, architecting multi-step solutions, and producing useful data to the user, is something that feels exciting to me right now.
Simplifying Middleware in Go
Simplifying Middleware in Go
I want to discuss some of the discoveries, and challenges, I ran into while building a Golang http web server, and making the authentication part of the application. Since I have not been using any frameworks, the process does get a bit deep, far moreso, comparatively to the ease by which other frameworks and languages remove the technical details of an application via abstractions. However, I stand by the idea that understanding a process without abstractions, is the best way to approach bugs, foreign code(code you are unfamiliar with), and also helps you to pick up new concepts quickly when encountering something novel.
Weekly Dev Update 1
Weekly Dev Update 1
Arden Labs Golang in AI Webinar
This week I had a chance encounter! I was listening to ‘Cup O’ Go’ podcast, where Bill Kennedy mentioned some of the trainings that Ardan Lab does, which led to me seeing the Ardan Labs was sponsoring a free Webinar on how to use Golang to create AI services! So many of my side projects related to AI were shelved because of how commited I am to learning Golang. However, I have had some bad experiences with conferences of late. Where I kept attending teaching events where the content was far too broad, tailored too specifically to beginners, or my favorite ’this could have been an email’. However, I was delightfully surprised at the level of this Webinar. I felt like my horizons expanded for what kinds of projects I can build using AI with strictly Golang! I learned a lot more about the ‘RAG’ approach, and how fine-tuning should generally be seen as a last resort. I have a lot of reading to do for Golang, but this really inspired me to consider giving some of the Ardan Lab Golang courses a shot in the future, once I’ve at least hit an intermediate level.