[-] Kissaki@programming.dev 2 points 1 year ago

I expect some hot Java code on that website 😏

[-] Kissaki@programming.dev 2 points 1 year ago

YouTube recently introduced UI changes. Google probably didn't optimize for Firefox besides Chrome. Whatever they're doing, it may be more performance on Chrome than on Firefox for technical reasons.

[-] Kissaki@programming.dev 2 points 1 year ago* (last edited 1 year ago)

I've been using phind as a technical-focused AI search engine, which is a great addition to my toolset.

I'm mindful of using it vs searching [ref docs etc], not only in the kind of search and answer I'm looking for but also energy consumption impact, but it's definitely very useful. I'm a senior dev though, and know what to expect and I am able to assess plausibility, and phind provides sources I can inspect too.

As for code assistance, I find it plausible that it can be useful, even if from my personal experience I'm skeptical.

I watched an Microsoft talk from two devs, which was technically sound and plausible in that it was not just marketing but they talked about their experience, including limits of AI, and where they had to and to what degree they had to deal with hallucinations and cleanup. They talked about where they see usefulness in AI. They were both senior, and able to assess plausibility, and do corrections where necessary. What I remember; they used it to bounce ideas back and forth, to do an implementation draft they then go over and complete, etc.

Microsoft can do the investment of AI setup, code sharing to model, AI instructions/meta-description setup investment, etc.

My personal experience was in using copilot for Rust code, for Nushell plugins. I'm not very familiar with Rust, and it was very confusing, and with a lot of hallucinations.

The PR descriptions CodeRabbit did were verbose and not useful for smaller PRs I made. That has been a while ago.

At work we have a voluntary work group exploring AI. The whole generate your whole app kind of thing seems plausible for UI prototypes. But nothing more. And for that it's probably expensive.

I'm not sure how much the whole thing does or can do for efficiency. Seems situational - in terms of environment, setup, capabilities, and kind of work and approach.

[-] Kissaki@programming.dev 2 points 2 years ago* (last edited 2 years ago)

It doesn't open with a summary or overview but dives right in to exploration, but I think the point comes across:

The copy and paste key codes, which have no physical keys anymore, are - to a degree - supported in software. Their claim is that those key codes are the tool for universal copy and paste, and then it's the input interpretations job (key and combination mapping) to offer bindings to those key codes.

GTK added support the copy and paste keyboards in January 2025. QT also added support for copy and paste key codes the same month. I'm not sure of the first released version of the GTK toolkit that will contain the fix. For QT, it will be QT 6.10, scheduled for release in September 2025. Together, this will cover many apps built for Gnome and KDE as well as others that use the same toolkits.

… followed by some more "current state of support for those key codes".

[-] Kissaki@programming.dev 2 points 2 years ago

Correlation does not equal causation.

Are you saying Google paid for them to stop implementing pwa?

[-] Kissaki@programming.dev 2 points 2 years ago

Start as in developing or as in hosting?

You're asking in a community called devs, implying you want to develop, but it seems like you want to only host?

[-] Kissaki@programming.dev 2 points 2 years ago

[Nix] allows users to reliably reproduce the same state coming from any other state, which is also used for safe rollbacks.

What does that mean for configuration? How does configuration and customization play into Nix declarations?

I'm thinking of what would usually be in /etc/, and what classic package managers like apt/dpkg would deliver a default of but not replace if already existing. Where you make your specific program and service configuration that is independent of the theoretically immutable package program data.

[-] Kissaki@programming.dev 2 points 2 years ago* (last edited 2 years ago)

Have you considered creating a ticket called "Can't ask questions without joining discord"?

Do you think it would have more answers if it were on GitHub discussions?

[-] Kissaki@programming.dev 2 points 2 years ago

I'm not familiar with their products and product names, so I had to look them up, sharing that here, including the other two free non-comm mentioned in the blog post:

  • Aqua: test automation IDE (various tech)
  • Rider: .NET and game dev
  • RustRover: Rust IDE
  • WebStorm: JavaScript and TypeScript IDE
[-] Kissaki@programming.dev 2 points 2 years ago

we should just write the code how it should be

Notably, that's not what he says. He didn't say in general. He said "for once, [after this already long discussion], let's push back here". (Literally "this time we push back")

who need a secure OS (all of them) will opt to not use Linux if it doesn’t plug these holes

I'm not so sure about that. He's making a fair assessment. These are very intricate attack vectors. Security assessment is risk assessment either way. Whether you're weighing a significant performance loss against low risk potentially high impact attack vectors or assess the risk directly doesn't make that much of a difference.

These are so intricate and unlikely to occur, with other firmware patches in line, or alternative hardware, that there's alternative options and acceptable risk.

[-] Kissaki@programming.dev 2 points 2 years ago* (last edited 2 years ago)

Code before:

async function createUser(user) {
    if (!validateUserInput(user)) {
        throw new Error('u105');
    }

    const rules = [/[a-z]{1,}/, /[A-Z]{1,}/, /[0-9]{1,}/, /\W{1,}/];
    if (user.password.length >= 8 && rules.every((rule) => rule.test(user.password))) {
        if (await userService.getUserByEmail(user.email)) {
            throw new Error('u212');
        }
    } else {
        throw new Error('u201');
    }

    user.password = await hashPassword(user.password);
    return userService.create(user);
}

Here's how I would refac it for my personal readability. I would certainly introduce class types for some concern structuring and not dangling functions, but that'd be the next step and I'm also not too familiar with TypeScript differences to JavaScript.

const passwordRules = [/[a-z]{1,}/, /[A-Z]{1,}/, /[0-9]{1,}/, /\W{1,}/]
function validatePassword(plainPassword) => plainPassword.length >= 8 && passwordRules.every((rule) => rule.test(plainPassword))
async function userExists(email) => await userService.getUserByEmail(user.email)

async function createUser(user) {
    // What is validateUserInput? Why does it not validate the password?
    if (!validateUserInput(user)) throw new Error('u105')
    // Why do we check for password before email? I would expect the other way around.
    if (!validatePassword(user.password)) throw new Error('u201')
    if (!userExists(user.email)) throw new Error('u212')

    const hashedPassword = await hashPassword(user.password)
    return userService.create({ email: user.email, hashedPassword: hashedPassword });
}

Noteworthy:

  • Contrary to most JS code, [for independent/new code] I use the non-semicolon-ending style following JavaScript Standard Style - see their no semicolons rule with reasoning; I don't actually know whether that's even valid TypeScript, I just fell back into JS
  • I use oneliners for simple check-error-early-returns
  • I commented what was confusing to me
  • I do things like this to fully understand code even if in the end I revert it and whether I implement a fix or not. Committing refacs is also a big part of what I do, but it's not always feasible.
  • I made the different interface to userService.create (a different kind of user object) explicit
  • I named the parameter in validatePassword plainPasswort to make the expectation clear, and in the createUser function more clearly and obviously differentiate between "the passwords"/what password is. (In C# I would use a param label on call validatePassword(plainPassword: user.password) which would make the interface expectation and label transformation from interface to logic clear.

Structurally, it's not that different from the post suggestion. But it doesn't truth-able value interpretation, and it goes a bit further.

[-] Kissaki@programming.dev 2 points 2 years ago

https://divverent.github.io/aaaaxy/

A nonlinear 2D puzzle platformer taking place in impossible spaces.

F-Droid, Google Play

view more: ‹ prev next ›

Kissaki

0 post score
0 comment score
joined 3 years ago
MODERATOR OF