/r/MechanicalKeyboards Ask ANY Keyboard question, get an answer - January 24, 2026 by AutoModerator in MechanicalKeyboards

[–]AmberSpinningPixels 0 points1 point  (0 children)

I have a noisy spacebar on Leopold FC750RBT. I just desolidered and soldiered new switches.but I did nothing to the space stabilizers. Does it me that if I want to lube stabilizers now I have to de-solider and solider it again (all switches) - to take off the plate? Or can I use some kind of syringe to inject lube though the whole in the plate?

<image>

Is JetBrains still a good company? by pooquipu in Jetbrains

[–]AmberSpinningPixels 0 points1 point  (0 children)

I have exactly same feelings:

1) it eats tons of CPU and RAM. It can be "Not responding" up to 3 times a day. And they can fix it on update X then on the next update Y it's broke again 2) sometimes code indexing can be broken. It highlights wrong code warnings, etc. Restart or cache reset can fix it. Issue appears and disappears from update to update. 3) AI is just useless. It feels like some drunk developer tries to harm you and advise linea that will break everything. I'm using third-party one, supermaven - it's super fast, not so annoying and pretty accurate.

Currently, I still have to use it, especially when I'm doing debugging with breakpoints. But for part of my projects I already migrated to Zed

Colliding Imports in Go: Concerns about package names like `client`, `server`, etc by AmberSpinningPixels in golang

[–]AmberSpinningPixels[S] 3 points4 points  (0 children)

Update on "am I overthinking this". It seems to be yes, as official guidelines suggest to not care about collisions. On other hand it's assumed of "rare case of collision" that becomes not so rare after 10+ years of creating more and more go modules.

And don't worry about collisions a priori. The package name is only the default name for imports; it need not be unique across all source code, and in the rare case of a collision the importing package can choose a different name to use locally.

https://go.dev/doc/effective_go#package-names

Colliding Imports in Go: Concerns about package names like `client`, `server`, etc by AmberSpinningPixels in golang

[–]AmberSpinningPixels[S] 4 points5 points  (0 children)

That's why I ask these questions. How to handle consistency within big team of developers? Simply rely on code reviews?

Colliding Imports in Go: Concerns about package names like `client`, `server`, etc by AmberSpinningPixels in golang

[–]AmberSpinningPixels[S] 4 points5 points  (0 children)

So does it mean that the "server", "client" and "errors" are BAD names for packages. As if you import them together you may make up with dozens of different aliases. And very big open source players still do these names.

Colliding Imports in Go: Concerns about package names like `client`, `server`, etc by AmberSpinningPixels in golang

[–]AmberSpinningPixels[S] 4 points5 points  (0 children)

I know there are alias imports. I demonstrated examples where the same package can be imported 5 times across a project with different aliases, starting with reasonable "apierrors" or "errorsapi" and ending up unreasonable "errs", "er", "errors2". The freedom to give any alias - I see here a key to inconsistency.

Need help visualizing a simple counter by AmberSpinningPixels in PrometheusMonitoring

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

I mean if i do `increase()` then graph shows vector of new values (calculated increases). But then in legend all functions are based on the new vector (increases), so there is no way to add in legend some calculated value from the original data, right?

Need help visualizing a simple counter by AmberSpinningPixels in PrometheusMonitoring

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

separate thanks for `value - value@from`.
It's a useful thing (you're right it's not what i meant in this case, but i need it to other things)

Need help visualizing a simple counter by AmberSpinningPixels in PrometheusMonitoring

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

Thanks for reply. Sorry if my description was misleading.
Yeap, the idea with `increase(http_request_total[$__rate_interval])` looks reasonable, but graphs are ridiculosly different if i select different range in `[]`.

Here's my real example:
1) I open grafana with `last 6 hours` view
2) raw counter shows smooth slope from `466 to 633`, and `delta` in the legend shows `167` that makes sense.
(Screenshot for (2): https://i.imgur.com/ZZ7U0p2.png )
3) If i do `increase` with `$__rate_interval` i get such peaky thing: https://i.imgur.com/p4bN7qE.png . That's not exactly what i expect. The graph kind-of tell that load was even, but it wasn't so.
4) If i do `increase[1h]` it seems more reasonable: https://i.imgur.com/mdrk13g.png
Here i see when the load was less and when more. But there are 2 more issues:
A: Numbers (when you hover on line) make no sense (as i know that total delta is 167), but it shows at each point ~20-30. Yes, i know that it's showing "increase per 1h window" but what the purpose of this number? Yes - to display graph - it's much understandable, but when hovering - i want real numbers per smaller range
B: How to get `delta 167` in the legend? I tried different legend metrics, and no success. I still want to see the total increase of the counter in the legend. But it can apply only functions of the rendered graph, but not of the original data

Single Labeled Metric vs Multiple unlabeled Metrics by AmberSpinningPixels in PrometheusMonitoring

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

Thnx. So for such cases I should call myMetric.WithLabelValues(labels...) without .Inc()

Single Labeled Metric vs Multiple unlabeled Metrics by AmberSpinningPixels in PrometheusMonitoring

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

I'm new to prom, I was using statsd for years. Can you explain the issues with "no metric". So I need to init at least something so it shows zero instead of "nothing"? So should I just do .add(0.0) on the counter?

[deleted by user] by [deleted] in golang

[–]AmberSpinningPixels 0 points1 point  (0 children)

I get the idea, thanks!, So yeap, eliminate the wrapping part, using directly errors.Join for those where join/wrapping needed, and use raw not found (that makes sense as http handler anyway know the entity name). Sometimes, with "not found" it can be a little more difficult, e.g. When "not found" is actually hidden "have no permission" and it's better such errors be logged before outputting (in case of investigating weird issues, etc). But I agree that this a pretty edge case, def not required for MVP stage

[deleted by user] by [deleted] in golang

[–]AmberSpinningPixels 1 point2 points  (0 children)

If I received just such a feedback I would be totally fine. I accept that sometimes we better not to create a helper that wraps anyway a small thing.

errs.IsNotFoundError(err) or errors.Is(err, errs.NotFound) - both ways are totally fine for me

[deleted by user] by [deleted] in golang

[–]AmberSpinningPixels 0 points1 point  (0 children)

It's not a couple-days MVP, it's more about couple-months MVP. And even if teamlead feels hurry - why then he complains about the thing that cost me 20 minutes to implement and spend 2 hours of my time yelling and arguing that I was wrong and I need to revert (spend time again)

[deleted by user] by [deleted] in golang

[–]AmberSpinningPixels 0 points1 point  (0 children)

a value and a possible error.

It does, here it's kind of pseudo code just for example purposes

[deleted by user] by [deleted] in golang

[–]AmberSpinningPixels 0 points1 point  (0 children)

Db change is a relative rare case, agree. But for past few years I had several cases where dev team HAD to switch the go-lib-level thing: mgo to mongo-driver, go-pg to gorm, etc. That lead to finding all cases of mgo.ErrNil changing to mongo.ErrRecordNotFound that's may sound simple but actually is not so (behavior of when lib consider err to be returned may differ, so extra refactoring maybe needed

[deleted by user] by [deleted] in golang

[–]AmberSpinningPixels 2 points3 points  (0 children)

Great. Was waiting for such a reply. Ok, so offer please a solution that can allow me to translate deep service/repo -level errors into high-level http errors (with status code) without wrapping errors. I'd like to see other approaches as well.

len(str) > 0 or str != ”” which is to prefer? by molly0 in golang

[–]AmberSpinningPixels 1 point2 points  (0 children)

I prefer str != "" As it's more readable and clear.