Readit News logoReadit News
brosciencecode commented on Statement from Scarlett Johansson on the OpenAI "Sky" voice   twitter.com/BobbyAllyn/st... · Posted by u/mjcl
brosciencecode · 2 years ago
Sam is very clearly in the wrong here, but is your argument for why he sucks seriously that he said “we should not brand people as heretics for disagreeing with my point of view?”
brosciencecode commented on Show HN: Auto-generate an OpenAPI spec by listening to localhost   github.com/Adawg4/openapi... · Posted by u/adawg4
w3news · 2 years ago
When you build an API, please start with the OpenAPI specification, before you write any code for your API. It can be iterative, but for every part, just start with the OpenAPI, and think about what you want from the API, what do you want to send, and what to receive.

It is like the TDD approach, design before build.

Writing or generating tests after you build the code, is the same as this. It is guessing what it should do. The OpenAPI specification, and the tests should tell you what it should do, not the code.

If you have the specification, everyone (and also AI) can write the code for you to make it work. But the specification is about what you think it should do. That are the questions and requirements that you have about the system.

brosciencecode · 2 years ago
I get the feeling you may not have gone 0-1 on an API before. In general, you have 1 consumer when you're starting off, and if you're lucky your API gathers more consumers over time.

In that initial implementation period, it's more time-consuming to have to update a spec nobody uses. Maintaining specs separately from your actual code is also a great way to get into situations where your map != your territory.

I'd instead ask: support and use API frameworks that allow you to automatically generate OpenAPI specs, or make a lot of noise to get frameworks that don't support generating specs to support that feature. Don't try to maintain OpenAPI specs without automation :)

brosciencecode commented on Press Release: Future Software Should Be Memory Safe   whitehouse.gov/oncd/brief... · Posted by u/steveklabnik
steveklabnik · 2 years ago
This is more like "seat belts make car accidents safer for passengers, and so we should move towards using them where possible."
brosciencecode · 2 years ago
We’re working under the assumption that “memory safe languages” can’t be unsafe themselves, which isn’t the case.
brosciencecode commented on Press Release: Future Software Should Be Memory Safe   whitehouse.gov/oncd/brief... · Posted by u/steveklabnik
brosciencecode · 2 years ago
In other news: crimes should not be committed, and car accidents are outlawed
brosciencecode commented on Latest ChatGPT 4 System prompt (1,700 tokens)   pastebin.com/vnxJ7kQk... · Posted by u/simonpure
brosciencecode · 2 years ago
"Use high effort; only tell the user that you were not able to find anything as a last resort. Keep trying instead of giving up."

Lol - it looks like they got hit by the recent laziness of GPT-4 too.

brosciencecode commented on Nile: Serverless Postgres for modern SaaS   thenile.dev/blog/introduc... · Posted by u/yarapavan
brosciencecode · 2 years ago
This looks like an interesting take on serverless Postgres! Is this type of multi tenant separation enough for the kinds of users who care about it? I’d imagine a lot of the concerns around multi-tenant would be related to potential application layer bugs that can co-mingle data.
brosciencecode commented on An Introduction to APIs   zapier.com/resources/guid... · Posted by u/teleforce
sibit · 2 years ago
> POST - Asks the server to create a new resource

> PUT - Asks the server to edit/update an existing resource

Maybe I've been doing it wrong all these years but it seems to me that the guides flip-flops the responsibility of POST and PUT. My understanding is that POST should edit/modify while PUT creates/replaces a resource.

brosciencecode · 2 years ago
Are you mistaking POST for PATCH? What I've been working with is:

- POST creates

- PUT replaces (i.e. edit, but you need to provide the whole resource)

- PATCH edits (i.e. you can only provide some fields)

APIs rarely implement all these properly in practice but that's my understanding of the theory.

brosciencecode commented on Poop: Performance Optimizer Observation Platform   github.com/andrewrk/poop... · Posted by u/davikr
warent · 3 years ago
Not to be rude but this source code... makes me wonder if I ever want to use Zig. It looks barely readable

https://github.com/andrewrk/poop/blob/main/src/main.zig

brosciencecode · 3 years ago
Out of curiosity, what makes it unreadable to you?

u/brosciencecode

KarmaCake day516November 13, 2021
About
brosciencecode@protonmail.com

GitHub: @brosciencecode

View Original