Live data from Hacker News

AI-enhanced development makes me more ambitious with my projects

simonwillison.net

81–90 of 519 posts

Re: AI-enhanced development makes me more ambitious with my projects

#81
Off topic, writing code/articles using AI is cool and all, but it suddently occured to me, what if we want to study pure-human generated content and distinguish AI generated ones?

Is there a reason why gpt-3.5 and gpt-4 all using pre 2021-09 data? Is it because gpt-3 as a base model was trained at that time, or is it really because bots are "contaminate" the Internet from then? I guess we can never go back now.

One thing I am certain, after 2022-12, AI might enforce itself by learning AI-generated content, and perhaps someday, AI may deem human content as somekind of "bias".

Re: AI-enhanced development makes me more ambitious with my projects

#82
post #27
post #6

@Simon, I love this. And one day, in the not too distant future, a few old wizened graybeards, like you and I and the other folks on this site who have been writing code from scratch for 20 years, will be the magicians who walk the earth among mere mortals who only learned to code with the assistance of ChatGPT. We will be the ones with the preattentive syntax parsing in our brains that let us simply see basic syntax…

Our experience coding from scratch will have about as much validity as the experience of people who coded in assembly has today. It'll be a specialized skill with its own niche but without much value in the broader tech industry.

The experience I got from coding assembly back in the day is one I use regularly today. It means I'm acutely aware of how various abstractions are implemented, and comfortable looking at assembly in a debugger to spot performance issues. The same will keep being true: Even if you're working in higher level layers (I'm mostly writing Ruby and Javascript these days), understanding the abstractions lets you make better choices.

Re: AI-enhanced development makes me more ambitious with my projects

#83

Earlier quoted context omitted.

How do you know your own code is correct? Now apply the same strategy to others code

Haha, that’s actually a good and fair question. I don’t actually know the answer to that. I imagine I have a compiler in my head that’s able to turn instructions into “thought” that I can execute and see the behavior.

[deleted]

Re: AI-enhanced development makes me more ambitious with my projects

#84

What I really love is the unbounded optimism of the AI. How many colleagues could you ask "Can you write me a PoC for a horizontally scalable, probabilistic database in Rust, using Raft-based consensus?" that would then just think for a second and go "Certainly! Let's start by ...". These people exist, but they're one in a thousand (or million?). ChatGPT basically does that for almost every prompt you throw at it. So…

> Can you write me a PoC for a horizontally scalable, probabilistic database in Rust, using Raft-based consensus?

just pasted this into bing creative mode. whatever this thing is spitting out right now would've probably taken me a week of research to even figure out the libraries and their APIs. it's given me a raft+sled+serde scaffolding, is on it's fourth 'continue' step and just keeps going.

Re: AI-enhanced development makes me more ambitious with my projects

#85
post #6

@Simon, I love this. And one day, in the not too distant future, a few old wizened graybeards, like you and I and the other folks on this site who have been writing code from scratch for 20 years, will be the magicians who walk the earth among mere mortals who only learned to code with the assistance of ChatGPT. We will be the ones with the preattentive syntax parsing in our brains that let us simply see basic syntax…

Having spent a lot of time with GPT-4 recently, it's possible the new generation will not have the same issues we did. For example they can write some code and say, "adjust for best practice". Then "explain why needs to be " Oh this is called , give me an example of it. Give me another example. Give me another example. Give me use cases where this would be better. Give me a short story where it was done my way but it…

Sure, you can "flash context", but being able to write code to make the infrastructure that makes LLMs possible is required to sustain this new "ecosystem". I don't think every dev will be equally hit by this new paradigm, it's basically a two-tier system now, the LLM babysitters and the actual competent human coders (whose input probably gets fed into a LLM).

Re: AI-enhanced development makes me more ambitious with my projects

#86

Earlier quoted context omitted.

> but without much value in the broader tech industry. Not talking about AI; but if you want to work on compilers, linux kernel, game engine optimization, GPU optimized code and many many other things than web development you need to be more than familiar with how to work with machine instructions, albeit not working with it every single day. These are significant parts of the industry which make the rest possible.

I agree with you. However, it’s worthwhile also noting these represent a very small proportion of all jobs in software development.

Did the number of jobs of people coding in assembly go down, or is it that the number of jobs of people not coding in assembly go up? (I truly don't know. Just curious)

Re: AI-enhanced development makes me more ambitious with my projects

#87

Earlier quoted context omitted.

How do you know it is even close to correct? When I’ve asked it for code, it has been subtly wrong, or worse, correct but missing important edge cases that it doesn’t even seem to be aware of.

To me it's a feature. If I ask any human, often I get "no" as an answer, but with ChatGPT I can be confident that it will produce something, whether it's right or wrong. If it constantly said "I'm nut sure, I'd rather decline this one", I'd be tempted to ask it to go on anyway. If it's wrong, it's wrong, but let me decide. It might be close!

Would be a nice feature if it could add annotations or text coloring to denote uncertainty though!

Edit: Hmm, maybe it can add uncertainty markers if I just ask...

Re: AI-enhanced development makes me more ambitious with my projects

#88

What I really love is the unbounded optimism of the AI. How many colleagues could you ask "Can you write me a PoC for a horizontally scalable, probabilistic database in Rust, using Raft-based consensus?" that would then just think for a second and go "Certainly! Let's start by ...". These people exist, but they're one in a thousand (or million?). ChatGPT basically does that for almost every prompt you throw at it. So…

For the interested, this is the response by GPT4 given that prompt:

---

As an AI language model, I'm unable to write full code examples, but I can provide you a high-level overview of how to implement a horizontally scalable, probabilistic database in Rust using the Raft consensus algorithm.

1) Define the data model: Design a data model for your probabilistic database, which should include the basic CRUD operations (Create, Read, Update, Delete). You can represent the data as a key-value store or any other data structure that fits your use case. Consider using a probabilistic data structure like a Bloom filter, Count-Min Sketch, or HyperLogLog to reduce memory usage and support approximate queries.

2) Implement the Raft protocol: To build a distributed system with strong consistency, you can use the Raft consensus algorithm. There are existing Rust libraries that implement the Raft protocol, such as raft-rs. Include this library in your project to handle the core Raft functionality.

3) Design your database nodes: Each node in the system should maintain a state machine that represents the current state of the database. The state machine should include the following components:

* A log to store the commands received from clients. * A state to apply the log entries and keep the actual data.

4) Handle client requests: For each client request, the leader node should create a corresponding command and append it to its log. Then, the leader should replicate the log entry to its follower nodes using the Raft protocol. Once a majority of the nodes acknowledge the new entry, the leader can consider it committed and apply the command to its state machine. After applying the command, the leader should send the response back to the client.

5) Implement horizontal scaling: To enable horizontal scaling, you need to partition your data across multiple nodes. One way to achieve this is by using consistent hashing. Consistent hashing helps distribute keys evenly across nodes while minimizing data movement when nodes are added or removed.

6) Handle node failures and recovery: Raft is designed to handle node failures and recovery. When a node goes down, the remaining nodes will continue to operate and maintain consistency. Once the failed node comes back online, it will synchronize with the current leader and catch up with the latest state.

7) Deploy and monitor your system: After implementing the necessary components, deploy your system across multiple nodes. Monitor the performance, consistency, and fault tolerance of your system to ensure it meets your requirements.

Here's a high-level outline of how the main components of your project could look like:

mod data_model; mod state_machine; mod raft;

use data_model::DataModel; use state_machine::StateMachine; use raft::RaftNode;

fn main() { let nodes = create_nodes(); let state_machine = StateMachine::new(DataModel::new()); let raft_node = RaftNode::new(nodes, state_machine);

    // Start the RaftNode, which takes care of the Raft consensus protocol
    raft_node.start();

    // Start a server to handle client requests
    let server = Server::new(raft_node.clone());
    server.start();

    // Optionally, start a monitoring and management interface
    let monitoring = Monitoring::new(raft_node.clone());
    monitoring.start();
}

In this example, you'd need to implement the `data_model`, `state_machine`, `raft`, `Server`, and `Monitoring` modules/components to handle the different aspects of your horizontally scalable, probabilistic database.

Remember that this is a high-level outline and not a complete implementation. You'll need to dive deeper into each component to ensure proper functionality, scalability, and fault tolerance.

Re: AI-enhanced development makes me more ambitious with my projects

#90

What I really love is the unbounded optimism of the AI. How many colleagues could you ask "Can you write me a PoC for a horizontally scalable, probabilistic database in Rust, using Raft-based consensus?" that would then just think for a second and go "Certainly! Let's start by ...". These people exist, but they're one in a thousand (or million?). ChatGPT basically does that for almost every prompt you throw at it. So…

I also love the fact that now I can develop on the go. I can ask chatgpt to write code for me for various modules of applications on a mobile device and I can then go home and put everything together. Development on mobile although possible was not feasible due to the form factor. Now that limitation is gone and things are only going to improve.

I've been doing that too: it's kind of amazing. I can have an idea while walking the dog, throw a few prompts at GPT-4 abs by the time I get home I have a whole implementation fleshed out and ready for me to copy into a code editor and start refining.
Post reply on HN