6 ms·
> You do realize that the code you see regurgitated is most likely some permuted variant of a question/answer on Stack Overflow or a pull request on Github, rig
by wizeman 4y ago
> You do realize that the code you see regurgitated is most likely some permuted variant of a question/answer on Stack Overflow or a pull request on Github, right?
What do you think coders do?
Did they learn to code by themselves, without ever looking at any preexisting code, or what?
- wizzwizz4 4y ago> What do you think coders do? I've seen enough programmers who can't program, but most of them can at least be taught to program. (The look on their faces when they finally start to get it… It's one of the best things.) Most people working on the Linux kernel can actually program. Most software engineering work is just plumbing existing libraries together, according to a specification given by a non-programmer. The hard part is translating the business requirements into something that a computer could understand; the exact syntax can be handled by a search engine, or a predictive text algorithm. ChatGPT can't write a kernel device driver, and it can't act as a no-code tool for non-programmers. Those are the hard parts. > “To tapping machine with hammer, 10s.; to knowing where to tap it, £10; total, £10. 10s.” https://quoteinvestigator.com/2017/03/06/tap/ https://quoteinvestigator.com/2017/03/06/tap/
- wizeman 4y ago> ChatGPT can't write a kernel device driver, and it can't act as a no-code tool for non-programmers. Those are the hard parts. Oh, do I have news for you then. Look at what I just did with ChatGPT in 30 seconds (and I did not cherry-pick, these were the first answers I got!): https://gist.github.com/wizeman/b269be035308994be745025fc3378f04 https://gist.github.com/wizeman/b269be035308994be745025fc337... Now to be fair, the code is probably not totally correct, as probably there are parts still missing/wrong and there might even be compilation errors or other problems. But here's the important part: you can tell which errors or problems you've observed and ChatGPT will fix these problems for you. Exactly like what a programmer does. And sure, it cannot yet do this at scale, such as in implementing a huge kernel driver like a GPU driver. But at this rate, give it a few years and an improved version might just be able to do anything a programmer does, perhaps even autonomously if we allow it to interact with a computer like a human does.
- dvt 4y ago> Look at what I just did with ChatGPT in 30 seconds (and I did not cherry-pick, these were the first answers I got!): Weird flex, as that code is like 90% boilerplate[1]. Everyone was freaking out about Copilot and no one seriously ended up using it because it just generates buggy (or copyrighted) code. It can't even handle writing unit tests with decent coverage (which is arguably the most repetitive/boring software engineering task). [1] https://github.com/ngtkt0909/linux-kernel-module-template/blob/develop/00.hello/src/hello.c https://github.com/ngtkt0909/linux-kernel-module-template/bl...
- dragonwriter 4y ago> no one seriously ended up using it [citation needed] I mean, I’ve seen people claiming to use it and that it has significantly accelerating their work. On what are you basing the conclusion that it has no serious use?
- vbezhenar 4y agoI do use it and I'm very picky when it comes to writing code. Here's example of tiny webapp I wrote recently: https://github.com/vbezhenar/pwgen/blob/main/pwgen.html https://github.com/vbezhenar/pwgen/blob/main/pwgen.html Of course it wasn't Copilot writing it, but it definitely helps with boring parts. Like I'd write const charactersElement = document.getElementById('characters'); and rest 10 lines will be written with Copilot with minimal assistance. It's like having stupid but diligent assistant who's happy to copy&paste&adapt parts of code. I can't claim that I often use fully generated Copilot functions. Sometimes I do, often with significant rework, but that's because, as I said, I'm very picky. I paid GitHub $100 already and don't regret it. Though I think that Copilot has plenty of features ahead. For example finding obvious issues in the code would be very useful. Like typos. Another issue with Copilot is that it only generates new code. Imagine that I need to edit 10 similar lines. I edit one line and I'd like Copilot to offer other edits. Also UI is lacking. Like it generates 10 lines but I only like first line. Now I have to add 10 lines and delete 9. But I'm sure that those are obvious directions.
- 4y ago
- pphysch 4y agoDeveloping OS is just plumbing already existing syscalls together... Developing the Linux kernel is just plumbing already existing CPU instructions together... Developing a CPU is just plumbing already existing electronic components together... Developing an electrical component is just manufacturing with already existing materials...
- valenterry 4y ago> The hard part is translating the business requirements into something that a computer could understand No, that's actually the easy part. The hard part is to translate the requirements into something that a computer can understand and a human can also easily understand at the same time. Because otherwise, it's a one-off program that can't really be changed afterwards anymore. And that is the real challenge that I'm curious about: how good will ChatGPT be in not only helping me with small, trivial, issues, but with the big ones. "ChatGPT, here's this small 500k line repository. I need to change the business requirements and make it so that when a user fails to login 3 times in a row, a captcha is being shown before they can attempt again." And if ChatGPT then gives me a 10k line diff that would be terrible. It should really minimize the diff but still keep it understandable. THAT is what I would love to see.
- delusional 4y agoHow do you think programming actually began?
- philjohn 4y agoI started programming in the 80's on a Commodore 128. I had the Commodore BASIC manual, and just went from there.
- wizeman 4y ago> I started programming in the 80's on a Commodore 128. I had the Commodore BASIC manual, and just went from there. ChatGPT can also learn about Commodore programming if you feed it the Commodore BASIC manual during training. My guess is that it could learn even more/better if you'd allow it to interact with a Commodore 128 computer like you did when you were learning!
- Baeocystin 4y agoNo need to feed it. I had it converting between the C=128's BASIC 7 and C=64's BASIC 2 without any additional context. Did a better job than 14 year old me had done back in the day, too.