Kache

joined 1 year ago
[–] [email protected] 2 points 9 months ago* (last edited 9 months ago)

avoiding merge conflicts

No, not like that -- you misunderstand. I'm not talking about actively avoiding conflicts. Coordinating to avoid merge conflicts is the same work as resolving a merge conflict anyway, just at a different time.

I'm talking about creating practices and environments where they're less likely to happen in the first place, never incurring the coordination cost at all.

One example at the individual level is similar to what you mentioned, but there's more to it. E.g. atomically renaming and moving in separate commits, so git's engine better understands how the code has changed over time and can better resolve merges without conflict.

But there're other levels to it, too. A higher-order example could be a hot module where conflicts frequently occur. Sure, atomic commits and all that can help "recover" from conflict more easily, but perhaps if the hot module were re-designed so that interface boundaries aligned with the domains of changes that keep conflicting, future changes would simply not conflict anymore.

IMO the latter has an actual productivity benefit for teams/orgs. Some portion of devs just aren't going to be that git proficient, and in this case, good high level organization is saving them from losing hours to incorrect conflict resolutions that can cause lost work, unintended logical conflicts (even though not lexical conflict), etc. Plus, it implies abstraction boundaries better match the changes demanded by the domain, so the code is likely easier to understand, too.

[–] [email protected] 1 points 9 months ago* (last edited 9 months ago) (2 children)

It's kind of difficult to explain in the same way git is difficult to grok on the first try.

Perhaps it's convincing enough to just say:

  • Git is the fundamentally better at resolving merges/rebases without conflicts than older VCS that don't maintain a commit tree data structure.
  • Even within just git, using one diff algorithm vs another can mean the difference between git successfully merging vs failing and showing you a conflict
  • Software is flexible -- there are endless permutations to how it can be structured. Everything else being equal, some code/commit structures are more prone to conflicts than others

I.e. whether a conflict will happen is not some totally unpredictable random event. It's possible to engineer a project's code & repo so that conflicts are less common.

[–] [email protected] 2 points 9 months ago (6 children)

Even better, learn how to avoid conflicts from happening in the first place!

[–] [email protected] 9 points 9 months ago (3 children)

What kind of quick one off scripts have large complex scopes where variable renames are difficult to track?

Besides, these days Python has great LSPs and typing features that can even surpass the traditional typed langs

[–] [email protected] -1 points 10 months ago* (last edited 10 months ago)

It's difficult to consider them pollution even if we were to accept the subjective opinion on displeasing aesthetics.

The pollution we're all concerned about tends to be:

  • Physically harmful
  • Difficult to confine/localize/avoid/reverse
  • An externality the economy doesn't sufficiently account for
  • A burden that's unevenly/unfairly distributed across society

Even light pollution, which is arguably barely physically harmful, has all of the remaining qualities (or nearly) for sure.

If these qualities even apply wind generators at all, they do so very weakly. They can be moved/unbuilt, the "free market" is pricing them cheaper by the day, and if you really don't like looking at them, it's not impractical to avoid them.

[–] [email protected] 3 points 11 months ago (1 children)

If that's what you're looking for, then: https://gitless.com/

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago)

Agree in the ideal, but in practice fiber is often still unavailable in suburban areas and even urban ones too, in the US.

I'm no expert, but it seems much more efficient to prioritize those areas over rural ones.

[–] [email protected] 5 points 1 year ago (1 children)

What? My intuition is there's always gotta be some equivalent nicer refactor that could do away with such an awkward construct.

In what kind of situation would that be totally unavoidable?

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)

That route already exists today as "the web", where the "latest" JavaScript source is downloaded and JIT-ed by browsers. That ecosystem is also not the greatest example of stable and secure software.

[–] [email protected] 0 points 1 year ago (5 children)

Wonder what makes it so difficult. "Cobol to Java" doesn't sound like an impossible task since transpilers exist. Maybe they can't get similar performance characteristics in the auto-transpiled code?

view more: ‹ prev next ›