lysdexic

joined 2 years ago
MODERATOR OF
[–] lysdexic@programming.dev 2 points 2 years ago* (last edited 2 years ago)

how centeralised GitHub

It's a pointless and irrelevant remark. Mozilla uses Git to track work on Firefox. GitHub provides Git repositories. I can clone Firefox out of GitHub, create an account on GitLab/Bitbucket, push the code there, and GitHub does not feature as a concern at all.

What point can you possibly think you're able to make regarding GitHub?

GitHub is enshittifying everything that has to do with Git.

Nonsense. Speaking as someone who actually hosts the same projects on GitHub and other version control providers, GitHub does not even feature as an implementation detail.

I'm starting to think you're just trolling.

You should care.

I do my best to not waste my time with irrelevant nonsense. It's silly to believe that the version control system you use has any influence on the quality of the software you deliver.

[–] lysdexic@programming.dev 17 points 2 years ago (8 children)

Because Microsoft will eat your ass in your sleep

So Microsoft has access to Firefox's source code. So what? Isn't the point of a FLOSS project that your source code should be made available to everyone?

[–] lysdexic@programming.dev 1 points 2 years ago* (last edited 2 years ago)

I'm not sure the author of this blog post is experienced with git rebase. I'm by no means an experienced git user, and to me the single most useful thing about git rebase is reordering commits in a local branch. This means I can commit some code in a local branch, continue working on stuff, and later move commits around to peel off PRs out of a feature branch. However, the author makes zero mentions to this feature in the blog post.

To illustrate how useful git rebase is, picture yourself working on a feature branch as part of your work on an issue. Suddenly you stumble upon something that you need to fix to unblock your work on that feature, but it's not directly related to your issue. You can stash your changes, create a new feature branch, fix the bug, post a PR, expect it to be merged, and afterwards rebase your feature branch onto mainline.

That's ok, but very time consuming.

You can instead use git rebase. Just go straight ahead and commit your code straight away in your feature branch and continue working. After you're done working on your feature, you run git rebase to reorder your commits so that the ad-hoc fix is the first commit in your feature branch, and you post a PR for that fix alone, and once it's merged you already have all your other changes lined up to be pushed as well.

Another usecase I follow often is posting an ad-hoc commit to simplify working on a issue. This means adding logging, forcing a flag, commenting out code, etc. I commit this message with commit messages that make it clear that this code is not to be pushed, and follow a convention that commit hooks can pickup as guardrail. From that point onward I just work on the feature until I'm done, and when I'm ready to post a PR I simply crack open git rebase, reorder the commits to move the ad-hoc commit to feature as the very last one, drop it, and done.

[–] lysdexic@programming.dev 8 points 2 years ago

Github for organizations becomes rather expensive rather quickly (...)

I'm not sure if that's relevant. GitHub's free plan also supports GitHub organizations, and GitHub's Team plan costs only around $4/(developer*month). You can do the math to check how many developers you'd have to register in a GitHub Team plan to match the operational expense of hiring a person to manage a self-hosted instance from 9-to-5.

[–] lysdexic@programming.dev 23 points 2 years ago (3 children)

A less confusing title would be “Mozilla drops support for Mercurial (...)

It's not even about GitHub at all. Taken straight out of the announcement:

“For a long time Firefox Desktop development has supported both Mercurial and Git users. This dual SCM requirement places a significant burden on teams which are already stretched thin in parts. We have made the decision to move Firefox development to Git.”

[–] lysdexic@programming.dev 1 points 2 years ago

Well generally speaking, read up on solid principles. Learn how to organize your code, write code that balances efficiency and manageability.

To me, that reads as "learn software design patterns", specially the balancing part.

[–] lysdexic@programming.dev 10 points 2 years ago

What really helped me get better as a software engineer was going out of my way to progressively learn as many software design patterns as I could and iterate over pet projects to refactor them to apply them in practice. It helped me write cleaner code that's far easier to maintain and extend, it helped me be far more efficient at onboarding onto projects, it helped me greatly improve my skills as a software architect.

[–] lysdexic@programming.dev 1 points 2 years ago (1 children)

These chatbots just make shit up.

As someone who interacts with "these chatbots", the "shit" that they "make up" is very useful to onboard onto topics and find paths forward. They are the closest there is to expert systems, and currently there is no alternative that comes close to the value they provide.

You can’t learn anything from them.

Those who can't learn in general also won't learn in specifics.

[–] lysdexic@programming.dev 7 points 2 years ago* (last edited 2 years ago) (2 children)

So, from a decentralised solution to the world’s biggest repository

You need to check your notes. Git is decentralized, even if you host a repository somewhere.

Decisions like these (...)

As a Firefox user, these initiatives matter nothing in my decision to use Firefox. In fact, I'm glad they went this way. They need to focus on working on code instead of wasting their time with irrelevant details.

[–] lysdexic@programming.dev 33 points 2 years ago* (last edited 2 years ago) (21 children)

but I don’t understand why they don’t self-host

Why would anyone self-host a FLOSS project? Trade secrets is not a concern, nor is it barring access to the source code repository. Why would anyone waste their resources managing a service that adds no value beyond a third-party service like GitHub?

[–] lysdexic@programming.dev -1 points 2 years ago

Use unsafe and write like you’re a C/C++ programmer. You can do it.

Onboard the C/C++ project to any C++ static code analysis tool and check back with me later.

This is a nothingburger.

[–] lysdexic@programming.dev 2 points 2 years ago (1 children)

From my perspective, LLM, voice recognition and reproduction, and image generation, manipulation, and identification is the majority of AI.

I think that's a very short-sighted view of the subject. You're basically reducing AI to a very narrow set of specific, high-level practical applications of AI, leaving everything out of your personal definition.

 

The "don't repeat yourself" principle is well established, but over-aggressive refactorizarions to extract common code are also widely known for creating hard to maintain code due to the introduction of tight coupling between components that should not be coupled. A passing resemblance between code blocks is reason enough to extract them away, even if that ends up breaking Liskov's substitution principle.

To mitigate problems caused by DRY fundamentalisms, the "write everything twice" (WET) principle was coined. WET works by postponing aggressive refactorizarions, the kind that introduces complexity and couples unrelated code just because it bears some resemblance, by creating a rule of thumb where similar code blocks showing up twice in the code should not be refactored, and only code that shows up multiple times should be considered for this task. However, this rule ignores context and nuances, and can dissuade developers from cleaning up code.

So, where do you stand on the topic? How do you deal with duplicate code? Do you follow any specific rule of thumb?

view more: ‹ prev next ›