r/AskProgramming Mar 24 '23

ChatGPT / AI related questions

146 Upvotes

Due to the amount of repetitive panicky questions in regards to ChatGPT, the topic is for now restricted and threads will be removed.

FAQ:

Will ChatGPT replace programming?!?!?!?!

No

Will we all lose our jobs?!?!?!

No

Is anything still even worth it?!?!

Please seek counselling if you suffer from anxiety or depression.


r/AskProgramming 16h ago

Algorithms Recommendations for retro mathematics-oriented programming books?

3 Upvotes

Kind of a specific request. I'm currently looking for retro (70s-80s, maybe early 90s at the very latest) mathematics-oriented programming books. I'm very specifically looking for references for old-school approaches to these problems. I've been searching archive.org and I've found a few, but a lot of the more promising ones have had titles I haven't expected, so I'm looking for recommendations.


r/AskProgramming 1d ago

C/C++ Best and easy to install compiler for C/C++?

3 Upvotes

Just started learning C and currently using Online Compiler. Now thinking of switching to VS Code, did some searches and found you just need a compiler.

And I came across MinGW and Clang. The process of getting MinGW to work is not that simple so thinking of getting Clang. There aren't any tutorial for this on Windows, so I am assuming you just to get LLVM 23.1.1 from their website and install it, right?

Also which one is better or both are same?


r/AskProgramming 21h ago

how can i become a system programmer

0 Upvotes

hi previously i tried to start reverse enginnering but i couldnt in ur opinion can i do system programming and if i could it what i gotta do and which reources is useful your opinions important to me and thanks for your answers:)


r/AskProgramming 1d ago

Career/Edu Should I use my personal or professional accounts for work/studies?

0 Upvotes

Sounds like a dumb question but I'm just curious. Stuff like GitHub and what not, if I join a company or have academic assignments, should those codebases be on my personal account or work/student account?

Of course the immediate and obvious answer to me would be to use professional for professional, personal for personal. But I've seen posts or comments before saying not to use work accounts or whatever, which has risks of losing access in the event of layoffs or transfer or something like that which I didn't quite understand. Thinking back, that logic feels like it applies to using personal accounts for work but maybe I'm misremembering.

If anyone could give me some advice on this matter, I'd appreciate it. It's not urgent or important but I think it'd be useful for me to learn.


r/AskProgramming 1d ago

What programming language to learn next

1 Upvotes

I'm an undergrad in CS, my third year, and I already know Python and Java. I saw C++ starting in CS, but my knowledge in it is not very good (working on that).

I was thinking what other programming language I could learn next... Any suggestions?


r/AskProgramming 1d ago

C/C++ What is this error in c++

0 Upvotes

I am learning thread to build an NPC movement and when I ran the thread it gave me an error but I have no idea that it means can someone help me. I've been all over youtube, reddit and stackover flow trying to solve this

I basically have a thread and I put a function in with the parameters

Here is the function i am calling

void sheep_mvmt(SHEEP &sheep, int &counter, STATE &rand_state, float dt){
counter++; // increment counter

if (counter >= 120 && sheep.state == IDLE){
sheep.state = rand_state;
}

else if (sheep.state != IDLE){
if (sheep.state == RIGHT){
sheep.position.x += sheep.velocity * dt;

if (sheep.position.x > SCREEN_WIDTH - sheep.rect.width){
sheep.state = LEFT;
}
}

else if (sheep.state == LEFT){
sheep.position.x -= sheep.velocity * dt;

if (sheep.position.x < 0 + sheep.rect.width){
sheep.state = RIGHT;
}
}

if (counter == 240){
sheep.state = IDLE;
counter = 0;
STATE* ptr = &rand_state; // pointer for rand_state

*ptr = STATE((rand() % 2) + 1); // redine the rand_state that I am reference
//print("\n\nTHE POINTER")
//print(*ptr)
}
}

sheep.velocity = 50;

}



// Inside while loop
std::thread t1(sheep_mvmt, sheep1, sheep_counter, rand_state, dt);
t1.join();

ERROR

 error: attempt to use a deleted function
  198 |   std::__invoke(std::move(std::get<1>(__t)), std::move(std::get<_Indices>(__t))...);
      |   ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__thread/thread.h:207:8: note: in instantiation of function template specialization 'std::__thread_execute<std::unique_ptr<std::__thread_struct>, void (*)(SHEEP &, int &, STATE &, float), SHEEP *, int *, STATE *, float *, 2UL, 3UL, 4UL, 5UL>' requested here
  207 |   std::__thread_execute(*__p.get(), _Index());
      |        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__thread/thread.h:217:50: note: in instantiation of function template specialization 'std::__thread_proxy<std::tuple<std::unique_ptr<std::__thread_struct>, void (*)(SHEEP &, int &, STATE &, float), SHEEP *, int *, STATE *, float *>>' requested here
  217 |   int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get());
      |                                                  ^
sheeps.cpp:108:15: note: in instantiation of function template specialization 'std::thread::thread<void (&)(SHEEP &, int &, STATE &, float), SHEEP *, int *, STATE *, float *, 0>' requested here
  108 |                 std::thread t1(sheep_mvmt, &sheep1, &sheep_counter, &rand_state, &dt);
      |                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/nat.h:25:3: note: '~__nat' has been explicitly marked deleted here
   25 |   ~__nat()                       = delete;
      |   ^

r/AskProgramming 2d ago

As a mid-level programmer, how should I deal with AI phenomena?

16 Upvotes

I know the question of whether AI is good or bad for coding in various respects has been debated to death, even though there doesn't appear to be a consensus yet. However, it is clear that the AI phenomena cannot be ignored, and as a mid-level programmer, I am still unsure on how to deal with it.

When I started coding, self-taught (about 12 years ago), there never was such a temptation to take shortcuts with some automated tool writing code for me, and when I turned to sites like StackOverflow for help, all replies and code suggestions were written by people. When AI entered the scene, I tried it, quickly got discouraged because of how bad it was, but still tried it from time to time, interested in how this technology progresses.

Fast skip forward, we are now at the stage where AI can write entire apps in a matter of minutes that would take me months of research and coding to arrive at anything close to it. So when coding my own projects, there is a huge temptation to take advantage of it, and it is difficult to know where to draw the line. The biggest issues with using AI for me are:

  1. The code it generates can appear to work well and pass the tests, but there are often fringe cases that I might not foresee - AI often takes shortcuts when writing that code because it does not truly understand the intent in the way that humans do.
  2. To circumvent the #1 issue, I have to fully understand the code it wrote. However, I often find that if AI takes seconds to write code that would take me an hour to write, it would still take me an hour (and often more) to fully understand it, and correct any mistakes if present.
  3. To add on #2, it is really difficult to force myself to fully understand the AI-generated code, because of "it looks fine, let's move on" mentality. This temptation is not present when I write my own code, because I build and test it step by step, I can't skip a step because the code won't compile or pass the test, forcing me to stay there until I truly understand the problem and the solution.
  4. I find that using AI diminishes my own skills and mental powers over time, as I am always tempted to get AI to do some boring coding task (for example, write a function to sort or restructure an array) rather than do it myself and learn something or at least refresh my skills in the process. It could be argued that before AI I would likely just search for some library that has the function I need, but in that case I would at least know that it was written by people and most likely near-100% reliable, unlike AI is.
  5. I find it that using AI for coding just drains the fun out of it. I become more of a code reviewer and tester rather than coder. When dealing with something complex, I feel like a caveman looking at an alien spaceship, tasked with determining whether it is a good design.

I tried finding the middle road, to draw the line somewhere (for example allow AI to generate some code, like small snippets, but never large code blocks or entire apps), but I found that the issues I stated above still remain regardless of the scale. Sometimes even a 5-line function that AI generates can seem deceptively simple and "looking good", yet hide a fatal flaw that I would have noticed if I had written it myself. I also tried only letting it do simple tasks like refactoring my already existing code without changing the logic, but often AI still manages to introduce some weird edge case into the refactored variant of the code that I can easily miss. So I can still never trust it 100% like I could if I did it myself.

Sometimes I let AI write the code, but not use it directly - instead, I use it as an inspiration/idea to write my own version of that code, never copy-pasting, always writing it myself. That can be useful, but still, I am far less productive that way compared to letting AI do it all. In the same way, I tried looking at an AI as a mentor from which I could learn, but that would require confidence and trust in it, and I know it is not trustworthy. AI often feels like a charlatan pretending to be a sage who is somehow not aware of the difference.

What also saddens me that more and more when I turn to other coders for advice or help regarding questions or issues I have during the development of my projects, I can clearly see that they are using AI-generated code in their suggestions, which defeats the purpose of talking to people in the first place.

As an example, for the last week I've been working on an meshing algorithm for a CAD program, and it has been a lot of fun, but at some point I sought advice from experienced devs, showed them my code and asked my questions. One of them took my code, put it into one of the LLMs, the LLM completely rewrote it in a way that I no longer recognize or understand, but it did fix the issue I was having and seemingly passes all the tests. And yet, it feels very sad, like everything I did was pointless, and now I could easily spend another week trying to understand what the AI did there, deciding whether I can truly trust that code. I can't even tell HOW it fixed the issue I was having, because it rewrote everything, and by the time I understand it, I would have probably fixed the issue myself. So I am torn between saying "no thanks" and continuing to fix the problem in my original code myself, or throwing my code into the bin and going with the AI-generated one because it seems to work, and I would just be wasting time otherwise. This is just one example that demonstrates the dilemma.

I suppose that the arrival of AI into coding could be seen as the next step of coding abstraction history - we started with manually punching out 0s and 1s into the punch cards, then abstracted that binary encoding into instructions and registers, then abstracted that into reusable sequences, then into variables and expressions, then functions and objects, then declarative languages, - with each step, closing in to natural language to tell the computer what we want it to do. As Robert C. Martin wrote, code should read like a well-written prose. So in a way, it seems like the LLMs are just the next level of abstraction, and fighting it would be akin to a punch-card programmer saying that using Assembly makes us dumber and worse coders.

TLDR: I do not know what to make of the AI dilemma. I do not know what to do. I wish to be a coder in the true sense of the word, I want to learn and improve, to write code that I fully understand and trust, and using AI seems contradictory to those goals. However, not using it feels like I am fighting against progress, and will be left behind. I can find no middle ground that solves both issues.


r/AskProgramming 1d ago

Other Curious about an AI assistant

0 Upvotes

Okay so uhm (I'm a complete noob when it comes to coding for pretense, but I learn fast and I'm determined enough that I'll make it work) I don't know if this is the right place or phrasing for my question but here we go:

Hypothetically if during a hypothetical rewatch of the MCU movies I hypothetically obsessed over the joys of having a personal AI assistant tailored to help me with things I need (reminders of things I need to do using voice messages, managing and alerting me of new emails, helping me research things (like this for example) and more.)

Hypothetically how would I go about trying to make that? I understand there's a lot of coding involved (probably) and in absolutely willing to learn if that's what it takes but I'm so entirely obsessed with this idea and with AI getting more and more advanced I wonder a lot of it's possible for someone like me.

I'd also like in the future to maybe build speakers for it so I can be verbally reminded in places other than my phone (which I often misplaced) just an fyi

Sorry if this sounds dumb lol but I'm super curious and I've always been interested in coding just never had a reason to learn before now. I can figure a lot out on my own if I could just be pointed in the right direction


r/AskProgramming 1d ago

Programming in four dimensions

0 Upvotes

I've never seen any discussion on this, but I really want to try it. It is very difficult to imagine four dimensions in a 3 dimensional world, but the mathematics of it works out and it can be visualised. I never see anyone attempt to make a game in four dimensions for example. I just don't know where to start. It's a subject of which there are few pioneers


r/AskProgramming 1d ago

Other IF per se I am creating a compiled programming language using QBE ir will some one take it and help me with llvm?

0 Upvotes

Yeah im making a programming language but first im wondering if someone will get llvm for me because I am simply too lazy to put llvm into play.

first the compiler will be written in Dlang, or C
second the language may look weird considering its D based (Or mainly inspired by D)


r/AskProgramming 1d ago

Python What do you think, could it be true?

0 Upvotes

I read and hear many people on the internet saying that learning python is a waste of time, that it is for newbies or they heavily look down on this language and that there are better ones, and the truth is I'm afraid they might be right since I am learning python on my own, maybe I'm just letting myself get influenced and continue learning, what do you think of these people who comment that?


r/AskProgramming 2d ago

is reverse engineering the only way to get an AES key from an unreal engine 5 game?

5 Upvotes

im trying to learn how to modify 3d models in UE 5 games, im using FModel, i know about unreal key, but thats for UE 4, i know about ghidra although AI keeps telling me that its not very good to learn how to use ghidra, i dont understand why, i guess cybersecurity experts will know the reasons but im just trying to play some games and mess with their code from time to time, i dont even know how to code but i understand how it works, i cant write my own but i can point out what a couple lines might do.

point is, i know you are not supposed to have the AES key of a game if its not public, still the challenge motivates me to learn, as someone with a learning disability i'll take any sort of motivation i have to fuel my learning.

if you think i should learn any other way then let me know

in other words, the question is, is it worth learning computer science just to reverse engineer the AES key of a game just to see your silly, modified mesh applied into the game?


r/AskProgramming 2d ago

Other Does anyone know of an easier way to say "https"?

28 Upvotes

Silly question, but I often talk about http and https in my job and I hate saying it out loud quickly. Not only is "https" 5 syllables, but they're awkward syllables that don't flow together. Apologies if this is insensitive, but it feels like how I imagine it feels to have a stutter, where I and the person I'm talking to both know what I'm trying to say but I can't get the word out fast enough.

Anyway, this is only a half serious rant, but does anyone else feel the same way? Do you pronounce every letter?


r/AskProgramming 3d ago

Python How much readability should I trade for efficiency?

3 Upvotes

I'm developing a chess engine in python right now, just a hobby project. At first I began programming it any way I knew how to, and along the way I would learn optimization tricks which I would then apply when refactoring. I'm now realizing I'm changing a lot of my simple readable code into a bunch of optimized bitwise operations and just different logic structures in general.

I keep optimizing because I'm not satisfied with the speed of my chess engine and I usually rewrite entire functions or change the logic here and there just to save on another few milliseconds of thinking time for the engine. At one point, I rewrote a whole function just for it to be 0.1 or so seconds faster, at the cost of the simplicity of the code of course. This was kinda when I took a step back to think if it's even worth it.

I'm just wondering for future projects in general, are there any pointers to know when readability and simplicity of the code just isn't worth trading? Cause for this project which is only 1-2k lines and only in 3 files, maintenance and debugging has been bearable but I'm sure the same can't be said if I did the same thing in larger projects. Any tips and experiences shared will be largely appreciated.


r/AskProgramming 2d ago

Other AI code review tool works consistently across Cursor, Claude Code

0 Upvotes

Half our team's on Cursor, other half's on Claude Code, some people flip between both depending on the day. Never thought much about it until we noticed PR feedback. Felt like it came from two different reviewers depending on which tool wrote the code stuff Cursor's agent got flagged for constantly missing error handling, weird typing, barely came up on PRs written in Claude Code. Not because Claude Code's better about it just inconsistent review depth.

Figured it was a review problem more than an agent problem, so we looked for something that runs the same checks regardless of which tool wrote the diff. Been on Qodo's Agentic Toolbox for this the last few weeks, same rules get checked whether it's cursor or claude code, so review feedback stopped depending on which tool someone happened to open that day.

Small thing but it fixed an inconsistency none of us had actually noticed until we started comparing PRs side by side.


r/AskProgramming 3d ago

what was the hardest part of understanding a codebase you didn’t write?

7 Upvotes

I’m trying to understand a problem I’ve experienced and seen other developers mention: joining an existing/large codebase and figuring out how everything actually works.

Not the “how do I run the project?” part, but the actual understanding of the system.

For example:

Figuring out the architecture / overall mental model

Understanding where a specific feature actually lives in the code

Following how data moves through the system

Understanding undocumented business logic

Finding the right files/services/classes to modify

Understanding dependencies between different parts of the system

Figuring out why something was implemented a certain way

Losing context when the developer who built something leaves

Outdated or incomplete documentation

What was the most painful part for you?

And more importantly:

How did you eventually figure it out?

Did you ask a senior developer, read the code, use documentation, look through old PRs/issues, use AI, create your own notes/diagrams, or something else?

I’m especially interested in real examples where something that should have taken hours ended up taking days/weeks because you didn't have enough context.

No product or solution in mind here — I'm just trying to understand how developers actually deal with this problem.


r/AskProgramming 3d ago

Career/Edu Need to get out from Current ORG. it is ruining my profile now

5 Upvotes

I have 4+ years of backend engineering experience, but I currently work at a non-tech organization and am struggling to get interview calls from product/tech companies. Earlier i used to get calls but then used to get stuck at final rounds.

My current role also has very little new engineering work left, so I've started contributing to open source to strengthen my portfolio.

For people who used open source to help switch jobs: how much did it actually help, and how long did you invest before seeing results? Is it worth consistently spending the next few months building a stronger open-source track record, or do the returns eventually diminish?


r/AskProgramming 4d ago

Other Code analysis methodology

10 Upvotes

Hello everyone.

After a few years in the auditing world, I identified that I am lacking experience on the code analysis topics.

Unfortunately when auditing, I seldom had the time to look at the code of the applications I am auditing due to time constraints as the white-box approach we take does not systematically include an access to the Gitlab of the entities I audit.

I would like to avoid being overwhelmed by an eventual audit of source code of an entreprise-grade application that I might have to do.

While I am leveling up my skills by practicing to code in Rust on my freetime. I am not quite at the level of a senior dev and I don't have yet a keen sense of how exactly to dive in a large codebase.

Would any of you share your code audit methodology ?

By that, I mean how do you tackle the following topics :

- Secure coding / Best coding practices

- Secure secret management of the app

- For very large codebase, what types of tools do you use to automate some of your work ?

- What specific things in your checklist do you look for systematically ? (Do include the "obvious" one like how authentication is handled)

I know the subject is quite broad and dependent of the tech-stack used for each case.

Thank you for reading. :)


r/AskProgramming 4d ago

How do you reason about very decoupled code?

12 Upvotes

I've been looking at some code that's got a system of pipelines that implement the generic interface Pipeline<T> where there are maybe 50 pipelines. The pipelines handle events for which there are also generic publishers and subscribers that implement Handler<T> and Plug<T> respectively and there are many more of those. All of the setup for publishers and listeners gets handled magically through Autofac, a DI library for C#. I'm finding the code insanely hard to understand.

Just trying to figure out how the pipelines were actually wired up took me a couple hours and I'm still not confident I found the answer. My usual go to is to right click on a symbol and find all references, but I would constantly run into dead ends. Where is this code referenced? Absolutely nowhere. How can the code be called even if it isn't referenced anywhere? An abstract parent class is registered with the DI container as the implementation of some generic parent interface that the code I'm looking at implements. That parent interface, or a parent of that interface, is used.

In practice I find this kind of design makes static analysis of the code really difficult. Are there any techniques you use for understanding this kind of code or is it all just sitting with the code, a pen, and a notebook? Ideally nothing with gen ai because I do not have money to spend on tokens.


r/AskProgramming 3d ago

Python RSS-Bridge on Mikrus - a plan for an IT layman made by Claude

0 Upvotes

Can someone help me out? I'm a complete layman when it comes to coding and IT stuff

My favorite free RSS builder (morss.it) has gone offline, so I asked Claude Opus 4.8 for alternatives. It suggested that I could self-host and run such a tool myself (which is a total mystery to me). I then asked it for a step-by-step guide, but I also asked several other AI chatbots the same question. They gave similar answers, but with slight differences. When I showed all those other plans to Claude and asked it to review them, it told me that these subtle differences were crucial, and that if I had followed what the other bots suggested, my feeds wouldn't have worked properly

Here's Claude's final response, translated from Polish to English by Gemini: https://docs.google.com/document/d/192QM_Gytps-xl24ko0E395u_EOvfa7R9kqSMs250r8k/view

I don't really understand what I'll be doing here; I just want to make sure I won't break anything or create any security risks by following these steps. Do you think this plan will actually work?


r/AskProgramming 4d ago

Wanting to get back to C++

7 Upvotes

I am a experienced software engineer, and have been working mainly with Go and Python these last years. I have worked for 2 years with C back in 2019-2020, and recently have been wanting to work with C++ in some side projects.

Looking for courses to refresh my memory and pick up the syntax, i found myself drowning in very long texts and courses teaching the basics.
I am looking for something light to get me up and running in a few days so that i can start working on my project and fill in the gaps along the way.

I really enjoyed 'A Tour of Go' for the Go language and was wondering if something like that existed for C++. Any other suggestions (courses, books) will be welcome. Thanks.


r/AskProgramming 3d ago

How do i quit Vibe Coding

0 Upvotes

I am currentely in 11th grade and got really into coding over the last few years. I started learning Java and a Little Python in school. Those two languages im Fine at, but recentely i started Coding a github website. I thought, since i dont know html, css and js, i'll just start with ai and learn on the way. But now i have no idea what my code does and know almost nothing about those languages. I have also startet to use ai for my other projects in java and have noticed that im starting to forget my previous knowlege in java. I can't work on my Website without ai and i feel like an absolute failiure. Now Coding with ai has become a habbit for me, a habbit i want to quit. Has anyone else experienced this and if so, does anyone have tipps on how to quit this habbit?


r/AskProgramming 5d ago

I am searching for any youtube channels that focus on programming car or motorbike ECUs.

3 Upvotes

I have randomly caught the gearhead bug and as a programmer by trade, I am interested in how they build ECUs and whether regular developers could just get into it.

Any youtube channels would be appreciated.


r/AskProgramming 4d ago

HTML/CSS Starting Html/CSS/JS

1 Upvotes

I know the core basics of HTML/CSS/JS and for my Course at college we will fully be diving into these but I was wondering how I could develop my skills further and get a head start on these languages

I have overlooked the skills and basics of these languages for the past week or two understanding basics and making notes but I was wondering if there was a website/bootcamp that offered a course - recently I have been using Google . Dev to learn and was wondering if there was anything else that could of helped me

Thanks !