Hacker News new | ask | show | jobs
by anigbrowl 1224 days ago
I think there's a secret third thing, domain specific fundamentals/boilerplate.

I've had good results with code generation for minimal proof-of concept things, like 'show me code for [maze construction algorithm]' or 'visualize this platonic solid in mathplotlib, with numeric labels on every vertex' or 'fetch data from https://hacker-news.firebaseio.com/v0/item/34741898.json and build a pandas dataframe from it'.

I've come to prefer it to visiting Stack Overflow when I need to get up to speed on a new thing, so that I don't have to read people's petty ego trips or irrelevant answers. I also find it responsive when I give carefully detailed prompts to develop an algorithm, as it saves me a lot of typing mistakes and syntactical screwups, eg mixing up dimensions in 3d or flipping [x:] and [:x]. Debugging sometimes feels faster than on my own code, because I didn't mentally commit to the error and create a blind spot for myself.

It's much easier to get good results by specifying incremental (across multiple responses) or stepwise instructions in pseudocode, rather than big bang problem statements. Although the latter occasionally kick out magically-working complete programs, they're much more likely to yield catapults: https://www.youtube.com/watch?v=5aCgSwmm5Ho

1 comments

> I've come to prefer it to visiting Stack Overflow when I need to get up to speed on a new thing,

I'm certainly guilty of this very same mistake, key word being "mistake." I'd hope for a world where the better way would be to read some good docs which gave an accurate mental model of the thing I want to get up to speed with. You know, organized and structured knowledge.

vs a quick answer to a single point without any context.

I don't regard this as a mistake. Tools and docs don't necessarily flow from the same source, and even good docs can't anticipate every need or blind spot of every reader - if we have perfect custom documentation, then it too would have to be AI generated. If good mental models were sufficient, there would be no ned for experiment and all great programs would flow from perfectly written specifications and never contain any bugs.

I like to go back and forth between the docs and hacking together little things that do one job to maintain a feel for what I'm doing (also in many other contexts besides programming).