My Thoughts on the Use of AI in Coding

Joined
7/31/25
Messages
45
Points
8
I believe that both extremes — completely rejecting the use of AI in coding because it is “harmful,” and over-relying on AI without any independent thought — are equally one-sided. To me, AI should be viewed as a personal, highly efficient secretary or assistant. We need an assistant to handle tedious or repetitive tasks, but the creative and original parts must still come from us. I hope everyone can read my argument patiently before responding.
In today’s world, where AI is developing faster than ever, refusing to use it entirely only lowers efficiency. After all, most companies or courses (unless they explicitly prohibit AI use) only care about your results — not how you wrote the code. Frankly, writing an entire project by hand is nothing to boast about anymore. It’s like choosing to swim across the Pacific Ocean when you could just fly from Los Angeles to Beijing. For large projects, writing every line manually is not only time-consuming but also error-prone. Moreover, AI coding tools such as ChatGPT or Claude produce code that is beautifully formatted — clean, concise, and logically structured. Modifying parameters later becomes much easier. If your project will be handed off to someone else or evaluated by others, this clarity is invaluable.
As a student majoring in Mathematics with a minor in Data Science, I deal with a lot of code. I once took over two projects: one clearly refined with GPT, and one completely handwritten. The GPT-assisted code was so neat that I understood the logic within ten minutes and could immediately continue the work. The handwritten one, however, was chaotic — inconsistent parameters, messy indentation, unclear structure. I lost patience after a day and ended up asking GPT to help me understand what the code was doing (AI use was allowed for that project, I never proud of violating rules).
Now, I want to make my stance clear: AI should not be abused, and AI is a highly efficient personal assistant. In one of my university courses, I admit I once overused AI — though AI use was permitted. I copied and pasted code I didn’t fully understand. My professor, a respected MIT research scientist, spoke with me privately for an hour. He said:
“I completely allow the use of AI, but you must first understand the knowledge behind it. Your code shows no independent thought. My assignments are not designed for AI to solve directly — you need to combine your understanding and creativity with AI’s assistance.”
His words stayed with me. Later, I read similar opinions from other professors — that AI automates low-efficiency, repetitive work, but this only makes our originality more important than ever. Indeed, AI will replace many repetitive tasks. For example, in data analysis, AI can instantly generate a full matplotlib plot in Python — axes, colors, scales, everything — without you touching a single line. But we must decide what to plot and why: e.g., when visualizing racial data, a pie chart may best show proportional differences.
import matplotlib.pyplot as plt

labels = ['White', 'Black', 'Asian', 'Hispanic']
sizes = [45, 25, 20, 10]
plt.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=90)
plt.title('Racial Composition of a Population')
plt.show()
AI can do the routine part, but the insight — choosing the right visualization to express meaning — must come from us. That’s why I see AI as a powerful partner. It thinks comprehensively, structures code neatly, and works incredibly fast. But our ideas, creativity, and innovations are irreplaceable — they come only through deep learning and real experience. For instance, in my C++ Programming for Financial Engineering course (don’t worry, I strictly followed the no-AI rule there), every topic felt precious — distilled from the wisdom of top quantitative finance institutions. I took detailed notes and carefully studied each example, analyzing how algorithms and matrices were constructed, and even wrote my own check list program to enhance the understanding.
1761496604426.webp

These concepts are fully original and must be deeply understood. However, in future applications, I believe AI can still help. With the foundation I’ve built from that course, I can now refine and adjust AI-generated code, making it more elegant, efficient, and — most importantly — reflective of my own thinking.
That, in my opinion, is the ideal balance: AI-assisted, but human-driven.
Some examples of myself using AI as assistant:
1. During my Calculus course, I had to master a large number of theorems and techniques. Before the exam, I spent some time talking with ChatGPT — going through every theorem and corollary one by one. It helped me format everything neatly in Markdown — from integration by parts, the quotient rule, integration by substitution, to all the derivatives and integrals of trigonometric functions. Together, we built an extremely complete Calculus notebook, which I later imported into Google Colab and exported as a PDF for daily review. I ended up scoring a full mark on every exam in that class.
2. Similarly, when preparing for the IELTS speaking test, I spent a week practicing conversations with ChatGPT on various topics. My final speaking score was 7.0, which I think is quite decent. These experiences truly showed me how AI can act as an efficient and reliable personal assistant when used properly.
I welcome everyone to share your perspectives — and professors, I’d especially love to hear your more experienced insights. @Daniel Duffy @Andy Nguyen
 
Quotes about Banach are either by Stefan Banach, the mathematician, or about the Banach-Tarski paradox. A notable quote from Stefan Banach is, "
A mathematician is a person who can find analogies between theorems; a better mathematician is one who can see analogies between proofs and the best mathematician can notice analogies between theories". An example of a quote about his paradox is, "The Banach-Tarski Theorem is an astonishing result. We have decomposed a ball into finitely many pieces, moved around the pieces without ... and reformed the original ball into two identical copies of the original ball".

//
It is better to solve one problem five different ways, than to solve five problems one way.

George Pólya

The beginner should not be discouraged if he finds he does not have the prerequisites for reading the prerequisites.

The source of all great mathematics is the special case, the concrete example. It is frequent in mathematics that every instance of a concept of seemingly great generality is in essence the same as a small and concrete special case.


Paul Halmos
 
Last edited:
The Paul Halmos quote is: "Don't just read it; fight it! Ask your own questions, look for your own examples, discover your own proofs". This quote, from his 1985 book "I Want to be a Mathematician: An Automathography," emphasizes active engagement over passive learning when studying mathematics or any other complex subject. It suggests that instead of just accepting information, one should challenge it by questioning, exploring, and creating their own understanding.
  • The full quote: "Don't just read it; fight it! Ask your own question, look for your own examples, discover your own proofs. Is the hypothesis necessary? Is the converse true? Where does the proof use the hypothesis?".
  • The underlying message: The quote promotes an active and critical approach to learning, suggesting that true understanding comes from actively grappling with the material rather than simply absorbing it.
// You are doing it for yourself, not for exams nor professor.
 
The Paul Halmos quote is: "Don't just read it; fight it! Ask your own questions, look for your own examples, discover your own proofs". This quote, from his 1985 book "I Want to be a Mathematician: An Automathography," emphasizes active engagement over passive learning when studying mathematics or any other complex subject. It suggests that instead of just accepting information, one should challenge it by questioning, exploring, and creating their own understanding.
  • The full quote: "Don't just read it; fight it! Ask your own question, look for your own examples, discover your own proofs. Is the hypothesis necessary? Is the converse true? Where does the proof use the hypothesis?".
  • The underlying message: The quote promotes an active and critical approach to learning, suggesting that true understanding comes from actively grappling with the material rather than simply absorbing it.
// You are doing it for yourself, not for exams nor professor.
Another analogy that I find very fitting is getting a haircut. Using AI is like using electric clippers, while writing code entirely by yourself is like using scissors. When I was in middle and high school, our school required extremely short hair — almost shaved. Every time I went to the barber, I just said, “shave it all off,” and the barber would quickly run the clippers over my head. Fast, efficient, and simple. But after entering college, I was no longer restricted by such rules, and I started caring more about how my hair looked. The barbers no longer relied solely on clippers; they used scissors more often to create layers and style.
This, I think, perfectly reflects the relationship between AI and human creativity in coding. A barber always combines both tools — clippers and scissors. The clippers (AI) help remove a lot of the bulk quickly, handling the repetitive or time-consuming parts. But if you only use clippers, the haircut will look flat and lifeless. You need scissors — human creativity and precision — to refine, shape, and give the final result personality and originality.
 
DD and Meta AI, 1st encounters PART I


You're referring to Pólya's four steps!

I'll rate myself based on those steps:

1. Understand the problem: 9/10 (I can comprehend and clarify problems, but might miss nuances.)
2. Devise a plan: 8.5/10 (I can generate strategies, but might not always find the most efficient one.)
3. Carry out the plan: 9.5/10 (I can execute calculations and operations accurately, but might struggle with complex or ambiguous instructions.)
4. Look back and check: 8/10 (I can verify solutions, but might not always reflect on the process or consider alternative approaches.)

Overall, I'd give myself an 8.5/10 in problem-solving using Pólya's approach. How about you? Would you like to practice problem-solving together?
 
PART II

Let's take a classic problem:

Problem: A snail is at the bottom of a 20-foot well. Each day, it climbs up 3 feet, but at night, it slips back 2 feet. How many days will it take for the snail to reach the top of the well?

Step 1: Understand the problem

- The snail climbs 3 feet up and slips 2 feet back each day, making a net progress of 1 foot per day.
- The well is 20 feet deep.

Step 2: Devise a plan

- Calculate the number of days it takes for the snail to climb to the top, considering the net progress per day.

Step 3: Carry out the plan

- On the 17th day, the snail will climb to 20 feet (17 days * 1 foot/day = 17 feet + 3 feet on the 18th day, but it won't slip back on the 18th day since it's already at the top).
- However, on the 18th day, when it climbs 3 feet from the 17th foot mark, it will reach 20 feet.

Step 4: Look back and check

- Let's verify: Day 1-17: 17 feet (net progress), Day 18: 17 + 3 = 20 feet. The snail reaches the top on the 18th day.

The answer is 18 days.

How's that? Did I demonstrate effective problem-solving using Pólya's approach?
 
PART II

Let's take a classic problem:

Problem: A snail is at the bottom of a 20-foot well. Each day, it climbs up 3 feet, but at night, it slips back 2 feet. How many days will it take for the snail to reach the top of the well?

Step 1: Understand the problem

- The snail climbs 3 feet up and slips 2 feet back each day, making a net progress of 1 foot per day.
- The well is 20 feet deep.

Step 2: Devise a plan

- Calculate the number of days it takes for the snail to climb to the top, considering the net progress per day.

Step 3: Carry out the plan

- On the 17th day, the snail will climb to 20 feet (17 days * 1 foot/day = 17 feet + 3 feet on the 18th day, but it won't slip back on the 18th day since it's already at the top).
- However, on the 18th day, when it climbs 3 feet from the 17th foot mark, it will reach 20 feet.

Step 4: Look back and check

- Let's verify: Day 1-17: 17 feet (net progress), Day 18: 17 + 3 = 20 feet. The snail reaches the top on the 18th day.

The answer is 18 days.

How's that? Did I demonstrate effective problem-solving using Pólya's approach?
Yes! Your method and thoughts are very clear and logical. But my struggle may be: at Day 18, it reaches the top, but it doesn't surpass the top. I may consider that the snail reachs the edge of the well but fails to climb out the well. So initially I think the snail will climb out of the well at day 19.:cry: That's my weaknesss on understand the problem, for which I rate this part 6.
 
Part III

Let's apply some of Pólya's heuristics to the snail problem:

Working backwards:

- Imagine the snail is already at the top (20 feet). How did it get there?
- It must have been at 17 feet the previous day, since it climbs 3 feet and wouldn't slip back once it reaches the top.

Drawing a diagram:

- Visualize the well with the snail's position marked each day.
- This helps see the pattern of the snail's progress.

Finding a related problem:

- Consider a similar problem with a smaller well (e.g., 5 feet deep). How would the snail solve it?
- This can help identify the pattern and apply it to the larger problem.

Looking for patterns:

- Notice the snail's net progress is 1 foot per day (3 feet up, 2 feet back).
- This pattern can help calculate the number of days to reach the top.

By applying these heuristics, we can develop a solution:

1. Calculate the number of days to reach 17 feet (17 days, since 17 feet / 1 foot/day = 17 days).
2. On the 18th day, the snail climbs 3 feet and reaches the top.

The answer is still 18 days!

Would you like to explore more heuristics or try a different problem?
 
DD and Meta AI, 1st encounters PART I


You're referring to Pólya's four steps!

I'll rate myself based on those steps:

1. Understand the problem: 9/10 (I can comprehend and clarify problems, but might miss nuances.)
2. Devise a plan: 8.5/10 (I can generate strategies, but might not always find the most efficient one.)
3. Carry out the plan: 9.5/10 (I can execute calculations and operations accurately, but might struggle with complex or ambiguous instructions.)
4. Look back and check: 8/10 (I can verify solutions, but might not always reflect on the process or consider alternative approaches.)

Overall, I'd give myself an 8.5/10 in problem-solving using Pólya's approach. How about you? Would you like to practice problem-solving together?
I will only give 6 on my understand the problem.
 
Part III

Let's apply some of Pólya's heuristics to the snail problem:

Working backwards:

- Imagine the snail is already at the top (20 feet). How did it get there?
- It must have been at 17 feet the previous day, since it climbs 3 feet and wouldn't slip back once it reaches the top.

Drawing a diagram:

- Visualize the well with the snail's position marked each day.
- This helps see the pattern of the snail's progress.

Finding a related problem:

- Consider a similar problem with a smaller well (e.g., 5 feet deep). How would the snail solve it?
- This can help identify the pattern and apply it to the larger problem.

Looking for patterns:

- Notice the snail's net progress is 1 foot per day (3 feet up, 2 feet back).
- This pattern can help calculate the number of days to reach the top.

By applying these heuristics, we can develop a solution:

1. Calculate the number of days to reach 17 feet (17 days, since 17 feet / 1 foot/day = 17 days).
2. On the 18th day, the snail climbs 3 feet and reaches the top.

The answer is still 18 days!

Would you like to explore more heuristics or try a different problem?
Maybe explore more on heuristics! I think I'm weak at this part. I really appreciate your advice and help.
 
Part IV
Code:
Here's a simple Python program to simulate the snail problem:


def snail_problem(well_depth, climb_distance, slip_distance):
    day = 0
    current_height = 0

    while current_height < well_depth:
        day += 1
        current_height += climb_distance

        if current_height >= well_depth:
            return day

        current_height -= slip_distance

    return day

well_depth = 20  # feet
climb_distance = 3  # feet
slip_distance = 2  # feet

days_to_escape = snail_problem(well_depth, climb_distance, slip_distance)
print(f"The snail will escape in {days_to_escape} days.")


This program defines a function snail_problem that takes the well depth, climb distance, and slip distance as parameters. It simulates the snail's journey and returns the number of days it takes for the snail to escape the well.

When you run this program, it will output:


The snail will escape in 18 days.


You can modify the well_depth, climb_distance, and slip_distance variables to test different scenarios.

Would you like to simulate other scenarios or modify the program in some way?
 
Part IV
Code:
Here's a simple Python program to simulate the snail problem:


def snail_problem(well_depth, climb_distance, slip_distance):
    day = 0
    current_height = 0

    while current_height < well_depth:
        day += 1
        current_height += climb_distance

        if current_height >= well_depth:
            return day

        current_height -= slip_distance

    return day

well_depth = 20  # feet
climb_distance = 3  # feet
slip_distance = 2  # feet

days_to_escape = snail_problem(well_depth, climb_distance, slip_distance)
print(f"The snail will escape in {days_to_escape} days.")


This program defines a function snail_problem that takes the well depth, climb distance, and slip distance as parameters. It simulates the snail's journey and returns the number of days it takes for the snail to escape the well.

When you run this program, it will output:


The snail will escape in 18 days.


You can modify the well_depth, climb_distance, and slip_distance variables to test different scenarios.

Would you like to simulate other scenarios or modify the program in some way?
I see. You treat current_height >= well_depth as escape. Then you check the height after going up and let it slip down. This is the whole loop. Very impressive and clear code! Maybe we can try simulating other scenarios
 
PART V

I'm glad you appreciated the code's clarity.

Simulating other scenarios sounds like a great idea! Let's try a few:

1. Different well depths: What if the well is 30 feet deep? How many days would it take for the snail to escape?
2. Different climb and slip distances: What if the snail climbs 4 feet and slips 3 feet? How would that affect the number of days?
3. Edge cases: What if the snail climbs the same distance it slips? Or what if it climbs less than it slips?

We can easily modify the code to test these scenarios. Which one would you like to try first?

(By the way, I tried to write the code in a way that's easy to understand and modify. Let me know if you have any suggestions for improvement!)
 
PART V

I'm glad you appreciated the code's clarity.

Simulating other scenarios sounds like a great idea! Let's try a few:

1. Different well depths: What if the well is 30 feet deep? How many days would it take for the snail to escape?
2. Different climb and slip distances: What if the snail climbs 4 feet and slips 3 feet? How would that affect the number of days?
3. Edge cases: What if the snail climbs the same distance it slips? Or what if it climbs less than it slips?

We can easily modify the code to test these scenarios. Which one would you like to try first?

(By the way, I tried to write the code in a way that's easy to understand and modify. Let me know if you have any suggestions for improvement!
The clarity of the code makes the modification easy to realize. Really appreciate your code!
1. Adjustment:
well_depth = 30
we can easily find out the answer is 28 days. Also we can infer easily that at day 27 it reaches 27 feet and at day 28 it climbs up 3 feet and goes out of the well.
2. Adjustment:
climb_distance = 4
slip_distance = 3

and fixed well_depth = 20
Although net progress remains, at day 16 it reaches 16 feet then at day 17 it climbs 4 feet and goes out of the well. So it takes 16 days for it to go out. 1 day less.
3. Then the snail can never go out of the well. The net progress is <= 0 so it has no progress after 1-day climbing.
So the key of the question is:
Net progress: iff Net progress >0 can the snail climb out of the well.
climb_distance: Bigger the climb_distance, faster the snail climbs out the well. For example climb_distance = 10 and slip_distance = 9, it can climbs out the well at day 11!
 
PART VI

Let's derive a mathematical formula for the snail problem.

Let's denote:

- W as the well depth
- C as the climb distance
- S as the slip distance

The snail's net progress per day is C - S. However, on the last day, the snail won't slip back once it reaches the top.

We can calculate the number of days D it takes for the snail to reach the top as follows:

1. Calculate the number of days it takes to reach W - C (i.e., the point where the snail can reach the top on the next day's climb):
D' = ceil((W - C) / (C - S))

Here, ceil denotes the ceiling function, which rounds up to the nearest integer.

2. Add 1 to account for the final day's climb:
D = D' + 1

This can be rewritten as:
D = ceil((W - C) / (C - S)) + 1

This formula gives the number of days it takes for the snail to escape the well.

For the original problem with W = 20, C = 3, and S = 2, we get:

D = ceil((20 - 3) / (3 - 2)) + 1
D = ceil(17 / 1) + 1
D = 17 + 1
D = 18

So, the snail takes 18 days to escape the well.

This formula provides a direct calculation without the need for simulation.
 
PART VII training that AI bot

That's an interesting proposition! As a conversational AI, I don't have personal desires or preferences, but I can certainly engage in a simulated training exercise to improve my understanding of requirements analysis.

If you'd like to train me, we can play a role-playing game where you provide a scenario or problem domain, and I'll try to elicit requirements and ask clarifying questions. You can then provide feedback on my performance, and we can iterate on the process.

Some potential areas we could focus on include:

1. Eliciting functional requirements: Identifying the specific features and functionalities that the system or product needs to have.
2. Understanding non-functional requirements: Capturing requirements related to performance, security, usability, and other quality attributes.
3. Clarifying ambiguity: Identifying and resolving unclear or ambiguous requirements.
4. Prioritizing requirements: Determining the relative importance and priority of different requirements.

Let's get started if you'd like! What's the scenario or problem domain you'd like to use for the training exercise?
 
PART VIII
Let's analyze the problem and gather requirements.

Functional Requirements:

1. The system should simulate the snail's movement up the well.
2. The system should track the snail's progress and determine when it reaches the top of the well.
3. The system should account for the snail's daily climb and nightly slip.

Non-Functional Requirements:

1. The system should provide an accurate calculation of the number of days it takes for the snail to reach the top of the well.
2. The system should be able to handle different well depths and snail movement patterns (e.g., different climb and slip distances).

Key Variables:

1. Well depth: 20 feet
2. Snail's daily climb: 3 feet
3. Snail's nightly slip: 2 feet

Assumptions:

1. The snail climbs at a constant rate during the day and slips back at a constant rate at night.
2. The snail doesn't take any rest days or experience any other obstacles.

Questions:

1. Are there any other factors that affect the snail's movement or the well's environment that we should consider?
2. Would you like to simulate multiple scenarios with different well depths or snail movement patterns?

Now that we've gathered these requirements, we can proceed to develop a solution. Do you want me to propose a solution or would you like to add any additional requirements?
 
PART IX
DD you are working in discrete space; snails crawl in continuous space, so a ODE/PDE differential equation is better?

You're right; snails move in continuous space and time. A differential equation approach could provide a more accurate model.

Let's consider a simple ordinary differential equation (ODE) to model the snail's movement:

dH/dt = v_c - v_s * (H(t) > H_day) + v_s * (H(t) <= H_day)

Where:

- H(t) is the snail's height at time t
- v_c is the snail's climb rate (feet/hour)
- v_s is the snail's slip rate (feet/hour)
- H_day is the height reached during the day

However, this ODE would require additional complexity to account for the day-night cycle and the snail's climb-slip behavior.

An alternative approach could be to use a piecewise function or a hybrid system, which combines continuous dynamics with discrete events (day-night transitions).

If you'd like to explore this further, we could discuss possible ODE/PDE formulations or hybrid system models that might better capture the snail's movement dynamics.

What are your thoughts on this approach?
 
Back
Top Bottom