6 ms·
This is useful, thanks. Since you're using this for learning, would it be fair to characterize this as asking the LLM to write code you don't already know how t
by koreth1 3y ago
This is useful, thanks. Since you're using this for learning, would it be fair to characterize this as asking the LLM to write code you don't already know how to write on your own?
I've definitely had success using LLMs as a learning tool. They hallucinate, but most often the output will at least point me in a useful direction.
But my day-to-day work usually involves non-exploratory coding where I already know exactly how to do what I need. Those are the tasks where I've struggled to find ways to make LLMs save me any time or effort.
- vineyardmike 3y ago> would it be fair to characterize this as asking the LLM to write code you don't already know how to write on your own? Yea absolutely. I also use it to just write code I understand but am too lazy to write, but it's definitely effective at "show me how this works" type learning too. > Those are the tasks where I've struggled to find ways to make LLMs save me any time or effort Github CoPilot has an IDE integration where it can output directly into your editor. This is great for "// TODO: Unit Test for add(x, y) method when x < 0" and it'll dump out the full test for you. Similarly useful for things like "write me a method that loops through a sorted list, and finds anything with <condition> and applies a transformation and saves it in a Map". Basically all those random helper methods and be written for you.
- koreth1 3y agoThat last one is an interesting example. If I needed to do that, I would write something like this (in Kotlin, my daily-driver language): fun foo(list: List<Bar>) = list.filter { condition(it) }.associateWith { transform(it) } which would take me less time to write than the prompt would. However, if I didn't know Kotlin very well, I might have had to go look in the docs to find the associateWith function (or worse, I might not have even thought to look for it) at which point the prompt would have saved me time and taught me that the function exists.