ChatGPT - A Versatile Solution for Numerous Tasks
By Armando Anglesey

ChatGPT - A Versatile Solution for Numerous Tasks

If you haven’t heard about how awesome ChatGPT is by now, I’m here to tell you, ChatGPT is pretty awesome. I’ve been using it regularly for a few weeks or so and it has saved me a lot of time, especially with mundane tasks. It isn’t perfect and there are a lot of limitations but there are also a lot of things it can do, things you wouldn’t expect or even think to ask it. Here are a few things I’ve used it for and how it has performed.

Coding and Scripts

I’ve used Codex before to help with coding and it was pretty good, but ChatGPT has been so much better. It particularly shines at small, specific tasks. I like that because much of the time, those are the tasks I hate doing. For instance, I needed a PowerShell script that deleted every zip file that started with a certain string (text, for you non-programmers). Easy enough to do on my own but I’m no PowerShell guru. Normally I’d have to spend maybe 10 minutes just looking up those few commands, writing it, and testing it. Maybe even up to half an hour. Now all I do is tell ChatGPT to write it and it spits out the code plus an explanation a few seconds later. It converted my batch scripts to PowerShell scripts just fine as well.

The other day, I had a list of dictionaries in Python and needed to remove each dictionary from the list that had a key with a specific value. That would normally take me a few minutes just to think about how to best approach it. The answer ChatGPT gave was adequate, using loops to iterate through the list, etc. But I know Python has something called list/dictionary comprehension. It’s a little more advanced and a bit harder to comprehend but much more concise. It had no problem rewriting it as a one-liner using list comprehension. Talking to ChatGPT is very natural as well and I can speak to it like a person, without having to word things in a way we are typically used to when dealing with machines. I asked it to zip a few folders in PowerShell. I looked at the answer and asked it if that would only zip up the contents of the folders, or it would include the folders themselves. It rewrote it to include the folders. When I asked for a script to delete the two folders and all the contents, it knew which folders I was referring to without me having to reference our previous conversation. I find it best to start small and make the tasks simple while you get a feel for what it can handle. It’s not going to do your entire job for you, at least not yet, but it’s really good at shaving off a few minutes from your tasks here or there and it adds up.

Queries

This one has been one of my favorites so far. While SQL queries can be challenging, they are more human-readable than most. MongoDB queries are not. They are formatted as JSON files and take some practice. Both are much easier with ChatGPT. It’s really as if you were talking to a database administrator and just explaining to them what you are trying to do. Your coworkers will probably think you are a SQL god.

String Manipulations and Writing

Anyone that has programmed for more than five minutes can probably tell you working with and manipulating strings can be deceptively difficult. There are a lot of tools for typical string manipulation tasks already, but ChatGPT can be more accessible or convenient to those that aren’t as tech savvy. Tell it to remove all the duplicates from a list, ignoring case. Give it a block of code and beautify it (format it to look pretty). Camel-case it if you want. As for writing, I haven’t had a chance to explore that myself, but I am told that is pretty powerful as well. You can tell it to write in the style of a certain author or genre. I read one article about how a group of realtors would feed it information on a house and it would write the description for the listing. That may seem trivial as those are very short but quality in writing takes time. Heck, I’m sure you can look back at some of my pieces and tell which ones were rushed. The realtor in the article said a listing can take up to an hour to write well but ChatGPT could do it immediately and they would then spend a few minutes tweaking it, saving hours a day. I don’t know about that personally, but one of these days I’ll try feeding it one of my articles to punch it up a bit.

Regular Expressions

For those that don’t know what they are, they’re like string manipulation on crack. Regular expressions are hard, at least for me. Sure, it’s easy enough to find one for a common use case like a phone number, but I dread ever having to write one from scratch. I almost always end up on stackoverflow.com asking for help. I recently had ChatGPT help me write one and while it took a while, it was much easier. I’d tell it what I needed to match, and it wrote an expression for me then I tested it on one of those regex testing websites. It over-matched but a little back and forth with ChatGPT, explaining the issue, and eventually it worked perfectly. Now regular expressions are more of a headache for me, rather than a migraine. In summary, my experience with ChatGPT was like talking to the most knowledgeable and polite tech support ever. It’s like Google but a person. I dread going to places like stackoverflow for help because, for one, there’s no guarantee anyone will respond. Also, it can take a really long time to describe your question and situation in such a way that it meets their standards, and you don’t get downvoted. It’s also really difficult to have a real conversation in that format. You can wait a long time for a response and people usually just answer the question and move on. There’s no back and forth. ChatGPT is more like talking to a coworker that’s an expert in their field. I don’t have to translate my questions into search-engine speak with ChatGPT. There’s less of a need to refine questions and I don’t have to scroll through search engine results. I’ve purposely thrown it some fairly vague or poorly worded questions and it keeps up. It’s free to use for now. They just added a subscription tier as well that gives you more queries and prioritizes your results over those using it for free. It’s been very popular, so the website has been slammed as of late but check it out: https://chat.openai.com.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了