NotePD Loader
Ideas Post

10 ways that large language models give developers superpowers

I am a developer and have been using LLMs (Chat GPT) to help me daily. LLMs are VERY good at writing code. It is especially helpful for developers because developers already know how to ask the correct questions.

10 ways that large language models give developers superpowers

    1. If you think something is possible, and can describe it, large language, models can make it happen in any computer language

    If you can describe what you want, the LLM will give you answers in Python, PHP, bash, JavaScript., or any other of dozens of languages.

    2. It knows ALL the commands: it read the manual

    I have my go-to methods for manipulating strings and so on, that I have used for many years. They are not always the most optimal. Large language models frequently surprise me with what they come up with for a solution.

    Habits and prior knowledge do not limit LLMs.

    3. it is great for terminal commands

    For example, you can ask it to give me a list of all files, larger than 5 MB ordered by size descending. Here is what it produced on the first try (this works)

    find /path/to/search -type f -size +5M -exec du -h {} + | sort -rh

    Because it has memorized the MAN pages and "understands" it can give you the best arguments that you may not be aware of.

    It also knows how to be helpful. Without explicitly asking, it added the h flag to sort, which tells the system to give you human readable file sizes

    4. It can help with GIT commands

    After a few minutes of iterations, it gave me a one-line code to list all of the branches that I had not committed to in more than a month and delete them.

    5. It can tell you why things don't work

    You can try something that it suggests and just paste the error message that you got back to it and it will help you fix it.

    6. It is great for improving your language skills

    For example, I don't write very many bash scripts. Today in about an hour I wrote a script that would log onto remote servers and save the last line from a deployment log file into a variable and echo it back out so I could paste it into an email report.

    The solution it came up with was elegant and about 10 lines of code. I learned how to manage arrays in a shell script. It is hard to describe how much easier it is to grok a new computer language when you see YOUR problem solved in an elegant way instead of starting at "hello world."

    7. It is great for spreadsheet macros

    I asked it to write a spreadsheet formula that would count all of the occurrences of each string in a particular column. I don't use spreadsheets in fancy ways very often but it opens up new possibilities.

    8. It can write SQL statements using the schema that you provide

    For example, you can tell it that you have a users table with a favorite color field and a products table with a color and ask it to join the two tables on the color field. It will give you an answer using the EXACT FIELD NAMES that you gave it. This becomes much more powerful when you realize that you can ask more complex queries like give me a list of all of the toy cars filtered by the users, favorite color sorted by price, Joins, COUNT(*) of specific fields etc.

    9. it is great for code completion

    I use GitHub Copilot. It is way off about 10% of the time, needs a little tweaking 30% of the time, nails it 50% of the time, and blows me away with how much better its solution is than mine about 10% of the time.

    10. It is great for writing unit tests

    You can tell it to write a function and then write the test or paste a function and ask it to write tests.

    11. It is a good partner for improvisation/pair coding

    This may seem weird to people who don't code, but in certain ways coding can be very creative and people compare it to writing music or poetry. Lots of bad code is like a freeform jazz Odyssey.

    You can ask it to give you some results, and then think about more results.

    I wrote this in about three hours using ChatGPT just to see what could happen:

    This started from a completely blank slate. ChatGPT created the SVG keyboard, and I worked with it to get the interaction.

0 Like.0 Comment
Comments (0)

No comments.