[LinuxSIG] ChatGPT to write code [was: Re: bash_httpd.sh]

Craig Miller cvmiller at gmail.com
Sat Mar 2 14:04:42 PST 2024


Ron,

Good to hear you are having better luck than I. I suspect that 'bash' is 
low on the list of programming languages, and that is why AI models fair 
so poorly. There just isn't enough training data, compared to language 
like Python, or apparently, even SQL.

Craig...

On 3/2/24 12:36, Ron / BCLUG wrote:
>
> Another instance where ChatGPT gave invaluable help in coding was with 
> an SQL problem I was having with joining 3 tables.
>
> I tried every combo of left join & right join, I tried CTEs, 
> subqueries, and I just could not get it to work.
>
>
> Hours were spent trying to get a solution and I was left questioning 
> my SQL knowledge.
>
>
> Interestingly, it took the table structure from this:
>
>> The tables:
>>
>> Table: Students
>>
>> +---------------+---------+
>> | Column Name   | Type    |
>> +---------------+---------+
>> | student_id    | int     |
>> | student_name  | varchar |
>> +---------------+---------+
>> student_id is the primary key (column with unique values) for this 
>> table.
>> Each row of this table contains the ID and the name of one student in 
>> the school.
> >
> > ...
> >
>
>
>
> The solution it spat out used a cross join and worked perfectly.
>
>
> A thousand online searches all lead to variations on basic "how to 
> join 3 tables", making them useless.
>
>
>
> Again, incredibly impressed.
>
>
>
> This was ChatGPT 3.5 from about a year ago.
>
> rb
>
-- 
IPv6 is the future, the future is here
ipv6hawaii.org



More information about the LinuxSIG mailing list