HNHacker News
TopNewBestAskShowJobs

dmfay

59 karma · joined September 17, 2020

submissionscomments
dmfay··on SQLite Schema Diagram Generator
My project pdot^1 has a full-ERD mode but it's honestly less useful than the semi-interactive/contextual mode of navigating schema subgraphs in a database of any size. pdot can output mermaid and render other graphs too, like trigger cascades and grant inheritance.

^1 https://gitlab.com/dmfay/pdot

dmfay··on Climatic and environmental aspects of Mongol withdrawal from Hungary (2016)
Supply chains in the sense of a centralized (or multi-centralized) logistics no, supply chains in the sense of mobile pastoral groups supporting armies' further extension yes. These did not stretch all the way back to central Asia. Groups like the White and Blue hordes, which later combined into the Golden Horde, were basically autonomous within the territory allotted them by the Qaghan -- they mostly owed the central authority a share of spoils, support for the postal system (örtöö or yam), and their presence when convened on matters of state. Armies would bring limited supplies with them as they campaigned, replacement horses and some small livestock, while the main group continued to focus on caring for the bulk of their herds. While not actively expanding their borders, steppe nomads usually moved between relatively well-established seasonal camps rather than continuously roaming.
dmfay··on Show HN: Ov – feature rich terminal pager
pspg ( https://github.com/okbob/pspg ) is wonderful for tabular data.
dmfay··on Archaeologists unearth the lost tomb of Genghis Khan
The image they're using is from a 2013 excavation of a Sarmatian kurgan in the Urals: https://www.archaeology.wiki/blog/2013/09/12/the-life-of-the...
dmfay··on Library of Database Schemas
It went offline earlier this year, but <https://web.archive.org/web/20220330034214/http://www.databa...> is something similar too. Diagrams not copy-pastable DDL, but at least for me the value is in seeing how other people have approached similar modeling problems, not in copying down their solutions -- so diagrams are perfect.
dmfay··on Ask HN: Which DB internals to study more to become expert in DBs overall??
de Haan & Koppelaars' _Applied Mathematics for Database Professionals_ is well worth your time, especially if you haven't studied discrete math yet.
dmfay··on Ask HN: How to handle open source contributors that do “too much”?
Ask! Create an issue if there's a tracker or send a short email explaining what you want to do and see if they're open to the idea, have more questions, or aren't interested in supporting it. No need to overthink formalities (although a quick "thanks for xyz" never hurt anyone's feelings), just be polite and concise.
dmfay··on Ask HN: How do you document your Data Models?
Postgres schema comments (COMMENT ON COLUMN mytable.mycolumn IS 'spline reticulation coefficient'). Otherwise, I've given up on ever maintaining data model documentation and generate ad hoc graphs from different perspectives in the foreign key network: https://di.nmfay.com/exploring-databases-visually
dmfay··on My quest for the perfect window manager (2004)
I haven't tried it myself yet but https://arcan-fe.com/2021/04/12/introducing-pipeworld/ has been on my radar for a while.
dmfay··on Ask HN: What are some MUST read Russian books?
I can't tell you whether you'll love or hate Fyodor Sologub's The Petty Demon but you won't feel lukewarm on it. The Cioran translation is more complete but harder to find than older translations now in the public domain.

I've been meaning to get to Victor Pelevin's The Life of Insects for a while.

dmfay··on Ask HN: Why aren't code diagram generating tools more common?
Full ERDs have always been more valuable to me in the making than in the having largely for that reason. But I've gotten a lot of mileage out of generating ephemeral slices of the foreign key graph from the "viewpoint" of a given table, as here: https://di.nmfay.com/exploring-databases-visually
dmfay··on Ask HN: What are some good books for SQL/DBA?
Lex de Haan and Toon Koppelaars, Applied Mathematics for Database Professionals -- a fairly gentle introduction to database theory starting with logic & discrete math

Ralph Kimball and Margy Ross, The Data Warehouse Toolkit -- even if you're in an OLTP context, it's useful to know about warehousing techniques

Dmitri Fontaine, The Art of PostgreSQL -- cookbook approach to modern SQL with plenty of explanations

Not a book but Heinz Klein and Kalle Lyytinen's paper "Towards a New Understanding of Data Modeling" in the Software Development and Reality Construction remains a must-read 30 years later. The organizers of that conference have published a free PDF copy of SDRC if you look around a bit.

dmfay··on Open Source SQL Parsers
I'm using a tree-sitter grammar^1, which category the OP doesn't mention, to index database object references in data access code and process schema migrations^2. The idea is early detection of potentially-dangerous database changes that modify or drop tables/views still used elsewhere, across the entire organization's code. It's already saved my bacon a few times.

^1 specifically https://github.com/DerekStride/tree-sitter-sql , but there are a few others around too

^2 https://ectomigo.com

dmfay··on Ask HN: What do you guys think of Tarot or other metaphysical things?
Nothing metaphysical about tarot, but it can be useful to challenge how you naturally think. The random cards you lay out force you to reconcile them with the story you tell yourself about where you are or a specific situation, and can show you connections and angles you might otherwise have ignored. Same goes for other methods of "divination" but tarot has a richer symbolic language than most.
dmfay··on Show HN: Atuin, improved shell history with multi-machine sync
I think mcfly's ( https://github.com/cantino/mcfly ) prioritization engine is still the killer feature for my purposes, but the sync server and timing display are both fantastic ideas, and I'd love to see them all together. Mcfly's also Rust+SQLite, even....
dmfay··on Exploring Databases Visually
You may be interested in the USING clause SQL-92 added for foreign keys where the referencing columns have the same name as the referenced columns: JOIN b USING (a_id). The only major RDBMS that doesn't support it is SQL Server afaik.
dmfay··on Exploring Databases Visually
That looks like another full-scale ERD generator, with much more detailed structural information too. Those make useful references, but what I'm trying to reach is a way of understanding parts of a relationship graph better and more quickly by navigating it from the inside with the terminal as a REPL of sorts (or, if you like, a very limited "parser" as in interactive fiction or a MUD) instead of the holistic and potentially overwhelming birds-eye view of an ERD.
dmfay··on Show HN: Extra-fuzzy history searching with Mnem
Searching shell command history one line at a time with ctrl-r and ctrl-s is useful but it's not how my brain works, and it probably isn't exactly how yours works either. Mnem aggregates the syntactic structures in your history to emphasize the commands you use more often and make the past fuzzily findable.

It's also my first foray into Rust! I had some idea of what to expect but the compiler definitely kicked my ass along the way -- I haven't had to care that much about _types_, let alone memory and ownership, for years and years.