HackerTrans
TopNewTrendsCommentsPastAskShowJobs

saila

no profile record

comments

saila
·il y a 11 jours·discuss
> VS is dying

I don't think this is true at all. If anything, it's the opposite, in that MS has greatly improved recent versions of Visual Studio.

> VSCode is the future

Maybe for some types of projects, but I have both VS and VS Code on my work machine and hardly ever use VS Code. There's just no comparison when working on .NET projects where VS is the clear winner.
saila
·il y a 19 jours·discuss
This doesn't seem like a particularly compelling feature to me, but iTerm can do this too (since the person you replied to mentioned iTerm, this seems relevant).
saila
·le mois dernier·discuss
You can also do Ctrl-UpArrow then click the space you want. This isn't instant, but it might be a little better than repeatedly cycling through each desktop, especially if you have a lot of them. Turning off "Automatically rearrange Spaces based on most recent use" is also a must IMO.

Personally, I only open one app per desktop and just use Command-Tab. If you hold Command after Command-Tab, you can select an app with having to cycle through all of them.
saila
·il y a 2 mois·discuss
I have an Astro site that's mostly static with a couple interactive components. I recently converted the components from React to Lit and the result is so much simpler.

One of the things that was clunky in the React version was the use of setInterval. I had to write a hook in React and it just added this unnecessary layer of weirdness in how it all interacts[1]. In the Lit version, I just use setInterval normally and there's nothing extra to understand.

[1] https://overreacted.io/making-setinterval-declarative-with-r...
saila
·il y a 2 mois·discuss
If you have Bitwarden installed on an iPhone, you can export directly to Apple Passwords with no intermediate steps or trying to figure out where to save the unencrypted CSV file. I just did this and it looks pretty good so far.
saila
·il y a 2 mois·discuss
That works when you already have an established connection with someone, but it doesn’t work so well for making new connections.

I’ve deleted all my Meta accounts and other social media accounts and have lost touch with many people and find it much harder to meet new people.

Personally, I accept that tradeoff but can see how others wouldn’t (or can’t).
saila
·il y a 2 mois·discuss
If I understand correctly, you're saying that leaving trash in Reno is bad, not that that's what people should do? I first read your comment as saying that people should leave their trash in Reno, but a sibling comment makes me think it's the opposite.
saila
·il y a 3 mois·discuss
I think it's a bit more nuanced than that. As I understand it, happiness increases for most people as their income increases. However, this doesn't mean that a person is happy overall since there are other factors. So, it's not that money can buy happiness in a binary sense, but it's a factor and often a significant one.

The article even ends with this quote from one of the authors of the study (emphasis added):

“Money is not the secret to happiness, but it can probably help a bit.”
saila
·il y a 3 mois·discuss
I'd suggest you dig a little deeper into American history. For example, "America First" isn't a new slogan. It's been used in its current sense for at least a century. Murdoch via Roger Ailes poured oil on the fire, but that was only possible because the sentiment already existed here and always has.
saila
·il y a 3 mois·discuss
This might be true for libraries or utilities that have a well-defined scope and no dependencies, but that's not what the article is focused on. When considering a company's main product, it's usually never done and patterns of activity—and especially changes in those patterns—can give you insight into potential issues.
saila
·il y a 4 mois·discuss
Good tools can improve your workflow for sure, but it's easy enough to keep a clean history with a handful of git commands. There are two main reasons people don't do so: 1. they don't know the commands yet or 2. they just don't care (and are in an environment where there's no incentive to care).

The kind of person who would try a tool like Magit and use it to discover git would have found a different route if Magit didn't exist. The type of person who doesn't care isn't going to learn something just because a tool is available.
saila
·il y a 4 mois·discuss
This doesn't sound right. PyPy has always been described as an alternative implementation of Python that could in some cases be a drop-in replacement for CPython (AKA standard Python) that could speed up production workloads. Underneath that is the RPython toolchain, but that's not what most people are talking about when they talk about PyPy.
saila
·il y a 5 mois·discuss
The point of the video is to highlight how the inundation of AI-generated pull requests is harming open source. It doesn't say anything about AI success/failure rates, and it wouldn't make sense for it to go into details about that. However, it does mention that LLMs are useful for some things.
saila
·il y a 5 mois·discuss
Surely you'll be able to tell who's YOLOing commits without allowing junk into your repo that you'll have to clean up (and it almost certainly be you doing it, not that other person).

DS_Store files are just annoying, but I've seen whole bin and obj directories, various IDE directories, and all kinds of other stuff committed by people who only know git basics. I've spent way more effort over time cleaning up than I have on adding a comprehensive gitignore file.

It takes practically no effort to include common exclude patterns and avoid all that. Personally, I just grab a gitignore file from GitHub and make a few tweaks here and there:

https://github.com/github/gitignore/
saila
·il y a 5 mois·discuss
Looks neat. Assuming the site is built using the framework, I ran a couple of the component pages (e.g., accordion) through Lighthouse and there are a number of accessibility issues. Just a heads up.
saila
·il y a 5 mois·discuss
True, but the point could have been made in a more tactful way, and it didn't add anything useful to the discussion anyway.
saila
·il y a 5 mois·discuss
Now that he's no longer with us, I don't think comments like this are necessary.
saila
·il y a 5 mois·discuss
> now that Windows mostly stopped resisting the inevitable

I've been trying to get Visual Studio to stop mucking with line endings and encodings for years. I've searched and set all the relevant settings I could find, including using a .editorconfig file, but it refuses to be consistent. Someone please tell me I'm wrong and there's a way to force LF and UTF-8 no-BOM for all files all the time. I can't believe how much time I waste on this, mainly so diffs are clean.
saila
·il y a 6 mois·discuss
I mostly use IDEs for day to day coding, and pretty much every IDE supports vim keybindings, which I always have enabled. I also use vim in the terminal for small edits and one-off files, so it's not either/or.

After the initial learning curve and fiddling with settings, it just becomes natural and you can edit code or other text at blazing fast speeds. I also find that it helps with RSI by reducing arm motions reaching for the mouse.

Of course, there are other good options out there, but if vim fits your brain, it can significantly boost your editing speed. For those who say programmers don't spend that much time typing, that's true sometimes, but there are periods after the design/planning phase where we type a lot, and I want that to go as fast as possible while I have an implementation loaded into short term memory.

As someone who used to be a vim skeptic myself, I'd suggest you either give it another look or just accept that it works well for other people and go on with your day.
saila
·il y a 6 mois·discuss
Thanks. I came up with this Python simulation that matches your 68%:

    import random

    def lying_flippers(num_flips=1_000_000):
        """

        - Bob flips a coin and tells Alice the result but lies 20% of the
          time.
        - Alice tells me Bob's result but also lies 20% of the time.
        - If I trust Bob, I know I'll be correct 80% of the time.
        - If I trust Alice, how often will I be correct (assuming I don't
          know Bob's result)?

        """

        # Invert flip 20% of the time.
        def maybe_flip_flip(flip: bool):
            if random.random() < 0.2:
                return not flip
            return flip

        def sum_correct(actual, altered):
            return sum(1 if a == b else 0 for (b, a) in zip(actual, altered))

        half_num_flips = num_flips // 2
        twenty_percent = int(num_flips * 0.2)

        actual_flips = [random.choice((True, False)) for _ in range(num_flips)]
        num_heads = sum(actual_flips)
        num_tails = num_flips - num_heads
        print(f"Heads = {num_heads} Tails = {num_tails}")

        bob_flips = [maybe_flip_flip(flip) for flip in actual_flips]
        alice_flips = [maybe_flip_flip(flip) for flip in bob_flips]

        bob_num_correct = sum_correct(actual_flips, bob_flips)
        bob_percent_correct = bob_num_correct / num_flips

        alice_num_correct = sum_correct(actual_flips, alice_flips)
        alice_percent_correct = alice_num_correct / num_flips

        # Trusting Bob should lead to being correct ~80% of the time.
        # This is just a verification of the model since we already know the answer.
        print(f"Trust Bob -> {bob_percent_correct:.1%}")

        # Trusting Alice should lead to being correct ?% of the time.
        # This model produces 68%.
        print(f"Trust Alice -> {alice_percent_correct:.1%}")

        print()