Hacker Newsnew | past | comments | ask | show | jobs | submit | fcoury's favoriteslogin

One hack is to end the prompt with: following solid architecture principles.

EG: Step 1: Define problem in PROBLEM.md Step 2: Ask agent to gather scope from codebase and update PROBLEM.md Step 3: Ask agent to create a plan following design and architecture best practices (solid, etc) and update PROBLEM.md Step 4: Ask agent to implement PROBLEM.md


The first approach (the 'It’s "obviously" the only way to go' one) is called an adjacency list.

The second (the 'vastly simpler method') i don't recall seeing before. It has some fairly obvious deficiencies, but it is clearly enough in some cases.

The third ('namespacing') is called a materialized path.

And there is at least another way to represent trees - nested sets: https://www.ibase.ru/files/articles/programming/dbmstrees/sq...

All of these were well-trodden back in the days when people took relational databases seriously. For example, see: http://www.dbazine.com/oracle/or-articles/tropashko4/

It seems this is lost knowledge now.


You might really like Windows 10 LTSC 2021 - it has all the crap stripped out and retains all core functionality

Yes, this! Vtables are how [lnav](http://lnav.org) works its magic. Embedded SQLite makes so much sense for such use cases.

One of my favorite sqlite features is the vtable mechanism: https://sqlite.org/vtab.html

It makes it possible to expose a custom, application specific database format as a sqlite table, and suddenly you can run SQL queries on your data!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: