Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is awesomely well written. There's a certain self-congratulatory style that a lot of more senior developers sometimes find themselves falling into, that I really feel like this avoids; it's wonderfully engaging.

Unfortunately I still don't find myself understanding it very well... And I'm a professional backend engineer. I just spend all day writing Python; I keep the database hits of my code to the minimum that I can, and if something is broken, I figure out how to fix it, and I call it a day. I don't know very much about SQL. Where should I start?



I would suggest that learning SQL (the syntax) isn't the crux--it's just syntax you learn over time based off need, just like learning python--what you need is motivation. I'd suggest watching this video to get a flavor of how much leverage using the database can give you: https://www.youtube.com/watch?v=wTPGW1PNy_Y If the database can make you more productive and more efficient and make your life easier, you now have incentive to use it more.

Another thing that took my use of databases to the next level, was using PostGraphile (https://www.graphile.org/postgraphile/). It takes a PostgreSQL database and provides a GraphQL endpoint for it. Use that as your only backend. You can use PostgreSQL row-level security to do access control (who can see or modify what). You can use PL/pgSQL to write business logic for higher level calculations. You can use constraints and triggers to do data validation. Each of these areas has an initially steep learning curve, and wonky syntax, but once you get over them you can implement many backends extremely quickly with them. And using PostGraphile where you only have SQL available (well, you can also add javascript extensions, but try to limit those) will be a great forcing function that will require you to scour stackoverflow and the excellent PostgreSQL docs to learn many of the useful corners of SQL you'd never learn otherwise.


Thank you for writing this. This is one of the most helpful comments I've read in my 7 years on HN.

A lot of this high-level engineering stuff feels so opaque. You outlined a clear heuristic: find a motivation to learn the tool, add artificial limits if necessary for your learning goals, then scout relevant resources to help you get unstuck. It seems simple when written out, but I always find myself trying to overload on uncontextualized information first, then feel confused about why I still don't know how to "make a neural net" or what have you.


Interesting, didn't know about PostGraphile. Having recently learned about EdgeDB [1] launch here in HN [2], seems the latter is going to each the former's lunch.

[1] https://www.edgedb.com/

[2] https://news.ycombinator.com/item?id=30290225




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: