The horrors of Sequelize Updated 2025-07-16
- foreign keys are capitalized:
- you must give
foreignKeywhen using aliases, otherwise it fails subtely. That would be derived automatically. - stackoverflow.com/questions/41502699/return-flat-object-from-sequelize-with-association can't auto-flatten to reuse the database's
ORDER limitandoffsetdon't work withoutsubQuery: falsewhen doing includes! It is just too buggy. Examples of this can be found e.g. under nodejs/sequelize/many_to_many_same_model.js.- stackoverflow.com/questions/34059081/how-do-i-reference-an-association-when-creating-a-row-in-sequelize-without-assum hard to not duplicate foreign keys values everywhere
- stack traces permanently broken or requiring non-obvious configs:
- does not automatically update fields on hooks: github.com/sequelize/sequelize/issues/8586#issuecomment-422877555
- cannot change columns when other columns have constraints due to the backup table?
- you have to use
.get()forattributealiased fields, why? stackoverflow.com/questions/32649218/how-do-i-select-a-column-using-an-alias/69890944#69890944 .idgets added toSELECTno matter what, breakingGROUP BYunless you do horrible workarounds:- no simple built-in mechanism for transaction retries: Sequelize transaction retries
- impossible to do subqueries in general. Docs just tell you to use literals. This in particular prevents single query deletes with join as done at nodejs/sequelize/raw/many_to_many.js:Also, you can't get query strings either: github.com/sequelize/sequelize/issues/2325
- sequelize.org/master/manual/sub-queries.html: the docs actually just tell you to use literals, lol
- stackoverflow.com/questions/45354001/nodejs-sequelize-delete-with-nested-select-query
- migrations. Generally speaking, anything but the simplest migrations are exceedingly hard to get right, as you have to go very low level when doing migrations. Syntax can be very different from regular DB operations.
- no way to do (non-raw) queries during migrations, e.g. to update fields based on other fields in a complex way?
- github.com/sequelize/cli/issues/862
- stackoverflow.com/questions/18742962/add-data-in-sequelize-migration-script
- stackoverflow.com/questions/38671483/sequelize-migration-update-model-after-updating-column-attributes
- stackoverflow.com/questions/38998397/can-i-use-sequelize-models-in-migration-scripts
- stackoverflow.com/questions/45286429/custom-query-on-sequelize-seeder
queryInterface.sequelize.modelscontains onlySequelizeMeta. Not sure why they have this limitation. - stackoverflow.com/questions/56043246/node-js-sequelize-no-primary-keys-when-migrating/56046101#56046101
- SQLite
changeColumnmigrations do on delete cascades of other tables. SQLite does not have change column statements, so they have to drop and recreate tables, but they don't temporarily remove cascades, so you lose data: stackoverflow.com/questions/62667269/sequelize-js-how-do-we-change-column-type-in-migration/70486686#70486686 - associations require full explicit index construction: stackoverflow.com/questions/39651853/how-to-create-join-table-with-foreign-keys-with-sequelize-or-sequelize-cli
- ability to iterate over a large result without blowing up memory and without using limit + offset (which is inneficient e.g. when looping over recursive queries). This is also known as cursor or streaming interfaces:E.g. the Python SQLite interface supports this just fine: stackoverflow.com/questions/29582736/python3-is-there-a-way-to-iterate-row-by-row-over-a-very-large-sqlite-table-wi
- stack overflow
- stackoverflow.com/questions/28787889/how-can-i-set-up-sequelize-js-to-stream-data-instead-of-a-promise-callback
- stackoverflow.com/questions/43964067/how-to-implement-cursor-pagination-using-sequelize
- stackoverflow.com/questions/57164242/perform-sequelize-findall-in-a-huge-array
- stackoverflow.com/questions/55191891/how-to-loop-through-result-in-sequelize generic loop
- issue tracker
- stack overflow
- empty
attributes: []breaks some nested queries: github.com/sequelize/sequelize/issues/16436 - does not expose a iteration API that supports large arrays?E.g. Python SQLite does: stackoverflow.com/questions/29582736/python3-is-there-a-way-to-iterate-row-by-row-over-a-very-large-sqlite-table-wi
Microsoft Updated 2025-07-16
They are evil because they produce closed source offline software used by millions: Microsoft Windows.
And also their monopolistic practices: United States v. Microsoft Corp.
So, as put in Video "Bill Gates vs Steve Jobs by Epic Rap Battles of History (2012)" by fake Steve Jobs to fake Bill Gates:
However, like all big tech companies with infinite money, they do end up doing some cool things in their research department, Microsoft Research, notably for Ciro Santilli being:
- Lean
- their quantum computing work. C is of course a bad idea, we don't need yet another domain-specific language, Python library based solutions like Qiskit are obviously the way to go
octokit.js Updated 2025-07-16
Tin compound Updated 2025-07-16
torchvision ResNet Updated 2025-07-16
pytorch.org/vision/0.13/models.html has a minimal runnable example adapted to python/pytorch/resnet_demo.py.
That example uses a ResNet pre-trained on the COCO dataset to do some inference, tested on Ubuntu 22.10:This first downloads the model, which is currently 167 MB.
cd python/pytorch
wget -O resnet_demo_in.jpg https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Rooster_portrait2.jpg/400px-Rooster_portrait2.jpg
./resnet_demo.py resnet_demo_in.jpg resnet_demo_out.jpgWe know it is COCO because of the docs: pytorch.org/vision/0.13/models/generated/torchvision.models.detection.fasterrcnn_resnet50_fpn_v2.html which explains that is an alias for:
FasterRCNN_ResNet50_FPN_V2_Weights.DEFAULTFasterRCNN_ResNet50_FPN_V2_Weights.COCO_V1After it finishes, the program prints the recognized classes:so we get the expected
['bird', 'banana']bird, but also the more intriguing banana. Wilhelm Ostwald Updated 2025-07-16
Mitochondrial DNA mutates faster than nuclear DNA Updated 2025-07-16
Wikipedia mentions "Since animal mtDNA evolves faster than nuclear genetic markers" with a few sources.
Some sources:
- Power, Sex, Suicide by Nick Lane (2006) page 361 mentions:so this property is also important for the human mitochondrial molecular clock.
While nuclear DNA can barely distinguish between chimps and humans, the mitochondrial clock ticks fast enough to reveal differences accumulating over tens of thousands of years
- www.ncbi.nlm.nih.gov/pmc/articles/PMC3350313 says it for metazoans
- www.quora.com/Why-does-mitochondrial-DNA-mutate-faster
How to blackout your window without drilling Swimming goggles plus sleeping mask hack Updated 2025-07-16
The problem with virtually all sleeping masks on the market is that they leave a lot of room near your nose for light to come in.
Ciro Santilli discovered a useful workaround for that: make the mask tighter with a swimming goggles!
Just make the goggles as loose as possible to not put pressure on your eyes, and then strap them over the sleeping mask.
If you are a back sleeper, put the googles forward as normal. If you are a stomach sleeper, put the googles on the back of your head, and the straps over the mask. This way you wont get your head squished by the goggles and the bed.
Once Ciro understood the idea, Googling "swimming googles sleeping mask" led to: mantasleep.uk/ might be a good option.
Window function (SQL) Updated 2025-07-16
Wolfgang Pauli Updated 2025-07-16
The dude was brutal. Ron Maimon praises that at youtu.be/ObXbKbpkSjQ?t=944 from Video "Ron Maimon interview with Jeff Meverson (2014)".
Works about Richard Feynman Updated 2025-07-16
Total derivative Updated 2025-07-16
The total derivative of a function assigns for every point of the domain a linear map with same domain, which is the best linear approximation to the function value around this point, i.e. the tangent plane.
Touchlight Genetics Updated 2025-07-16
Toyota Research Institute Updated 2025-07-16
Fermi-Dirac statistics Updated 2025-07-16
IBM System/360 Updated 2025-07-16
Tobias J. Osborne Updated 2025-07-16
Instrumental convergence Updated 2025-07-16
Microsoft Quantum Updated 2025-07-16
Unlisted articles are being shown, click here to show only listed articles.


