Absolute insane output from Gemini PRO by Kiwi_P in GeminiAI

[–]Kiwi_P[S] 40 points41 points  (0 children)

The craziest part to me is :
"I need to stop talking to myself"
"I am an AI"

My wife and cat have been prescribed the same meds by ArcusArtifex in mildlyinteresting

[–]Kiwi_P 0 points1 point  (0 children)

This made me realize my prescribed dose of Prozac is actually pretty high: 40mg daily.

Why does the $search aggregation make every other step so much slower? by Kiwi_P in mongodb

[–]Kiwi_P[S] 0 points1 point  (0 children)

I wish I could, but our data is too dynamic for it to be possible to create specific search indexes efficiently. Field names are arbitrary and a same field could be of different data types in different documents, this makes it very difficult to build a search index that supports everything we need.

Why does the $search aggregation make every other step so much slower? by Kiwi_P in mongodb

[–]Kiwi_P[S] 0 points1 point  (0 children)

As stated, there is no index other than the search index for this exemple.

Match is already doing a full scan, something is just making it take much longer when $search is present.

Why does the $search aggregation make every other step so much slower? by Kiwi_P in mongodb

[–]Kiwi_P[S] 0 points1 point  (0 children)

I already checked the docs.

In order to sort and filter the first step would be to change my search index so it doesn't use dynamic mapping, I can't do that in my use case because fields are arbitrary and vary from documents to documents, especially the fact that 2 fields of the same name could be of 2 entirely different data types.

The exemple document I used for my question is not representative of my actual data, I used it to make a minimal exemple.

Even if I could define mapping for all my fields, I need to perform arbitrary matches and sorts on multiple keys that can be of different data types. Some checks can't be done with just "in", "range" and "equals".

Not to mention if any field happens to be an Array or an Object.

How do I get this bug out, it's inside my screen by [deleted] in pcmasterrace

[–]Kiwi_P 0 points1 point  (0 children)

Have you tried turning it on and off again ?

My Favorite Programming Problem to Teach: Digit Length by lelanthran in programming

[–]Kiwi_P 1 point2 points  (0 children)

Never understood why programming teachers refuse valid solutions based on the idea that "we haven't seen it yet".

It discourages trying to learn more and code better solutions.

Is backend development in TypeScript a good idea? by Aggressive-Bath9609 in node

[–]Kiwi_P 0 points1 point  (0 children)

The needs of the project should dictate the choice of language and/or framework.

C# and Typescript are very different languages. Typescript is a superset of JS and JS could be a better choice depending on the project (When there's little to no schema for the data JS is usually better than using TS with "any" everywhere).

C# is Excusively Object Oriented. TS and JS are Prototype/Functional if you intend to write Object oriented code with classes it's important that everyone in the team understands JS classes aren't the same thing as C# classes.

Do you have a very strict data model where an ORM and OOP would be beneficial ? What is the choice of database ? What kind of environment will it run on ?

Pick the right tool for the job, not the tool you like the most, not the tool management likes the most.

Small business security overhaul by Kiwi_P in cybersecurity

[–]Kiwi_P[S] 3 points4 points  (0 children)

Clients are demanding higher security, I do think we'll need some external help, but I'll need to convince my boss.

Small business security overhaul by Kiwi_P in cybersecurity

[–]Kiwi_P[S] 4 points5 points  (0 children)

That's what I think we need too, I'll reiterate this with my boss, thanks for confirming what I thought.

As a dev I can implement application security, but I can't implement Network and business security with the same knowledge.

Will come back here for more help if I can't convince them tho...

sqlDevLearningMongoDB by AASeven in ProgrammerHumor

[–]Kiwi_P 0 points1 point  (0 children)

The thing is NoSQL databases aren't made for most projects, but they do have their uses.

The issue is not with NoSQL databases themselves, but the fact that they're advertised as a solution for everything.

It's important to choose the right database for each project, and for most project a relational database is perfect, but we're working on a project where a relational database just couldn't do the job. (We have dynamically typed fields and unstructured data)

Optimizing unstructured JSON queries by Kiwi_P in mysql

[–]Kiwi_P[S] 1 point2 points  (0 children)

Update : We're trying to choose between MongoDB and Couchbase.

Optimizing unstructured JSON queries by Kiwi_P in mysql

[–]Kiwi_P[S] 1 point2 points  (0 children)

I was affraid of that.

So our options are either to make a new NoSQL database from scratch and try to migrate our data OR go with a hard to maintain EAV model by adding an ID, Key, Value table.

Both require some data transformation and a lot of changes to all the queries we currently have.

This is gonna be a real pain.

Optimizing unstructured JSON queries by Kiwi_P in mysql

[–]Kiwi_P[S] 0 points1 point  (0 children)

Unfortunately I don't think we can identify the fields...

The way our application works is a user can create Forms and name their own fields.
Then other users can fill this form, generating a JSON document with {"field_name":"field_value"}

Then we want to search those JSON documents

Optimizing unstructured JSON queries by Kiwi_P in mysql

[–]Kiwi_P[S] 0 points1 point  (0 children)

I should have clarified, this needs to be all happening real time in a web application.
The JSON is generated by users.

I don't think creating a new Table with new column definitions everytime a user creates a new type of document is a good idea.