Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over

Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over

What started out as a personal experiment, has quickly become a tool in my toolbox as a senior software engineer. Whether you’re a junior engineer or a seasoned vet, you need to learn how to collaborate effectively with ChatGPT

Photo by Alex Knight on Unsplash

There’s quite a few articles on the internet talking about ChatGPT and the implications it’s going to have on software engineering. Some have chosen to point out the gaps in the tool while others have focused on trying to make ChatGPT straight-up write code. In this article, I’ll show you one of the best use cases I’ve seen for this awesome tool — as a collaborator for designing software systems.

But before we start…

How should we evaluate the performance of an engineer (or AI) designing a system?

In Alex Xu’s book, System Design Interview, he describes the process of evaluating a candidate’s system design¹ based on how they-

  1. Analyze a vague problem
  2. Solve the problem step-by-step
  3. Explain the idea
  4. Discuss with others
  5. Evaluate and optimize the system

I believe these are great evaluation points, and most engineers would relate to these metrics, when designing systems for their day-to-day jobs. Over the last few weeks, I’ve used these to analyze ChatGPT’s performance and will use the same today when working through an example system design.

What’re we asking ChatGPT to design?

Today, I’m asking ChatGPT to help me with some backend system design. More specifically, I’m trying to build a social media and need to understand what to think about when designing the database. In a future article, we’ll try and do the same exercise for the API.

One point of clarification is that I’m treating ChatGPT just like any other engineer on my team — a collaborator — and not like a replacement for my own thinking/analysis and judgement. The goal is to use this new tool to supercharge my existing skills and be more efficient.

In the following two sections, I’ll share the conversation I had with ChatGPT and then analyze it.

A working session with ChatGPT

In the interest of word count, space and your time I won’t copy-paste my full conversation here. I’ll share the most insightful bits and the final SQL DDL generated by ChatGPT. Here’s the full conversation (powered by this awesome tool called ShareGPT) for those of you interested in the process.

I started with a high level ask –

And then dove in deeper –

After this, I asked some probing questions like –

As you can already see, this isn’t any different than working with any other engineer on your team. You start from the top, dive in as needed and ask probing questions. Finally, you ask them to do some research, make a decision and present their decisioning process to the team. You can see this in action below –

Wow. ChatGPT presented me with some options and when provided with some constraints was able to help me make a decision (with a well thought though explanation).

After this, I was satisfied with the state of the design so I asked it to help me design specific tables. An example of this can be seen below (note: the ERD link was bugging, but I didn’t mind)-

I repeated this for the remainder of the tables and concluded with asking it to help me write the SQL DDL of all the tables we discussed. The final SQL DDL of all the tables I discussed with ChatGPT can be seen below-

-- Users table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each user
username TEXT NOT NULL, -- User's username
password TEXT NOT NULL, -- User's hashed password
name TEXT NOT NULL, -- User's full name
profile_picture TEXT, -- Reference to user's profile picture (file name or URL)
email TEXT NOT NULL, -- User's email address
location TEXT -- User's location (optional)
);

-- Relationships table
CREATE TABLE relationships (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each relationship
user_id_1 INTEGER NOT NULL, -- ID of first user in the relationship
user_id_2 INTEGER NOT NULL, -- ID of second user in the relationship
relationship_type TEXT NOT NULL, -- Type of relationship (e.g. friend, follower)
status TEXT NOT NULL, -- Status of the relationship (e.g. pending, accepted)
created_at DATETIME NOT NULL, -- Date and time the relationship was created
FOREIGN KEY (user_id_1) REFERENCES users (id),
FOREIGN KEY (user_id_2) REFERENCES users (id)
);

-- Posts table
CREATE TABLE posts (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each post
user_id INTEGER NOT NULL, -- ID of the user who made the post
content TEXT NOT NULL, -- Content of the post (text, image, video)
type TEXT NOT NULL, -- Type of post (text, image, video)
created_at DATETIME NOT NULL, -- Date and time the post was made
updated_at DATETIME, -- Date and time the post was last updated
likes INTEGER DEFAULT 0, -- Number of likes the post has received
shares INTEGER DEFAULT 0, -- Number of times the post has been shared
comments INTEGER DEFAULT 0, -- Number of comments the post has received
FOREIGN KEY (user_id) REFERENCES users (id)
);

-- Comments table
CREATE TABLE comments (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each comment
post_id INTEGER NOT NULL, -- ID of the post to which the comment belongs
user_id INTEGER NOT NULL, -- ID of the user who made the comment
content TEXT NOT NULL, -- Content of the comment
created_at DATETIME NOT NULL, -- Date and time the comment was made
likes INTEGER DEFAULT 0, -- Number of likes the comment has received
FOREIGN KEY (post_id) REFERENCES posts (id),
FOREIGN KEY (user_id) REFERENCES users (id)
);

-- Likes table
CREATE TABLE likes (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each like
user_id INTEGER NOT NULL, -- ID of the user who liked the content
post_id INTEGER, -- ID of the post that was liked (optional)
comment_id INTEGER, -- ID of the comment that was liked (optional)
FOREIGN KEY (user_id) REFERENCES users (id),
FOREIGN KEY (post_id) REFERENCES posts (id),
FOREIGN KEY (comment_id) REFERENCES comments (id)
);

-- Analytics table
CREATE TABLE analytics (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each analytics record
user_id INTEGER NOT NULL, -- ID of the user who performed the action being tracked
action TEXT NOT NULL, -- Type of action being tracked (e.g. view, like, share)
object_type TEXT NOT NULL, -- Type of object on which the action was performed (e.g. post, comment)
object_id INTEGER NOT NULL, -- ID of the object on which the action was performed
timestamp DATETIME NOT NULL, -- Date and time the action was performed
FOREIGN KEY (user_id) REFERENCES users (id)
);

You can quickly see the value of the above exercise. Instead of starting from a blank page, I was able to leverage ChatGPT to talk me through some of the different aspects of the system and give me a generic set of tables/fields to start working with. From here, I can think about some business-specific logic we may have missed and modify the tables as needed.

Additionally, I was able to ask questions about different parts of the system, probe on some missed functionality and even ask it to make a decision given the budget of the project. Now that’s awesome!

Takeways

This isn’t a complete solution by any means. But you can use the same technique to dive into the other parts of the system — user authorization/authentication, performance, scalability, privacy, security etc. At the end of the day, it’s your responsibility as an engineer to combine your learnings from all these conversations, leverage any code ChatGPT produced and actually implement the system.

ChatGPT is a great tool for software engineers to add to their toolbox. While it’s not complete enough to replace your jobs, it can certainly take over some of the heavy lifting involved in ideating system designs. If someone has previously built the system you’re trying to build (especially if their code has a public footprint), there’s a good chance that ChatGPT can share some insights into it.

This means that engineers who learn to use this tool will become more efficient and build sh*t faster.

Thanks for checking out this article! Leave a comment below if you have any questions. If you enjoyed this article and would like to see more content like this, I’m building a mailing list of engineers, entrepreneurs and builders. Sign up for it below.

techbits – by Harsh Rana

[1]: https://bytebytego.com/courses/system-design-interview/foreword

Level Up Coding

Thanks for being a part of our community! Before you go:

🚀👉 Join the Level Up talent collective and find an amazing job


Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Harsh Rana

Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over

What started out as a personal experiment, has quickly become a tool in my toolbox as a senior software engineer. Whether you’re a junior engineer or a seasoned vet, you need to learn how to collaborate effectively with ChatGPT

Photo by Alex Knight on Unsplash

There’s quite a few articles on the internet talking about ChatGPT and the implications it’s going to have on software engineering. Some have chosen to point out the gaps in the tool while others have focused on trying to make ChatGPT straight-up write code. In this article, I’ll show you one of the best use cases I’ve seen for this awesome tool — as a collaborator for designing software systems.

But before we start…

How should we evaluate the performance of an engineer (or AI) designing a system?

In Alex Xu’s book, System Design Interview, he describes the process of evaluating a candidate’s system design¹ based on how they-

  1. Analyze a vague problem
  2. Solve the problem step-by-step
  3. Explain the idea
  4. Discuss with others
  5. Evaluate and optimize the system

I believe these are great evaluation points, and most engineers would relate to these metrics, when designing systems for their day-to-day jobs. Over the last few weeks, I’ve used these to analyze ChatGPT’s performance and will use the same today when working through an example system design.

What’re we asking ChatGPT to design?

Today, I’m asking ChatGPT to help me with some backend system design. More specifically, I’m trying to build a social media and need to understand what to think about when designing the database. In a future article, we’ll try and do the same exercise for the API.

One point of clarification is that I’m treating ChatGPT just like any other engineer on my team — a collaborator — and not like a replacement for my own thinking/analysis and judgement. The goal is to use this new tool to supercharge my existing skills and be more efficient.

In the following two sections, I’ll share the conversation I had with ChatGPT and then analyze it.

A working session with ChatGPT

In the interest of word count, space and your time I won’t copy-paste my full conversation here. I’ll share the most insightful bits and the final SQL DDL generated by ChatGPT. Here’s the full conversation (powered by this awesome tool called ShareGPT) for those of you interested in the process.

I started with a high level ask -

And then dove in deeper -

After this, I asked some probing questions like -

As you can already see, this isn’t any different than working with any other engineer on your team. You start from the top, dive in as needed and ask probing questions. Finally, you ask them to do some research, make a decision and present their decisioning process to the team. You can see this in action below -

Wow. ChatGPT presented me with some options and when provided with some constraints was able to help me make a decision (with a well thought though explanation).

After this, I was satisfied with the state of the design so I asked it to help me design specific tables. An example of this can be seen below (note: the ERD link was bugging, but I didn’t mind)-

I repeated this for the remainder of the tables and concluded with asking it to help me write the SQL DDL of all the tables we discussed. The final SQL DDL of all the tables I discussed with ChatGPT can be seen below-

-- Users table
CREATE TABLE users (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each user
username TEXT NOT NULL, -- User's username
password TEXT NOT NULL, -- User's hashed password
name TEXT NOT NULL, -- User's full name
profile_picture TEXT, -- Reference to user's profile picture (file name or URL)
email TEXT NOT NULL, -- User's email address
location TEXT -- User's location (optional)
);

-- Relationships table
CREATE TABLE relationships (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each relationship
user_id_1 INTEGER NOT NULL, -- ID of first user in the relationship
user_id_2 INTEGER NOT NULL, -- ID of second user in the relationship
relationship_type TEXT NOT NULL, -- Type of relationship (e.g. friend, follower)
status TEXT NOT NULL, -- Status of the relationship (e.g. pending, accepted)
created_at DATETIME NOT NULL, -- Date and time the relationship was created
FOREIGN KEY (user_id_1) REFERENCES users (id),
FOREIGN KEY (user_id_2) REFERENCES users (id)
);

-- Posts table
CREATE TABLE posts (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each post
user_id INTEGER NOT NULL, -- ID of the user who made the post
content TEXT NOT NULL, -- Content of the post (text, image, video)
type TEXT NOT NULL, -- Type of post (text, image, video)
created_at DATETIME NOT NULL, -- Date and time the post was made
updated_at DATETIME, -- Date and time the post was last updated
likes INTEGER DEFAULT 0, -- Number of likes the post has received
shares INTEGER DEFAULT 0, -- Number of times the post has been shared
comments INTEGER DEFAULT 0, -- Number of comments the post has received
FOREIGN KEY (user_id) REFERENCES users (id)
);

-- Comments table
CREATE TABLE comments (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each comment
post_id INTEGER NOT NULL, -- ID of the post to which the comment belongs
user_id INTEGER NOT NULL, -- ID of the user who made the comment
content TEXT NOT NULL, -- Content of the comment
created_at DATETIME NOT NULL, -- Date and time the comment was made
likes INTEGER DEFAULT 0, -- Number of likes the comment has received
FOREIGN KEY (post_id) REFERENCES posts (id),
FOREIGN KEY (user_id) REFERENCES users (id)
);

-- Likes table
CREATE TABLE likes (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each like
user_id INTEGER NOT NULL, -- ID of the user who liked the content
post_id INTEGER, -- ID of the post that was liked (optional)
comment_id INTEGER, -- ID of the comment that was liked (optional)
FOREIGN KEY (user_id) REFERENCES users (id),
FOREIGN KEY (post_id) REFERENCES posts (id),
FOREIGN KEY (comment_id) REFERENCES comments (id)
);

-- Analytics table
CREATE TABLE analytics (
id INTEGER PRIMARY KEY AUTOINCREMENT, -- Unique identifier for each analytics record
user_id INTEGER NOT NULL, -- ID of the user who performed the action being tracked
action TEXT NOT NULL, -- Type of action being tracked (e.g. view, like, share)
object_type TEXT NOT NULL, -- Type of object on which the action was performed (e.g. post, comment)
object_id INTEGER NOT NULL, -- ID of the object on which the action was performed
timestamp DATETIME NOT NULL, -- Date and time the action was performed
FOREIGN KEY (user_id) REFERENCES users (id)
);

You can quickly see the value of the above exercise. Instead of starting from a blank page, I was able to leverage ChatGPT to talk me through some of the different aspects of the system and give me a generic set of tables/fields to start working with. From here, I can think about some business-specific logic we may have missed and modify the tables as needed.

Additionally, I was able to ask questions about different parts of the system, probe on some missed functionality and even ask it to make a decision given the budget of the project. Now that’s awesome!

Takeways

This isn’t a complete solution by any means. But you can use the same technique to dive into the other parts of the system — user authorization/authentication, performance, scalability, privacy, security etc. At the end of the day, it’s your responsibility as an engineer to combine your learnings from all these conversations, leverage any code ChatGPT produced and actually implement the system.

ChatGPT is a great tool for software engineers to add to their toolbox. While it’s not complete enough to replace your jobs, it can certainly take over some of the heavy lifting involved in ideating system designs. If someone has previously built the system you’re trying to build (especially if their code has a public footprint), there’s a good chance that ChatGPT can share some insights into it.

This means that engineers who learn to use this tool will become more efficient and build sh*t faster.

Thanks for checking out this article! Leave a comment below if you have any questions. If you enjoyed this article and would like to see more content like this, I’m building a mailing list of engineers, entrepreneurs and builders. Sign up for it below.

techbits - by Harsh Rana

[1]: https://bytebytego.com/courses/system-design-interview/foreword

Level Up Coding

Thanks for being a part of our community! Before you go:

🚀👉 Join the Level Up talent collective and find an amazing job


Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over was originally published in Level Up Coding on Medium, where people are continuing the conversation by highlighting and responding to this story.


This content originally appeared on Level Up Coding - Medium and was authored by Harsh Rana


Print Share Comment Cite Upload Translate Updates
APA

Harsh Rana | Sciencx (2022-12-30T15:14:44+00:00) Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over. Retrieved from https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/

MLA
" » Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over." Harsh Rana | Sciencx - Friday December 30, 2022, https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/
HARVARD
Harsh Rana | Sciencx Friday December 30, 2022 » Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over., viewed ,<https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/>
VANCOUVER
Harsh Rana | Sciencx - » Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/
CHICAGO
" » Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over." Harsh Rana | Sciencx - Accessed . https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/
IEEE
" » Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over." Harsh Rana | Sciencx [Online]. Available: https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/. [Accessed: ]
rf:citation
» Move over 10x engineers — it’s time for the supercharged ChatGPT engineers to take over | Harsh Rana | Sciencx | https://www.scien.cx/2022/12/30/move-over-10x-engineers-its-time-for-the-supercharged-chatgpt-engineers-to-take-over/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.