Safely using Maps in Golang: Differences in declaration and initialization

Introduction

This week, I was working on one of the API wrapper packages for golang, and that dealt with sending post requests with URL encoded values, setting cookies, and all the fun stuff. However, while I was constructing the body, I was using url.Value type to construct the body, and use that to add and set key-value pairs. However, I was getting a wired nil pointer reference error in some of the parts, I thought it was because of some of the variables I set manually. However, by debugging closer, I found out a common pitfall or bad practice of just declaring a type but initializing it and that causing nil reference errors.

[]

Techstructive Weekly #5

Week #5

This week felt like a slog, with many challenges and frustrations. However, by the end of the week, I found my stride and got excited about the direction I’m heading. It’s amazing how quickly things can shift from feeling like the end of the world to experiencing a burst of excitement.

I also managed to get the side project of the Meta AI API wrapper in Golang correctly, over the weekend will polish this project and also fix the bug in the Chat GPT anonymous client in Python.

[]

Techstructive Weekly #4

Techstructive Weekly #4

It was an exhilarating week for me, learned a lot of stuff, wrote a lot of code, pushed a lot of bugs, and tweeted a lot. This week, I wrote a lot of Python scripts at my work for experimentation setup and testing a lot of things, I was learning and prototyping my idea of Audiofy with Appwrite cloud, and read some inspiring articles.

Let’s refresh the developer’s life a bit and think philosophically.

[]

Techstructive Weekly #3

Techstructive Weekly #3

 The week was really tiring for me for some reasons, was not able to work on the side projects. I actually spent some time with my family and cousin who came over the weeks for festivals. However, on the work side of things, I was able to learn a few things about NGINX, pdf parsing and product specific features.

The upcoming week(end) will be actually fun, as I finally have some free time to write some blogs, hopefully will be able to have some things to showcase and share next week about the things I explored or failed at those things.

[]

Techstructive Weekly #2

Week #2

This week I made some mistakes at my job (well they were the week before) but they got caught after the review. I learned how powerful reviews could be at catching flaws in code. I also caught a bug while pair programming, it was a mixed feeling as a developer for me this week.

In the end, I would recommend debugging your code thrice, yes not once, not twice but thrice, and also make sure to forcefully make the code flow reach the section of your changes, if that is a bit of an edge case thing.

[]

Techstructive Weekly #1

Week #1

This week, I had a ton of fun on the side as I finally made the MVP of a side project. An SSG with a Content Management System-like interface. an SSG with an editor that syncs up the posts from a database.

In this process, I learned about Cloudflare workers and golang. At work, I had some thinking and experimentation with LLMs.

Thanks for reading Techstructive Weekly! Subscribe for free to receive new posts and support my work.

[]

Techstructive Weekly #0

Week #0

This week was about writing one of the much-procrastinated blog posts, starting a YouTube channel, and going through some heavy debugging sessions with my colleagues at work.

Quote of the week

It’s harder to say things which are easier to do, and easier to say things which are harder to do
(It’s just my random thought converted to a quote)

Seriously think about this quote, it is easier to say I will go to the gym daily, and read books, but working on them is it hard. Why is the harder to say that I am scrolling through Twitter, and Instagram, having burnout, but taking action against it is sheer a change in mindset?

[]

NGINX Survival Guide: Serving Web Applications

Introduction

In the second part of our NGINX Survival Guide, we dive into the practical aspects of using NGINX to serve web applications. This section will guide you through the essential tasks of setting up a basic HTTP server, configuring NGINX to serve content from custom directories, and using it as a reverse proxy to forward requests to backend servers.

NGINX is a versatile web server that can be used to serve applications in a variety of ways, from simple web servers to complex proxy configurations. NGINX can be used to serve static HTML content, proxy requests to a backend server, or load balance traffic across multiple servers. In this guide, we’ll explore the different ways to use NGINX to serve applications, including setting up a simple HTTP server, serving content from custom directories, and using it to load balance traffic across multiple upstream servers.

[]

Golang Web: PUT Method

Introduction

In this section of the series, we will be exploring how to send a PUT HTTP request in golang. We will understand how to send a basic PUT request, create an HTTP request, update a resource on a server, parsing the content from struct to json, headers, etc in the following section of this post.

What is a PUT Method

A PUT method is a type of request that is used to update or modify an entire resource on a server/database.

[]