🐞 Find your own Golden bug!
Tags: productivity, career, codenewbie, dx
Published: 2020-03-01 18:33:56

## Introduction

Hey, people! 😉 I came back with an interesting **DX** (Developer Experience) thought, that I recently realized. Let's talk about _bugs_ on your code and why they're _useful_, if you want to _grow up_ quickly.

### 📝 Table of contents

- [What is Golden bug?](#ch-1)
- [Why it will help me?](#ch-2)
- [How can I find him?](#ch-3)

<a name="ch-1"></a>
## What is Golden bug? 🤔

_Gold bug_ is the sum of your three states:

1. You wrote code, but it doesn't work the way it should.
2. You asked your friends for advice on _how this code should work_.
3. One (or several) advice and/or code samples, gave you much more "_solving the problem_" and taught you something new (which you always missed or didn't know in the principle).

Exactly the same, when you show your code or dev/tech article to the Internet. Let me give you an example from my recent experience 👇

> When I published my article about [Go web app settings in YAML](https://dev.to/koddr/let-s-write-config-for-your-golang-web-app-on-right-way-yaml-5ggp.), one of my readers advised me to be _more careful_ with the `func init()`, because code inside is very difficult to test.
>
> I started looking at my previous projects and found _a lot of examples_, where this built-in Go feature really prevented 100% coverage of my code with tests.
>
> As a result, I have revised development model for Go web apps and got a lot of experience. There he is the _Golden bug_! 🎉

<a name="ch-2"></a>
## ☝️ Why it will help me?

When you really **don't know** how to find the right solution to your problem and you get more than just a "_do this_" instruction, your brain remembers this solution pattern _much better_.

You can only **gain** experience, when you learn more, than you already know.

![How can I find him?](https://dev-to-uploads.s3.amazonaws.com/i/8i53zwkk2t28oumjw52k.jpg)

<a name="ch-3"></a>
## 🔍 How can I find him?

The main rule is **write a lot of code every day** and don't be afraid **to ask** more experienced friends (or people on Internet) to give you a review of your code.

> Listen to people and be grateful, even when they hint that your code is terrible and will not be enough to waste time on it. Just ask to explain to you that place (_fragment of your code_), which you don't understand.
>
> **Experience at the top of everything!**

## Photo by

[Title] Limor Zellermayer https://unsplash.com/photos/k5mr8g4NBW8
[1] Rabie Madaci https://unsplash.com/photos/eo6t2CSxXhc

<a name=""></a>
## P.S.

If you want more articles (like this) on this blog, then post a comment below and subscribe to me. Thanks! 😻

And of course, you can help me make developers' lives even better! Just connect to one of my projects as a contributor. It's easy!

My projects that need your help (and stars) 👇

- 🔥 [gowebly][gowebly_url]: A next-generation CLI tool for easily build amazing web applications with Go on the backend, using htmx & hyperscript and the most popular atomic/utility-first CSS frameworks on the frontend.
- ✨ [create-go-app][cgapp_url]: Create a new production-ready project with Go backend, frontend and deploy automation by running one CLI command.
- 🏃 [yatr][yatr_url]: Yet Another Task Runner allows you to organize and automate your routine operations that you normally do in Makefile (or else) for each project.
- 📚 [gosl][gosl_url]: The Go Snippet Library provides snippets collection for working with routine operations in your Go programs with a super user-friendly API and the most efficient performance.
- 🏄‍♂️ [csv2api][csv2api_url]: The parser reads the CSV file with the raw data, filters the records, identifies fields to be changed, and sends a request to update the data to the specified endpoint of your REST API.
- 🚴 [json2csv][json2csv_url]: The parser can read given folder with JSON files, filtering and qualifying input data with intent & stop words dictionaries and save results to CSV files by given chunk size.

<!-- Footer links -->

[gowebly_url]: https://github.com/gowebly
[cgapp_url]: https://github.com/create-go-app
[yatr_url]: https://github.com/koddr/yatr
[gosl_url]: https://github.com/koddr/gosl
[csv2api_url]: https://github.com/koddr/csv2api
[json2csv_url]: https://github.com/koddr/json2csv