1,019 karma · joined Feb 7, 2019 (7y ago) · 491 submissions
comment 1y ago · link · parent
In retrospect, I am highly sceptical that OOP has had any positive impact on productivity. Its popularity coincided with the advent of automatic memory management, the World Wide Web and relational databases, and later with dependency management tools such as Maven. It is much more likely that it is these factors that have improved productivity, rather than OOP.
comment 1y ago · link · parent
As FOL is as powerful as HOL but easier to optimise, it has become the basis for relational databases. The trade-off is that you have to normalise your data so that you can efficiently query and apply constraints to it.
But yes, just because your data at rest should be flat relations, that doesn't mean that the results of your queries need to be flat. I think querying a well-normalised database and returning nested JSON makes a lot of sense.
comment 1y ago · link · parent
The result in your example looks exactly like JSON. Am I missing something?
Also, what is the point of avoiding JSON? Your client has to unmarshal the result either way.
comment 1y ago · link · parent
Example code: https://github.com/sivers/store
This talk is more Oracle specific but with some minor changes you can apply the same ideas to postgres: https://www.youtube.com/watch?v=GZUgey3hwyI
Personally I am using an architecture similar to https://sive.rs/pg in my personal projects and I am very happy with it. It is important that you put data and procedures/views in different schemas so that you can use migrations for your data but automatically delete and recreate the procedures/views during deployment. Also use pgtap or something similar for testing.
comment 1y ago · link · parent
I think the author kind of mentions this: "Figuring out the simplest solution requires considering many different approaches. In other words, it requires doing engineering."
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 1y ago · link · parent
Yes the entropy of the next letter always depends on the context. One bit per letter is just an average for all kinds of contexts.
> Also the fact that there are more than two letters also indicate more than one bit
Our alphabet is simply not the most efficient way of encoding information. It takes about 5 bits to encode 26 letters, space, comma and period. Even simple algorithms like Huffman or LZ77 only require just 3 bits per letter. Current state-of-the-art algorithms compress the English Wikipedia using a mere 0.8 bits per character: https://www.mattmahoney.net/dc/text.html
comment 1y ago · link · parent
[1] https://www.postgresql.org/docs/current/datatype-binary.html
comment 2y ago · link · parent
[1] https://www.enterprisedb.com/blog/postgres-vs-file-systems-p...
[2] https://www.phoronix.com/review/bcachefs-benchmarks-linux67
comment 2y ago · link · parent
Running a database on ZFS results in reduced throughput, while Btrfs and Bcachefs are outright performance disasters. [1][2]
[1] https://www.enterprisedb.com/blog/postgres-vs-file-systems-p...
[2] https://www.phoronix.com/review/bcachefs-benchmarks-linux67
comment 2y ago · link · parent
comment 2y ago · link · parent
SNCF Connect, on the other hand, not only had a terrible UX, but also crashed randomly, forcing me to use third-party apps to buy SNCF tickets.
comment 2y ago · link · parent
Not to mention Excel, which uses cells, a concept invented by Alan Kay. He also invented OOP which in 1964 inspired the creation of Simula, the first OOP-Language.
comment 2y ago · link · parent
But why would you want to do that? If you take out a fixed-rate loan and interest rates rise, you are already making a profit. Financially, there would be no further benefit from the buy-back of the loan.
comment 2y ago · link · parent
comment 2y ago · link · parent
Even for prototyping there are many other good choices since RDBMS like Postgres have implemented JSON support. Mongodb looks like a solution in search of a problem.