Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What surprises me is the amount of programmers and analysts that I meet the don’t do this yet. Writing complex, useful SQL queries is probably the most valuable thing that ChatGPT does for me. It makes you look like a god to stakeholders, and “I’m not strong in SQL” is no longer an excuse for analysis tasks.


Same for excel - I suck at it but ChatGPT is really good at writing these formulas. I feel this is one area LLMs are pretty good at.


I've noticed this as well. Do you have any theories as to why that is?


I think a lot of people tried just asking GPT-3.5 to "Write me full stack web app no bugs please." when it first came out. When it failed to do that they threw up their hands and said "It's just a parrot."

Then GPT4 came out, they tried the same thing and got the same results.

I keep seeing comments regarding it not being helpful because "super big codebase, doesn't work, it doesn't know the functions and what they do."

...so tell it? I've had it write programs to help it understand.

For example: Write me a Python program that scans a folder for source code. Have it output a YAML-like text file of the functions/methods with their expected arguments and return types.

Now plug that file into GPT and ask it about the code or use that when it needs to reference things.

I've spent the last year playing with how to use prompts effectively and just generally working with it. I think those that haven't are definitely going to be left behind in some sense.

It's like they aren't understanding the meta and the crazy implications of that. In the last year, I've written more code than I have in the last 5. I can focus on the big picture and not have to write the boilerplate and obvious parts. I can work on the interesting stuff.

For those still not getting it, try something like this.

Come up with a toy program.

Tell it it's a software project manager and explain what you want to do. Tell it to ask questions when it needs clarification.

Have it iterate through the requirements and write a spec/proposal.

Take that and then tell it it's a senior software architect. Have it analyze the plan (and ask questions etc) but tell it not to write any code.

Have it come up with the file structure and necessary libraries for your language.

Have it output than in JSON or YAML or whatever you like.

Now take that and the spec and tell it it's a software engineer. Ask it which file to work on first.

Have it mock up the functions in psuedo code with expected arguments and output type etc.

Tell it to write the code.

And iterate as necessary.

Do this a few times with different ideas and you'll start to get the hang of how to feed it information to get good results.


Nail. Head.

The amount of code I now "write" (I've started calling it directing) and features I've put into my side projects has been more than the last 5-10 years combined this last year.

I successfully created a sold a product within 3 months. Start to finish, because of the productivity power I received.

People are misusing it.


I'm also using GPT-4 for my side projects. For the database specifically, I can write a short sentence describing my table. Then get GPT-4 to generate the SQL to create it, plus a TypeScript interface and data repository module for access with the methods and SQL for basic CRUD. If I need more than basic CRUD, it can usually create methods for that also.

Its also pretty good at generating basic tests, amongst other things.


Can you elaborate more on the product that you created and sold?


I think the main reason people don't do something like this more often is that this turns you from a "coder" to a "manager". Your task now is to serialize the issue and to ask the right questions / keep everything moving along.

I don't particularly mind because I cre more about building something than doing my craft but I can totally see how this will be different for many people.


Here's the philosophical conundrum: Do we prioritize learning new things (improve craft) or create value (build stuff)? The first used to lead to the second, but not as much anymore.


Yeah that's exactly it. You have to build up the proper context first. Get all the documentation to be nice and coherent and it will happily write beautiful code.


I already know SQL, and yes it can take time to form exceptionally complex queries, but ChatGPT doesn't seem to do those accurately (yet). CGPT is more useful for general programming languages where there's a lot more boilerplate.


I've found GPT-4 to be alot better than the free version of ChatGPT (which uses the earlier GPT 3.5).


It is. I should've mentioned that I don't have access to that. But I can still hammer out correct SQL faster than I can prompt ChatGPT.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: