Live data from Hacker News

Ask HN: How do you use AI to get things done faster?

news.ycombinator.com

51–60 of 118 posts

Re: Ask HN: How do you use AI to get things done faster?

#51
I use it alot to help me write functions and small python scripts.

It helped me build a script that takes a wakeup word "GPT" or "Hey GPT" and then grabs the next words and sends it to the the GPT api and responds back with TTS.

Also, helped built some scripts to take notes from web pages, youtube videos, a mini chat window, FTP images from Dall-e and Pexels to my website.

had it write me script that can call GPT api to generate a list into a sqlite database then takes that list and calls GPT api with another prompt.

it helped me build a script that pulls my email from an imap account.

tons of bootstrap/css snippets for website widgets.

It helped me build a poormans vector database. I took a list of keywords got embeddings then saved it to a column in sqlite and ran it through a sentence similarity function to find the id of the closest match then had it mark the one as ignore.

.htaccess expressions for taking url slugs and redirecting to a posts.php page which is a real pain in the butt no way I could have done that without ChatGPT.

had it generate a regular expression cheatsheet.

Re: Ask HN: How do you use AI to get things done faster?

#52
I've been using phind.com as a replacement for Google.

It's been a mixed bag due to how quickly they iterate on the app (and introduce bugs). But lately they added their own Phind Model, which is free, has unlimited uses as opposed to GPT-4, and sits nicely in-between GPT-3.5 and GPT-4 in performance.

More often than not, it doesn't give a good enough answer, but it may nudge me in the right direction. For example, it may say some keyword that I can use to search for the right thing on Google, or cite sources that I can use to investigate further.

Re: Ask HN: How do you use AI to get things done faster?

#53
Mostly to get around bad docs. I need to implement things using libraries, services, and APIs that aren't well documented, but the source code is public, and people have written code against them, and ChatGPT has read all of the things that I would read (and more) to get to the point where I can use it, so I just ask it.

The 2021 knowledge limit is pretty annoying, since libraries change so often, but it's still very useful.

It's ALSO very useful for asking stupid questions that I don't want to waste someone's time with. Like for instance, in bash, when you redirect stdout to a file with > filename it works, and when you redirect stderr to stdout with 2>&1 it works, but when you try to redirect stderr to stdout and stdout to a file, it only works when you do it in this order:

command > filename 2>&1

it doesn't work if you do

command 2>&1 > filename

which feels more natural to me, so I asked ChatGPT why that is, and it explained that you have to consider it from a filehandle perspective and that if you look in /proc/pid/fd you can see that 2>&1 is really redirecting to the terminal, and > is redirecting from the terminal to a file.

I would have had to find someone deeply steeped in unix/linux fundamentals to explain that to me, or I could just ask ChatGPT. I've done the same thing again and again - how are HSMs really different than TPMs? How are heat pumps different than ACs?

I'll read a reference to something, and immediately go to ChatGPT to learn more - "Can you give me a brief summary of the writings and opinions of Cicero?" and then I can spend 20-30 minutes learning more about stoicism, epicureanism, and whatever else I'm curious about. It's like being able to interview wikipedia.

Re: Ask HN: How do you use AI to get things done faster?

#54
I use GPT4 like I would ask a question on StackOverflow. While my prompts are relatively long compared to a web search, I’ve found the results really good.

I usually state the problem, provide code context, motivations, and end with restating what I want as a result,why and a question.

Here is short example from my history:

—-

I have the following docker command to help me backup data from some containers.

```sh (omitted for brevity) ```

I want to improve it by not only copying and zipping all the related files in the container volume, but using pgdump to take a copy of the database before doing the copy and zip. How might I change the above to achieve this?

—-

This takes a lot longer than starting a web search but the quality of answers is high, and I find faster than wading through maybe semi related content farms,cookie dialog a, prompts for news letters etc.

One thing to remember is like StackOverflow answers, the code might not be up to date, or have bugs etc, as I test I feed issues back into it with any relevant context. I’ve started building a Jetbrains IDE plug-in around this workflow for myself with the ability to use self hosted models, improving it as I learn new tricks and find what workflows I prefer.

Re: Ask HN: How do you use AI to get things done faster?

#55
post #15

I like asking ChatGPT for things that I know I can understand, but do not feel like figuring out (today I asked it how to write a specific SPL template for API gateway transformations). I spent hours looking over the internet for someone that had done it before, and then ChatGPT just spit out exactly what I was looking for (after two extra requests to better indicate my intentions).

Oh yeah, unless I know I need to interact with a website or view pictures, if I want to know the answer to a thing, I just go to ChatGPT now and talk to it. Way faster and the signal to noise ratio is incredible.

Re: Ask HN: How do you use AI to get things done faster?

#56
post #4

I do one-off text transformations that not worth writing a script for. Eg. paste a bunch of unformatted data and format them in json, find patterns in huge text etc.

> find patterns in huge text etc.

Oooooh that's interesting. Can you tell me more about what kind of stuff you use it to find?

Re: Ask HN: How do you use AI to get things done faster?

#57
I use it (LLMs / GPT-4) as a sort of "realtime intern" to offload the more commoditised tasks that I don't really need to do - and that I don't contribute unique value to by doing myself. So some boilerplate CSS layout code, sketching out unit tests, initial stubs of API client code. Lots of "filling in the gaps" - which frees me up to spend more time thinking about higher level architecture, structure, business problems, abstraction/refactoring, planning, design etc.

Due to the way my brain seems to work, it also keeps me from getting stuck on small distracting problems which would previously create some resistance or procrastination - causing a break in my flow of work. It essentially keeps me in a productive flow state for longer periods than I could sustain without it. Any problem that is not in my "critical path" that I want to be focused on in the moment, and that could be easily solved by an LLM, gets "outsourced" as such.

This is in addition to it replacing about 80% of my software development / devops related Google searches. Because I work across quite a wide range of disciplines, I'm often looking for quick answers to questions about some technology stack that I'm not using daily. It's perfect for that. And I have enough familiarity with what I'm working with to sense-check/QA the responses.

I believe you do need some subject matter knowledge and experience to get the best out of LLMs though. I think many people are verbatim copy/pasting code out and complaining when it doesn't work. I very rarely find I waste any time debugging or correcting problems - because I either spot them and correct them in real time - still saving me a lot of time regardless - or I structure my prompts in a way that avoids these problems in the first place - by breaking the request down in to granular enough parts that I can pretty much predict how accurate the response will be (most of the time; very).

And in the scenarios where there is a bit of back and forth, trying different ideas and debugging in realtime - this is almost always a much faster (net) process than if I had done the same iteration myself.

As a point on usage and confidentiality, I don't use integrated coding assistants like Copilot - everything I do is sandboxed - so nothing confidential goes into the LLM. Specific details in my prompts are "anonymised" as I enter them (as in, I self-censor) - so I get the benefit of a lot of assistance from LLMs but with no sharing of any information that I would deem confidential. I plan to experiment with tighter integration into my workflow (eg. Copilot type assistance) with a private LLM instance at some point, but I'm comfortable with the balance of productivity and confidentiality at this point.

I do also have a Hammerspoon shortcut that will take the currently highlighted text in any app, and send it directly into OpenAI's endpoint. So I can highlight a mixture of comments and/or code in my IDE and immediately send them to GPT-4 and have that highlighted text replaced (or appended to) by the response. This gives me contextual assistance without having a constant live feed into a proprietary LLM ala Copilot.

Re: Ask HN: How do you use AI to get things done faster?

#58
I've been a software engineer for decades and I still use it daily for that purpose.

It's like having superpowers. Even if I know how to do something, sometimes explaining it is easier than writing out all of the code. An example recently would be in a TypeScript project when a class-based approach to something was deprecated, in favor of a functional approach. I only had to paste the old function signature and say "convert this to an arrow function". That already is less typing, but after that I was able to paste the other examples and say "do the same with this" and they were all correctly quickly converted. Was it easy to do myself? Yes. Was it faster to do myself? No.

Or, I may not know how to do something. In a toy desktop project I had in C#, I wanted an image to fade to greyscale and then fade out. That, I had no idea how to do. So I simply told it that, and added "optimized for performance", and it gave me a function including a hard-coded object that instantiated an array of arrays with certain values. Where did ".3f, .59f, .11f" come from? I don't know, and that point I didn't care, because the whole thing worked perfectly on the first try. In this case, a project for myself, only the result mattered. I did go read the documentation later to see why that works, just out of curiosity. Plus, it explained it ... and was right.

Obviously I review the code and am careful what I send it, but if it's going to shave minutes off my day every time I use it, this stuff adds up.

Re: Ask HN: How do you use AI to get things done faster?

#59
post #14
post #10

As a web developer who manages his own servers, ChatGPT has been a godsend for things like creating Ansible roles and docker / docker compose files.

Why is a web developer managing their own servers in 2023?

Mainly cost. I also don't mind the insane performance of bare metal :)

https://world.hey.com/dhh/we-have-left-the-cloud-251760fb

Re: Ask HN: How do you use AI to get things done faster?

#60

I think to get good value out of it you really have to get a sense for what it's good for and what it's not. I don't have it write my day to day code, because that's complicated and usually niche enough that it's not likely to give a good result. But it's awesome for something like writing a quick and dirty shell script. most recently I needed to bulk rename 50 or so files with an interactive piece for a special case…

> I think to get good value out of it you really have to get a sense for what it's good for and what it's not.

> I don't have it write my day to day code, because that's complicated and usually niche enough that it's not likely to give a good result.

Yep totally agree. I don't think you should just treat it as a black box - throw in literally any prompt you can think of and then use the response verbatim, without even reading it, and expect to have success.

You need to exercise some judgement and be a bit discerning. And think about what areas of your work are most unique to your own skills and experience, and what are the bits of work around the fringes that don't need to be done by you - and are not really part of your core "craft", and, are likely to be well suited to the capabilities of something like GPT-4.

And like every other tool, using it effectively is a skill and requires perserverance, practice, and adjusting your approach as you go. Which means the user can get better at getting value of out an LLM over time. It's not a static or all or nothing thing.

Post reply on HN