HackerTrans
TopNewTrendsCommentsPastAskShowJobs

contextnavidad

no profile record

comments

contextnavidad
·в прошлом году·discuss
L3 constructs [0].

Define MyProjectLambda construct that handles common patterns, add methods for optional functionality.

[0] https://docs.aws.amazon.com/prescriptive-guidance/latest/aws...
contextnavidad
·2 года назад·discuss
> Our project was originally full stack NextJS but we wanted to first migrate everything to Python/FastAPI

This is the eye opener for me, how is a startup justifying a re-write when they don't even have customers?
contextnavidad
·2 года назад·discuss
Take a look at Posteo. Seem to have a similar philosophy as Mullvad.
contextnavidad
·2 года назад·discuss
> because you can't pass a name string as an argument that is expected to be an email address

Unless you accidentally create the wrong branded type? Which is as likely as disordered arguments.

As you stated, tests should cover this case trivially, I don't see the value in added type complexity.
contextnavidad
·2 года назад·discuss
Source? There is a similar charge in London, that's all I know of
contextnavidad
·2 года назад·discuss
Some organisations forbid copy left licenses
contextnavidad
·2 года назад·discuss
Had good experiences with PM2, however be cognizant of it's copy left license. We have found it redundant with the likes of Kubernetes.
contextnavidad
·2 года назад·discuss
Midlands is the way to go honestly, great transport links to the whole country, great nature, very cheap living.
contextnavidad
·2 года назад·discuss
You're a little off on the average UK wage. It's around £34k now.
contextnavidad
·3 года назад·discuss
> async middleware not handling errors properly thing though

Can you expand on this? Error handling in middleware is pretty well documented.
contextnavidad
·3 года назад·discuss
Upgrade everything you need with a commit per upgrade, then if something breaks `git bisect` to find the troublesome package.

And read release notes for everything you upgrade too.
contextnavidad
·3 года назад·discuss
https://www.artillery.io/
contextnavidad
·3 года назад·discuss
We used `cloneDeep` heavily at a previous role, it isn't particulary fast - so be careful if you cloning very big objects (1mb+). There are faster options out there such as https://github.com/davidmarkclements/rfdc or even https://developer.mozilla.org/en-US/docs/Web/API/structuredC...
contextnavidad
·3 года назад·discuss
Someone knows how to get voted to the front page
contextnavidad
·3 года назад·discuss
Looks like you need an env var `OPENAI_API_KEY` for this to work. Strange that it is not documented at all.

Also they could have provided an actual error rather than letting it panic!
contextnavidad
·3 года назад·discuss
I live in the UK and do not follow the news. I am not aware there is a food shortage!
contextnavidad
·3 года назад·discuss
From the deployment stage of the pipeline to live traffic hitting the new code, probably a couple of minutes. Limited by image pulls, application startup time and K8s rollout strategy.
contextnavidad
·3 года назад·discuss
I have my linting setup to force a base on `parseInt`, for the extra characters I do feel it's worth it for the safety.

The extra parentheses is just habit from Prettier formatting :)
contextnavidad
·3 года назад·discuss
It's great to see other JS runtimes progressing, I have a continued frustration with the lack of decent TS tooling and ESM support in Node.js.

Jest and Mocha both do not support ESM very well out of the box and there is an expectation that you are using babel to transpile to CommonJS for everything to work nicely. (See Jest's _experimental_ support for ESM mocking!). Node.js is only starting to build out a testing framework, and it has a way to go yet until it has any level of feature parity with the established libraries.

Then you have the naive assumption that any package written in JS works with TS. Which is true, they do work, but the missing types will always lead you to look for a TS-first alternative. A good example of this is Joi vs Zod for validation, with the latter performing type inference based on your validation parameters, which is great. But it really does feel like you have a subset of a package ecoystem lurking on NPM.

I am not that confident Deno is the answer, but I would say those are my biggest frustration writing production grade JS/TS code today.
contextnavidad
·3 года назад·discuss
It passes the value and index to `parseInt`, where the 2nd argument is `base`. So it does not return `[10, 10, 10]` as you'd expect. It returns `[10, NaN, 2]` instead.

You have to do `['10', '10', '10'].map((val) => parseInt(val, 10));` to get the "expected" output. In addition, you should always provide `base` to `parseInt` otherwise it has it's own interpretation infered by the value you give it.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...