Ausnahme gefangen: SSL certificate problem: certificate is not yet valid 📌 The newest must-have developer tool is ChatGPT

🏠 Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeiträge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden Überblick über die wichtigsten Aspekte der IT-Sicherheit in einer sich ständig verändernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch übersetzen, erst Englisch auswählen dann wieder Deutsch!

Google Android Playstore Download Button für Team IT Security



📚 The newest must-have developer tool is ChatGPT


💡 Newskategorie: Programmierung
🔗 Quelle: dev.to

Rather watch this as a video? Click here to view

You might be thinking: another article about ChatGPT? Really?

There's been no shortage of press dedicated to this tool, but let's get specific. Let's talk about how you can use it as a software developer.

I've been using this tool since its release. The output has been outstanding. It has made me better at software development. That's right, this tool has improved my work tremendously. Is it because now I generate all my code with ChatGPT and work 10x faster?

No.

But it has made me more productive. So I will share some tips with you that will help you learn more and leverage this tool for your software work.

What is ChatGPT?

Generative Pre-trained Transformer 3, or GPT-3, is a language processing model developed by OpenAI. ChatGPT is a GPT model trained on conversational data. It's designed to be a hyper-intelligent chat bot. It uses articles, research papers, books, documentation, and more to predict answers to questions. We'll get into that a bit more.

You can try out ChatGPT here for free.

If you're wondering what all the hype is about, you can sign up and immediately use it through an easy-to-use chat interface:

How to use ChatGPT for Software Development

No, I didn't use ChatGPT to write this article. It's written by a human being (this time). However, I did have ChatGPT write an application for me the other day. I'm impressed.

If you want to learn more about ChatGPT and how it works, check out this awesome course on ChatGPT by Amber Israelsen. It covers what you need to know to understand and use it better.

What it is

You've probably heard about people using ChatGPT to generate content, rewrite their bios, or come up with catchy names for a company. It's great at that. Many folks have been using it as a supercharged search engine.

ChatGPT thinks like a person and speaks like a machine. It learns from words and predicts the next word or set of words. This is an important distinction because many think it is a giant database, or "Google on steroids." It's not. It's a much different tool for another purpose: predicting text.

Put simply:

ChatGPT doesn't do an internet search for answers; It predicts Answers based on its training data - Amber Israelsen

That's great news for you as a developer. If you're searching for the meaning of an error message, Google and Stack Overflow are still your best bet. However, if you want to know, "what's a better way to write this?" ChatGPT is the tool to use. Let's explore that deeper.

How to use it as a developer

You can extract valuable information from ChatGPT using prompt engineering. Asking the tool what you want from it can be tricky, but changing the questions will improve your answer. Let's look at some prompts we can use to improve our code.

Prompt 1: What's a better way to do this?

This is one of my favorite prompts, so I'm listing it first.

After a few years, you're dusting off your C# skills and are writing an application. You create a vehicle class with a few properties:

public class Vehicle
{
    private int _numberOfWheels;
    private string _typeOfCar;
    private string _color;

    public int NumberOfWheels
    {
        get
        {
            return _numberOfWheels;
        }
        set
        {
            _numberOfWheels = value;
        }
    }

    public string TypeOfCar
    {
        get
        {
            return _typeOfCar;
        }
        set
        {
            _typeOfCar = value;
        }
    }

    public string Color
    {
        get
        {
            return _color;
        }
        set
        {
            _color = value;
        }
    }
}

Is this valid code? Sure. It uses getters and setters, and you can implement data protection on your properties. It will compile and work just fine.

However, this isn't how we implement properties in C# anymore. But you have no way of knowing that, especially if you haven't written C# since version 3.0.

So out of curiousity, you go into ChatGPT and paste in the following:

What's a better way to write this class? <insert code here>

ChatGPT takes this prompt and spits out the following:

How to use ChatGPT for Software Development

Not only does it tell you about auto-implemented properties, but it tells you why you should use this suggestion. Now you know that you can perform the same thing that 41 lines of code used to do in just six lines of code. It tells you why that's important. You just learned something.

Let's look at another example.

You have an array of data in Python that you'd like to iterate through. You write the following code to do it:

my_array = [1, 2, 3, 4, 5]

for i in range(len(my_array)):
    print("The value at index", i, "is", my_array[i])

Does it work? Yes. It makes sense, and it is pretty concise. But is there a better way?

What's a better way to write this <insert code here>

ChatGPT returns this:

How to use ChatGPT for Software Development

While less drastic than the first example, you just learned a new way to do something and why it matters.

Prompt 2: How do I (do something)

This is yet another way to use ChatGPT. However, there is a caveat attached. You can always ask it how to do something:

how do I connect to postgresql with php?

How to use ChatGPT for Software Development

And for many common things, it will usually spit out an answer that's correct.

You can have it generate a variety of great boilerplate code for various tasks.

How to use ChatGPT for Software Development

Not only will it write the code for you, but it will explain the reasoning behind it:

How to use ChatGPT for Software Development

This can be incredible if it's a concept you are unfamiliar with. ChatGPT can generate things like this much faster than a Google query.

As I said earlier, I pretended to know nothing about Go, JavaScript, and HTML and created an entire web application with ChatGPT. Even if I knew little about these technologies, I could assemble an application using ChatGPT as the primary resource.

But what's the caveat I mentioned earlier?

You must understand the code you are generating.

I can't stress this enough. Don't blindly say, "how do I do this" and dump the code into your application. Generate the code, study it, and understand it. You can also use ChatGPT for this, as we'll see with the next prompt.

Prompt 3: How does (this) work in the code you just generated?

You can dig deeper into what ChatGPT generates with this prompt. ChatGPT keeps a conversational context by bundling your queries in a single conversation. That means you can keep iterating on the results, just like in a real conversation with a human.

How to use ChatGPT for Software Development

This gives you a deeper explanation of how things work before you use them.

This is one example of how ChatGPT has made me a better developer. I have gone down some rabbit holes for sure and gained a deeper understanding of the things I'm working on. I suggest doing this. Especially if you are generating code you don't fully understand.

Prompt 4: Rewrite this code with syntactic sugar

This is another one of my favorites. If you don't know, Syntactic sugar is programming language syntax that is concise and (sometimes) easier to read and express. It's not for everyone, but I like it, especially when it de-clutters my code.

Let's take this example in C#:

int? nullableValue = null;
int value;

if (nullableValue.HasValue)
{
  value = nullableValue.Value;
}
else
{
  value = 0;
}

In this code, we're looking for values that may be null, and if they are, we'll assign them a value of 0. If they have a value stored, we'll pass that value.

Pretty straightforward, right? But one look at this code tells you there's a shorter way to do this. So we'll ask ChatGPT:

How to use ChatGPT for Software Development

And we get this, which is much better:

int value = nullableValue ?? 0;

This is yet another way ChatGPT can teach you and help you be a better programmer. Keep in mind this isn't bulletproof. I have seen some code generated using this that didn't work as expected. But it's pretty cool when it does!

Summary

ChatGPT is cool and a lot of fun to play with. However, it can also be a useful tool to improve productivity, as we've shown. It can teach you new ways to write code.

We didn't cover some of the other ways it helps, such as generating documentation, providing answers to support questions, and more. I'll share a follow-up article to this, so keep checking back.

It might sound like a dumb fad, but it isn't. From here forward, developers need to learn this tool. This is a significant turning point for software development, and I can only see it improving.

Check out this great course if you'd like to learn more about ChatGPT.

Questions, comments? Let me know!

...



📌 ChatGPT: A Scammer’s Newest Tool


📈 28 Punkte

📌 10 Insane NEW GPT Apps Built With ChatGPT’s Newest Updates!!


📈 22.62 Punkte

📌 Check out our newest developer activities


📈 22.54 Punkte

📌 GitHub - chatgpt/chatgpt: Open source and free version of @chatgpt (to be released soon)


📈 22.1 Punkte

📌 Samsung SSD firmwares are still protected by military-grade obfuscation - I made a tool to decrypt the newest version


📈 20.63 Punkte

📌 OpenAI Must Defend ChatGPT Fabrications After Failing To Defeat Libel Suit


📈 17.25 Punkte

📌 12 JavaScript Code Snippets That Every Developer Must Know


📈 17.18 Punkte

📌 Advanced Guide to CSS Selectors: Every Web Developer must Know


📈 17.18 Punkte

📌 PHP 8.2.12 Release that Every Developer Must Know About


📈 17.18 Punkte

📌 Relevant DEV Posts - an Updated Reading List (no developer must read this in 2023)


📈 17.18 Punkte

📌 Top 12 Websites That Every Developer Must know 🤩


📈 17.18 Punkte

📌 JavaScript Essential Terms Every Developer Must Know


📈 17.18 Punkte

📌 10 Must-Read JavaScript Books for Every Developer


📈 17.18 Punkte

📌 7 GitHub Repositories that every front-end developer must know.


📈 17.18 Punkte

📌 Five Java Developer Must-Haves for Ultra-Fast Startup Solutions


📈 17.18 Punkte

📌 10 Tools and Tech every frontend developer must use.


📈 17.18 Punkte

📌 10 GitHub repositories that every developer must follow


📈 17.18 Punkte

📌 9 Fantastic websites every developer must know


📈 17.18 Punkte

📌 GPU Survival Toolkit for the AI age: The bare minimum every developer must know


📈 17.18 Punkte

📌 4 Platform Engineering Tools that every developer must explore in 2024


📈 17.18 Punkte

📌 18 Must-Bookmark GitHub Repositories Every Developer Should Know


📈 17.18 Punkte

📌 5 Developer Communities You Must Join in 2024


📈 17.18 Punkte

📌 FBI’s secret iPhone hacking tool must stay under wraps, court rules


📈 15.26 Punkte

📌 Why these USB lithium-ion battery chargers are must-haves for my tool bag


📈 15.26 Punkte

📌 To use the new Windows AI Studio tool, you must first install Linux. No, it's not a joke


📈 15.26 Punkte

📌 Nerf’s Newest Blasters Include a 10-Barreled Mega Monster


📈 15.25 Punkte

📌 Bulletproof Eiffel Tower Wall Proves Architecture Is The Newest Anti-Terror Weapon


📈 15.25 Punkte

📌 Royal Navy's newest ship formally named in Glasgow yard


📈 15.25 Punkte

📌 The CEO Of The World's Newest Unicorn On How To Secure Your Enterprise


📈 15.25 Punkte

📌 The Secret Ingredient To America's Newest Spy Museum: A British Ex-Hacker


📈 15.25 Punkte

📌 Solus 1.2.0.5 Updated ISO Launches with Budgie Fixes, Newest Software Releases


📈 15.25 Punkte











matomo