ChatGPT - How Long Till They Realize I’m a Robot?

Image
I tried it first on December 2nd... ...and slowly the meaning of it started to sink in. It's January 1st and as the new year begins, my future has never felt so hazy. It helps me write code. At my new company I'm writing golang, which is new for me, and one day on a whim I think "hmmm maybe ChatGPT will give me some ideas about the library I need to use." Lo-and-behold it knew the library. It wrote example code. It explained each section in just enough detail. I'm excited....It assists my users. I got a question about Dockerfiles in my teams oncall channel. "Hmmm I don't know the answer to this either"....ChatGPT did. It knew the commands to run. It knew details of how it worked. It explained it better and faster than I could have. Now I'm nervous....It writes my code for me. Now I'm hearing how great Github Copilot is - and it's built by OpenAI too...ok I guess I should give it a shot. I install it, and within minutes it'...

The Curious Case of the Document Database



Let’s talk about an oft-overlooked NoSQL database type. It’s got all the best parts of a k-v store and allows limited SQL-like query-ability too! They’re called document databases and they’re all the rage.

A document database stores objects that can be serialized to JSON or some similar serialization format. These JSON ‘documents’ are keyed by an ID, similar to how k-v stores work. When you want to fetch an entire document, all you need is the key for it. But the magic of document databases allows you to fetch only pieces of a document and also to fetch data from multiple documents using selection criteria that mirrors basic SQL query functionality.

This is all made possible by the tree-like structure that documents in a doc DB must conform to. JSON data can contain keyed fields, nested structures, and lists. Using this structure a doc DB can extract specific pieces of a doc so that the entire doc doesn’t have to be returned and parsed in the application layer.

Query-ability, the other interesting feature of doc DBs, is a step above k-v stores, though not as powerful as a SQL DB. You can filter your results based on different fields in documents since the documents have structure to them. There’s no strict schema, so some docs will have fields that others don’t, but you can still run the same queries on those docs. To improve performance, you can use high-selectivity fields (fields where there are many different possible values among docs) as query filters and add indexes to limit the computation further.

Like other NoSQL database types, document databases also enforce no schema. 2 different keys can point to docs with entirely different sets of fields. This means you won’t have to do expensive database migrations each time a new field is needed.

MongoDB is the most widely known open source document DB and has all the features listed above as well as many more that will allow you to scale both reads and writes easily. Check it out next chance you get and you’ll certainly find a use for it in one of your projects.

Comments

Popular posts from this blog

ChatGPT - How Long Till They Realize I’m a Robot?

My experience with Udacity

Architectural Characteristics - Transcending Requirements