Hacker News new | ask | show | jobs
by lukeschlather 6 days ago
So, the sort of thing I do is, I have something I want to do (say I need to sort some objects.) I have the AI generate 10 different versions of the sorting function. I ask it to consider different things like memory locality, caching behavior, etc. and suggest algorithms. I review the algorithms it gives me, I suggest several alternatives. I have it implement and run benchmarks, then I review the benchmark data, try the "good" implementations out myself and consider which one to use.

I can do this in less time than it would take me to implement a single algorithm, even if we ignore the time to read DSA. And I don't necessarily know how to implement my favorite sorting algorithm by hand after, but that's not the thing that interests me, it's which implementations are correct and performant for the sort of use cases I have that interests me.

1 comments

This is an example of the other side of this argument: you learned enough to know what questions to ask by slogging through doing these things manually. Its one thing to be told that optimizing for a smaller big-O is important; its another thing to be _told_ this (and be denied the opportunity to understand the _why_). AI can only provide the latter.

AI is how we get to "big-O(1) is good because we were told its good"

AI can explain the why. You need to use judgement to decide if it's right or not, but you can absolutely learn these things, and you have functional code that you can take apart and test to validate your understanding.

If you're just taking the AI's statements for granted, sure, you learn nothing, but you don't have to do that.

With the recent news of AI sandbagging its users based on whatever the big labs are scared of that week, I wouldn't trust the why. That's what the DSA book is for!