I had an XML file format, I needed it converted to JSON. I haven't parsed XML in over a decade, and I didn't want to relearn. I also didn't want to match up XML fields to JSON fields. Both file formats had well defined schemas available, but were also common enough that most major LLMs were trained on them.
I just asked Claude to write a program to convert from one file format to another.
There is no joy in that task. Doing it myself would have been the very definition of a useless chore.
In 2 days, GPT, Claude and Llama 3 helped me solve 4 different problems. 1) I wanted to load in a webpage a json file, parse and read it, using Rust + webassebly. GPT solved it in 10 minutes. 2) Then i wanted to use this code and make it as a Chrome browser extension. GPT solved it as well. 3) Then i wanted to parse recursively directories with Rust source code, run tree-sitter queries, get the points and print matches, not with cli but using the libraries. GPT solved it in an hour. 4) Right now i finished analyzing a git repo, and fetching all branches and commit messages using git2. Llama 3 + Claude Sonet solved it in an hour or two.
DHH did an interview yesterday [1] in which he mentions that he will be programming by hand even if everyone else uses A.I. assistance. I think he is pretty smart and he will not be stuck in the era of meaty fingers pressing keyboards to make programs.
Perhaps there is no reference implementation in Pancake Stack, but your language has to be quite arcane to not have something available.
Was it correct?
How did you know?
Aside from that; Following logic as you develop it vs following logic as you read it are two different skills. Also, with the latter, it's easier to miss details. Further, when you're not experienced on the subject of the code, it's critical to develop an understanding by doing, and not only by reading. Further still, following the logic of genAI code is complicated by the fact that AI can make different mistakes than humans do, and it speaks/documents with much more authority, both of which make it not only more difficult to spot issues, but make it difficult in a frustrating way, reducing energy and satisfaction.
I could get a little bit of benefit out of an autocomplete that only showed legal suggestions, but even with deterministic autocomplete I frequently had to look at too many suggestions and it was faster to throw a query at Google.
For a practical example, lets say I define protobuf models, I start by writing
```
service X {
rpc doSomething([cursor]
}```
It'll generally be smart enough to complete to the same pattern as every other one in the codebase
I can then put my cursor after and get it to generate the models by just tabbing a bunch:
```
service X {
rpc doSomething(DoSomethingRequest) returns (DoSomethingResponse);
}[cursor]
```
```
service X {
rpc doSomething(DoSomethingRequest) returns (DoSomethingResponse);
}message DoSomethingRequest {}
message DoSomethingResponse {}
```
Then I can go to my actual code file where this is implemented, and having had both the context of the codebase and the context of the protobuf file, it'll generate
```
class DoSomethingImpl extends some.grpc.package.DoSomethingService {
override def doSomething(request: DoSomethingRequest): Future[DoSomethingResponse] {
// Some usually bad code I just delete
}
}```
Nothing here is super complicated, I know it's right at a glance, it's super easy to write, but I hate having to do the boilerplate. Could I write a simple script that kind autogenerates this for a given API? Maybe. But a bunch of typing and piping things around becomes just a bunch of "tab" presses. And an LLM is more flexible to slight changes in the pattern.
This is multiplied times 10 if I then want to consume this from some other language, and it has both in it's context. I literally just need to create the one definition, and the LLM will complete the required code to product / consume the API on both sides as long as it's all in the same context window (and tools are getting good at doing this)
What I really want now is to just have to say "Add a proto api for `doSomething` and add boilerplate to give a response and then consume it. Put it in X existing grpc service" and just have it do all of this without a series of smaller completion.
It's mostly full stack web applications, with React frontend and APIs with databases, so it's not exactly something groundbreaking.
Every time I play with web or GUI development I get the impression that the languages and systems are misaligned with the way people express their intentions in the space. It makes me want to develop a language (or family of languages) directly for expressing GUI concepts, but I don't understand the space well enough to do a good job.
And sometimes if you do abstract it away too much, edge cases handling and everything affecting everything else might not be worth it.
I also think with Copilot in the house, it's completely acceptable to have it write utils fn even if they are not DRY, in the sense that you could import leftPad as a package, but it doesn't matter since you can just write function leftP and copilot will do it for you within few seconds, which is faster and more flexible for the future. And without unnecessary, unknown dependencies with potential vulnerabilities baked in.
I think there's going to also be some sort of enlightening in terms of overusing libraries and idea of everything having to be DRY. Because frequently this will cause more problems than it wins even though you think the code is really, really clean.
Typing the code yourself incentivizes you to write code that's concise and easy to read and avoids repetition.
And of course the fact that each heading has exactly 2 paragraphs in similar lengths and the overall tone as well.
The whole blog including the other articles looks like AI generated.
Even if I were unfamiliar with a new keyboard, I'll still never use it. Instead, I'll consult the technical guides and follow examples.
I like typing, and I neither need nor want a word processor to do it
Certain things may seem strange, or that they take away from the experience, but sometimes it is simply progress... good or bad.
I noticed that too, found it quite ironic =)
I still read the docs and examples because it isn't reliable enough to tell me accurately how to use most packages. It's absolutely a mess of flaws and sharp edges so I get the hesitation in using it, and for sure it has allowed less than stellar coders to confidently present steaming trash heaps with a pretty bow on top, but I don't think it's always fair to assume using AI tools means being less involved with the code you produce.
Or take requirements and propose extensible design patterns. There aren't many design patterns per se but that task has a lot of value. Perhaps the most value.
Also an AI that can find similar concepts using different patterns where they should be consolidated. This could even be for something "as simple as" file access. So many bugs and issues due to one person not knowing how to access resource X.
I think that code generator models need to understand the abstract syntax tree, like using treesitter to better understand the structure, and as you said, the patterns involved in the code. Plus generators could then check that their new code correctly implements a pattern.
I'd love to be able to feed a repo into a model and get documentation and diagrams out of it.
This will sound extremely harsh; but I noticed I strongly favour colleagues who do use AI-assisted tooling over those who do not. The PR, documentation and code just looks cleaner.
So if it comes to who I favour working with; it's usually people who rely on AI-tools. They deliver code I like maintaining more.
It’s a very useful tool to see how to do something a different way, and sometimes it’s surprising and has some really good ideas!
The problem is people expect these tools to “just do it”, but that doesn’t work. You need to iterate—if it makes a mistake, nudge it in the right direction and you’ll find it knows how to intelligently adjust where it goes wrong.
q 'write a an article called "Why Copilot is Making Programmers Worse at Programming"'
1. Introduction: In recent years, the use of Copilot has become increasingly popular among programmers. While Copilot can be useful in certain situations, it is also making programmers worse at programming in several ways.2. Lack of critical thinking skills: When using Copilot, programmers may rely too heavily on the tool to generate code for them. This can lead to a lack of critical thinking skills and an inability to solve problems independently.
3. Overreliance on automation: Copilot is designed to automate certain tasks in programming, which can lead to an overreliance on automation. While this can be helpful in some cases, it can also make programmers less able to think creatively and outside the box.
4. Dependence on a single tool: Copilot is just one tool among many that programmers use to write code. By becoming too dependent on a single tool, programmers may be less well-rounded in their skills and less able to adapt to different programming environments.
5. Lack of creativity: When using Copilot, programmers may not have the opportunity to be creative with their code. This can lead to a lack of originality and an inability to come up with innovative solutions to problems.
6. Inability to learn from mistakes: With Copilot, programmers may not have to deal with as many errors in their code. However, this can also make it harder for them to learn from their mistakes and improve their programming skills.
7. Lack of attention to detail: When using Copilot, programmers may be more likely to overlook small details in their code. This can lead to bugs and other issues that could have been caught with a little more attention to detail.
8. Conclusion: While Copilot can be useful in certain situations, it is also making programmers worse at programming in several ways. By becoming too dependent on the tool and not developing critical thinking and problem-solving skills, programmers may be less well-equipped to handle more complex programming tasks. It is important for programmers to use Copilot as a supplement to their existing skills rather than a replacement for them.
mistral-7b-instruct-v0.1-Q4_K_M-main.llamafileWhat I see is that new programmers do use it extensively though and if the service is down they often remain helpless. Still think it is a very good support in the beginning as long as some knowledge remains retained, which it very likely will.
LLM code generators are a problem for those who write code for a living, not for pleasure. They may well eventually be forced to use such systems, whether they like it or not. When your paycheck is on the line, you will conform.
For those who both enjoy writing code and have to do it for a living, their everyday jobs may just get a lot more tedious and boring than they are right now.
Im pretty sure I will enjoy riding horses. But if I have to deliver things to people, I think I will be using a truck.
I will personally never use Copilot, or any other AI code generation tool, for the simple reason that I enjoy writing code.
Even if I were unfamiliar with a new language, I'll still never use it. Instead, I'll consult the documentation and follow examples. I like coding, and I neither need nor want a machine to do it for me.
It's exactly the same as writing English. There is great pleasure to be found in writing, it's worth your time. Just be careful when doing so to not end up sounding exactly like ChatGPT.