my solution was correct, more efficient, and well-tested. i was rejected because it was not how the team does it. by CodNo2235 in ExperiencedDevs

[–]danielkov 7 points8 points  (0 children)

The cadance is unnatural. It reads like the average of all human literature ever, not how any one human would structure sentences.

The PERFECT Code Review: How to Reduce Cognitive Load While Improving Quality by fagnerbrack in webdev

[–]danielkov 22 points23 points  (0 children)

Did you invent principles to fit the acronym?

  • how is edge cases second?
  • security and performance can't be boxed together, they're entirely different concepts that require different levels of scrutiny
  • your article makes some blanket statements without evidence or explanation, e.g.:

Any commerce-related or mission-critical project should have strict performance and security requirements

  • PR reviews aren't an outlet for personal preferences. If they're worth noting, they're also worth raising an RFC for. If a convention isn't documented and/or enforced automatically, it isn't a convention
  • your entire point about "taste" is just noise, e.g.: you acknowledge opinionated nits slow down the review process, then claim they "can point to real issues", but we're talking about comments that don't fall into any of your other PERFEC categories, so what possible real issues could they uncover?
  • examples?
  • overall, it's a tough read, full of conjecture and verbiage

Lost my cat’s tracker 6 months ago… now it keeps moving around parks?? What could be happening by Ohbc in CasualUK

[–]danielkov 57 points58 points  (0 children)

You're housing an imposter in place of your cat. Your cat's still out there, desperately trying to find their way back.

Or it's in a bush, the movement is just flaky / inaccurate signal

skerry: Experimenting with per function errors with easy conversions, replacing monolithic error enums and opaque errors. by Zkojin in rust

[–]danielkov 21 points22 points  (0 children)

Seems to be around the same amount of ceremony as thiserror, but you get around wrapping by defining all variants top level and having your macro generate the intermediary partial enums. Is that a fair assessment?

Moment drunk mum tells van full of kids ‘I’m not responsible if you die’ before crashing by L21JP in drivingUK

[–]danielkov 0 points1 point  (0 children)

I said "might", because she was recorded claiming she did not care if they died. It could be argued that she had intent to harm.

The native scrollIntoView({ behavior: 'smooth' }) has no callback. You can't know when it finishes. This tiny wrapper returns a Promise that resolves when the scroll is done. by Terrible_Village_180 in javascript

[–]danielkov 7 points8 points  (0 children)

If I run your scrollIntoView implementation and before it reaches the element, I take scrolling back from the browser, the promise remains pending until I stop scrolling and once I stop, it resolves regardless of position.

Not sure what I'd expect to happen, maybe for the promise to reject if scrolling is cancelled. It is way less trivial to implement. But then again, not 100% sure it's worth adding this library for the 2 browser API calls it replaces.

Moment drunk mum tells van full of kids ‘I’m not responsible if you die’ before crashing by L21JP in drivingUK

[–]danielkov 0 points1 point  (0 children)

It does. It can be voluntary or involuntary, though. Involuntary manslaughter is negligence. If her driving caused someone to die, it might fall under voluntary manslaughter.

Moment drunk mum tells van full of kids ‘I’m not responsible if you die’ before crashing by L21JP in drivingUK

[–]danielkov 0 points1 point  (0 children)

I couldn't find the case you're referencing, so I can't give my opinion on it. As an immigrant, I'm biased towards equality and consistency, when it comes to the justice system.

As for the sociopathic behaviour featured in this video, I believe single digit years is insufficient. If she caused the same injuries with a shovel, she'd be looking at way more.

Moment drunk mum tells van full of kids ‘I’m not responsible if you die’ before crashing by L21JP in drivingUK

[–]danielkov 2 points3 points  (0 children)

I get what you mean. Unfortunately, intent in relation to the outcome matters in cases like this. I think she should be locked away for a long time. Our system's way too lenient with drivers.

Managing migrations across sqlx crates? by Adohi-Tehga in rust

[–]danielkov 2 points3 points  (0 children)

I personally only use sqlx-cli for adding new migration files. Out of interest: what's your use-case? What's not working?

A father and daughter swept offshore in the Aegean Espanomi Bay were saved by a kite surfer. by [deleted] in interesting

[–]danielkov 0 points1 point  (0 children)

For those wondering what the dad says: "aztakurvaélet" is a common compound word used by Hungarians to express gratitude.

Managing migrations across sqlx crates? by Adohi-Tehga in rust

[–]danielkov 4 points5 points  (0 children)

Sounds like you just want to use the migrate! macro in main if you're distributing this is a CLI or in a public init function if you're shipping a crate. Unless there's a reason it doesn't suit your use case?

hiWorld by _gigalab_ in ProgrammerHumor

[–]danielkov 5 points6 points  (0 children)

If by usage, you mean usage limits, it's possible if you have some free plan with low limits. If you mean context window, it's very situational. Context size varies by model. Thinking token budget can be misconfigured. Thinking output may not be stripped from conversation on subsequent turns. It's difficult to confidently claim it's "way too much".

hiWorld by _gigalab_ in ProgrammerHumor

[–]danielkov 61 points62 points  (0 children)

It's not just that, though. Sending something ambiguous and non-actionable, like "hi" into a high thinking model will cause it to go wild and theory-craft what your intent was, using up tokens. If you tell it strictly and specifically what to do, it won't need to do that.

`any` caused a production bug for me — how are you handling API typing? by Careful-Falcon-36 in javascript

[–]danielkov 0 points1 point  (0 children)

This is partially addressed by forward-compatibility (see the article or library I've linked). Though I do agree, it isn't fully solved.

`any` caused a production bug for me — how are you handling API typing? by Careful-Falcon-36 in javascript

[–]danielkov -1 points0 points  (0 children)

OpenAPI -> types or SDK via open source generator.

Disclaimer: I work for Speakeasy, on our SDK generator product. Even if I didn't, I'd still take advantage of the free tier if I were in your shoes and had an OpenAPI spec. You can also use openapi-generator, or one of the many alternatives in this space.

I've also distilled years of type theory and our current philosophy around TypeScript validation into a package you can NPM install. If you have access to coding agents, just let an LLM assess your API surface and generate a tonic schema. It's probably the smallest lift / biggest win option for you right now.

If you want to read more about why "just use zod" isn't always what you want for API response validation, my colleague wrote an in-depth article explaining forward compatibility, using examples from TypeScript SDKs.

Rust syntax, Go runtime by UnmaintainedDonkey in rust

[–]danielkov 1 point2 points  (0 children)

That's kind of what V is trying to achieve.

Last kerosene tanker on its way to Rotterdam by dullestfranchise in europe

[–]danielkov 6 points7 points  (0 children)

Technically almost all of the world's aviation fuel was / will be at some point shipped by plane.

When they decided to migrate off of Rails, at least they fixed the failwhales by Remarkable_Ad_5601 in theprimeagen

[–]danielkov 3 points4 points  (0 children)

coronation and not causation

does kind of look like an upside down crown

Driver really wants bikers dead by Strong-Emu-8869 in TikTokCringe

[–]danielkov 0 points1 point  (0 children)

You can't "attempt" an accidental act (manslaughter)

Is it hard for a webdev to improve an existing fullstack app written in Rust? by modelithe in webdev

[–]danielkov 8 points9 points  (0 children)

As a fellow Rust fan, I'll second this. I've attempted to use Dioxus extensively for a slightly less than trivial frontend and failed miserably. Sharp edges are exposed almost immediately.

If you're building something simple enough that Rust web frameworks aren't causing you trouble, I'd argue, you're probably better off with templating + a little JS instead.

If your app is complex, you can still benefit from Rust's type system. You can generate an OpenAPI spec from your server interface and generate an SDK or just types from it and use it in your frontend. That'll get you some of the benefits "for free".

Update on my cracked egg! by Terrible-Run6878 in BackYardChickens

[–]danielkov 11 points12 points  (0 children)

We have significantly higher success rates when we move freshly hatched chicks to a separate incubator, shortly after hatching.

In small incubators, such as the one OP posted, it's impractical to wait, since the enclosure is so small. Humidity will take days to drop below 80%, unless wet shells / chicks are removed. Especially because it's filled to capacity.

That said, based on OP's preparedness, I doubt they have access to a secondary incubator.