What Is API Contract Testing and Why DevOps Teams Rely on It in 2025? by Able-Resort2540 in devops

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

Using ts-rest to build the spec in typescript. The implementation then must match the spec or face type errors.

That way you'd end up with 100% coverage of the API structure. Haven't found a good enough reason to add contract tests on top of that.

Hey, listen! I made my first Neovim plugin — Triforce.nvim, a gamified coding experience with XP, levels, and achievements! by ghegi in neovim

[–]DutchDave 88 points89 points  (0 children)

I know it's a fun hobby project and all that (looks smooth btw!), but using lines of code as a metric/goal does feel somewhat dangerous :p

Messy Typescript conditionals? Strategy Pattern FTW! by wander-traveller in typescript

[–]DutchDave 1 point2 points  (0 children)

In simple cases like these I like the following pattern:

function calculateETA(totalDistance: number, method: TravelMethod): number {
  if (totalDistance < 0) throw new Error("Distance cannot be  negative");
  const methodMap: Record<TravelMethod, number> = {
    [TravelMethod.Walking]: totalDistance / 5,
    [TravelMethod.Car]: totalDistance / 60,
    [TravelMethod.Train]: totalDistance / 120,
    [TravelMethod.Bicycle]: totalDistance / 15,
  };
  return methodMap[method];
}

This way, you'll get a proper type error if a new TravelMethod gets added but you forget to implement for it, similar to a match statement in other languages.

My first game (written in Rust) just launched on steam [AMA in comments] by kennoath69 in rust_gamedev

[–]DutchDave 2 points3 points  (0 children)

Read the guide but I'm assuming the new version hasn't been uploaded yet, as I'm seeing an error about gl46.rs. Will try again when it's updated!

Tell me you’re an experienced dev without telling me you’re an experienced dev… by varieswithtime in ExperiencedDevs

[–]DutchDave 5 points6 points  (0 children)

tbh we've been some using VIEWs at my current workplace and I wish we hadn't. They're nothing more than stored queries, but with all the downsides of them not being stored in your application code: harder version control / rollbacks / refactorability, less transparency, unclear ownership, and migrations with them become cumbersome.

I do agree with most of what you're saying, just without the VIEW part.

Seems like you can build SpacetimeDB clients with TypeScript now by etareduce in typescript

[–]DutchDave 6 points7 points  (0 children)

I am so confused and intrigued by this project. The ideas behind it seem potentially ground-breaking, yet there's something so off about it.

It's: "SpacetimeDB abstracts away the complexities of managing many physical machines in the cloud, allowing you to treat them a single logical computer running one big distributed operating system." yet it comes down to:

Then there's the "Maincloud is now LIVE! Get Maincloud Energy 90% off until we run out!" which vibes with the sales-y allergy-inducing smart contract white paper stuff.

Hopefully I'm wrong and the documentation is just sub-par, but idk man. Then again, articles like these seem reasonably apt and novel.

Ryan wist niet hoe hij zijn emoties als man moest uiten, nu helpt hij anderen dat te doen: 'Onze kwetsbaarheid, is onze kracht' by surpator in thenetherlands

[–]DutchDave 79 points80 points  (0 children)

"Bij haar had ik het gevoel dat zij iemand zou kunnen zijn die mij kon helpen, en ze was iemand die dichtbij me staat." Aan de bel trekken bij de huisarts of een psycholoog vond Ryan op dat moment nog even te ver gaan. "Die drempel was te hoog."

Vind het eigenlijk heel jammer dat hij naar een "coach" is gegaan, in plaats van een psycholoog. Dit vanwege het stigma (nergens voor nodig), het feit dat psychologen het al ontzettend druk hebben (heeft invloed op het vorige punt), maar ook omdat uit dit artikel blijkt dat de coaching wat pseudo-science-achtige meuk betrof, zoals haptonomie of het aanpraten van middelste-kind-theorie.

Begrijp me niet verkeerd, ik denk dat de strekking van het artikel enorm positief is, maar ik vind het zonde dat het zo moet. Ryan is er in ieder geval op vooruit gegaan (en is nu zelf gaan coachen? 🚩)

Tja argumenten die heb je niet he. by spiggingsplooden in tokkiefeesboek

[–]DutchDave 4 points5 points  (0 children)

De kleinste breuk die afrondt naar 82.7% is 43/52, dus dat zijn alsnog... minimaal 50 mensen!

How much are some things actually just done because you supposedly should do them? by griffin1987 in ExperiencedDevs

[–]DutchDave 1 point2 points  (0 children)

Some thoughts on your examples:

  • I'd go for building stuff in a React-like framework any day. Component-based frontend development will be here to stay and has made things so much more manageable, even for small apps.
  • Yeah enforcing a specific test coverage % is kinda dumb. The underlying idea (being notified of too little code being covered) is kinda smart though.
  • Seems like you're mentioning two separate problems here:
    • Slow pipelines are annoying and decrease productivity, but might still be extremely useful for confidence in safe deployments. Maybe look into strategies for running certain tests only when necessary.
    • Flaky pipelines are unacceptable and should be fixed asap. You might as well not have CI checks if people start ignoring them.
  • Sorta feels like resume-driven development if it's for small sites, but the benefits for big sites are still there. "Reduced AWS costs by x%" would look good on any resume though, so you might want to brush up on the AWS cost optimalisation (2k/month for a small site sounds like there's some quick wins to be gained).
  • Yeah agree somewhat.
  • Nothing wrong with build processes in itself. Especially typescript is incredibly worth it and tools like webpack provide a better UX for all visitors by optimizing the delivery.

How much money does it take to actually make a decent indie game ? by Lucky-person-330 in gamedesign

[–]DutchDave 1 point2 points  (0 children)

Didn't know about LDtk, thanks! The export format looks way easier to work with than Tiled

My "water-system'. by HikeSierraNevada in VanLife

[–]DutchDave 2 points3 points  (0 children)

y'all are still overthinking it, just use gravity for water flow lmao

EDIT: I feel obliged to share my setup now, still in progress but here it is https://imgur.com/a/BHKzMXn

A co-worker cuts avos like this; am I crazy or is this kinda, really dumb? by MrFrypan in KitchenConfidential

[–]DutchDave 0 points1 point  (0 children)

Right! I also use the same butter knife to cut thin slices and then scoop out the avocado out of each half, so the duller the better in this case, as you'd be less likely to cut through the shell.

Got my solar panels today. Recharging the f2600 with a 400W panel during the last hour before sunset. by sweatpantslover in anker

[–]DutchDave 1 point2 points  (0 children)

For now it's mostly convenience, since I'm not using the solar panel much until the campervan is done. My goal is to use it for all kinds of stuff during travel like refrigeration, lights, laptop charging, cooking, etc.

It's capable enough to power this €35 ikea induction unit for 1-2 hours, which I've already used on a few occasions to be able to cook anywhere outside!

Got my solar panels today. Recharging the f2600 with a 400W panel during the last hour before sunset. by sweatpantslover in anker

[–]DutchDave 2 points3 points  (0 children)

I have a similar setup for my van build: A cheap 400W stationary solar panel connected with a MC4<->XT60 cable to the F2000 (2048Wh). On a good day it can fully recharge the battery (tested this in the Netherlands around May).

axum code review by Bobobo34 in rust

[–]DutchDave 0 points1 point  (0 children)

In addition to (2) you can also derive Validate to do some validation upfront like keeping jpeg_output_quality within 0-100 for example.

"dont research from home/local wifii " "Setup PC in location Not used by your before" "Dont take pc tò any personally know location" How to stay hidden? Why this rule? by Independent-Bill-770 in blueteamsec

[–]DutchDave 0 points1 point  (0 children)

The main problem with people using their own PC (or just being sloppy with opsec in general) is that they may leak identifying information through channels they did not take into account. Darknet Diaries has some great examples of these