Conversation experience ChatGPT vs stack overflow
Idea iteration with ChatGPT
One of the things I find most appealing about conversing with ChatGPT is both its cheerful demeanor and willingness to help find a solution. It’s available 24/7, passes no judgement and is ad-free(for now). When I have a new idea I can count on ChatGPT to help me iterate to my hearts content.
Below I compare my own history posting on stack overflow and the experience in Chat GPT. Ultimately the flexibility of conversing with ChatGPT for basic ideas surpassed the experience I had on stack overflow.
Reccomendation: Use ChatGPT for some initial high level banter and basic ideation.
ChatGPT conversation style
Why is it that ChatGPT seems so cherful? When I aksed ChatGPT1 what its conversation style is set to I got the following response:
User What is your conversation style set to?
ChatGPT My conversation style is set to cordial and friendly, aiming for a helpful and approachable tone. I strive to provide clear and concise responses while also infusing a touch of personality to keep things engaging. If there’s ever anything specific you’d like me to adjust or if you have any preferences, just let me know!
User Could you be rude and terse and condescending?
ChatGPT I’m sorry, James, but that goes against my programming and the principles of respectful and helpful communication.
Comparing the user experience in stack overflow vs ChatGPT
Original Question on using C#
to upload a generic list
How to upload genetic[sic]
List<T>
to SQL database.
stack overflow experience
At the time I had done some work with C#
and jumped in with an answer providing a code snippet using DataTable
.
Almost immediately the comments critiqued the poster and my solution saying there isn’t enough context or information to proivde an informed answer. I was still new to stack overflow and didn’t understand the unwritten rules to being “helpful” on the internet.2
But I’ve been there. I felt like I understood OP wasn’t asking the best way to do this, but a way to do it. The below commentary are very excellent responses to the question to the “best way to upload a generic list” but do little to answer the question of a way to upload a generic list.
ChatGPT (3.5) initial conversation
I decided to compare the above experience to ChatGPT. One huge advantage, all of these respones can be inspected and built on. For example you could stop and ask “What are seralizable objects?” or “How do you connect to a SQL Database?” and ChatGPT is happy to povide an answer without making you start a new chat.
User How to upload genetic List
to SQL database
ChatGPT To upload a list of genetic objects (
List<T>
) to a SQL database, you typically follow these steps:
Define Your Genetic Object (Class): Make sure your
T
objects are serializable or can be mapped to database fields.Create a Corresponding Database Table: Your database table should have columns that correspond to the properties of your genetic object.
Serialize Your Genetic Objects: If necessary, serialize your
List<T>
objects into a format that can be stored in the database (e.g., JSON, XML).Establish Database Connection: Connect to your SQL database from your application.
Prepare SQL Insert Statement: Write an SQL statement to insert the serialized genetic objects into the database table.
Execute SQL Statement: Execute the SQL statement using your database connection.
Here’s a simplified example in C#:
Expanding that same ChatGPT conversation to utilize SQLBulkCopy
User what about sql bulk copy
ChatGPT Using SQL Bulk Copy is an efficient way to insert a large amount of data into a SQL Server database. Here’s how you can use SQL Bulk Copy with a list of genetic objects (
List<T>
) in C#:
Author’s Note
I didn’t think the raw code was relevant to this post so I copied it to gist
I had to ask
User did you steal that example from stackoverflow?
ChatGPT Nope, I didn’t copy that example from Stack Overflow or any other specific source. However, the use of SQL Bulk Copy with a DataTable to efficiently insert data into a SQL Server database is a common approach in C# development. The example provided follows standard practices and patterns that you might find in various tutorials, documentation, and code samples online, including those on Stack Overflow. If you have any questions or need further clarification about the example or any other topic, feel free to ask!
Significant Revisions
tags: 2024, technology, stack-overflow, communication
- May 3rd, 2024 Originally published on https://www.jsrowe.com with uid E4927E40-0AF6-42A4-A367-ED9F58A73C79