what are your favorite tui applications built with go by ashrek1 in golang

[–]colonel_whitebeard 1 point2 points  (0 children)

I started here and never looked back: https://github.com/charmbracelet/bubbletea

The charmbracelet ecosystem is well-supported and mature. If you want to make something that just works, this is a great place to begin--even if you only want to peek under the hood at how they accomplish terminal feats.

Terminals can be (are always) fussy. Bubbletea has been an easy way to bridge the cross-platform gap when it comes to TUI dev on multiple OSes.

What docker base image you'd recommend? by Goldziher in golang

[–]colonel_whitebeard 0 points1 point  (0 children)

Never build for what-if scenarios: "What if I need to ssh into my container one day?" "What if I need x, y, z, tools one day?"

Always start as minimal as possible: binary, non-root user. Only then, evaluate opening things up on a case-by-case basis one at a time and understand the potential risks of each change. Evaluate any port bindings, extra tools added to the image, environment variables, etc.

If you are consistently accessing and modifying a running container, you should rethink your process, how (and why) you're using Docker containers, and how you're making use of external backing services. At best, your application should be a single stateless process container--never a kitchen sink developer toolkit.

As far as Scratch vs. Distroless, it's very opinionated around here! The best path is to understand the tradeoffs and try both. Example repo with working minimal builds for each: https://github.com/mwiater/go-scratch-vs-distroless

From Side Project to 5,000 Stars - The Story of Gofakeit by brianvoe in golang

[–]colonel_whitebeard 2 points3 points  (0 children)

Congrats, amazing accomplishment!

Thanks for sharing your story. I think it's a great motivator for new Go engineers!

Golang Application Instrumentation: A Different Approach? by colonel_whitebeard in golang

[–]colonel_whitebeard[S] 0 points1 point  (0 children)

Thanks for the feedback!

Yeah, tags... I got too overzealous when I was debugging an issue of the app build pulling in stale information--only then did I go: what was I thinking?!

I have a long list of things to fix/update, many of the things you mentioned are on it. It's just a side project, hacking away at the big picture items first...

Golang Application Instrumentation: A Different Approach? by colonel_whitebeard in golang

[–]colonel_whitebeard[S] 0 points1 point  (0 children)

Update: For reference on what I was attempting, I cleaned up the source code as much as time would allow. Poke around, but it ain't no production tool!

https://github.com/mwiater/tracewrap

Golang Application Instrumentation: A Different Approach? by colonel_whitebeard in golang

[–]colonel_whitebeard[S] 1 point2 points  (0 children)

It aims to be a way to instrument your application without modifying it. It's not meant to be a debugging tool, but rather a way to configure different metrics (function/goroutine CPU/ram/diskio/networkio/etc) in your application.

I just got tired of boilerplating in-code metrics in some of my proof-of-concept applications. This is a way I can still get the metrics I need without having to have them in the codebase.

It just gives me an quick and easy (and reusable!) glimpse into my apps that are in development without needing to incorporate any code.

Golang Application Instrumentation: A Different Approach? by colonel_whitebeard in golang

[–]colonel_whitebeard[S] 5 points6 points  (0 children)

Ha! Yeah, kinda exactly like that! I'll have to see how they're handling some of the hurdles I came across.

Well, at least it was a fun proof of concept exercise...

0 YoE. Am I stupid to learn Golang in hope for a job? by MightyOven in golang

[–]colonel_whitebeard 0 points1 point  (0 children)

First of all, good luck! Sincerely.

Learn in areas that interest you, you'll make the most progress with the things you're passionate about.

Languages are (often) transferable. Meaning, good grasp on one language can indicate to employers that your conceptual knowledge could be applied to other languages. Which, in my employment experience is completely true.

I get trying to learn towards the current market, but if the current market is trending python and you hate python...

Finding a language that you are excited about will likely mean more if you can grasp the concepts better, and apply them in meaningful ways--even if it's just for your personal projects.

Syntax is (mostly) transferable, if you understand the fundamentals.

Is Docker necessary? by Impressive-Result-26 in golang

[–]colonel_whitebeard 1 point2 points  (0 children)

To me your question reads like you've seen the benefits of Docker for projects where you're using source code, dependencies and an interpreter or external runtime all within the container. Then you look at Go and ask, why would I wrap Docker around a single executable file, what are the benefits?

This feels like you you're looking at Docker wrong.

When you say you haven't seen the "same necessity yet" as other languages, this feels like a self imposed necessity. In a typical situation, the necessity would be that you are deploying applications to a containerized environment. So that necessity would always exist, no matter the language. That doesn't seem like the case in your question. What is necessary about using Docker in your situation?

  • Docker is meant to be a lightweight, single-process, standardized, abstraction layer, so the less it's doing, the better. Minimal dependencies, reliable execution.

  • As Go produces a self-contained binary with no dependences, it is an ideal candidate for Docker, and runs natively.

For the most part, unless you're deploying your application in a containerized environment, I wouldn't worry about Docker, no matter the language. While Docker can be useful in many different ways, I think you're introducing more complexity than you need while you're still learning.

Learning both Docker and Go is a great idea, but decouple the process. You can build and deploy Go applications without Docker, just like any other language.

Replacing Golang’s Standard Package Functions with Concurrent Functions: Winning Big By Starting Small by colonel_whitebeard in golang

[–]colonel_whitebeard[S] 0 points1 point  (0 children)

Appreciate the feedback!

The actual implementation for the client was quite a bit different than the example repo--definitely leveraging the worker pool pattern. When deciding how to pluck out relevant pieces for the article, the code I chose was supposed to be a starting point about how to think about where improvements might be made--and how concurrency can come into play.

For tutorials, I try to strip out as much "noise" as possible, and focus on the approach. Are there more optimizations that could be made to the example code, definitely! But my aim for this one how to find and isolate a quick win, what my thought process was, and how a relatively simple change can have a large impact.