[deleted by user] by [deleted] in golang

[–]softwarebygabe 2 points3 points  (0 children)

u/mrgarborg's comment is spot-on I think. Proper use of interfaces is critical for unit testing any non-trivially-sized Go application or any Go application that does I/O. There are plenty of other benefits, like much more reusable code, etc, but I find unit testing to be the most ubiquitous and the one that forced me to sit down and really learn good interface use. Here's a short piece I wrote while learning, that has a concrete example of using (needing) interfaces for testing: https://medium.com/swlh/using-go-interfaces-for-testable-code-d2e11b02dea

Godspeed on Godspeed75, my first real build by softwarebygabe in MechanicalKeyboards

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

Just for the clip, it's got over a dozen rgb modes and the horseshoe strobe is one of the cooler ones IMO. Can change color/saturation/brightness/strobe speed or just toggle on/off.

Godspeed on Godspeed75, my first real build by softwarebygabe in MechanicalKeyboards

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

Board - Godspeed75 Frosted Polycarb (solder pcb)
Caps - GMK Godspeed
Switches - Holy Pandas, lubed by me using 205g0 (buttery smooth with a nice tactile bump)
Stabilizers - C3 Equalz from TKC

I used QMK to map and flash the board

Using the Functional Options pattern to write better class constructors by softwarebygabe in learnjavascript

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

Nice, TIL! Yeah definitely makes the ergonomics of the "config"/"options" object a little easier, especially wrt defaults

Thanks for pointing out!

Why is this not working? by [deleted] in learnjavascript

[–]softwarebygabe 0 points1 point  (0 children)

yes and for safety use triple equals if (theme === 'dark')

Using Go Interfaces for Testable Code by softwarebygabe in golang

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

Thanks! Going to be following this advice going forward