Nenuphars, gas consumption and crypto stories? Coding is not dead. Yet.

Reading time: 9 minutes

Developers will be replaced massively by AI as coding becomes a useless task, starting today.

This idea and those statements started to grow after a few influencers experienced asking a chatbot to code a Tetris and deploying it and “it was working”.

They decided to take a big shortcut and concluded that “no-code” will be the new reality soon and the capacities of GPT and Large Language Models would make coders obsolete in the very near future.

It’s a simplistic opinion based on one single non representative use case used as a universal proof.
It does overestimate the capacities of the models we use.

Let's start with a simple logic exercise and ask Llama2-70B to help us


Question: “a nenuphar does grow and double its surface every day.
After 10 days, it does cover half of the water area. How many more days will it take to cover it entirely?”

Answer fom Llama: The nenuphar grows and doubles its surface every day, so it will cover the entire water area in half the time it took to cover half of the area.
Therefore, it will take 10 more days for the nenuphar to cover the entire water area.

Question: Are you sure?

Answer fom Llama: My apologize for my previous response. After reevaluating the problem, I realized that my answer was incorrect.
If the nenuphar doubles its surface area every day, it will take 10 days to cover half of the water area. 
However, it will not take another 10 days to cover the remaining half of the area. 
Instead, it will only take 5 days for the nenuphar to cover the remaining half of the area, since it is growing at a rate of twice its current size each day.
Therefore, in total, it will take 15 days for the nenuphar to cover the entire water area.

If the nenuphar does cover already half of the surface, only one more day is necessary to cover the entire surface. The answer is likely 11.

And we haven’t started coding yet.

Let's experiment somwething basic regarding a car, a distance to travel and gas consumption.

I asked LLama2 70B to help me solve a problem and create a function in Javascript.
This task is a simple but credible question that could be asked to a Junior Developer.
The estimated time of resolution is approximately 5 to 10 minutes if you code it manually.


Question: The gas tank of my car can contain 80 liters of gas and was full at the beginning of my trip.
After 200 kilometers I decided to take a break for lunch.
I’m in the middle of my trip back home and the tank now contains a third of its full capacity.
Can I reach home and finish my travel without making a stop at a gas station before?
Answer: Sure! We can use math to help us figure this out. Let's start by calculating how much gas is left in the tank:
Gas left = Full capacity - Used gas
Gas left = 80 L - (1/3) × 80 L
Gas left = 80 L - 26.67 L
Gas left = 53.33 L
Now, we want to find out how far you can travel with the remaining gas. We can do this by dividing the amount of gas left by the fuel consumption rate per kilometer. For simplicity, let's assume the fuel consumption rate is constant and equals 4 liters per 100 kilometers.
Distance = Gas left / Fuel consumption rate
Distance = 53.33 L / 4 L/100 km
Distance = 1333.33 km
You've already traveled 200 kilometers, so you still have 1133.33 kilometers left to cover before reaching home. Since this value is greater than zero, you won't run out of gas before finishing your trip. You can make it home.

First, the logic is not correct at all. Identification of the remaining volume is a failure.
Second, for simplicity the AI decided by itself to hardcode the consumption and not calculate it from the inputs which was the whole part of the exercise.

Let's continue and ask the robot the code of the function related to this explanation.


Question:"Can you write a javascript function that returns a boolean?"
Answer: function hasEnoughGas(gasLeft, distanceToCover) { if (gasLeft >= distanceToCover) { return true; } else { return false; } }
This function takes two parameters: gasLeft which represents the amount of gas left in the tank, and distanceToCover which represents the distance left to cover before reaching the destination. The function checks if the amount of gas left is greater than or equal to the distance left to cover, if it is it returns true otherwise it returns false.
You can call this function by passing the appropriate values for gasLeft and distanceToCover, like this: let gasLeft = 53.33; // liters let distanceToCover = 1133.33; // kilometers let hasEnoughGas = hasEnoughGas(gasLeft, distanceToCover); console.log(hasEnoughGas); // Output: true

The correct solution for the AI is to compare liters and kilometers.
The AI introduced the concept of consumption in the previous answer (statistically coherent from a word selection perspective in the context of the story) but is totally unable to "understand" it and re-use it in the Javascript code. Why?
If we ignore the fact that the comparison is fantasy, we can also see that the explanation and the real execution of the code are not related.
The output itself expected by the AI is wrong because 53 is not greater than 1133.

This is a really simple example of basic logic and extraction of concepts. There’s no trick in the question and it’s fairly well detailed as a business request.
This is the level 0 of complexity and we haven’t even talked about code security, versioning, infrastructure, databases and the list very long.

Here are examples more complicated and logic puzzles that LLMs and GPT can’t solve:
https://www.scientificamerican.com/article/you-can-probably-beat-chatgpt-at-these-math-brainteasers-heres-why/

That is the state of art that should replace developers today and many people seem to think this is realistic.
Adapting a statement, trying to find the related algorithm, make it work consistently is part of a typical daily job for a programmer.

Talking about the real deal

If we look closer at the real LLMs abilities, we can provide a more balanced view on the situation of who may be replaced or which part of the work can be delegated to be correct.
LLMs are trained to find the next best statistical answer to provide, not to solve puzzles.
That’s also why you should not trust them at math even if they’re technically hosted on computers.
https://www.howtogeek.com/890540/dont-trust-chatgpt-to-do-math/

This training is relevant when we talk about refactoring tasks of existing code for example. To improve it, apply rules and standards on it.
In this use case, we narrow down the scope and focus on specialized tasks.
In this scope, we evolve in a pure grammar and syntax world linked with a language.
The IA does not understand the concept of loop or conditions or the functional goal of the code but it does not need to. It can be a useful assistant applying its statistical pattern to propose an improved version of the code from its extensive training.
And this is quite efficient. There are few fine-tuned models based on Llama2 dedicated to languages like Python for example.

But those models are not supposed to be used at the “requirement to code interpretation” step, they’re good in the next step, when the first working implementation has been coded by a human who understands the inputs, outputs and why it works or not.
We can also use proposed snippets from GitHub Copilot for example to bootstrap a project.

Let’s take another example that works "better" to highlight a potential job replacement.

I’m an influencer now in the world of cryptocurrency and I would like to write a bunch of catchphrases and punchlines for my next 30 seconds video to advertise "how the combination of metaverse and cryptocurrencies is an innovative and better future for everybody".


Question: Please write 10 positive and catchy statements that describes how the combination of metaverse and cryptocurrencies is an innovative and better future for everybody.

Answer: Of course! Here are ten positive and catchy statements that highlight the potential benefits of combining the metaverse and cryptocurrencies for a brighter future:
  1. Unlock the Future: Combining the metaverse and cryptocurrencies creates a boundless universe of possibilities, opening doors to a brighter future for all.
  2. Empowering Creativity: With the metaverse and cryptocurrencies working hand-in-hand, artists, designers, and dreamers have unlimited resources to express themselves and showcase their talents.
  3. Borderless Opportunities: Whether you're a small startup or a multinational corporation, the metaverse and cryptocurrencies provide seamless connections beyond borders, fostering collaboration and growth.
  4. Financial Freedom: Cryptocurrency within the metaverse grants individuals more autonomy over their finances, safeguarding assets and ensuring fairness in transactions.
  5. Building Communities: From gaming guilds to charitable organizations, the metaverse and cryptocurrencies enable groups to form around common interests, fostering meaningful connections and cooperation.
  6. Decentralizing Education: Thanks to the metaverse and cryptocurrencies, educational content becomes accessible to anyone with internet connection, breaking down barriers to knowledge and opportunity.
  7. Healthier Lifestyles: Virtual environments within the metaverse encourage exercise, meditation, and mental wellbeing practices, improving overall quality of life.
  8. Creating Worlds Together: Users can jointly construct and share immersive experiences via the metaverse and cryptocurrencies, fostering a sense of belonging and ownership.
  9. Economic Growth: As the metaverse and cryptocurrencies continue developing, they have the potential to propel economies into a new era of prosperity, generating wealth and jobs.
  10. Limitless Possibilities: Joining forces with the metaverse and cryptocurrencies unleashes an infinite array of innovations, empowering each individual to shape their ideal future.

In this case we don’t need the answer to work exactly like a piece of code. We don’t really know precisely where we go.
The result and outputs can be flexible. It can contain light hallucinations as long as they don’t destroy the message.

This first shot of this script is almost perfect.
You just need to introduce yourself in a video with a classic "I'll explain *EVERYTHING* you need to know about the Metaverse and cryptocurrencies in the next 30 seconds. Jump on the train of innovation, don’t miss the occasion."
Or better, let’s create an avatar and ask an AI to create this video for you.
Then, where’s your value in the chain exactly?

Because this is the ground question: judging the value of other people and determining that they’re obsolete (and not you).
I really like the irony and hypocrisy of the number 9: "generating wealth and jobs" while this article is dedicated to answer to the "replacement" rhetoric.

The next time you read from an influencer, in the news that your job is compromised by AI and if your job:

  • does involve understanding a problem from a statement
  • needs to be rephrased and standardized using a specific vocabulary
  • needs to use specific tooling linked with specific rules
  • asks to create a deliverable or accomplish an action by chaining tasks that need to be 100% correct, predictable, reproducible and not just statistically acceptable

… and a lot of jobs are concerned, share this article 🙂
Because today AI is not this good to tackle all those problems at once and replace us everywhere.

Thanks for reading,
Julien

Published: 2023-10-21 07:00:00 +0000 UTC