Three Must-Have Skills for Any Programmer and How AI Can Supercharge Them

There are three skills that are critical for a programmer to have. And guess what? Artificial intelligence can be your trusty sidekick, supercharging these skills and helping you become a coding superhero. Let’s dive right in!

Skill #1: Searching for Existing Solutions

Imagine you encounter a programming problem and have no clue how to solve it. Don’t panic! The first and most crucial step is to look for whether what you are trying to do has been done before by someone else, in a form you can reuse. The smaller and simpler your problem, the more likely you are to find an existing solution and be able to use it.

For instance, the standard problems in computer science textbooks are likely to exist in the simplest and easiest form for reuse, such as a function or class you can directly access from within the programming language you’re using. Examples of this include sorting functions and data structures such as linked lists and hash maps.

Other problems are not classic CS material, but are so commonly encountered, that they are also very likely to be easily available in the programing language of your choice. Those include problems such as converting a string to all lower case, splitting a string into multiple strings given a delimiter that separates them, or generating random numbers.

Other problems might not be as obvious as above, but enough programmers of a specific language encountered them, that solutions have been built in. An example of this is the compact() method of an array in the programming language Ruby. This method removes all instances of the nil values (the Ruby equivalent of None in Python), in an array.

It’s important to gain intuition for what type of problems might have an existing solution that can be reused. Experience will be your guide here, but if you don’t have much experience, let the following question be of help:

“Is it likely that other people had the same problem I am trying to solve?”

If the answer is yes, then you might be able to use an existing solution.

An internet search can of course assist to uncover the solution you’re seeking. If you’re fortunate, a solution will be directly built into the programming language or available in an easy-to-use library or module. If not, maybe someone else posted code that solves your problem and you can borrow inspiration from.

You can take this to the next level with AI assistants such as ChatGPT. An AI is trained on a large body of existing code. Therefore, if you ask it to write a code for something that already exists, it’s likely to give you a good answer. The advantage of AI is that it can adapt to your specific requirements. If you need something written that hasn’t exactly been done before, it can adapt, unlike something posted on a web page.

But you should verify anything you get from an AI yourself, because AI systems, i.e. large language models, do tend to “hallucinate” sometimes, meaning they give the wrong answer with full confidence.

Skill #2: Asking for Help

Asking for help is not a sign of weakness; it’s a testament to your willingness to learn and grow. Whether you’re stuck on a bug or facing a roadblock, reaching out to another person for help is a legitimate way of moving forward.

The problem with asking for help, and what stops many programmers from doing so, is the overhead involved. Asking for help take time and effort. You must find the right available person and then explain your problem and what you’ve been doing. After that, the person might not even know and not be able to help you. Posting a question online involves similar overhead.

Therefore, you don’t want to reach out too quickly, because if you don’t give up right away, you might come up with the answer faster than it would take you to ask for help. But on the other hand, you don’t want to be stuck for a long time while perpetually putting off asking for help.

Intuition of knowing how long to wait while trying to figure things out on your own is valuable. But, if you don’t have that, one easy strategy is to set a fixed time that seems not too long and not too short, for example, half an hour, of being stuck before reaching out to someone else for help.

An internet search is often the first line of defense before asking a person for help. (The strategy of pasting an error message into your favorite search engine is a cornerstone of software development solutions world-wide.)

And now, AI can help even more. Asking an AI your question, can often involve much less overhead than asking a person. But sometimes it might be more difficult because AI systems are not as good at seeing the “big picture” and are not likely to know the particulars of the system you are working on, as someone on your team would. It’s a tool for you to use, and can make things easier in many, but not all situations.

Skill #3: Breaking Down Problems Into Smaller Pieces

Large problems can be overwhelming, even for experienced programmers. That’s where the art of breaking down problems into smaller, more manageable pieces comes into play. This skill involves dissecting complex challenges into smaller tasks, making them easier to comprehend and tackle.

An AI can assist in this process by providing guidance. You can describe your problem and then ask it to give you the steps involved.

Here is a prompt example I tried with ChatGPT:

“I would like to code an artificial neural network from scratch in Python. Please list the steps involved.”

This will give you a list with an overview of the steps to take.

For more details with some code, you can replace the word “list” with the word “detail”:

“I would like to code an artificial neural network from scratch in Python. Please detail the steps involved.”