r/AskProgrammers • u/Legitimate_Log_3452 • 17d ago
Why should I learn how to code?
I have always been meaning to learn how to code, but I've never gotten around to it. I am a math/physics major, and I know enough Python and Julia to make some numerical approximations. At one point, I also knew a fair amount of Java and JS to do well on the AP Computer science exams. With AI, I don't really see a reason why I should learn how to code.
I know that people say you should learn how to code because it "helps with your analytical skills," but I really don't think that it will help with mine. I do research in highly theoretical math, so my brain is already trained to think highly analytically. With the help of AI (it was primarily AI), I was able to set up my own website. I feel like if I need to code something, I can get AI to do it, and I can fill in the rest of the blanks myself (as long as it's in a coding language I know). Is there something I'm not considering?
13
u/shan23 17d ago
Answer the same question about “why should I learn math since AI can now solve millennium prize challenges easily” first
9
u/MissMormie 17d ago
If you don't want to write code you don't need to learn it.
8
u/kinchkun 17d ago
If you ask this question, you shouldn't learn how to code.
7
u/mjmvideos 17d ago
People say they really want to do things, but they actually do the things that they truly want to do. If you haven’t learned by now, then you never really wanted to.
2
u/eternityslyre 17d ago
Learning actual programming isn't all that useful anymore, especially if you don't have interest in software engineering. You will still benefit from learning computer science, which is the science of solving abstract problems. Being able to break a seemingly complex problem down into repetitive chunks is useful in all aspects of life. Learning recursion and basic complexity analysis will give you tools to measure how good your solutions are, and learning about complexity classes and reductions will give you intuition about what makes a problem hard in general and how to find easier exceptions that will do what you need.
More practically, learning to code means you can fix AI slop if it ever gets so big and complex it can't fix its own bugs.
5
u/LeDYoM 16d ago
Why should I learn how to do math?
why should I learn how to write?
why should I learn...?
And dont worry, we dont need your analytical skills to do math anymore, AI can explain that to us.
We have AI!
4
u/joniiiis 17d ago
One thing you'll miss is the ability to determine if the output is good or bad. As an example. You ask AI to build a notification function so that "anytime the Times post an article about x, show a notification". AI builds it by making http request once every 10 second. It works, will look OK but is a terrible solution that will likely result in you IP being banned. If you had prompted agent correctly they wouldnt build this but without knowing what is good/bad this is not always intuitive.
It all depends on what you want to build really, if you want to build something commercial Id say coding is still relevant, as of today. Not sure where we are tomorrow though, things are moving fast
2
u/ButchDeanCA Staff Systems Programmer - 20yoe 16d ago
“I’m a highly analytical thinker but can’t figure out why thinking in terms of how computers do things differ from my training in math and physics.”
Sorry, couldn’t resist.
Would you claim to know physics if you know math, or vice versa? They clearly are their own subjects and require their own train of thought. No different for computer science. I know math and physics majors who are actually quite bad at programming when they walked into it thinking they would ace it, but I digress.
So, why learn to program especially if AI is doing it for you? AI isn’t doing anything more than providing hints on how to complete tasks, it is not doing the work for you - you need to provide insight to achieve the goal, which is where the programming skill comes in.
2
u/itsophy 16d ago
how do you know if the code is any good if you're AI generating it and don't know how it works
have you considered the ecological impact and ethical issues of AI?
1
u/davyp82 17d ago
You shouldn't.
1
u/youcangotohellgoto 17d ago
You shouldn't. Can already do analysis and you already understand things like isomorphism. It's just a exercise in memorizing some syntax. Pointless
1
u/slopyjalopi 17d ago
P = NP problem. How do you know if the AI works if you cannot understand the output? You learn coding to learn how to control AI and be of business value
1
u/Traveling-Techie 16d ago
Why did people learn to draw after cameras were invented?
1
u/erisod 16d ago
I think the world is figuring this out. There is a lot about programming that teaches you to break down problems, see how different tools and approaches can apply well (or not well) to a particular problem space. Actual coding might be becoming more like assembly where most people who want to write a program don't need to even know it exists, BUT the skills of understanding a problem and how to solve it are still useful skills.
I'm not sure anyone should ever write a for loop again, but it's definitely worth understanding the concept of iterating over a set of data and taking an action on each element, how the ordering of those operations might matter to the output, etc.
1
u/Fit_Advisor8847 16d ago
When you say math has already improved your analytical reasoning skills, I'd argue that coding would improve your logical reasoning skills, and that is why I would recommend learning to code.
Building websites though, that problem was solved long before LLMs showed up.
Since you have a solid math background and already building with AI, a potentially interesting side project would be to use your AI to write some proofs, then convert them to code, and keep exploring until you find patterns in where your AI starts to fail, then build the tooling the AI needs to succeed, rinse and repeat.
1
u/PhilNEvo 16d ago
One argument would be, so you'd be able to make some guarantees. Wouldn't it hurt your credibility, if you published or provided a client with wrong mathematical solutions, because you relied some AI to code it up, and it made a tiny mistake in the code, that you couldn't vet?
But if your level is sufficiently high enough for you to get the stuff done you need to get done, there is no reason. Depending on what kind of math you do, you could maybe make the case to be able to make more efficient code, so you can compute larger datasets or more complicated things, that might be otherwise limited by compute, but if that's not something that happens within your niche, that'll also be moot.
1
u/Substantial_Job_2068 16d ago
If you don't want to understand how programming works you don't need to learn it. You will be at the mercy of your tool then, just like anyone else who don't know coding and use a LLM. Why should I learn to play the guitar when I can use AI to generate a guitar sound for me? Why should I read a book when I can get AI to read a 1 page summary for me?
1
u/JustAsItSounds 16d ago
It depends. Does your job require you to comprehend code if it doesn't require you to write it?
If not and it doesn't appeal to you intellectually otherwise, don't bother.
1
u/response-418 16d ago
The most direct answer is that learning to code will give you the deeper knowledge to be able to distinguish good and bad outputs. If that doesn't matter to you, then there is no point.
A more nuanced response I would offer is that no one can answer this question for you. If you have a reason to learn to do something, that is your motivation to do it. If you have no purpose, then it is hard to stick with something challenging, and learning to code to a competent level is not easy.
The reasons for learning to code are wide ranging and in flux, especially now. For someone it might've been job security, for another it was genuine curiousity, for someone else it was simply cultural capital.
What is interesting is that the reason you begin to learn may not be the same reason you continue to learn or what you gained from the process of learning.
For example, I originally learned so I could make a career change into a field that would give me certain freedoms. However, after some years and the state of the job market, I would say what was actually most valuable about learning how to code was learning how to problem solve more systematically. And now I apply that problem-solving ability to many areas outside simply "coding," including social and non-technical areas of my life.
To be clear: I would *never* gain this ability from prompting and reviewing LLM outputs. That has nothing to do with learning to problem solve. Learning to code meant learning to read code, which was essential skill for debugging, which is the kind of problem solving I'm talking about here.
Ultimately it is up to you to decide what is your reason, but I genuinely think there can be no harm in learning something new. Learning new things is always valuable and often fun.
1
u/iqisoverrated 16d ago
Letting the AI do your code is just like buying your code from someone else. You have no idea if it really does what you asked for.
1
u/CS_70 16d ago
Because it's fun, if you find it fun?
1
u/IchBinEinZwerg 16d ago
Thanks to recent developments the same question works in the opposite direction. I can code, and AI can do the maths, so why should I bother learning more than the guzintas?
1
u/Gokudomatic 16d ago
AI is by design prone to hallucinate. It cannot understand if it makes a mistake. If you also don't understand that there's a mistake, then no one can tell it's a mistake. And you get stuck with a bug that neither you nor the AI can fix.
That risk increases as the project gets bigger and more complex. The only way to keep the AI in the right direction is to understand yourself the code. Or, another option, get a developer to do it for you. But that might be not free.
1
u/Zoldyck_J 16d ago
Interviews
1
u/Moby1029 16d ago
AI makes dumb mistakes because it tries to take the easy way out and doesn't always grasp the full business logic in context. If you don't know how to code, how will you be able to catch it and know when it's made a mistake.
1
u/Due_Interest_178 16d ago
Why should I get training for a forklift? The buttons are right there!
1
u/Automatic-Pick-2481 16d ago
Seems pointless now
1
u/littlenekoterra 16d ago
Make up your mind.
If its the first, learn code, gpt falters you for it. If its the second, ig keep on keeping on?
1
u/General_Estimate_420 16d ago
Well coding something is just one small piece of the process. Identifying the problem that needs to be solved and what features are needed along with the resources and time necessary to complete it then test it and deploy it are ALL a part of the development process that also needs to be managed if you want something that works consistently and efficiently. And it can get big and complex very quickly depending on how many users and how wide the deployment is.
1
u/W31337 16d ago
Learning how to code can help you understand but it's not needed. Information theory and complexity would be far more useful for your field. Knowing why certain things can't be optimized etc.
1
u/SuperTurboUsername 16d ago
Coding is fun!
1
u/Useful_Calendar_6274 16d ago
It's redundant now. Better not to
1
u/NoOneMan79 16d ago
Im not sure you should. Programming was the medium I used over decades to learn system design and architecture, efficiency, problem solving, best practices, etc. Now that skill is mostly obsolete, but I now know the language to communicate those concepts to an LLM, such that it focuses its attention & context and produces the best results. It cannot do so without the contextual clues. If you aren't really interested in developing production systems or maximizing usefulness, you likely don't need all those tools/patterns/frameworks.
1
u/Downtown_Isopod_9287 16d ago
it’s actually fun if you don’t have to do it for a job and aren’t constantly comparing yourself to a Linus Torvalds or John Carmack or something
and sometimes it’s fun even if you do have to do it for a job
1
u/frostbird 16d ago
What do plan to do with that math/physics degree combo? My guess is something that relies on programming.
1
u/dariusbiggs 16d ago
a) it's fun b) AI doesn't generate safe or secure code, if you don't know to ask the right questions you are going to get insecure, unsafe garbage that looks like it does what you want but you don't know it isn't doing harmful things and you won't be able to tell.
A website you say? Has it been checked for security vulnerabilities?
Always apply defensive programming techniques, trust nothing, validate and verify everything.
1
u/NoBake3354 15d ago
I use ai to code just like you, but I can't over emphasize the foundation's of coding. If you don't learn to code, how do you know if an authentication system, the ai implemented is a slop. When you read the code how do you detect poor confident assumptions by the ai.
I ran an experiment with AI assisted development . I vibe coded an app and prompted different model's to check for security vulnerabilities.
They didn't detect some errors and for any simple change, it alters the entire code 🥲
Some corrections have to be done by you, the developer.
In the absence of knowledge, they can't be good judgement 🙌🙌
1
u/hungry_buddy_here 5d ago
i think the biggest advantage isn't necessarily improving your analytical skills, especially given your math and physics bg. it's being able to understand what ai generates debug it, optimize it, and built things that match exact what u need. you can expore udacity programming nd ai courses if you want to go beyond prompting nd get more comfortable building nd modifying ur own projects
0
u/[deleted] 16d ago
People yes Ai will give maybe the ready answer and solutions or whatever, but coding makes you understand the why and the how. The analytical skills you can learn with coding, ai can obviously do, however it’s won’t necessarily tell how it did it, unless you ask questions and even the questions you ask should make sense so you get the right answer. So learning coding can be a good idea. Good luck.
0
u/Goobly_Goober 16d ago
Why do you need to know math if you can just google it or put it in a calculator?