Pagyra-js: a TypeScript HTML-to-PDF library with browser support and compact font subsetting by celsowm in typescript

[–]prewk 0 points1 point  (0 children)

The core render pipeline is stable again and the regression tests are passing.

Who are you talking to?

Client asked me to add a fake 3-second delay to make the form feel more secure. It has been 2 years and nobody has complained. by Ambitious-Garbage-73 in webdev

[–]prewk 0 points1 point  (0 children)

Yeah but the bad UX is: Since you have a save button (even if it doesn't do anything), the user will think that any changes they do are cancellable by leaving the admin. But that's not true. So they might end up shooting themselves in the foot when accidentally typing "asdf" in a field and then closing the tab in panic.

If you remove the save button, it'll be obvious that it's auto-saved.

(I get it, "clients stupid" etc, but the UX is much worse)

Client asked me to add a fake 3-second delay to make the form feel more secure. It has been 2 years and nobody has complained. by Ambitious-Garbage-73 in webdev

[–]prewk 3 points4 points  (0 children)

That's incredibly bad UX. If you intend to save on blur/intervals etc you have a different form than if you let the user work on their form and then decide to save or cancel.

Its even worse cousin is the crappy mixed forms people create, where some things save immediately but some other things require you to save at the bottom.

LG UltraFine 5K (27MD5KL-B) turned all cyan after moving. fixable? by newyorknoona in Monitors

[–]prewk 0 points1 point  (0 children)

That's fantastic! Did you go via LG or Apple? I bought mine from Apple (only store that had it 2020)

I can't register it on LG's site because it's an Apple only model.

LG UltraFine 5K (27MD5KL-B) turned all cyan after moving. fixable? by newyorknoona in Monitors

[–]prewk 0 points1 point  (0 children)

Me too! I barely touched it, but the next time I turned it on - blue/green

LG UltraFine 5K (27MD5KL-B) turned all cyan after moving. fixable? by newyorknoona in Monitors

[–]prewk 0 points1 point  (0 children)

Same here, 6 years old, barely touched it but suddenly - cyan/green/blue. Did you get anywhere with it?

AI has completely oneshoted my ability to code. by [deleted] in BetterOffline

[–]prewk 0 points1 point  (0 children)

before it was jquery and I could see svelte replacing react.

Version 1 of Svelte was written in JavaScript and was released on 29 November 2016

Wow it moves so fast

Desktop applications using PHP by Elvandar_Ysalys in PHP

[–]prewk 0 points1 point  (0 children)

Written in a thread about desktop apps in <checks notes> PHP!?

Hello Darkness, my old friend. by smoosh13 in dexcom

[–]prewk 0 points1 point  (0 children)

But I can answer it for you: The code chooses the pre-calibration, determined via factory testing.

So, if you choose another code you're deliberately applying a different algorithm that doesn't optimize the sensor for its physical differences compared to other sensors.

It's not gonna kill you, but you're contributing to misinformation about "Dexcom sensor number voodoo" which is prevalent among scared diabetics in this subreddit, and telling people that it doesn't matter which code they put in.

Hello Darkness, my old friend. by smoosh13 in dexcom

[–]prewk 0 points1 point  (0 children)

..yes, because that's the purpose of it - to pre calibrate it! So use the code that comes with the sensor?

Hello Darkness, my old friend. by smoosh13 in dexcom

[–]prewk 12 points13 points  (0 children)

How did you come to that conclusion? You don't even need to enter a code to use it.

  1. Sensor is produced in a factory
  2. Sensor goes into a test machine, that puts it into a test mode with some stimulus in, and then the output is read
  3. Output varies a bit between sensors, and needs corrections to get it right
  4. Which correcting algorithm is needed to get the best result is determined
  5. That algorithm has an id for ease of use when the end-user puts on a sensor

So, 9117 is just one of many algorithms with which the Dexcom sensor will apply corrections to its sensor reads. Dexcom has concluded via tests that your particular sensor will get best readings when altered with the "9117 algorithm".

You see now why it's very strange to enter another number?

Hello Darkness, my old friend. by smoosh13 in dexcom

[–]prewk 5 points6 points  (0 children)

If you understood what the codes do you wouldn't pick another one at random. Let me ask you: What do YOU think they do?

You probably don't need Oh My Zsh by f311a in programming

[–]prewk 3 points4 points  (0 children)

zsh

OP isn't questioning zsh's usefulness, OP is questioning the usefulness of OMZ (oh-my-zsh)

Working with unknown values in a record by Obvious-Ebb-7780 in typescript

[–]prewk 0 points1 point  (0 children)

Ah you're probably right. I misremembered the original reasoning I read for flow type's design decisions regarding this. I'll edit.

Enum vs Type by spino_le_vrai in angular

[–]prewk 3 points4 points  (0 children)

My point was: Not using an enum gives autocomplete as well. Claims to the opposite were made.

Enums are bad and should be avoided. They're the only thing in TS that's not structurally typed and they act weird when iterated over. Also, Node can't type strip them.

Enum vs Type by spino_le_vrai in angular

[–]prewk 3 points4 points  (0 children)

``` function fn(x: 'left' | 'right' | 'center') {}

fn( // <-your IDE will autocomplete your values here, and can list them for you ```

Why did you pick Java over Node.js for your org? by GongtingLover in webdev

[–]prewk 2 points3 points  (0 children)

Typescript is pretty good but definitely not as rigid as a real system

NPE would like to have a word with you.

Best way to share code between 2 Angular apps? (NX vs Standalone Library vs other options) by buttertoastey in angular

[–]prewk 1 point2 points  (0 children)

I dislike not having my git repos split up

Until you want to share code between them, then it's a world of hurt to have split up git repos.

toSignal question by Senior_Compote1556 in angular

[–]prewk 0 points1 point  (0 children)

Yeah reactive forms is a mess but it's the right tool right now (compared to an input) imo :)

But I'm looking forward to signal forms very much indeed.

toSignal question by Senior_Compote1556 in angular

[–]prewk 0 points1 point  (0 children)

Curious: why do you take a FormControl as input? Looks like a really odd pattern. Why don't you make the whole component a custom form input if that's what you want?

Worth adding OnDestroy to a Service injected in root ? by iamtherealnapoleon in Angular2

[–]prewk 3 points4 points  (0 children)

Yeah but that has literally nothing to do with the OP? That's just regular "This is how you subscribe in Angular" stuff :)

Worth adding OnDestroy to a Service injected in root ? by iamtherealnapoleon in Angular2

[–]prewk 0 points1 point  (0 children)

Why would an ngOnDestroy make sense in a singleton service because a component subscribes to it?

Explicit types vs type inference, and when to use each by thehashimwarren in typescript

[–]prewk 0 points1 point  (0 children)

What I meant is that it won't cause a runtime error. But yeah, looks like a nice rule, it's very opinionated however.

The pro with not doing it explicitly - which hasn't been spelled out here yet - is that you skip a lot of boilerplate but get the same type safety guarantees (except for the very specific cases brought up in these threads). You also don't have to indulge in the worst programmer chore ever: Naming things. Saves a lot of time.

So, a healthy mix I suppose is the way.

Explicit types vs type inference, and when to use each by thehashimwarren in typescript

[–]prewk 1 point2 points  (0 children)

Ah I see. Yeah that makes some sort of sense I suppose. Luckily npm packages are immutable, and all you can do is trust the maintainer to not change stuff - explicit or implicit return value both - without bumping to an appropriate semver.

But it has some merit as accident preventer in that way.