towerful

joined 2 years ago
[–] [email protected] 4 points 6 days ago

Yeh, absolutely.
Horses for courses.

[–] [email protected] 8 points 6 days ago* (last edited 6 days ago) (7 children)

I feel like variable or function names that become overly verbose indicate that a specific type or a separate class should be considered.
I see it as a mild code smell.

Something like int intervalSeconds = 5 could maybe have a type that extends an int called seconds. So then you are declaring seconds Interval = 5.
It describes the unit, so the variable name just describes the purpose.
You could even add methods for fromMinutes etc. to reduce a bunch of (obvious) magic numbers elsewhere.

To extend this contrived example further, perhaps there are a couple of intervals. A refresh, a timeout and a sleep interval.
Instead of having.

int sleepIntervalSeconds = 0;
// etc...

You could create an intervals class/object/whatever.
So then you have.

public class Intervals {
    public seconds Sleep
    public seconds Refresh
    public seconds Timeout
}

The class/object defines the context, the type defines the unit, and you get nice variable names describing the purpose.

[–] [email protected] 3 points 6 days ago

All the cool kids are running kubernetes

[–] [email protected] 14 points 1 week ago

You really think they know regex?
They probably got grok to generate it and didn't understand what it does

[–] [email protected] 29 points 1 week ago (1 children)

Let's be honest, "will pass"

[–] [email protected] 3 points 1 week ago (2 children)

Why do you dislike PHP?

[–] [email protected] 3 points 1 week ago

Clearly you are not a bot if you can say smeeeee.... Smeeehhhh.... Smeeeeeee.... Heeeeeeeaaaa..

[–] [email protected] 2 points 1 week ago

Endeavour OS is lovely. I'm enjoying it

[–] [email protected] 2 points 1 week ago

Yup.
It's just quite common for these hydrogen production facilities are cracking hydrocarbons.
Or if they are electrolysing, it's with power from a grid backed by hydrocarbon.
So "where does the hydrogen come from?" is a common question.

While it sounds like this does come from the grid, it does sound like a high-renewable grid.
Altho if the hydroelectric is capable of pump-storage, I imagine the operators would rather fill reservoirs than convert the excess energy into hydrogen.
But still, hydrogen as a fuel is interesting and promising. I hope all the difficulties are worked out! And the first step to that is adoption & demand, which requires hydrogen.

[–] [email protected] 2 points 1 week ago (2 children)

Douglas County PUD hasn’t just built a filling station, but has also built its own hydrogen production facility that uses Washington State’s abundant hydroelectric power. According to the utility, electricity makes up 80% of the input costs of hydrogen production. Thus, a cheap source of power means cheap hydrogen. As a bonus, the utility can use the hydrogen electrolyzer to burn off excess power to help stabilize the grid at times when renewable energy supplies are high and grid demand is low.

[–] [email protected] 4 points 1 week ago (1 children)

Granted. 100k. Or 900k. Both are lethal, tbh

view more: ‹ prev next ›